优化OCR解析
This commit is contained in:
@@ -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']
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user