Click or drag to resize

OcrApi Methods

The OcrApi type exposes the following members.

Methods
 NameDescription
Public methodAdaptToWordStr Applies the given word to the adaptive classifier if possible
Public methodAnalyseLayout Runs page layout analysis in the mode set by PageSegmentationMode.
Public methodClear Free up recognition results and any stored image data, without actually freeing any recognition data that would be time-consuming to reload. Afterwards, you must call SetImage or GetTextFromImage before doing any Recognize or Get* operation.
Public methodClearAdaptiveClassifier Call between pages or documents etc to free up memory and forget adaptive data.
Public methodClearPersistentCache Clear any library-level memory caches.
Public methodStatic memberCreate Create handle to base APIs interface
Public methodDispose Releases all resources used by this OcrApi
Public methodDumpToPGM Dump the internal binary image to a PGM file.
Obsolete
Public methodGetAltoText Make an XML-formatted string with Alto markup from the internal data structures.
Public methodGetBoolVariable Get the value of an internal "parameter."
Public methodGetBoxText The recognized text is returned as a char* which is coded in the same format as a box file used in training.
Public methodGetComponentImages(PageIteratorLevel, Boolean, OcrBoxa, OcrPixa, Int32) Get the given level kind of components (block, textline, word etc.) as a leptonica-style Boxa, Pixa pair, in reading order.
Public methodGetComponentImages(PageIteratorLevel, Boolean, Boolean, Int32, OcrBoxa, OcrPixa, Int32, Int32) Get the given level kind of components (block, textline, word etc.) as a leptonica-style Boxa, Pixa pair, in reading order.
Public methodGetDoubleVariable Get the value of an internal "parameter."
Public methodGetHOCRText Make a HTML-formatted string with hOCR markup from the internal data structures.
Public methodGetIntVariable Get the value of an internal "parameter."
Public methodGetLSTMBoxText Make a box file for LSTM training from the internal data structures.
Public methodGetRegions Get the result of page layout analysis as a leptonica-style Boxa, Pixa pair, in reading order.
Public methodGetStringVariable Get the value of an internal "parameter."
Public methodGetStrips Get textlines and strips of image regions as a leptonica-style Boxa, Pixa pair, in reading order.Enables downstream handling of non-rectangular regions.
Public methodGetSymbols Get the symbols as a leptonica-style Boxa, Pixa pair, in reading order.
Public methodGetTextFromImage(Bitmap) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(OcrPix) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(String) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(Bitmap, Rectangle) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(OcrPix, Rectangle) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(String, Rectangle) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(Bitmap, Point, Size) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(OcrPix, Point, Size) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(String, Point, Size) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(Bitmap, Int32, Int32, Int32, Int32) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(OcrPix, Int32, Int32, Int32, Int32) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextFromImage(String, Int32, Int32, Int32, Int32) Recognize a rectangle from an image and return the result as a string.
Public methodGetTextlines(OcrBoxa, OcrPixa, Int32) Get the textlines as a leptonica-style Boxa, Pixa pair, in reading order.
Public methodGetTextlines(Boolean, Int32, OcrBoxa, OcrPixa, Int32, Int32) Get the textlines as a leptonica-style Boxa, Pixa pair, in reading order.
Public methodGetTsvText Make a TSV-formatted string with Alto markup from the internal data structures.
Public methodGetUNLVText The recognized text is returned as a char* which is coded as UNLV format Latin-1 with specific reject and suspect codes
Public methodGetUtf8Text The recognized text is returned as a string which is coded as UTF8
Public methodGetWords Get the words as a leptonica-style Boxa, Pixa pair, in reading order.
Public methodGetWordStrBoxText The recognized text is returned as a char* which is coded in the same format as a WordStr box file used in training.
Public methodInit(Languages, String, OcrEngineMode, String, String, String, Boolean) Initialize the OCR SDK library
Public methodInit(Languages, String, OcrEngineMode, String, String, String, Boolean) Initialize the OCR SDK library
Public methodInit(String, String, OcrEngineMode, String, String, String, Boolean, Boolean) Initialize the OCR SDK library
Public methodInitForAnalysePage Init only for page layout analysis.
Public methodInitLang Init only the lang model component of Tesseract.
Public methodIsValidWord Check whether a word is valid according to Tesseract's language model
Public methodPrintVariablesToFile Print Tesseract parameters to the given file.
Public methodProcessPage Turn a single image into symbolic text.
Public methodProcessPages Turns images into symbolic text.
Public methodReadConfigFiles Read a "config" file containing a set of parameter name, value pairs.
Public methodReadDebugConfigFiles Same as ReadConfigFiles(String), but only set debug params from the given config file.
Public methodRecognize Recognize the image from SetImage, generating Tesseract internal structures.
Public methodRecognizeForChopTest Variant on Recognize used for testing chopper
Public methodRelease Close down tesseract and free up all memory. Once Release() has been used, none of the other API functions may be used other than Init.
Public methodSetImage(Bitmap) Provide an image for Tesseract to recognize.
Public methodSetImage(OcrPix) Provide an image for Tesseract to recognize.
Public methodSetVariable Set the value of an internal "parameter."
Top
See Also