ImageMagick - how to clean captcha?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,145
Reaction score
10,489
I'm trying to use ImageMagick to clean a type of captcha so that I can use OCR on it. This is the captcha:

Capture.PNG


If I run this command:

Code:
magick convert capture.png -fuzz 20% -transparent black capture1.png

I get this:

858585.PNG


There's 2 problems with it.

One is that the image is still not good enough to be read by Tesseract/OCR. I guess all the dots and the lines are messing it up, plus the letters are kinda blurry.

Can this be cleaned up better/smoother/sharper?


---


The second thing is that I actually took a screenshot of the image that ImageMagic created (capture1) for my second screenshot above. If I try to upload the actual "capture1" image to skype, discord, or here, it still shows the same picture as the original photo.

This:

capture1.png


This isn't necessarily a problem, just thought I'd mention it...
 
I downloaded and installed Tesseract, using this -

I tried it on this image and it worked, it read it correctly:

asd.PNG


Then I tried it on this one, but it failed:

3331.PNG


I cleaned it up, using Paint like a true professional. Still nothing:

3332.PNG


I cleaned it up a bit more. Going deep cleaning within the letters with the eraser, even with the pencil. And this one worked!

3335.PNG


So now I just need ImageMagick to take my original image and convert it into something that looks like the last image I shared.

Come on guys, help a brother out. If you don't I'll leave this forum forever! :D @xReminisce @Willyfish
 
Back
Top