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