Last active
March 18, 2021 20:14
-
-
Save suryak-cs/71c79b0c96b7222cc6df3297cb8bc806 to your computer and use it in GitHub Desktop.
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
try: | |
from PIL import Image | |
except ImportError: | |
import Image | |
import pytesseract | |
def ocr_extraction(filename): | |
""" | |
This function will handle the core OCR processing of images. | |
""" | |
text = pytesseract.image_to_string(Image.open(filename)) | |
return text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OCR Extraction