I'm trying to solve captchas by OCR them with Tesseract on C#. I'm grabbing the captcha with Selenium and I apply some effects to clean the image and I end up with this that is not clean enough to read it properly.
I'm asking here if someone could help me writing an OpenCV code that could remove the lines and dots as they have different width. Thanks!
Image: https://i.imgur.com/Md5XC6G.png
Image after OpenCv changes: https://i.imgur.com/pxcxPfQ.png
var image = Resize(img, 800, 600);
image.Save("captcha.png", System.Drawing.Imaging.ImageFormat.Png);
Mat imageIn = Cv2.ImRead("captcha.png", ImreadModes.Grayscale);
Mat edges = new Mat();
Cv2.Canny(imageIn, edges, 100, 100);
edges.SaveImage("captcha1.png");
Anyway to improve it a bit more? Tesseract doesn't recognize it yet.