Commit 0926cc2f authored by Niels-Oliver Walkowski's avatar Niels-Oliver Walkowski
Browse files

include Contrast class in BivariateSequence class

parent cd37ece1
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment