As shown in the example picture below, if the background and the color of the object to be obtained are similar, What would be good to use as a preprocessing before proceeding with binarization?
img = cv2.imread(‘image.jpg’, cv2.IMREAD_GRAYSCALE)
ret, binary = cv2.threshold(img, 127, 255, cv2.THRESH_BINARY)
I used the code below, but it’s hard to separate.
What is the pre-processing method for neat binarization?