pytesseract Python的光学字符识别OCR

pytesseract简介

pytesseract,Python第三方库,用于光学字符识别,即可以识别并“读取”嵌入图像中的文本,支持的所有图像类型,包括jpeg、png、gif、bmp、tiff等。

pytesseract应用实例

from PIL import Image
import pytesseract

# If you don't have tesseract executable in your PATH, include the following:
pytesseract.pytesseract.tesseract_cmd = r''
# Example tesseract_cmd = r'C:\Program Files (x86)\Tesseract-OCR\tesseract'
# Simple image to string
print(pytesseract.image_to_string(Image.open('test.png')))
print(pytesseract.image_to_string('test.png'))

pytesseract Github统计数据

Apache-2.0 license

Github 5.2k stars

pytesseract安装命令

pip install pytesseract

pytesseract Python版本和系统环境要求

Python 3.6+

免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。


行业导航 / Python指南 :
























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.