python 文字识别 之 pytesseract

转自:http://www.cnblogs.com/cxscode/p/8316815.html

运行下面代码

1

2

3

4

5

6

from PIL import Image

import pytesseract

img = Image.open('aaa.png')

text = pytesseract.image_to_string(img,lang='chi_sim')

print (text)

以前主要是识别中文字符,不知怎么设参数:

pytesseract.image_to_string(img,lang='chi_sim')

猜你喜欢

转载自blog.csdn.net/zhangshoug/article/details/81167425