Swapnil Trivedi
Published

Optical Character Recognition (OCR) Using Odinub

Have you ever imagined extracting texts out of the images? Let's do it using OCR.

IntermediateFull instructions provided764
Optical Character Recognition (OCR) Using Odinub

Things used in this project

Hardware components

Odinub
Odinub
×1

Software apps and online services

Tesseract

Story

Read more

Code

OCR.py

Python
import pytesseract
from PIL import Image
text = pytesseract.image_to_string('/root/Desktop/ocr/LP_1.jpg')

if text == u'~DL4\xa3AF4943':
    print("Mr. Swapnil Trivedi")
    print("545171901830")
    print("Contact No:8149950777")

elif text == u'\\ /\n\n\xe9KL 85 C 7283':
    print("Mr. Chinmay Shukla")
    print("545171942697")
    print("Contact No:9426975294")

elif text == u'KA03WJ101 1':
    print("Mr. Rahul Roy")
    print("645276901324")
    print("Contact No:9488704203")

Credits

Swapnil Trivedi
3 projects • 4 followers

Comments