How I could remove these random points and lines from this captcha?
Hi, Im using a function to resize and remove the noise from the image and I'm left with this: Some code:
static string screenshot(IWebElement captchaImage)
{
Screenshot sc = ((ITakesScreenshot)captchaImage).GetScreenshot();
var img = System.Drawing.Image.FromStream(new MemoryStream(sc.AsByteArray)) as Bitmap;
img.SetResolution(800, 600);
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");
return "captcha1.png";
}
Could I use a function to remove these thin lines and dots? Thanks! It has two issues, first of all tesseract doesn't get the full text, second I get this error: Warning. Invalid resolution 0 dpi. Using 70 instead. Empty page!! Empty page!!
Captcha image after all filters:
@mvuori I'm not using this to damage any system or something. I've seen many people on this forum asking for the same type of help and they got responded. If I came here without saying it was a captcha nothing would have happened neither you would told me that.