Remove false page signals without clipping real text
Remove unrelated background and scanning artifacts, but leave a small clean margin around the actual text region.
A successful cleanup removes false page signals while retaining complete characters, labels, units, and enough margin to show where the real document begins and ends.
Test the suspected failure with Image to Text. Check the retained page edges with How to Photograph a Document for Accurate OCR and Deskew, Dewarp and Perspective Correction for OCR.
Border problem and response
| Artifact | Risk | Response |
|---|---|---|
| Black scanner edge | False characters and regions | Crop or mask on the derivative |
| Text touches image edge | Clipped glyphs or poor segmentation | Restore a modest clean margin |
| Large blank canvas around one label | Region may be treated as empty | Crop closer while retaining a margin |
| Gutter shadow | Merged strokes and false vertical line | Flatten, relight, or normalize locally |
Crop the recognition unit without clipping its evidence
A scanner edge, finger, punch hole, neighboring page, or dark gutter can become a false text region. Remove those elements on a working copy, but retain page numbers, labels, units, footnote markers, and a small clean margin around real text.
Check every crop boundary at full size. If a character touches the edge, restore space. If a tiny label sits inside a very large blank canvas, make a closer crop while keeping enough context to identify it. Uneven paper and show-through need tonal treatment, not an increasingly tight crop that removes document meaning.
- Preserve the full original
- Retain a modest clean margin
- Check punctuation and identifiers at every edge
Separate borders, shadows, and neighboring content from the page
Remove false text candidates
Scanner lids, black page edges, fingers, punch holes, rulers, desk texture, and neighboring pages can be segmented as marks. Crop or mask them on a derivative while keeping the original unchanged.
Keep a breathing margin
Tesseract documentation notes that text cropped without a border can cause recognition problems, while very large borders can lead to an empty-page result for a small word or region. A modest clean margin gives the segmenter context without dominating the page.
Do not crop away document meaning
Page numbers, repeated headers, units, footnote markers, and form labels may look secondary but are often needed to interpret output. Decide the downstream task before excluding them.
Handle background texture separately
Uneven paper, shadows, and show-through require tonal cleanup rather than tighter cropping. Test background normalization on a copy and check that punctuation and light strokes survive.
Safe crop and cleanup check
- Preserve the full original
- Remove external background on a derivative
- Leave a small light margin
- Retain page identifiers and units
- Inspect punctuation at crop edges
Cropping can remove meaning
An aggressive crop may clip ascenders, punctuation, page numbers, labels, marginal notes, or evidence that explains reading order. Retain an untouched original and a small clean margin.

