Why a Cutout Looks Pasted On, and the Two Things That Fix It
A clean edge is not what makes a composite convincing. Two other things give it away: the subject carries the colour of the light it was photographed under, and it casts no shadow on the surface it is supposedly sitting on. Both are fixable with arithmetic, on your own device, with nothing downloaded and nothing generated.
By Novus Stream Solutions Editorial Team · Part of the Image processing and on-device AI topic cluster
Why a cutout looks pasted on
A 32-second captioned walkthrough of Cutout Match and Contact Shadow: colour inside the matte, then a grounded shadow from the alpha.
Complete transcript
- 0:00A clean edge can still look pasted on.
- 0:04Wrong light on the subject is the first tell.
- 0:08Cutout Match measures Lab colour on both sides.
- 0:12It moves only pixels inside the matte.
- 0:16Missing contact shadow is the second tell.
- 0:20Contact Shadow builds a footprint from the alpha.
- 0:24Both tools are deterministic transforms, not generation.
- 0:28Nothing is uploaded. Nothing is invented.
Almost every conversation about background removal is a conversation about edges. Hair, fur, the soft band around a shoulder, whether the model found the boundary. That is where the difficulty is, so that is where the attention goes.
But once the edge is good, a composite can still look wrong, and people usually blame the edge again because it is the part they know how to think about. It is normally not the edge. Two other things give a composite away, both of them independent of how the cutout was made, and both of them fixable with arithmetic rather than with a better model.
1. Clean edge, wrong light
The matte is fine. The subject still carries the studio colour temperature.
One: the subject is wearing the wrong light
Colour in a photograph is the colour of the object multiplied by the colour of the light. A white mug photographed under a tungsten bulb is orange. Photographed under an overcast sky it is blue. Your eye discounts this almost perfectly when it is looking at a real scene, which is why nobody notices their kitchen is orange at night.
It stops discounting the moment there are two scenes in one frame. A subject shot indoors dropped onto a daylight photograph does not look like an object under a warm light; it looks like a cut-out. The eye has one reference for what white should be and the picture is offering two.
Contrast does the same thing more quietly. A subject photographed against a bright studio backdrop has its shadows lifted by all that bounce. Put it into a scene lit by one window and it will be flatter than everything around it, in a way most people register as "it looks fake" without being able to name.
What you can measure, and what you cannot
Four properties of a region carry most of this, and all four are ordinary statistics:
- its average lightness,
- its average position on the two colour axes, which together is the colour of the light,
- the spread of its lightness, which is its contrast,
- and how its brightness trends across the frame, which is roughly where the light is coming from.
The last one is worth a paragraph, because the obvious way to measure it is wrong. Splitting an image down the middle and subtracting one half from the other is destroyed by any single dark object: a doorway on the left or a shadow on the right dominates the answer for the whole photograph. Fitting a plane to the brightness of every pixel, centred on the image own weighted middle, describes a trend instead of an accident, and reports approximately nothing on a scene that genuinely has no trend.
Do all of this in CIE Lab rather than in RGB. In RGB, every channel carries some luminance, so making a subject warmer also makes it brighter and adjusting its contrast also shifts its hue. Lab separates lightness from the two colour axes, which is what lets you move one thing at a time. It is also roughly perceptually uniform, so a cap expressed in Lab units means about the same amount of visible change on a dark subject and a bright one.
The trap in the standard method
The textbook transfer, which moves the subject mean and standard deviation onto the target mean and standard deviation, is a genuinely bad idea here, and it is what most implementations do.
The reason is that it makes a claim about the world that is false. A person is not as bright as the wall behind them. A black camera is not as bright as the desk it sits on. Force the averages to agree and you get a grey silhouette: technically matched, obviously wrong.
The honest version applies a fraction of any brightness difference and caps what survives that, moves the colour cast most of the way but not past a believable change of white balance, and bounds the contrast rescale in both directions. The result is a correction that closes the obvious mismatch and refuses to close the rest, because the rest is not a mismatch.
Which means the numbers have to be visible. A capped correction and a small correction look identical if you only report what was applied. Cutout Match prints what it measured next to what it applied, for all four properties, so a clamp is legible as a clamp.
And it has to touch only the subject
This is the part that has gone wrong here before, so it is worth being blunt about. A tool with this job shipped on this site previously. It captioned the background image, turned the caption into a text prompt, and ran the whole picture back through an image-to-image pass. It did not adjust the subject, it redrew it, and it altered the background it was supposed to be matching to at the same time.
The replacement adds an offset to colour values inside the matte and nowhere else. The constraint is not a policy, it is the last line of the loop: the corrected colour is mixed with the original in proportion to the matte alpha, so a pixel the matte does not cover is returned byte for byte. A test reads every pixel of a frame and requires exact equality outside the matte, with no tolerance.
The same line gets the boundary right as a side effect. A pixel that is half subject gets half the correction. Written instead as "if this pixel is part of the subject, correct it", a feathered edge gets the whole correction and you draw a rim of the new colour around the old one, along exactly the hair and fur edges everyone was worrying about at the start.
Two: it is not standing on anything
The second tell is simpler and often larger.
An object resting on a surface blocks some of the light that would otherwise reach the surface immediately around it. That darkening is not decoration. It is most of the evidence your eye uses to decide the object is resting on something rather than hovering above it. Remove the background and the evidence goes with it, because it was part of the background.
You do not need to know anything about the object to put it back approximately. You need its outline, which the matte already is:
- Find the contact line, which is the lowest row that is at least half subject. Not the lowest row with any transparency at all: a cutout fades to nothing over a few pixels, and grounding on the faintest of those floats the shadow by the width of the fade.
- Compress the silhouette vertically toward that line. That is what turns a shape into a footprint.
- Offset it slightly and blur it.
- Composite the original pixels back on top.
Nothing there is invented. Every pixel of the shadow is a function of the alpha channel the cutout already carried, which is why Contact Shadow is described as a deterministic transform and never as generation: the same file with the same settings always produces the same bytes.
The step that is easy to get wrong
Compressing a shape vertically by a factor of six means about six rows of the original land inside one row of the result. Take a single sample per output row and you read one of the six and skip five.
On a solid silhouette you might not notice. On fine hair, mesh or a lattice you get stripes, and they survive the blur that comes next, because the blur can only smear the rows that were read and cannot invent the ones that were not. Averaging the whole span instead is what an area resample does, and it is the difference between a shadow that looks like the object and a shadow that looks like a barcode.
What a silhouette cannot tell you
A matte gives you the outline and nothing about the shape. It cannot say which parts of an object are nearest the surface, so what you get is a footprint of the outline rather than a projection of a solid.
For a bottle, a box or a shoe photographed from roughly eye level, the silhouette and the footprint very nearly agree and the result convinces. For something photographed from above, or with a large overhang, they do not agree at all, and no setting fixes that. This is a limit of the input, not of the implementation, and it is the kind of limit a tool should state rather than hope you do not hit.
Neither of these needs a model
Both are arithmetic over pixels you already have. No weights, no download, no server, no inference, and no randomness. On a typical product photograph each one takes a fraction of a second on the device you are already holding.
That is worth saying because the reflex in 2026 is to reach for a model, and a model would be worse here in three ways. It would be a download measured in tens or hundreds of megabytes for a job that needs none. It would be non-deterministic, so the same file at the same setting would give you a different answer on Tuesday. And it would be unable to guarantee the one property that made the colour tool safe to ship again: that it changes the subject and nothing else.
The order to do them in
Colour first, then shadow. The shadow is built from the cutout outline and is unaffected by its colours, but judging a shadow is much easier once the subject is not fighting its background, and you will pick a strength you actually want.
And before either: if the cutout itself is poor, neither tool will rescue it. Photo Check measures whether a photograph will cut out cleanly in a fraction of a second, before anything is downloaded at all.
Applies to NSS Background Remover v2.6.2, the release that was current when this article was published.
Was this article helpful?
Your answer is saved in this browser only. This control makes no network request and does not send the answer to an NSS feedback endpoint.