Why OCR gets text wrong and how to improve the result

Istio · Updated

If recognized text is missing words or contains unexpected characters, compare it with the image first. OCR may have misread a letter, or the typo may already be in the original. A spelling check helps edit the extracted text; it cannot reconstruct the source automatically.

Start with one readable paragraph

Open image-to-text recognition, select the language actually printed in the image, and try a short paragraph. This helps you tell whether the problem affects the whole photo or just one area.

Change one condition at a time: language first, then framing or image quality. Otherwise, it is hard to tell what helped. Use the image as your reference, even when an incorrect result looks like a plausible sentence.

Common symptoms and what to try

  • Letters from the wrong alphabet. Check the selected text language. The interface language and recognition language are separate settings.
  • Missing letters or word endings. Zoom in on the original. If you cannot distinguish the characters yourself, take a clearer picture.
  • Words from different columns are mixed together. Crop one column in an external image editor and upload it separately.
  • Extra characters appear around the edges. Remove dark frames, fingers and objects beside the page.
  • No text is found. Check the file, selected language and legibility, then try a small block of ordinary printed text.

Take a better photo

Keep the camera parallel to the page, focus on the letters and use even lighting. Avoid reflections that hide part of a line. For a strongly curved book page, two smaller photos may be easier to read than a single picture of the entire spread.

Straighten visibly tilted lines. Crop away unnecessary background, but leave a small light margin around the text. These steps follow Tesseract’s image preparation guidance.

Why a larger image is not always better

The size and clarity of the letters matter more than the file size alone. A small sign in a large room photo still contains little readable detail. Cropping to the page may help more than enlarging the entire photo.

Istio prepares images before recognition and limits their dimensions for processing in the browser. If a large page contains very small letters, try uploading individual paragraphs. Enlarging an already blurred image cannot bring back details that were not captured.

Screenshots, photos and complex layouts

If the text is already on a screen, use the original screenshot instead of photographing the monitor. If possible, enlarge the text in its source application before capturing it. Keep the original image rather than repeatedly sending it through services that visibly reduce its quality.

JPG/JPEG and PNG are useful starting formats. The OCR page does not directly support PDF or HEIC: save the relevant page or picture in a supported image format first. Tables, handwriting and decorative fonts need careful manual review. Preserving the original layout is not guaranteed.

Compare before and after

  1. Choose a short passage you can read yourself.
  2. Recognize the original image and copy the output into a note.
  3. Change one factor, such as removing glare or isolating one column.
  4. Recognize it again with the same language and compare missing characters, substitutions and line order.
  5. Keep the more accurate version and correct the remaining differences manually.

For example, OCR might confuse the digit “1” with the letter “I” in the practice line “Document 15”. This illustrates a possible error; it is not a measured Istio recognition result. Always compare names, dates, amounts and codes with the source.

Check spelling after reviewing the image

Edit the recognized text in the result field, then choose “Check recognized text” if spelling support is available for the selected language. Review suggestions in context. A correctly spelled word may still be the wrong word for the image, so a spelling check does not replace comparison with the original.

If a new recognition attempt fails or finds no text, the previous result stays in the editor. It may belong to the previous image. Read the message above the form before treating the visible text as a successful new result.

If recognition does not start

The first run downloads a language model. A network problem or blocked resource can prevent this step from completing. Check your connection and try again after resolving the cause. Waiting without a result is not evidence that recognition succeeded.

Learn more about the browser engine in the Tesseract.js documentation. It describes engine capabilities; Istio’s interface exposes only some of those settings.