0
votes

I have the follwing image where i have to clean the picture as much as i can. Removing the small dots around the names. I made the following processing but without big results

blur = cv2.medianBlur(gray_image, 3)
ret3, th3 = cv2.threshold(blur, 120, 255, cv2.THRESH_BINARY_INV  + cv2.THRESH_OTSU)

kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (3, 3))
thresh = cv2.morphologyEx(th3, cv2.MORPH_OPEN, kernel)
skimage.io.imsave('../output/processing/' + os.path.basename(image),thresh)

enter image description here what can i do ?

1
You can start by sharing the original image. - Jeru Luke

1 Answers

0
votes

Instead of using simple thresholding, you can use adaptive Gaussian thresholding which is robust against noise and may give better results than Otsu's binarization, assuming your noise is the same intensity as your desired text.