Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cittena
cittena
Commits
0926cc2f
Commit
0926cc2f
authored
Dec 22, 2016
by
Niels-Oliver Walkowski
Browse files
include Contrast class in BivariateSequence class
parent
cd37ece1
Changes
1
Hide whitespace changes
Inline
Side-by-side
itten/views.py
View file @
0926cc2f
...
...
@@ -286,9 +286,13 @@ class BivariateSequence(View):
else
:
maxs
.
append
(
int
(
total_value
/
sum
(
hist_maxs
))
+
127
)
# peak strategy
else
:
hist_value
=
cv2
.
calcHist
([
img_hsv
],
[
self
.
_channel
],
None
,
[
256
],
[
0
,
256
])
ctrst_cls
=
self
.
_get_ctrst_cls_name
(
self
.
_contrast
)
ctrst_img
=
ctrst_cls
(
img
).
ctrst
hist_value
,
_
=
np
.
histogram
(
ctrst_img
.
flatten
(),
bins
=
self
.
_bins
,
range
=
(
0
,
256
))
peaks
=
peakutils
.
indexes
(
hist_value
.
flatten
(),
thres
=
0.2
,
min_dist
=
15
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment