Click or drag to resize

OcrResultIterator Class

Class to iterate over tesseract results, providing access to all levels of the page hierarchy.
Inheritance Hierarchy
SystemObject
  Patagames.OcrOcrResultIterator
    Patagames.OcrOcrMutableIterator

Namespace:  Patagames.Ocr
Assembly:  Patagames.Ocr (in Patagames.Ocr.dll) Version: 4.2.411
Syntax
public class OcrResultIterator : IDisposable

The OcrResultIterator type exposes the following members.

Properties
  NameDescription
Public propertyChoiceIterator
Gets instance of OcrChoiceIterator class.
Public propertyHandle
Handle to internal tesseract iterator
Public propertyPageIterator
Gets instance of OcrPageIterator class.
Public propertySymbolIsDropcap
Returns true if the current symbol is a dropcap. If iterating at a higher level object than symbols, eg words, then this will return the attributes of the first symbol in that word.
Public propertySymbolIsSubscript
Returns true if the current symbol is a subscript. If iterating at a higher level object than symbols, eg words, then this will return the attributes of the first symbol in that word.
Public propertySymbolIsSuperscript
Returns true if the current symbol is a superscript. If iterating at a higher level object than symbols, eg words, then this will return the attributes of the first symbol in that word.
Public propertyWordFontId
Gets the font id.
Public propertyWordFontName
Gets a font name of the word
Public propertyWordIsBold
Check whether a font of the word is bold.
Public propertyWordIsFromDictionary
Returns true if the current word was found in a dictionary.
Public propertyWordIsItalic
Check whether a font of the word is italic.
Public propertyWordIsMonospace
Check whether a font of the word is monospace.
Public propertyWordIsNumeric
Returns true if the current word is numeric.
Public propertyWordIsSerif
Check whether a font of the word is a serif font.
Public propertyWordIsSmallCaps
Check whether a font of the word have a small caps
Public propertyWordIsUnderlined
Check whether a font of the word is underlined.
Public propertyWordPointSize
Gets the point size of the font. Pointsize is returned in printers points (1/72 inch.)
Public propertyWordRecognitionLanguage
Return the name of the language used to recognize this word.
Top
Methods
  NameDescription
Public methodCopy
ResultIterators may be copied! This makes it possible to iterate over all the objects at a lower level, while maintaining an iterator to objects at a higher level.
Public methodDispose
Releases all resources used by this OcrResultIterator
Public methodGetConfidence
Returns the mean confidence of the current object at the given level. The number should be interpreted as a percent probability. (0.0f-100.0f)
Public methodGetUtf8Text
Get the UTF-8 encoded text string for the current object at the given level.
Public methodNext
Moves to the start of the next object at the given level in the page hierarchy in the appropriate reading order.
Public methodWordFontAttributes
Get the font attributes of the current word. If iterating at a higher level object than words, eg textlines, then this will return the attributes of the first word in that textline.
Top
Remarks
Caution note Caution
This class points to data held within the OcrApi class, and therefore can only be used while the OcrApi class still exists and has not been subjected to a call of Init, SetImage, Recognize, Clear, Release or anything else that changes the internal PAGE_RES.
OcrResultIterator adds text-specific methods for access to OCR output.
See Also