Python OCR form scanner success!

B. Douglas Hilton doug.hilton at engineer.com
Wed May 30 23:04:45 EDT 2001


Just finished converting a mess of Perl and shell scripts to
a single Python program for a work project. It calls an external
TWAIN grabber to get a BMP file, then uses PIL to make
a pnm image. It crops out the relevant portion and then
calls GOCR ( GNU Optical Character Recognition ) to
convert to text. Finally it compares checksums and then
files or else builds a Tkinter fixup screen for manual
correction.
    This program saves me about 6 hours per week! It was
very easy to write, almost trivial, and its execution speed
is fantastic! I have begun advocating Python to our other
computer-savvy engineer for quick development projects
and he is very interested.
    Overall, I found Tkinter to be only mildly more difficult
to use than Tcl itself, excepting that Python provides so many
advantages over Tcl that it is in fact much better in the long run.
You would have to be insane to use Visual C when you could
use Python ( for Wdoze... Linux is a different critter ).
    Following up on a recent post, I am commiting to develop
mainly in Python and Ada where possible from now on, and
reverting to C or C++ only where necessary. I originally used
Perl to get the job done, but now that I have studied Python I
really doubt that I will need to use Perl much more. It was
quite trivial to covert the Perl scripts to Python code.

Python works great! Thanks CLP!

- Doug





More information about the Python-list mailing list