summaryrefslogtreecommitdiff
path: root/ocr/image_demo.py
blob: a9d9a6ac6b87c24d78d8df85c7731d8fbd76d1e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import pytesseract
from PIL import Image

img = Image.open('./data/2.jpg')


# text = pytesseract.image_to_string(img, lang='eng')
text = pytesseract.image_to_string(img, lang='chi_sim')


print(text)