Tesseract class
- Inheritance
-
- Object
- ForeignInstanceStub
- Tesseract
Constructors
-
Tesseract.new({List<
String> languages = const ['eng'], PageSegMode pageSegMode = PageSegMode.auto, String? tessDataPath, String? configFilePath, String? tempDir})
Properties
- asyncRunner → AsyncRunner
-
finalinherited
-
handle
→ Pointer<
Void> -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addLanguage(
String language) → void - Adds a language to the list of languages to be detected.
-
addLanguages(
List< String> languages) → void - Adds a list of languages to the list of languages to be detected.
-
disableDebug(
) → void - Disables debug output from Tesseract.
-
dispose(
) → void -
inherited
-
getBoundingBoxes(
PageIteratorLevel level) → List< BoundingBox> - Retrieves the bounding boxes of the detected text.
-
hocrText(
PixImage image) → Future< String> - Executes character recognition on the given document image and returns the detected text in hOCR format.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processDocument(
String docImageFilePath) → Future< String> -
Executes character recognition on the given document
image file and returns the detected text. This method
emulates the behavior of the
tesseract
command line. -
setBlackList(
String blacklist) → void - Sets blacklist chars.
-
setPageSegMode(
PageSegMode mode) → void - Sets "Page Segmentation Mode" (PSM) to detect layout of characters.
-
setVariable(
String name, String value) → void - Sets the value of a Tesseract variable.
-
setWhiteList(
String whitelist) → void - Sets whitelist chars.
-
toString(
) → String -
A string representation of this object.
inherited
-
utf8Text(
PixImage image) → Future< String> - Executes character recognition on the given document image and returns the detected text.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultTessDataPath → dynamic
-
Returns the path to the Tesseract data directory.
no setter
- version → dynamic
-
Returns the version of the Tesseract library.
no setter
Static Methods
-
clearPersistentCache(
) → void - Clears any library-level memory caches. There are a variety of expensive-to-load constant data structures (mostly language dictionaries) that are cached globally – surviving the Init() and End() of individual TessBaseAPI's. This function allows the clearing of these caches.