Tesseract OCR
Recognize text from image regions using supplied language data and a chosen page segmentation mode.
Characters are pixels before a recognizer assigns text to them.
Provide the appropriate trained language data.
Segment the image into the text structure expected by the selected mode.
Recognition assigns characters to the detected pixels. Language data and layout assumptions influence the result.
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
Experiment at pixel level
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.
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
Select a pixel
Select a pixel
When to use it
Read labels, scanned documents or prepared text crops locally.
How it works
- 01Provide the appropriate trained language data.
- 02Segment the image into the text structure expected by the selected mode.
- 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.