1

I need to extract text from these kinds of captcha images. first image second image

my code is:

img = cv2.imread('abs2.png')

#convert into grayscale
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

#removing noise
noi = cv2.medianBlur(gray,3)
custom_config = r'--oem 3 --psm 6'
pytesseract.image_to_string(noi, config=custom_config)

my output: first image and second image. Additionally, I also applied different approaches from recognize text from image and also try to apply some OpenCV related approaches but nothing seems to give me good results.

How can I improve the image to extract the string value or are there any other approaches to solve this kind of problem?

0 Answers0