Tesseract-OCR for mac 的使用

https://www.jianshu.com/p/719c053f170b
https://blog.csdn.net/u010670689/article/details/78374623

python 调用tesseract识别图片的方法

#encoding: utf-8

import pytesseract
from PIL import Image

pytesseract.pytesseract.tesseract_cmd = r"/usr/local/Cellar/tesseract/4.1.0/bin/tesseract"

image = Image.open('/Users/yumingliang/Desktop/14_tesseract_demo/b.png')

text = pytesseract.image_to_string(image)
print(text)

你可能感兴趣的:(Tesseract-OCR for mac 的使用)