Optical character recognition
Optical character recognition (OCR) is the electronic or mechanical conversion of images of typed, handwritten, or printed text into machine-encoded text, whether from a scanned document, a photo of a document, a scene-photo (such as the text on signs and billboards), or from subtitle text superimposed on an image.
History
Early OCR systems date to the late 19th and early 20th centuries, with devices like the optophone for the blind. In the 1950s and 1960s, commercial OCR readers were developed for processing printed text in fixed fonts, such as those used on bank checks and credit card imprints. The introduction of personal computers and flatbed scanners in the 1980s made OCR more accessible. Modern OCR relies heavily on machine learning and neural networks, particularly deep learning methods such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs).
Technology
Most OCR systems involve several stages:
- **Image acquisition**: A document is scanned or photographed.
- **Preprocessing**: Includes binarization, deskewing, noise removal, and layout analysis.
- **Segmentation**: Isolating individual characters or words.
- **Feature extraction** or direct pixel-based recognition.
- **Classification**: Using models such as support vector machines or neural networks to assign character labels.
- **Postprocessing**: Contextual correction using dictionaries and language models.
Modern OCR engines, such as Tesseract and Google Cloud Vision, can handle multiple languages, varied typefaces, and even handwritten text with reasonable accuracy.
Applications
OCR is used in:
- Document digitization: Converting paper archives, books, and invoices into searchable digital files.
- Automated data entry: For forms, checks, and ID cards.
- Assistive technology: For visually impaired users to read printed material aloud.
- License plate recognition and automatic number-plate recognition (ANPR).
- Receipt and invoice processing in accounting software.
- Historical text digitization for libraries and archives.
Limitations
Challenges include poor image quality, unusual fonts, skewed or curved text, and heavy handwriting. While accuracy for printed text in clean conditions often exceeds 99%, recognition of cursive handwriting remains an active research area.