Thursday, November 22, 2018

Python Code : Convert Image to text

'''
image to text converter....
sudo apt install tesseract-ocr
pip install Pillow
pip intall pytesseract
'''

from PIL import Image
from pytesseract import image_to_string

print(image_to_string(Image.open('ocr_scrap.jpg'), lang='eng'))

No comments:

Post a Comment