Skip to content

Conversation

@o-kamalGit
Copy link

To run this project on a Linux Ubuntu 18.04 do as following:
sudo apt-get update
sudo apt-get install libleptonica-dev
sudo apt-get install tesseract-ocr
sudo apt-get install libtesseract-dev

pip install tesseract
pip install tesseract-ocr

In Main.py change the lines below:
#pytesseract.pytesseract.tesseract_cmd = r'./Tesseract-OCR/tesseract' # https://github.com/tesseract-ocr/tesseract/wiki/4.0-with-LSTM#400-alpha-for-windows
pytesseract.pytesseract.tesseract_cmd = r'/usr/bin/tesseract'

#print(pytesseract.image_to_string(Image.open('./out/newImage.jpg'), lang='eng', config='--psm 10 --oem 3 -c tessedit_char_whitelist=1234567890 --tessdata-dir="./Tesseract-OCR/tessdata"'))

print(pytesseract.image_to_string(Image.open('./out/newImage.jpg'), lang='eng', config='--psm 10 --oem 3 -c tessedit_char_whitelist=1234567890 --tessdata-dir="/usr/share/tesseract-ocr/4.00/tessdata/"'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants