Illustration of document pages being combined, with a padlock and a file tab.

How to Improve OCR Accuracy: Lighting, Angle, and Resolution

OCR fails in predictable ways. The text may be too small, the page may be photographed at an angle, the light may be uneven, or the image may be so heavily compressed that letter edges blur into the background. Improving accuracy is mostly a matter of removing those obstacles before the file reaches the recogniser.

Text from Image runs recognition in your browser. It reads clean, straight, well-lit printed pages best. The adjustments below are worth making before you try a different tool or a higher resolution.

Quick answer

Photograph the page straight on, fill the frame with the text, light it evenly, and keep it sharply focused. Crop away margins and backgrounds, avoid heavy compression, and proofread the output against the original. For most pages, a steady angle and even light matter more than a higher pixel count.

Lighting: even and diffuse

A single lamp or a phone flash creates glare on glossy paper and a hard shadow from the hand holding the camera. Both reduce contrast exactly where the recogniser needs it. Daylight from a window, diffused by a sheet of paper or a net curtain, is usually kinder.

Watch for shadows across the page, especially near the spine of a book. If half the text sits in shade, the recogniser may treat the darker side as a different background and lose characters along the boundary. Move the light or rotate the page until the illumination is as even as you can make it.

Angle and page shape

Shoot from directly above the page and keep the camera parallel to it. A photo taken from the side produces perspective distortion: lines of text converge, and characters at the top and bottom are seen at different scales. OCR can cope with a little of this, but not with a steep angle.

Keep the page flat. A book that curves into the spine bends the lines of text, and a curled receipt does the same. Flatten what you can, or photograph in smaller sections where the page lies still. Rotate the image afterwards so the text runs horizontally before recognition.

Resolution and focus

Each character needs enough pixels to have a recognisable shape. If the letters are only a few pixels tall, no amount of contrast adjustment will recover them. Move closer or use a higher-resolution capture, but do not rely on digital zoom, which enlarges a small area without adding detail.

Sharpness matters more than a large file. A crisp image at a modest size usually reads better than a soft one at twice the resolution. Clean the lens, steady the camera, and avoid saving the image at a very low quality; compression artefacts around letter edges look like strokes and produce confident mistakes.

Prepare the image and check the result

Crop to the text, remove borders and background objects, and straighten the page. If your editor offers greyscale and contrast controls, use them gently; overdoing the contrast can close the gaps inside letters such as e and a. Save as PNG or a high-quality JPEG to avoid a second round of loss.

Try a single paragraph before committing to a long document: open Text from Image, add the photo, and compare the result with the page. The tool runs in your browser; check the extracted text for private details before sharing it. If the text is still poor, retake the photo straight and evenly lit rather than adjusting the output by hand. For how recognition works and where it fails, read How OCR Turns a Photo into Editable Text. If the scan is a PDF and you need the file itself to be searchable, see How to Make a Scanned PDF Searchable.

Common questions

Is a higher resolution always better for OCR?

No. Sharp focus and even light matter more than a large pixel count, and a blurry high-resolution image still reads badly. Once the characters are clear, extra pixels add file size rather than accuracy.

Why does OCR misread numbers more often than words?

Numbers have fewer surrounding clues, so the recogniser cannot use context to correct an ambiguous shape. A smudged 5 and 6, or a 1 and 7, can produce a plausible but wrong figure. Check every number against the original.

Can I improve a photo after it was taken?

Sometimes. Cropping, straightening, and gentle contrast adjustment can help, but they cannot restore detail that was never captured. If the text is blurred or hidden by glare, a new photo is usually more effective than editing the old one.