import { PaddleOCROptions, TextBox } from "../typings"; import { OCRImageData as ImageData } from "../utils/image"; import { BaseRecognizer } from "./BaseRecognizer"; /** * 文本检测类 * 负责检测图像中的文本区域 */ export declare class TextDetector extends BaseRecognizer { private modelLoader; private model; /** * 创建文本检测器实例 * @param options 配置选项 */ constructor(options: PaddleOCROptions); /** * 初始化检测模型 */ init(): Promise; /** * 检测图像中的文本区域 * @param image 输入图像 */ detect(image: ImageData): Promise; /** * 使用 TensorFlow 进行检测 */ private detectWithTensorflow; /** * 使用 ONNX 进行检测 */ private detectWithONNX; /** * 后处理检测结果 */ private postprocess; /** * 释放资源 */ dispose(): Promise; }