编程学习教程

 

1.Python3的pillow、pytesseract包   可使用pip install pillow、pip install pytesseract命令安装
识别引擎tesseract-ocr下载安装加入环境变量,下载chi_sim.traineddata放在Tesseract-OCR\tessdata目录下
2.代码

  1. from PIL import Image
  2. import pytesseract
  3. image = Image.open('a20170914155348.jpg')
  4. imtext = pytesseract.image_to_string(image,lang='chi_sim')
  5. print(imtext)

3.效果
Python实现从图片提取文字

 

 

相关文章:

  • 2021-11-17
  • 2021-12-30
  • 2021-04-25
  • 2021-07-02
  • 2021-08-25
  • 2022-01-10
  • 2021-11-30
  • 2023-03-14
猜你喜欢
  • 2021-05-25
  • 2021-12-30
  • 2021-11-17
  • 2021-07-03
  • 2022-01-24
  • 2021-11-30
  • 2022-01-01
相关资源
相似解决方案