Last modified: May 02, 2012
Contents
In module gamera.toolkits.greekocr.greekocr
Provides the functionality for GreekOCR. The following parameters control the recognition process:
- cknn
- The kNNInteractive classifier.
- mode
- The mode for dealing with accents. Can be wholistic or separatistic.
Loads the training data. Signature:
load_trainingdata (trainfile)
where trainfile is an Gamera XML file containing training data. Make sure that the training file matches the mode (wholistic or separatistic).
Returns a list of segmented CCs using the selected segmentation approach on the given image. This list can be used for creating training data. Signature:
get_page_glyphs (image)
where image is a Gamera image.
Recognizes the given image and returns the recognized text as Unicode string. Signature:
process_image (image)
where image is a Gamera image. The recognized text is additionally stored in the GreekOCR property output, which can subsequently be written to a file with save_text_unicode or save_text_teubner.
Make sure that you have called load_trainingdata before!
Saves the following images to the current working directory:
Stores the recognized text to the given filename as Unicode string. Signature
save_text_unicode(filename)
Make sure that you have called process_image before!
Stores the recognized text to the given filename as a LaTeX document utilizing the Teubner style for representing Greek characters and accents. Signature
save_text_teubner(filename)
Make sure that you have called process_image before!