Can someone help me remove these unnecessary pixels on my binary image? I already tried setting all values to 0 and 255 only, yet it's still the same.
Instead of white, I used gray value for the picture so that the other unnecessary pixels will be more visible.
Here is just a simple code snippet on the processing of the image..
rgb = cv2.imread('test.jpg',0)
ret,otsu = cv2.threshold(rgb,220,255,cv2.THRESH_BINARY)