我的笔记
经管类学习笔记 网课学习笔记 计算机学习笔记 高频知识点

高频知识点

313-pytesseract

目录

  • 313-pytesseract

313-pytesseract

  • 功能:封装 Google Tesseract OCR 引擎,用于从图像中识别文本。

  • PyPI:https://pypi.org/project/pytesseract/

  • GitHub:https://github.com/madmaze/pytesseract

  • 推荐使用:推荐,开源 OCR 常用方案。

1
2
3
4
5
6
7
from PIL import Image

import pytesseract

img = Image.open('text_image.jpg')
text = pytesseract.image_to_string(img)
print(text)

​

© 2026 Michael An · Built with Hugo