The page may be slightly changed in the future. Be sure to refresh (F5) right before you start.
The goal of this assignment is to make a generator for word zone hypotheses.
A word zone hypothesis is a set of coordinates defining a region (zone) that possibly contains a word. This can be the first step of a word-based handwriting recognizer. To save you some hassle, the line zones are provided.
Make a word zone hypothesis generator. Given an image and a file describing the line zones, output a new file describing an abundance of word zones.
The command to call the program should be like this:
python zonehypo.py input.ppm input.words output.words
where:
The input and output files with extension .words
have a format as defined here: .words file description. Reading and writing such files is made easy by the provided wordio.py.
Make sure that the C++ part of your code compiles with the command 'make'. This is required.
Submit your program using Nestor's Digital Dropbox.
cp -r /home/student/hwr/assignment2 ~/hwr/
cp -r /home/student/hwr/wordsfile-editor ~/hwr/
/home/student/hwr/lines-train
/home/student/hwr/words-train
python wordsfile-editor.py imagefile wordsfile.words
chmod u+w *.words
python generate_wordzones.py input.ppm input.words output.words
python example-cocos.py input.pgm output.pgm
assignment2/
File | Description |
cocos_arnold/ | C++ routines for fast connected components labeling by Arnold Meijster (no need to look inside). |
cocoslib.cpp | Procedures to compute connected components in document images (uses cocos_arnold/). |
cocoslib.h | Describes what you can do with cocoslib.cpp. |
cocoslib.i | Interface between C++ and Python for cocoslib. |
example_cocos.py | Provides a quickstart for using connected components. |
generate_wordzones.py | Illustrates reading an image, reading a .words file with lines and writing a .words file with random word zones. |
pageview.py | Viewer component, used by word-annotation.py. |
pamImage.cpp@ | Link to file in toolbox/ |
pamImage.h@ | Link to file in toolbox/ |
pamImage.i@ | Link to file in toolbox/ |