GreenBG Remover

When is a difference matte better than a chroma key?

A difference matte asks a different question. A chroma key asks how similar each pixel is to the key colour; a difference matte asks whether that pixel changed compared with an empty plate of the same scene. That change of question buys you one large advantage and costs you two. The advantage is spill: with 40% green spill on a grass-green subject, the chroma key's alpha collapses to 0.2225 because the spill pushed the subject toward the key colour, while the difference matte holds 1.0000, because direction of colour change is irrelevant to whether something changed. The costs are a locked-down camera and a clean plate, and a hard noise floor — two empty plates differ by 0.0154 on average purely from sensor noise. The advertised advantage that does not hold is same-colour subjects: a garment in exactly the key colour produces a change of 0.0201, against a noise floor of 0.0154, and no threshold rescues it.

A different question, not a better keyer

A chroma key decides, for every pixel, how close it is to the key colour. A difference matte decides whether that pixel changed. You shoot the empty screen, you shoot the scene, and anything that moved is your subject.

It is worth clearing up the name first, because the thing it gets confused with is genuinely different. A colour difference key is a variant of a chroma key and behaves like one. A difference matte is not a colour operation at all — it never looks at whether your subject is green.

We built synthetic plates to measure it: 1280x720, key green #00B140, 25% corner falloff, sensor noise at sigma 2/255, and — importantly — independent noise between the empty plate and the subject plate, because no two frames share their noise. The subject contained a denim body, a skin-tone head, and a garment dyed in exactly the key colour, distinguished only by 3% brightness texture from folds.

Everything below is from that run.

The advantage that is real: spill stops mattering

This is the one worth remembering, and the measurement is unambiguous.

Take a grass-green subject sitting 0.305 from the key colour — close enough that spill is a real threat but far enough that the keyer holds it comfortably. Now put 40% green spill on it:

The chroma key loses most of the subject, because spill works by moving the subject's colour toward the key colour, and closeness is the only thing a chroma key measures. The difference matte does not care which direction the colour moved. The pixel changed, therefore it is subject. That is the whole mechanism, and it is the reason people reach for this method when spill is eating an otherwise good shot.

It also means you skip a whole stage of work. No spill suppression, no de-spill pass, no guessing at how much correction is too much.

The advantage that does not hold: same-colour subjects

The other thing difference mattes are said to solve is a subject that contains the key colour — the case that makes a chroma key delete part of your subject outright. We tested it directly, and the answer is more disappointing than the reputation suggests.

Mean alpha by region, chroma key against difference matte at a threshold of 0.05:

The chroma key deletes the garment completely, as expected. The difference matte rescues almost nothing of it. The reason is in the signal sizes: the garment produces a change of 0.0201, and the noise floor measured from two empty plates is 0.0154. Those are the same order of magnitude, so there is no threshold that separates them.

So the honest framing is this: a difference matte does not remove the same-colour problem, it converts it. The question stops being 'is this colour too close to the key colour' and becomes 'is the change here bigger than the noise'. Both can fail. A same-colour subject is still a bad idea.

Where the threshold has to sit

Because the method is a threshold on a difference, everything is a trade between false positives in the background and missed coverage on the subject. Measured on the same plates:

The strongly contrasting regions — the denim body and the head — sit at 100% detection at every threshold tested, all the way up to 0.30. Threshold selection only ever matters for the marginal regions, which is another way of saying it only matters where the method is already struggling.

Notice also that the useful range is narrow. Below 0.02 the background starts filling in with false foreground; above 0.03 the marginal subject is gone. Two hundredths of normalised colour distance is the entire window you have to work in.

What locking the camera down actually buys

The quote says you need a locked-down camera and a clean plate. Here is what failing to do that costs, measured by shifting the empty plate before differencing.

Background false positives, with a plate that has only falloff and noise:

And with a wrinkled plate, carrying 6% fabric texture at high spatial frequency: 0.00%, 0.20%, 0.41%, 0.81% — effectively the same, because sensor noise already dominates and the texture adds little on top.

