CyberFreezeDev Loading
  1. Home
  2. AI glossary
  3. OCR (optical character recognition)

What is OCR (optical character recognition)?

Reading the characters in a scan or photo and turning them into usable text.

3D render of a paper stack and a scanner bed whose light bar reads fields into a record card

The plain definition

OCR detects text in a scan, photo or image-only PDF and outputs characters with positions. Turning that text into fields is a separate job.

Read more about The plain definition

Optical character recognition (OCR) detects text in an image (a scan, a phone photo, an image-only PDF) and outputs it as characters, usually with the position of each word on the page.

Widely used engines include the open-source Tesseract and PaddleOCR, and cloud services such as Google Cloud Vision, Amazon Textract and Azure AI Document Intelligence. Newer vision language models can also read text directly from an image. OCR gives you text; turning that text into fields like "invoice total" is the job of intelligent document processing.

How it works

  1. 01 Clean the image

    Straighten, rotate, raise contrast and remove noise; this step often decides the result.

    Read more about Clean the image

    Straighten the page, fix rotation, raise contrast and remove noise. This step alone often decides the result.

  2. 02 Find text regions

    A detection model boxes lines and words, apart from logos, stamps and tables.

    Read more about Find text regions

    A detection model draws boxes around lines and words, separating them from logos, stamps and tables.

  3. 03 Recognise characters

    A recognition model reads each box and gives characters with a confidence score.

    Read more about Recognise characters

    A recognition model reads each box and outputs characters, with a confidence score.

  4. 04 Rebuild layout

    Words go back into lines, paragraphs, columns and table cells in reading order.

    Read more about Rebuild layout

    Words are put back into lines, paragraphs, columns and table cells in reading order.

Where it matters in business

Accounts and GST

Photographed bills and receipts get into Tally or a ledger without retyping.

Read more about Accounts and GST

Vendor bills and expense receipts arrive as photos and scans. OCR is the first step to getting them into Tally or another ledger without retyping.

KYC and onboarding

Reading PAN, Aadhaar, passports and address proofs, masking numbers you cannot store.

Read more about KYC and onboarding

Reading PAN cards, Aadhaar, passports and address proofs for customer onboarding, with masking of numbers you are not allowed to store.

Searchable archives

Years of scanned contracts and files become searchable by any word.

Read more about Searchable archives

Making years of scanned contracts and files searchable by any word in them.

A practical example

Cropping and straightening phone photos of challans before reading, then sending low-confidence words to a person, gave the accounts team reliable text.

Read more about A practical example

A distributor photographs delivery challans on a phone. Plain OCR on the raw photos misses many fields because of shadows and skew. Adding automatic cropping and deskewing before recognition, then sending only low-confidence words to a person for a quick check, gives the accounts team text it can rely on. The same pattern (OCR, confidence check, human review) runs through our OCR and document intelligence work.

Common mistakes

Testing on clean samples only

Real inputs are crumpled, stamped and photographed at an angle. Test on your worst.

Read more about Testing on clean samples only

Real inputs are crumpled, stamped, handwritten and photographed at an angle. Test on the worst real documents you receive.

Ignoring confidence scores

Use each engine's confidence score to decide what a person should check.

Read more about Ignoring confidence scores

Every engine reports how sure it is. Use the score to decide what needs a person instead of trusting every character.

Wrong language models

Tamil, Hindi and mixed-script documents need engines that support those scripts.

Read more about Wrong language models

Tamil, Hindi and mixed-script documents need engines and language packs that support those scripts.

Questions

Can OCR read handwriting?

Modern engines and vision models handle neat handwriting reasonably, but accuracy drops sharply on rushed or joined writing. Plan for human review on handwritten fields.

Do we need OCR for digital PDFs?

Not if the PDF already contains a text layer, as most system-generated invoices do. You can extract that text directly, which is faster and exact. OCR is for scans and photos.

Can OCR run without sending documents to the cloud?

Yes. Tesseract and PaddleOCR run fully on your own servers, which helps when documents contain personal data covered by the DPDP Act 2023 or GDPR.

Last updated