I'm trying to read this captcha. I'm using ImageMagick to treat the image and Tesseract to interpret it. But without success. Could anyone help me?
convert captcha.png -fuzz -50% -transparent black -fuzz 15% -fill black -opaque 'rgb(16,128,176)' -fuzz 40% -fill white +opaque blue -colorspace gray captcha_clean.png
tesseract --psm 7 captcha_clean.png stdout
Should I use Python? Maybe you have a Python working example?
UPDATE:
Here is how to detect a black horizontal line and replace it with yellow color
img = cv2.imread("JgqK4.png")
(h, w) = img.shape[:2]
img = cv2.resize(img, (w*2, h*2))
blackMin = np.array([0, 0, 0],np.uint8)
blackMax = np.array([0, 0, 0],np.uint8)
HSV = cv2.cvtColor(img,cv2.COLOR_BGR2HSV)
mask = cv2.inRange(HSV, blackMin, blackMax)
SE = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (8,9))
mask = cv2.dilate(mask, SE, iterations=1)
img[mask>0] = [0,255,255]
cv2.imwrite("JgqK4_2.png", img)