Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How does Pyramid Mean Shift Filtering helps in finding better threshold?

shifted = cv2.pyrMeanShiftFiltering(image, 21, 51)

convert the mean shift image to grayscale, then apply Otsu's thresholding

gray = cv2.cvtColor(shifted, cv2.COLOR_BGR2GRAY) thresh = cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY | cv2.THRESH_OTSU)

How does Pyramid Mean Shift Filtering helps in finding better threshold?

shifted = cv2.pyrMeanShiftFiltering(image, 21, 51)

convert the mean shift image to grayscale, then apply Otsu's thresholding

51) gray = cv2.cvtColor(shifted, cv2.COLOR_BGR2GRAY) thresh = cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY | cv2.THRESH_OTSU)