Dienstag, 10. Februar 2015

Handle captchas with unix command line tools imagemagick and tesseract-ocr. This is the result of playing around in lunch break.

This is captcha i tried to get the text value of. Therefor i once pushed it through imagemagick to get the tiny fractals away.

convert securimage_show.php.png -fuzz 40% -fill red -opaque white result




sudo tesseract result -psm 8  captcha_txt

Tesseract is able to read the second image and writes the text uwCzDv to file captcha_txt.