Python圖片識別漢字字母數字,tesseract-ocr
2018年03月09日 Python LEO 2607
環境:ubuntu + python2.7
代碼:
|
效果:
步驟:
1:這裏我們需要用到兩個庫:pytesseract和PIL
2:同時我們還需要安裝識別引擎tesseract-ocr
3:下載中文簡體字庫chi_sim.traineddata
安裝pytesseract和PIL
pip install PIL
pip install pytesseract
安裝識別引擎tesseract-ocr
安裝Tesseract
sudo apt-get install tesseract-ocr
安裝中文
sudo apt-get install tesseract-ocr-chi-sim
下載中文簡體字庫
地址:https://download.csdn.net/download/leoeitail/10275552
存放路勁:/usr/local/share/tessdata/