Python 圖像識別入門篇


一、安裝Python依賴

pip install pytesseract pyocr pillow Image

pip安裝:https://www.cnblogs.com/Javame/p/10918325.html

二、下載並安裝 tesseract-ocr:

wget https://download.csdn.net/download/yiyu1/11200375

三、修改pytesseract.py

位置:..\lib\site-packages\pytesseract\pytesseract.py

tesseract.exe來源第二步安裝后Tesseract-OCR/tesseract.exe執行文件快捷方式。

四、找張圖片

五、Python代碼

from PIL import Image
import pytesseract
image = Image.open(r'E:\test.png')
code = pytesseract.image_to_string(image)
print(code)

六、執行腳本

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM