Skip to content
GPU-assistedUpload required

Clean Up a Photographed Receipt

A till receipt is printed by heating a coated paper rather than by putting ink on it, and that coating never stops reacting. Warmth, sunlight, friction, and the plastic of a wallet all keep developing it, which is why a receipt goes uniformly gray and then blank. Nothing recovers a faded one. The copy you make today is permanently the best copy that will ever exist, and that fact is more useful than anything on this page.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free

Drop an image here, or click to browse

Up to 25 MB. Uploaded temporarily, deleted after processing.

GPU-assisted — results vary slightly between runs.

What it does

  • Curl shadows removed by background subtraction
  • Tuned for small thermal glyphs
  • No model, so no figure can change
  • Output around four megapixels

How to use Receipt Cleanup

  1. 1

    Photograph it today

    Thermal print fades continuously and irreversibly. Capture it while it is still legible, then clean the capture, rather than the other way round.

  2. 2

    Flatten it as best you can

    Weigh the ends down or press it under glass. This handles the curl shadow well, but it cannot recover text that the curl has hidden from the camera.

  3. 3

    Run the cleanup

    The photo is enlarged, the shaded paper is estimated and subtracted, then contrast and sharpening bring the small print back to a readable edge.

How it works

Your photograph is resampled with lanczos filtering to about four megapixels — more than the document page uses, because receipt print is considerably smaller and needs the pixels.

Then a morphological closing with a fifteen pixel kernel estimates what the paper looks like with no printing on it, including whatever shading the curl and your own shadow put across it. That estimate is subtracted, leaving only the marks that were too small to survive it. The result is inverted back to dark on white, contrast is raised, and a light sharpening pass restores the edges.

No model, no sampler, no prompt. The same photograph always produces the same output.

Thermal paper is running out

This is the part worth acting on, and it has nothing to do with image processing.

A till receipt has no ink. The paper carries a colorless dye and a developer in a coating, and the print head applies heat where the characters should be, which melts the two together and turns them black. That is the entire mechanism, and it explains everything about how receipts behave.

The reaction is not finished when the receipt is printed. Anything that supplies heat continues it: a warm car, a sunny windowsill, a radiator, a pocket. Friction does it too, which is why a receipt rubbed against a card in a wallet goes gray in patches. Some plasticisers in wallets and folders dissolve the coating outright.

The end state is a uniformly gray slip with nothing on it. There is no restoration for that anywhere, from anyone, because the dye has already reacted across the whole sheet — the contrast between character and background is gone rather than hidden.

Which makes the practical advice unusually clear. Photograph receipts on the day you get them. A good capture of a fresh receipt is a permanent record. A perfect tool applied to a two year old one in a glovebox is not.

Why the settings differ from a document page

The mechanism here is the same background subtraction used for photographed documents, with two adjustments that follow from the medium.

The kernel is smaller. That number sets the boundary between what counts as ink and what counts as background — anything wider is treated as paper and subtracted. Receipt characters are small and often condensed, so a kernel sized for A4 body text would classify some of them as background and delete them.

There is a sharpening pass at the end. Thermal printing produces softer characters than a laser printer does, because heat spreads sideways in the coating and the head has a coarse dot pitch. A document scan usually needs no help at the edges; a receipt does.

The curl is a real advantage here

Receipts are never flat, and for once that works out.

A strip of thin paper rolls, so under any light there is a smooth brightness gradient down its length, plus a darker band where it lifts away from the surface. That is a slowly varying signal across a large area — precisely the kind of thing background subtraction is built to remove, and precisely the kind of thing a brightness threshold cannot handle at all.

What the method cannot do is recover text the curl physically hid from the camera. If the paper folded over on itself, those characters were never photographed and no processing brings them back. Flatten the receipt under glass before shooting it, then let this deal with whatever shading remains.

Publication gate

This page ships once the workflow has been run against a fresh curled receipt, a partly faded one, a receipt with a rubbed gray patch, and one photographed under mixed lighting, with every total and date compared against the paper original.

Examples

Curled supermarket receipt

shop.jpg - 3000x4000, a long receipt curling at both ends
prathom-receipt-cleanup.png - 1732x2308, flattened tone

The intended case. The curl produces a smooth brightness gradient down the strip, which is exactly what the background estimate removes.

Partly faded receipt

old.jpg - 2000x3000, gray print on gray paper
old-clean.png - 1632x2448

Improves the contrast between what remains and the paper. Where the coating has fully developed there is nothing left to recover, and no tool changes that.

Frequently asked questions

Can it restore a receipt that has already gone blank?

No. Fading is the coating reaching its developed state, so the information is not obscured, it is gone — there is nothing under the gray to bring back. This raises the contrast of whatever survives. A receipt that is faint becomes readable; one that is blank stays blank.

Can it change a number on my receipt?

No, and this is the reason the workflow is built without a model. There is no generation step anywhere in it, only arithmetic on your pixels, so nothing exists that could turn an ambiguous digit into a confident one. For anything going into an expense claim or an accounting record, that property is the point.

Why is this different from the document shadow page?

Same principle, different tuning. Receipt print is much smaller than document text, so the background estimate uses a smaller kernel or it would swallow the characters. There is also a sharpening pass afterwards, because thermal printing has softer edges than anything a laser printer produces.

Should I keep the original photograph?

Yes, always, and this matters more here than elsewhere. The cleaned version is a processed derivative, and some organizations will want the unmodified capture. Since the paper itself is disappearing, your original photograph is the primary record and the cleaned copy is the readable one.

Is the AI Receipt Cleanup tool free, and do I need an account?

There is no paid tier for Receipt Cleanup, which means there is no free version being held back against one. You do not sign in, you do not enter a card, and the file you download carries no mark. What the page does ask of you is patience with the queue, because the job runs on a shared GPU host and finishes in its own time.