Skip to content

Tesseract OCR

Recognize text from image regions using supplied language data and a chosen page segmentation mode.

Try it on your image ↓

VISUAL WALKTHROUGHText
REFERENCE INPUTText in an image

Characters are pixels before a recognizer assigns text to them.

RESULTRecognized character sequence

Recognition assigns characters to the detected pixels. Language data and layout assumptions influence the result.

STEP 03 / 03

Recognize characters and return text with available component information.

Illustrative example. The stages explain the method; they are not a live OpenCV execution.

Try it on an image

YOUR IMAGE · REAL OPENCV

Experiment at pixel level

Open full lab ↗

Recognize English text using the bundled Tesseract model (4 MB, loaded on first use), or supply your own English traineddata. Text appears below the preview. Dense pages benefit from a larger processing size.

The engine loads on your first run. Your images stay in this browser.

Input448 × 320
OutputWaiting for a result

Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.

Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Hover to inspect. Click to pin a pixel.
Input
Select a pixel

Output
Select a pixel

Sample models and licenses

When to use it

Read labels, scanned documents or prepared text crops locally.

How it works

  1. 01Provide the appropriate trained language data.
  2. 02Segment the image into the text structure expected by the selected mode.
  3. 03Recognize characters and return text with available component information.

text image → line/word structure → recognized symbols

What to tune

The language, engine mode and page segmentation mode should match the input. Keep text resolution adequate without inventing extra detail.

Where it breaks down

Language data is an application asset, not bundled. Small text, perspective distortion and complex backgrounds need preprocessing.

TypeScript API

Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.

All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.