Create a bitonal image for OCR using Image Magick
Posted
by Greg
on Stack Overflow
See other posts from Stack Overflow
or by Greg
Published on 2010-05-13T23:47:29Z
Indexed on
2010/05/13
23:54 UTC
Read the original article
Hit count: 405
nice /usr/local/bin/convert -colors 2 -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg
This command worked with a really OLD version of Image Magick.
With the newest version this method produces a completely black image.
nice /usr/local/bin/convert -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg
nice /usr/local/bin/convert -colors 2 /var/www/html/uploads/pokemontest.jpg /var/www/html/uploads/pokemontestfinal.jpg
This results in a bitonal gray and black image, but it's really rough. NOT clean at all.
© Stack Overflow or respective owner