how to turn handwritten notes into text with python

Solutions on MaxInterview for how to turn handwritten notes into text with python by the best coders in the world

showing results for - "how to turn handwritten notes into text with python"
Gena
28 Jan 2017
1try:
2    from PIL import Image
3except ImportError:
4    import Image
5import pytesseract
6
7def ocr_core(filename):
8    """
9    This function will handle the core OCR processing of images.
10    """
11    text = pytesseract.image_to_string(Image.open(filename))  # We'll use Pillow's Image class to open the image and pytesseract to detect the string in the image
12    return text
13
14print(ocr_core('images/ocr_example_1.png'))
15