pip install pytesseract



报错:tesseract is not installed or it's not in your path

识别中文需要新的字库

图片:English.png

Python 进行 OCR识别 -- pytesseract库

图片:Chinese.png

Python 进行 OCR识别 -- pytesseract库

识别

import pytesseract
from PIL import Image

im_en = Image.open('English.png')
im_ch = Image.open('Chinese.png')

print('========识别字母========')
print(pytesseract.image_to_string(im_en), '\n\n')

print('========识别中文========')
print(pytesseract.image_to_string(im_ch, lang='chi_sim'))

结果

Python 进行 OCR识别 -- pytesseract库

相关文章:

  • 2021-11-16
  • 2022-01-12
  • 2021-12-24
  • 2022-12-23
  • 2022-01-27
  • 2021-09-02
  • 2022-12-23
  • 2021-11-04
猜你喜欢
  • 2022-12-23
  • 2021-05-28
  • 2021-12-12
  • 2021-07-05
  • 2022-12-23
相关资源
相似解决方案