What Is OCR? Turning Photos of Documents Into Text
OCR (optical character recognition) is a technology that reads text from images, scanned documents, or photographs and converts it into editable, searchable digital text. If you have ever photographed a printed page and had your phone offer to copy the text, that was OCR working behind the scenes.
OCR (optical character recognition) is a technology that reads text from images, scanned documents, or photographs and converts it into editable, searchable digital text. If you have ever photographed a printed page and had your phone offer to copy the text, that was OCR working behind the scenes.
How OCR works in simple terms
OCR software analyses the pixels in an image and identifies shapes that match known characters (letters, numbers, punctuation). It works through several steps.
First, the software preprocesses the image: straightening tilted scans, adjusting contrast, and removing background noise. A crisp, well-lit document produces far better results than a blurry photo taken in dim lighting.
Next, the software segments the image into blocks of text, individual lines, then individual characters. Modern OCR tools can recognise different fonts, sizes, and even some handwriting styles, though handwriting recognition remains less reliable than printed text.
Finally, the software maps the detected shapes to actual characters using pattern matching or machine learning models. The output is a text file, a searchable PDF, or structured data (like a spreadsheet row) depending on the tool you use.
The entire process typically takes seconds. What would take you ten minutes of manual typing happens almost instantly.
Where Kenyan professionals use OCR daily
Processing receipts and invoices. If you run a business in Nairobi or Mombasa, you probably receive a mix of digital and paper invoices. Photographing paper receipts and running them through OCR lets you extract vendor names, amounts, dates, and KRA PINs without retyping everything. Tools like Google Lens (free on most Android phones) handle this well for printed Kenyan documents.
Digitising government forms. County government offices, hospitals, and schools across Kenya still rely heavily on printed forms. OCR lets you scan completed forms and extract the data into spreadsheets or databases, saving hours of manual entry per batch.
Reading M-Pesa confirmation messages from screenshots. When customers send M-Pesa payment screenshots instead of transaction codes, OCR can extract the transaction ID, amount, and timestamp. This is practical for small businesses that verify payments manually.
Archiving old documents. Law firms, NGOs, and government agencies often have filing cabinets full of printed records. OCR converts these into searchable digital archives, so you can find a specific document by searching for a keyword rather than flipping through folders.
OCR accuracy and its limits
Modern OCR on clean, printed English text achieves accuracy rates above nearly all. But several factors reduce accuracy in practice.
Image quality matters most. A sharp scan at 300 DPI produces near-perfect results. A blurry phone photo under fluorescent lighting drops accuracy significantly. Always use good lighting and hold the camera steady.
Language and script affect results. OCR works best with Latin-script languages (English, Swahili in its written form). Non-Latin scripts, mixed languages, and informal abbreviations can confuse the recognition engine.
Handwriting remains difficult. OCR tools handle neat, consistent handwriting reasonably well, but messy or overlapping handwriting still produces errors. If you regularly digitise handwritten notes, expect to proofread the output.
Layout complexity creates challenges. Documents with tables, multiple columns, stamps, or overlapping text (common on Kenyan government forms) can confuse the segmentation step. The OCR might jumble the reading order or merge columns incorrectly.
OCR versus multimodal AI
Traditional OCR extracts text but does not understand it. It tells you what the characters say, not what they mean. If you scan an invoice, OCR gives you the raw text. You still need to identify which number is the total and which is the tax.
Multimodal AI models (like GPT-4o or Claude with vision) go further. They can read the image and answer questions about its content. You can upload an invoice photo and ask, "What is the total amount including VAT?" The model reads the image, interprets the layout, and gives you the answer directly.
For simple text extraction, OCR is faster and cheaper. For interpretation and follow-up questions, multimodal AI is more capable. Many modern workflows combine both: OCR for bulk extraction and AI for analysis.
We cover how these tools connect in our AI Automation glossary, including related terms like tokens and hallucination.
FAQ
Is OCR free to use?
Yes, for basic use. Google Lens (available on most Android phones), Apple's Live Text, and Google Drive's built-in OCR on uploaded PDFs are all free. Paid tools like Adobe Acrobat or dedicated OCR software offer higher accuracy and batch processing for larger volumes.
Can OCR read Swahili text?
OCR handles Swahili well because written Swahili uses the Latin alphabet. The accuracy is comparable to English for printed text. Issues arise mainly with mixed Swahili-English documents where formatting is inconsistent.
How do I get the best OCR results from my phone?
Use natural daylight or a well-lit room. Hold the phone parallel to the document (not at an angle). Ensure the entire document fits in the frame with some margin. Avoid shadows across the text. Most phone cameras produce adequate resolution, but tapping to focus on the text area helps.
Frequently Asked Questions
### Is OCR free to use?
Yes, for basic use. Google Lens (available on most Android phones), Apple's Live Text, and Google Drive's built-in OCR on uploaded PDFs are all free. Paid tools like Adobe Acrobat or dedicated OCR software offer higher accuracy and batch processing for larger volumes.
Can OCR read Swahili text?
OCR handles Swahili well because written Swahili uses the Latin alphabet. The accuracy is comparable to English for printed text. Issues arise mainly with mixed Swahili-English documents where formatting is inconsistent.
How do I get the best OCR results from my phone?
Use natural daylight or a well-lit room. Hold the phone parallel to the document (not at an angle). Ensure the entire document fits in the frame with some margin. Avoid shadows across the text. Most phone cameras produce adequate resolution, but tapping to focus on the text area helps.
10-minute interactive glossary lesson, free
Bonaventure Ogeto
Founder, Mctaba Labs
Software engineer building products for the African market. Teaching 10,000+ students across multiple platforms. BSc Mathematics & Computer Science from JKUAT.