import { PaddleOCROptions, TableResult } from "../typings"; import { OCRImageData as ImageData } from "../utils/image"; /** * 表格识别类 * 负责识别图像中的表格结构和内容 */ export declare class TableRecognizer { private options; private modelLoader; private structureModel; private cellDetector; private textDetector; private textRecognizer; private isInitialized; /** * 创建表格识别器实例 * @param options 配置选项 */ constructor(options: PaddleOCROptions); /** * 初始化表格识别模型 */ init(): Promise; /** * 识别图像中的表格 * @param image 输入图像 */ recognize(image: ImageData): Promise; /** * 图像预处理 */ private preprocessImage; /** * 识别表格结构 */ private recognizeTableStructure; /** * 使用TensorFlow识别表格结构 */ private recognizeStructureWithTensorflow; /** * 使用ONNX识别表格结构 */ private recognizeStructureWithONNX; /** * 检测表格单元格 */ private detectTableCells; /** * 识别单元格内容 */ private recognizeCellContents; /** * 从图像中裁剪区域 */ private cropRegion; /** * 生成最终表格结果 */ /** * HTML 特殊字符转义 */ private escapeHtml; private generateTableResult; /** * 将表格转换为 Markdown 格式 */ private convertToMarkdown; /** * 释放资源 */ dispose(): Promise; }