Final assignment: Word recognizer

Make a recognizer recognize.py that performs word recognition.

Input/output

When wordimage.ppm is a rectangular image cut out from a KdK page and contains the handwritten word "appeltaart", then:
python recognize.py wordimage.ppm
results in printed text like:
appeltaart 0.10
appelflap 0.25
appelsap 0.30
citroentaart 0.40
...
where each line contains a possible transcription and a score. The lower the score, the more likely the program considers this option to be the right one. The list should be sorted such that the top position is the most likely result (lowest score). The minimum number of lines in this list is 1, the maximum is 5. The scores are neglected during testing.

Framework

You could use or modify some files from /student/hwr/framework:

Testing options

For testing, the images will be cut like option 1, or if you like, option 2:

Option 1

Like the green rectangle:

Option 2

Like the red rectangle:

In this case, your program will be called with the shear angle of the word:
python recognize.py wordimage.ppm 45
This number will probably be equal to 45 in most cases, but not necessarily always. Indicate in a Readme file which option you would like your program to be tested with. By default, option 1 will be used. The blue parallelograms are defined as described in Assignment 1.

Requirements

Criterion for scoring

Highscore

Last modified: May 24, 2007 by Axel Brink.