Skip to content

Instantly share code, notes, and snippets.

View parkkk123's full-sized avatar
🙊
เมี๊ยวๆๆๆๆ

parkkk123

🙊
เมี๊ยวๆๆๆๆ
View GitHub Profile
@parkkk123
parkkk123 / tessocr_check_version_and_lang.py
Created September 12, 2020 06:11
Tesseractocr check version and show language support
import tesserocr
print(tesserocr.tesseract_version()) # print tesseract-ocr version
print(tesserocr.get_languages()) # prints tessdata path and list of available languages
@parkkk123
parkkk123 / getting_start_tess_python_wPath.py
Last active September 12, 2020 05:45
Getting start tesseract with python
from tesserocr import PyTessBaseAPI
from PIL import Image
#ใส่ Path ที่เก็บไฟล์ภาษา .traineddata
with PyTessBaseAPI(path='/home/..../tessdata/' ,lang="tha") as api:
#ลบช่องว่างแต่ละตัวอักษร
api.SetVariable('preserve_interword_spaces', '1')
#Path ของรูปภาพ
api.SetImageFile("Image.jpeg")
@parkkk123
parkkk123 / getting_start_tess_python.py
Last active September 12, 2020 05:47
Getting start with tesseract on python
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())

Keybase proof

I hereby claim:

  • I am parkkk123 on github.
  • I am parkkk123 (https://keybase.io/parkkk123) on keybase.
  • I have a public key whose fingerprint is 5A77 8C21 7A55 1B3F 1177 A1D5 7E7D 4C2B 7FBA E780

To claim this, I am signing this object: