优化OCR解析

This commit is contained in:
2025-11-03 10:22:28 +08:00
parent 4603a86df4
commit 3e58c3d0e9
9 changed files with 581 additions and 30 deletions

View File

@@ -20,12 +20,15 @@
可以直接作为独立模块使用。
使用方法:
from ocr import OCR
from ocr import OCR, SimplePdfParser
import cv2
ocr = OCR()
img = cv2.imread("image.jpg")
results = ocr(img)
parser = SimplePdfParser()
result = parser.parse_pdf("document.pdf")
"""
# 处理导入问题:支持直接运行和模块导入
@@ -35,3 +38,4 @@ from pathlib import Path
__all__ = ['OCR', 'TextDetector', 'TextRecognizer', 'SimplePdfParser']