Platforms to show: All Mac Windows Linux Cross-Platform
TessEngineMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | OCR | MBS OCR Plugin | 21.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This replaces the older TesseractMBS class.
The new class is for Tesseract 4.x and 5.x versions.
- 2 events
- 9 properties
- property DeadlineMSecs as Integer
- property Handle as Integer
- property InitLanguagesAsString as String
- property InputImage as Picture
- property InputName as String
- property MeanTextConf as Integer
- property PageSegMode as Integer
- property Resolution as Integer
- property ThresholdedImage as Picture
- shared property Version as String
- 31 methods
- method AllWordConfidences as Integer()
- method AnalyseLayout as TessPageIteratorMBS
- method Clear
- method Constructor
- method GetAltoText(PageNumber as Integer) as String
- method GetAvailableLanguages as String()
- method GetBoolVariable(Name as String, byref value as boolean) as Boolean
- method GetBoxText(PageNumber as Integer) as String
- method GetDoubleVariable(Name as String, byref value as Double) as Boolean
- method GetHOCRText(PageNumber as Integer) as String
- method GetIntVariable(Name as String, byref value as Integer) as Boolean
- method GetLoadedLanguages as String()
- method GetLSTMBoxText(PageNumber as Integer) as String
- method GetStringVariable(Name as String) as String
- method GetText as String
- method GetTsvText(PageNumber as Integer) as String
- method GetUNLVText as String
- method GetWordStrBoxText(PageNumber as Integer) as String
- method Initialize(dataPath as String, language as String, Mode as Integer = 3, configs() as String = nil) as Boolean
- method IsValidWord(Word as String) as Boolean
- method PrintVariablesToFile(File as FolderItem) as Boolean
- method PrintVariablesToPath(Path as String) as Boolean
- method Recognize as Boolean
- method ResultIterator as TessResultIteratorMBS
- method SetImage(pic as picture)
- method SetImageData(Data as MemoryBlock)
- method SetImageData(Data as String)
- method SetImageFile(File as FolderItem)
- method SetImageFile(Path as String)
- method SetRectangle(Left as Integer, Top as Integer, Width as Integer, Height as Integer)
- method SetVariable(Name as String, Value as String)
- 7 shared methods
- shared method LibraryLoaded as Boolean
- shared method LibraryLoadError as Integer
- shared method LibraryLoadErrorMessage as String
- shared method LoadLibrary(file as folderitem) as boolean
- shared method LoadLibrary(path as string) as boolean
- shared method SetCurrentWorkingDirectory(path as folderitem) as boolean
- shared method SetCurrentWorkingDirectory(path as String) as boolean
- 18 constants
OCR Engine Running Modes
Constant | Value | Description |
---|---|---|
kOcrEngineModeDefault | 3 |
Specify this mode when calling init_*(), to indicate that any of the above modes should be automatically inferred from the variables in the language-specific config, command-line configs, or if not specified in any of the above should be set to the default kOcrEngineModeTesseractOnly. |
kOcrEngineModeLstmOnly | 1 |
Run just the LSTM line recognizer. |
kOcrEngineModeTesseractLstmCombined | 2 |
Run the LSTM recognizer, but allow fallback to Tesseract when things get difficult. deprecated |
kOcrEngineModeTesseractOnly | 0 |
Run Tesseract only - fastest; deprecated |
Page Layout
Constant | Value | Description |
---|---|---|
kPageSegModeAuto | 3 |
Fully automatic page segmentation, but no OSD. |
kPageSegModeAutoOnly | 2 |
Automatic page segmentation, but no OSD, or OCR. |
kPageSegModeAutoOsd | 1 |
Automatic page segmentation with orientation and script detection. (OSD) |
kPageSegModeCircleWord | 9 |
Treat the image as a single word in a circle. |
kPageSegModeOsdOnly | 0 |
Orientation and script detection only. |
kPageSegModeRawLine | 13 |
Treat the image as a single text line, bypassing hacks that are Tesseract-specific. |
kPageSegModeSingleBlock | 6 |
Assume a single uniform block of text. (Default.) |
kPageSegModeSingleBlockVertText | 5 |
Assume a single uniform block of vertically aligned text. |
kPageSegModeSingleChar | 10 |
Treat the image as a single character. |
kPageSegModeSingleColumn | 4 |
Assume a single column of text of variable sizes. |
kPageSegModeSingleLine | 7 |
Treat the image as a single text line. |
kPageSegModeSingleWord | 8 |
Treat the image as a single word. |
kPageSegModeSparseText | 11 |
Find as much text as possible in no particular order. |
kPageSegModeSparseTextOsd | 12 |
Sparse text with orientation and script det. |
This class has no sub classes.
Some examples using this class:
Blog Entries
- MBS Xojo Plugins in version 22.3
- News from the MBS Xojo Plugins Version 21.3
- MonkeyBread Software Releases the MBS Xojo Plugins in version 21.3
- Introducing Tesseract 4 to Xojo
Release notes
- Version 22.3
- Updated TessEngineMBS class to work with tesseract 5.1.
The items on this page are in the following plugins: MBS OCR Plugin.
TessChoiceIteratorMBS - TesseractChoiceIteratorMBS