Last active
September 12, 2020 05:47
-
-
Save parkkk123/50b68d3a82bb2a4c2ae6fb3969072db5 to your computer and use it in GitHub Desktop.
Getting start with tesseract on python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tesserocr import PyTessBaseAPI | |
from PIL import Image | |
with PyTessBaseAPI(lang="tha") as api: | |
#ลบช่องว่างแต่ละตัวอักษร | |
api.SetVariable('preserve_interword_spaces', '1') | |
#Path ของรูปภาพ | |
api.SetImageFile("Image.jpeg") | |
print(api.GetUTF8Text()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment