diff --git a/samples/python/tutorial_code/imgProc/anisotropic_image_segmentation/anisotropic_image_segmentation.py b/samples/python/tutorial_code/imgProc/anisotropic_image_segmentation/anisotropic_image_segmentation.py index a8a9ccb3cc..3a72ffebd1 100644 --- a/samples/python/tutorial_code/imgProc/anisotropic_image_segmentation/anisotropic_image_segmentation.py +++ b/samples/python/tutorial_code/imgProc/anisotropic_image_segmentation/anisotropic_image_segmentation.py @@ -74,7 +74,7 @@ imgCoherency, imgOrientation = calcGST(imgIn, W) ## [thresholding] _, imgCoherencyBin = cv.threshold(imgCoherency, C_Thr, 255, cv.THRESH_BINARY) -_, imgOrientationBin = cv.threshold(imgOrientation, LowThr, HighThr, cv.THRESH_BINARY) +imgOrientationBin = cv.inRange(imgOrientation, LowThr, HighThr) ## [thresholding] ## [combining]