FfiPaddleOcr class

PaddleOcrPlatform 的 FFI 实现。

这是 Windows 平台的默认实现。它通过 dart:ffi 直接与原生 C++ 库通信, 避免了 MethodChannel 的开销。当 FFI 不可用时(例如找不到 DLL), 会自动回退到 MethodChannelPaddleOcr

Inheritance

Constructors

FfiPaddleOcr()

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

dispose() → void
释放引擎并清理原生资源。
getPlatformVersion() Future<String?>
获取平台版本字符串。
override
initialize({required String detModelPath, required String recModelPath, required String dictPath}) Future<bool>
使用模型路径初始化 OCR 引擎。
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickImage() Future<String?>
打开文件选择对话框以选择图片,返回所选文件路径。
override
recognizeImage(String imagePath) Future<List<OcrResult>>
从图片文件路径识别文字。
override
recognizeImageBytes(Uint8List imageBytes) Future<List<OcrResult>>
从图片字节数据识别文字。
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited