OCR & Capture

How to Photograph a Receipt for Better OCR

On this page7 sections
  1. Six photography habits calibrated for receipt OCR
  2. Lighting, backing, and camera angle tips
  3. How image preprocessing handles faint ink and long slips
  4. How do Review-bar rescue controls fix crooked or wide-margin shots?
  5. When clean photos still misassign fields
  6. Quick pre-shutter checklist for faded receipts
  7. 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.

Side-by-side diagram comparing angled shadowed receipt capture against flat overhead receipt framing for on-device OCR

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.

  1. Fold trailing loyalty coupons, survey codes, or sweepstakes banners backward behind the receipt before framing.
  2. 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.
  3. Capture Shot 2 starting two rows above that overlap anchor down through Subtotal, Tax, and Grand Total so bottom currency decimals stay above 20 px tall.
  4. 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% to 35% Top, Bottom, Left, and Right sliders paired with Re-scan crop, removing wide desk clutter so the remaining receipt upscales cleanly toward 1,000 px minimum width (2x upscale cap) before normalization.
  • Boost faded ink: Re-runs OCR with Bradley-Roth local adaptive thresholding (binarised profile) 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:

  1. Lay the bill flat over a dark table or notebook cover so its white margins stand out clearly.
  2. Smooth sharp creases gently from the center outward, pressing curled top and bottom corners flat.
  3. Step slightly closer until merchant lines at the top and the grand total at the bottom fill most of the viewfinder.
  4. Block direct ceiling spotlights with your hand so glossy thermal paper loses white reflection stripes.
  5. 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.

Common questions

  • Why does filling the camera frame improve OCR accuracy so much?

    Receipt fonts are narrow and faint. Filling the frame ensures each letter spans roughly 20 or more pixels in height before image normalization runs at 1800px max edge.

  • Should I use flash when photographing glossy thermal paper?

    No. Direct flash creates a bright specular reflection stripe across shiny thermal paper that erases printed ink completely and cannot be recovered afterwards.

  • How should I scan an extra-long supermarket receipt?

    Avoid backing far away to fit three feet of paper into one tiny shot. Shoot the receipt in two overlapping halves or fold non-essential loyalty coupons neatly.

  • Do I need a scanner app before picking emailed PDF receipts?

    No. Pick original emailed PDFs directly with Choose photos or PDF on the scan screen instead of photographing your monitor.

  • Can poor contrast cause digits like 3 and 8 to swap?

    Yes. Motion blur, overhead glare, or heavily faded thermal ink causes PP-OCRv6 to confuse 0/O, 5/S, and 3/8, which is why flagged fields always require verification.

  • Can I fix an upside-down or wide-margin receipt photo without retaking it?

    Yes. Inside the Review bar, tap Rotate 90° to orient sideways receipts upright or open Trim margins to crop out excess tabletop borders with Re-scan crop so text upscales clearly.


Put it into practice

Scan receipt