Page 1 of 1

Preparing for OCR

Posted: 2014-02-25T16:55:06-07:00
by riddler
Does anyone know how I could use ImageMagick to replicate the effect in the images below? I am preparing the image to be sent to an OCR engine for scanning.

http://www.scanbizcards.com/benefitquest.jpg
http://www.scanbizcards.com/benefitquest-bw.jpg

Thanks

Re: Preparing for OCR

Posted: 2014-02-25T18:00:27-07:00
by fmw42
They are both the same image!

But I think I know what you want. If on Linux or Mac or Windows w/ Cygwin, see my script, textcleaner, at the link below. Otherwise, see the IM function -lat, which is what I use in the textcleaner script. see http://www.imagemagick.org/script/comma ... ns.php#lat

try something like

Code: Select all

convert image -lat 25x25+10% result
Optionally add -colorspace gray after reading the image and before -lat.