So the honest version is not 'one pixel and the shot is ruined'. It is that a one-pixel shift manufactures foreground pixels out of nothing — around fifteen hundred of them at this resolution — and it puts them exactly along your subject's outline, which is the one place you cannot clean up afterwards. Our plate was clean; a real screen with seams, shadows and heavier wrinkles will be worse, and we did not measure that.

What makes it unforgiving is that nothing downstream absorbs it. A chroma key is tolerant of small misalignment because it looks at colour, not position. A difference matte is a subtraction, and any movement is fed straight into the result.

The noise floor is the whole game

Two empty plates of an unchanging screen should be identical. They are not, and the size of that difference sets everything else.

At sigma 2/255 noise, two empty plates differ by 0.0154 on average, with a 99th percentile of 0.0346 and a maximum of 0.0598. That is the floor, and every threshold has to clear it.

Reducing the noise lowers the floor in direct proportion:

Which means the things that reduce noise are doing double duty here: more light on the screen, in-camera noise reduction, averaging several empty frames into one clean plate. Averaging is especially cheap, since the plate is static by definition — you can average as many frames as you like and the noise floor drops with the square root of the count.

When to reach for it

The decision is mostly about whether you can satisfy the two requirements, because the requirements are absolute.

Reach for it when spill is the problem. This is the case it genuinely wins, and it wins by a lot: 0.2225 against 1.0000 at 40% spill. If your subject is fighting green bounce and the correction is eating the image, this is the fix.

Reach for it when the camera can be truly locked and you can get a clean plate. If either is impossible, the method has nothing to offer you — it will manufacture artifacts along every edge.

Do not reach for it just because your subject contains the key colour. It does not solve that. Change the wardrobe, or change the screen colour, as covered in our piece on the conditions automatic removal actually requires.

Do not reach for it for moving-camera work at all. There is no version of this method that survives a handheld shot.

Where these numbers stop

These plates are synthetic. The screen is a smooth falloff with Gaussian noise and, in the wrinkled variant, sinusoidal texture. A real screen has seams, real fabric, dust, uneven stretching and whatever the last shoot left on it, all of which raise the noise floor and raise the cost of any misalignment. Treat the thresholds as a shape, not as settings to copy.

The noise is independent between plates, which is right for two separate takes, but we did not model a camera's temporal noise behaviour or its in-body processing, both of which change the floor in ways this does not capture.

The subject is flat coloured regions. Real subjects have their own texture, motion blur and sub-pixel edges, and those interact with the differencing in ways this test does not show.

And the comparison is against one specific chroma key implementation — the one this site runs, with the window measured in our key colour piece. Software that models the screen spatially will narrow the gap on some of these numbers.

Related questions

What is a difference matte?

Instead of asking how close a pixel is to the key colour, it asks whether that pixel changed compared with an empty plate of the same scene. You shoot the screen with nothing in front of it, shoot the scene, and the difference is your matte. It is not the same thing as a colour difference key, which is a variant of a chroma key.

Does a difference matte fix spill?

Yes, and this is its real advantage. With 40% green spill on a grass-green subject, a chroma key's alpha falls to 0.2225 because the spill pushes the subject toward the key colour, while a difference matte holds 1.0000 — it only cares that the pixel changed, not which direction the colour moved.

Can it handle a subject the same colour as the screen?

Barely. A garment in exactly the key colour produced a change of 0.0201 against a noise floor of 0.0154, and mean alpha came out at 0.0031 where the chroma key gave 0.0000. It converts the problem from colour similarity into signal-to-noise rather than solving it.

How still does the camera have to be?

Locked down. A one-pixel shift between plate and scene took background false positives from 0.00% to 0.20-0.24%, which at 1280x720 is roughly fifteen hundred spurious foreground pixels sitting along the subject's outline. Four pixels gave 0.81-0.94%.

How do I lower the noise floor?

Reduce noise before anything else. The floor scales directly with it: sigma 0.5 gives 0.0038, sigma 2 gives 0.0154, sigma 4 gives 0.0308 and starts producing false positives. More light on the screen, in-camera noise reduction, and averaging several frames of the static plate all help directly.

Open the green screen remover