PaddleOcrPlatform class abstract

pp_ocr 插件的平台接口。

唯一实现是 FfiPaddleOcr(dart:ffi 直连原生库);识别链路不存在 MethodChannel 回退 —— 整图字节跨通道序列化的开销不可接受。

Inheritance
  • Object
  • PlatformInterface
  • PaddleOcrPlatform
Implementers

Constructors

PaddleOcrPlatform()

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

clearDefaultOptions() → void
清除引擎级默认选项,回到标准单分支行为。
getPlatformVersion() → Future<String?>
获取平台版本字符串。
initialize({required String detModelPath, required String recModelPath, required String dictPath}) → Future<bool>
使用模型路径初始化 OCR 引擎。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pickImage() → Future<String?>
打开文件选择对话框以选择图片,返回所选文件路径。
recognizeImage(String imagePath, {OcrOptions? options}) → Future<List<OcrResult>>
从图片文件路径识别文字。
recognizeImageBytes(Uint8List imageBytes, {OcrOptions? options}) → Future<List<OcrResult>>
从图片字节数据识别文字。
runPipeline(Uint8List imageBytes, List<OcrPreprocessor> preprocessors, {OcrOptions? options}) → Future<List<OcrResult>>
用宿主注入的预处理变体跑编排管线(插件接口)。
setDefaultOptions(OcrOptions options) → Future<bool>
设置引擎级默认选项:此后不传 options 的识别调用都会用它。
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance ↔ PaddleOcrPlatform
获取当前平台接口实例。
getter/setter pair