Remove spurious small islands of noise in an image – Python OpenCV
Remove spurious small islands of noise in an image – Python OpenCV Question: I am trying to get rid of background noise from some of my images. This is the unfiltered image. To filter, I used this code to generate a mask of what should remain in the image: element = cv2.getStructuringElement(cv2.MORPH_RECT, (2,2)) mask = …