Platforms to show: All Mac Windows Linux Cross-Platform

Back to TesseractResultIteratorMBS class.

TesseractResultIteratorMBS.Begin

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Moves the iterator to point to the start of the page to begin an iteration.

TesseractResultIteratorMBS.BoundingBox(Level as Integer, byref left as Integer, byref top as Integer, byref right as Integer, byref bottom as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the bounding rectangle of the current object at the given level.

Returns false if there is no such object at the current position.
The returned bounding box is guaranteed to match the size and position of the image returned by GetBinaryImage, but may clip foreground pixels from a grey image. The padding argument to GetImage can be used to expand the image to include more foreground pixels. See GetImage.

Coordinate system:
Integer coordinates are at the cracks between the pixels.
The top-left corner of the top-left pixel in the image is at (0,0).
The bottom-right corner of the bottom-right pixel in the image is at (width, height).
Every bounding box goes from the top-left of the top-left contained pixel to the bottom-right of the bottom-right contained pixel, so the bounding box of the single top-left pixel in the image is: (0,0)->(1,1).
If an image rectangle has been set in the API, then returned coordinates relate to the original (full) image, rather than the rectangle.

TesseractResultIteratorMBS.Confidence(Level as Integer) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the mean confidence of the current object at the given level.

The number should be interpreted as a percent probability. (0.0 - 100.0)

TesseractResultIteratorMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The private constructor.

TesseractResultIteratorMBS.IsAtBeginningOf(Level as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if the iterator is at the start of an object at the given level.

Possible uses include determining if a call to Next(kLevelWord) moved to the start of a kLevelParagraph.

TesseractResultIteratorMBS.IsAtFinalElement(Level as Integer, element as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns whether the iterator is positioned at the last element in a given level.

(e.g. the last word in a line, the last line in a block)

TesseractResultIteratorMBS.NextItem(Level as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Moves to the start of the next object at the given level in the page hierarchy, and returns false if the end of the page was reached.

NOTE that kLevelSymbol will skip non-text blocks, but all other level values will visit each non-text block once.
Think of non text blocks as containing a single paragraph, with a single line, with a single imaginary word.
Calls to Next with different levels may be freely intermixed.
This function iterates words in right-to-left scripts correctly, if the appropriate language has been loaded into Tesseract.

TesseractResultIteratorMBS.SymbolIsDropcap as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
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.

TesseractResultIteratorMBS.SymbolIsSubscript as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if the current symbol is a subscript.

If iterating at a higher level object than symbols, e.g. words, then this will return the attributes of the first symbol in that word.

TesseractResultIteratorMBS.SymbolIsSuperscript as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
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.

TesseractResultIteratorMBS.Text(Level as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the text string for the current object at the given level.

TesseractResultIteratorMBS.WordFontAttributes(byref bold as boolean, byref italic as boolean, byref underlined as boolean, byref monospace as boolean, byref serif as boolean, byref smallcaps as boolean, byref pointsize as Integer, byref fontid as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the font attributes of the current word.

If iterating at a higher level object than words, e.g. textlines, then this will return the attributes of the first word in that textline.
The actual return value is a string representing a font name.
Pointsize is returned in printers points (1/72 inch.)

Some examples using this method:

TesseractResultIteratorMBS.WordIsFromDictionary as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if the current word was found in a dictionary.

TesseractResultIteratorMBS.WordIsNumeric as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OCR MBS OCR Plugin 12.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns true if the current word is numeric.

The items on this page are in the following plugins: MBS OCR Plugin.


The biggest plugin in space...