15 lines
343 B
Python
15 lines
343 B
Python
from rapidocr_onnxruntime import RapidOCR
|
|
|
|
engine = RapidOCR()
|
|
ocr_result, elapse = engine(r"E:\ZKYNLP\aidocproject\audiotransaction\gwdoc\图片.png")
|
|
|
|
texts = [item[1] for item in (ocr_result or [])]
|
|
full_text = "图片包含的文字内容为:"+",".join(texts)
|
|
|
|
|
|
|
|
print("\n合并文本:")
|
|
print(full_text)
|
|
|
|
print("\n耗时:", elapse)
|