OCR (optical character recognition) is the recognition of printed or handwritten text characters by a computer. The basic process of OCR involves examining the text of a document and translating the characters into character codes a computer program can understand.
OCR systems are used to convert physical documents into machine-readable text. Software features can also take advantage of artificial intelligence (AI) to implement more advanced methods of intelligent character recognition (ICR), like identifying languages or styles of handwriting.
The process of OCR is most commonly used to turn hard copy legal or historic documents into PDFs. Once digitized, the document can be interacted with as if it was created with a word processor. This is why OCR is sometimes also referred to as text recognition.
How optical character recognition works
The first step of OCR is to scan the physical document. OCR programs typically target one character, word or block of text at a time. When a character is identified, it is converted into ASCII code.
Characters are typically identified using one of two algorithms:
- Pattern recognition – OCR programs are fed examples of text in various fonts and formats which are then used to compare, and recognize, characters in the scanned document.
- Feature detection – OCR programs apply rules regarding the features of a specific letter or number to recognize characters in the scanned document. Features could include the number of angled lines, crossed lines or curves in a character for comparison. For example, the capital letter “A” may be stored as two diagonal lines that meet with a horizontal line across the middle.
Optical character recognition use cases
OCR can be used for a variety of applications, including:
- Indexing print material for search engines.
- Deciphering handwritten documents into text that can be read aloud to visually-impaired or blind users.
- Archiving historic information, such as newspapers, magazines or phonebooks, in searchable formats.
- Electronically depositing checks.
- Recognizing text, such as license plates, with a camera or software.
- Sorting letters for mail delivery.
- Translating words within an image into a specified language.