What is OCR (optical character recognition)?

OCR is the technology that turns text in scanned documents, photos or screenshots into machine-readable, searchable text.

It differs from document parsing in scope: OCR only converts the text in an image, while parsing also extracts structural parts such as headings, tables and fields. OCR does not capture all meaning in an image; table and field meaning is handled separately. It is not limited to scanned PDFs.

Topic
Embeddings, document processing and RAG
Also known as
Text recognition

How OCR (optical character recognition) works

  1. The image is pre-processed: deskewing, noise removal and contrast enhancement.
  2. Text detection finds lines, words or text blocks on the page; layout analysis sets the reading order.
  3. A recognition model converts the characters in each region into text; current systems use deep learning models.
  4. Output is corrected with a language model or dictionary and exported as text with position data.

In more detail

Native versus scanned PDFs and per-page routing

Enterprise ingestion pipelines first inspect each PDF to detect whether a reliable embedded text layer already exists before invoking OCR. Routing native digital pages to direct text extraction and sending only raster/scanned pages or pages with garbled font encodings to OCR drastically cuts GPU cost and eliminates recognition errors on digital documents.

CER, WER and sensitivity to Turkish characters

OCR quality is quantified primarily via Character Error Rate (CER) and Word Error Rate (WER), calculated using edit distance (insertions, deletions and substitutions) against a human-verified ground truth. In agglutinative languages like Turkish, CER is often more diagnostic than WER because a single misread diacritic (such as 'ş' versus 's' or 'ı' versus 'i') can alter an entire word's meaning.

Resolution requirements and lightweight OCR and VLM architectures

Resolution and scan quality strongly govern accuracy: standard OCR typically requires 200 to 300 DPI for reliable Latin-script recognition, while dense footnotes, stamps or faded dot-matrix print may need higher DPI. Compact specialised vision-language OCR models (0.5B, 3B parameters) increasingly bridge classic OCR and layout parsing on a single local GPU.

Commonly confused terms

TermHow it differs
Native PDF text extractionDigital-native PDFs already contain an embedded text layer that can be extracted directly and losslessly, whereas scanned PDFs are raster images requiring OCR; confusing the two causes unnecessary compute cost or corrupted text when embedded fonts are broken.
Vision-language modelTraditional OCR uses dedicated text detection + character recognition models optimised for speed and line-level accuracy; multimodal VLMs jointly reason over layout, charts and text via prompts, at higher GPU cost and potential hallucination risk.

Why OCR (optical character recognition) matters for on-premises AI

Much of an organisation's archive is scanned; without OCR that content stays outside search and RAG, so it is among the first steps of document ingestion. When ID, contract and health documents are processed on in-house servers, images never leave. Turkish characters, stamps, handwriting and poor scans raise error rates, so accuracy is measured on the organisation's own documents. OCR errors carry into search and answers, so critical fields are checked.

ON-PREMISES EXAMPLE

A law firm runs OCR in-house on scanned documents in old case files and adds them to its search index; precedent searches run over that text.

Common questions

How does OCR differ from a vision-language model?

OCR turns text in an image into text. A vision-language model interprets image and text together and understands relations such as tables and layout, but needs more hardware.

How is OCR accuracy measured on Turkish documents?

Character and word error rates are measured on samples from the organisation's own documents; pages with stamps, tables and handwriting are tested separately.

Sources

Related page on this site: Related FAQ · In the glossary: Glossary, M to Q

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.