OcrKitBindings class
FFI bindings for flutter_ocr_kit native library
Constructors
- OcrKitBindings(DynamicLibrary dynamicLibrary)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
detectLayout(
Pointer< Char> imgPath, double confThreshold) → Pointer<Char> - Detect layout from image file path
-
detectTextFromPath(
Pointer< Char> imgPath, double threshold) → Pointer<Char> - Detect text regions only (without recognition)
-
freeString(
Pointer< Char> str) → void - Free allocated string memory
-
getVersion(
) → Pointer< Char> - Get library version
-
getVisionSupportedLanguages(
) → Pointer< Char> - Get supported languages for Vision OCR
-
initModel(
Pointer< Char> modelPath) → void - Initialize layout model with path
-
initOcrModels(
Pointer< Char> detModelPath, Pointer<Char> recModelPath, Pointer<Char> dictPath) → void - Initialize OCR models (detection + recognition + dictionary)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recognizeRegionWithVision(
Pointer< Char> imagePath, double cropX1, double cropY1, double cropX2, double cropY2, Pointer<Char> languages) → Pointer<Char> - Recognize text from a cropped region using Apple Vision Coordinates are in original image space
-
recognizeTextFromBuffer(
Pointer< Uint8> buffer, int width, int height, int stride, double detThreshold, double recThreshold) → Pointer<Char> - Recognize text from image buffer (for camera frames) Buffer format: BGRA (iOS camera format)
-
recognizeTextFromPath(
Pointer< Char> imgPath, double detThreshold, double recThreshold) → Pointer<Char> - Recognize text from image file path (full OCR: detect + recognize)
-
recognizeTextWithVision(
Pointer< Char> imagePath, Pointer<Char> languages) → Pointer<Char> -
Recognize text from image using Apple Vision Framework
imagePath- Path to image filelanguages- Comma-separated language codes (e.g., "zh-Hant,zh-Hans,en-US") -
releaseLayoutModel(
) → void - Release layout model resources
-
releaseOcrEngine(
) → void - Release OCR engine resources
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited