How to Photograph a Receipt for Better OCR
On this page7 sections
- Six photography habits calibrated for receipt OCR
- Lighting, backing, and camera angle tips
- How image preprocessing handles faint ink and long slips
- How do Review-bar rescue controls fix crooked or wide-margin shots?
- When clean photos still misassign fields
- Quick pre-shutter checklist for faded receipts
- Mandatory check before saving any scan
Most receipt scanning errors happen before recognition software even starts running. Optical character recognition expects flat, evenly lit, high-contrast rows of text rather than a curled strip balanced next to coffee cups in dim restaurant lighting.
Key takeaways
- Fill the frame: Target ~20+ pixels of glyph height across the paper width before our image pipeline normalizes to ~1800 px max edge.
- Eliminate glare first: Contrast-stretching recovers soft shadows far better than blown-out white ceiling reflections on glossy thermal paper.
- Flatten curled ends: Hold both short edges flat because receipts curl most right over the bottom tax and grand-total lines.
- Skip the camera for PDFs: Always load emailed invoices natively instead of photographing laptop screens.
Six photography habits calibrated for receipt OCR
Every image selected on Scan passes through client-side resizing, greyscale conversion, and percentile contrast normalization via the MDN Canvas API. Capturing cleaner pixels upfront saves time on the Review screen.
| Receipt defect | Visual symptom in raw text | Impact on extraction | Fast physical fix before shooting |
|---|---|---|---|
| Shot too far away | Missing decimal points and merged columns | Tiny glyphs fall below ~20 px height | Move camera closer until paper fills ~80% frame |
| Overhead ceiling glare | Blank horizontal strip across mid-receipt | Item prices or total digits disappear | Tilt receipt slightly or shade with hand |
| Curled bottom edge | Warped text lines and slanted prices | Total and date lines fail baseline sort | Flatten receipt against dark matte surface |
| Misfocus / hand shake | Smeared thin ink strokes | 3/8, 5/S, 0/O digit substitutions |
Rest elbows on table and tap to focus |
Lighting, backing, and camera angle tips
Place pale thermal paper against a dark tabletop, wooden desk, or matte folder so page edges stand out clearly. Shoot with your phone lens parallel to the surface rather than tilted at a sharp angle, because trapezoid perspective compresses top vendor names differently from bottom totals.
Indirect window daylight yields the cleanest ink separation. Avoid triggering camera flash, and check that your own hand or head does not cast a sharp shadow directly across the numeric column on the right side of the bill. For capture hardware access in modern browsers, see MDN MediaDevices documentation.
How do glossy POS rolls, dot-matrix slips, and A4 invoices compare?
Different receipt papers distort light and stroke density in distinct ways, yet every layout obeys the same pixel-resolution floor. Keeping average capital letters at roughly 20 px or taller across the full column width prevents thin periods, commas, and minus signs from vanishing during downsampling.
| Paper & printer type | Width & pixel scale rule | Common failure pattern | Camera & lighting adjustment |
|---|---|---|---|
Glossy thermal POS roll (57–80 mm) |
Narrow strip fills frame easily; yields 24–32 px glyphs |
Ceiling reflection streaks and tight bottom curl | Shade overhead bulbs and flatten ends under fingers |
Dot-matrix carbon fuel slip (76–110 mm) |
Shoot close (~15–20 cm) so pin dots merge cleanly |
Missing pin strokes swap 3/8, B/8, and 0/O |
Use diffuse side daylight on dark matte backing |
Wide matte A4 supplier invoice (210 mm) |
Fill 85%+ horizontal frame so 80-column text hits ~20 px |
Distant desk framing drops small 8 pt digits to ~10 px |
Keep lens parallel to full sheet or load original PDF |
| Pocket-creased paper slip | Smooth creases before resizing to 1,800 px max edge |
Diagonal fold shadows mimic slash or decimal noise | Press under a notebook for 10 seconds first |
Why does column width matter so much for wide sheets? An 80-character line stretched across a 1,800 px normalized canvas still leaves roughly 22 px of pitch per character when the page fills the frame, whereas shooting from arm’s length with wide desk margins cuts glyph height in half.
How image preprocessing handles faint ink and long slips
Inside the browser, Receipt Scanner scales incoming images to an upper bound around 1,800 pixels along the longest edge, converts frames to weighted greyscale, and stretches contrast between low and high tonal percentiles. Retaining smooth greyscale shading preserves faint character strokes that harsh black-and-white thresholds would otherwise drop.
How do you frame a three-foot supermarket receipt?
Backing far away to squeeze a 90 cm grocery strip into one vertical frame forces the 1,800 px longest-edge cap to compress more than a hundred rows into illegible sub-10 px smears. Shooting two overlapping halves keeps every price line crisp and readable.
- Fold trailing loyalty coupons, survey codes, or sweepstakes banners backward behind the receipt before framing.
- Capture Shot 1 covering the store logo down through the middle items, leaving two or three recognizable item rows at the bottom edge as a visual overlap anchor.
- Capture Shot 2 starting two rows above that overlap anchor down through
Subtotal,Tax, andGrand Totalso bottom currency decimals stay above20 pxtall. - Save the final summary shot holding the paid total into your active book, and skip or discard intermediate item-only strips unless itemized tracking is needed.
For standard digital statements without thermal curl, pick original multi-page electronic documents directly using scanning PDF receipts on-device.
How do Review-bar rescue controls fix crooked or wide-margin shots?
Sideways landscape snaps, thick wooden desk borders, and unevenly shadowed corners do not require grabbing your phone camera for another take. Built-in Review adjustments transform and re-process the local image blob directly inside browser memory so you can recover clean fields in seconds.
Using Rotate 90°, Trim margins, and Boost faded ink in order
Apply transformations in a consistent sequence on the Review screen so each pass feeds cleaner pixels into PP-OCRv6:
- Rotate 90°: Turns sideways or upside-down captures upright in 90-degree increments before baseline line grouping runs, stopping horizontal price rows from reading out of order.
- Trim margins: Opens
0%to35%Top, Bottom, Left, and Right sliders paired with Re-scan crop, removing wide desk clutter so the remaining receipt upscales cleanly toward1,000 pxminimum width (2xupscale cap) before normalization. - Boost faded ink: Re-runs OCR with Bradley-Roth local adaptive thresholding (
binarisedprofile) whenever soft shadows or sun-bleached thermal coating cause regular greyscale stretching to drop totals.
Running Trim margins before Boost faded ink ensures local neighborhood thresholding measures actual paper luminance instead of dark walnut tabletop edges.
When clean photos still misassign fields
Sometimes the raw OCR text is crystal clear, yet the merchant string captures a loyalty slogan above the store name or an ambiguous 04/05/2026 date flips day and month. Thermal ribbons low on carbon and dot-matrix slips also produce isolated character substitutions (O vs 0, B vs 8).
In those cases, retaking five extra photos will not help because layout heuristics or worn printer ink caused the mismatch—learn how to tell photo defects apart from parser rules in why receipt OCR misreads merchants and items.
Quick pre-shutter checklist for faded receipts
Before tapping the camera shutter on thermal paper that has already sat in a wallet for days, run through this quick five-second routine:
- Lay the bill flat over a dark table or notebook cover so its white margins stand out clearly.
- Smooth sharp creases gently from the center outward, pressing curled top and bottom corners flat.
- Step slightly closer until merchant lines at the top and the grand total at the bottom fill most of the viewfinder.
- Block direct ceiling spotlights with your hand so glossy thermal paper loses white reflection stripes.
- Wait a beat after tapping to focus so thin digits stay crisp rather than smeared by shutter motion.
Comparing a clean natural-light snap against our pre-loaded demo samples—or following our faded thermal receipt recovery guide for sun-bleached ink—quickly shows whether lighting or paper wear caused a Review miss.
Mandatory check before saving any scan
Even studio-lit photographs cannot fix crumpled coffee stains hiding a decimal point or handwritten tip totals written on credit-card drafts. Always use Take a photo or review controls carefully, inspect check this confidence badges, and confirm merchant names, dates, currencies, and totals against the original paper slip before filing claims. You can test our zero-upload execution pipeline on How Privacy Works.