使用rapid latex ocr进行数学公式识别

from rapid_latex_ocr import LatexOCR

# 打开图片文件
img_path = './images/a.png'  # 替换为你的图片路径
with open(img_path, "rb") as f:
    img = f.read()

model = LatexOCR()

result, elapsed_time = model(img)

print(result)
print(elapsed_time)

你可能感兴趣的:(ocr)