#TESSDATA_PREFIX C:\Program Files (x86)\Tesseract-OCR\tessdata from PIL import Image import pytesseract tessdata_dir_config = '--tessdata-dir "C:\Program Files (x86)\Tesseract-OCR\tessdata"' text=pytesseract.image_to_string(Image.open('denggao.jpg'),lang='chi_sim', config=tessdata_dir_config) print(text) text=pytesseract.image_to_string(Image.open('idcard.png'),lang='chi_sim', config=tessdata_dir_config) print(text) text=pytesseract.image_to_string(Image.open('zh2.png'),lang='chi_sim', config=tessdata_dir_config) print(text) text=pytesseract.image_to_string(Image.open('zh3.png'),lang='chi_sim', config=tessdata_dir_config) print(text)
-
Notifications
You must be signed in to change notification settings - Fork 1
bigjungle/pyocr
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
About
python ocr test
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published