GreenBG Remover

Why does your camera give the subject a white border before you even key it?

Because sharpening inside the camera works on brightness and leaves colour alone, so every contour in the frame picks up a pair of rings: the side that is already brighter gets brighter, the darker side gets darker. On anything brighter than the screen - a highlight, a white shirt, rim-lit skin - the bright ring lands inside your subject, and where a channel runs into 255 the rim stops being that colour and becomes white. Those pixels are written before the keyer ever sees the frame, they come out fully opaque, and no keying control on this page can reach them.

What the camera does to an edge before it encodes it

In-camera sharpening - sold as detail, aperture or crispness - is an unsharp mask: it blurs the frame, subtracts the blur, and adds part of the difference back. At any step in brightness that has one fixed side effect. The bright side of the step overshoots, the dark side undershoots, and the two rings are equal, opposite and only a couple of pixels wide.

The part that matters for keying is that the correction is applied to luma only. Chroma is left where it was, and in a 4:2:0 pipeline it was already stored at half resolution. So the camera is raising brightness while holding the colour-difference values fixed, which is not the same thing as brightening the colour. Converted back to RGB, the channel that is already highest runs into the 255 ceiling first.

The border follows brightness, not colour

We built a 640x360 frame of six discs - dark hair, an olive jacket, mid grey, skin, rim-lit skin and a white shirt - against a screen reading (0,177,64), luma 131, and took the key colour from the screen itself. At a moderate detail setting, radius 1.2 pixels, the pixel one step inside the contour moved by this much luma: hair -19.7, olive -7.8, grey -1.8, skin +5.4, rim-lit skin +13.8, white +13.1.

The sign follows one thing only: whether the material is brighter or darker than the screen. Hair sits 88 luma below the screen and loses another 19.7; the white shirt sits 109 above and gains 13.1. The control is the mid grey at 128 against a screen at 131 - a completely different colour, almost the same brightness, and it picks up just -1.8. A border that tracks brightness and ignores colour is not a chroma problem.

Why the bright side turns white

An overshoot that stays below 255 only makes the rim a brighter version of the same colour. Skin at (205,160,140) comes back as (207,162,142): 2.1 code values wrong, and invisible on its own. The white border appears where the overshoot has nowhere left to go. Among the rim pixels that hit the ceiling, rim-lit skin goes from (240,205,185) to (255,225,205), and its saturation falls from 0.229 to 0.196.

Push the detail harder and those same pixels read (255,236,216) at saturation 0.153 - a third of the colour is gone and what remains is a bright neutral line. At that setting 29.4% of the rim-lit band and 32.7% of the white band have a channel pinned at 255. That line is now part of your subject: baked into RGB, at full opacity, before any colour key runs.

The screen still keys clean - which is why nobody suspects the camera

The other half of the pair lands on the screen, and there it is harmless. Over the three pixels of screen just outside the contour, the default setting leaves 0.27% of them alive, and their average distance to the key colour is 0.026 - well inside the window. Darkening green a little keeps its normalised RGB close to the key, so the halo never appears as leftover screen.

That is the trap. You get a cutout with a bright outline, the screen itself is gone, and the obvious conclusion is that the keyer did something wrong. Nothing in the numbers supports it: the screen is clean, the rim pixels are sitting at alpha 1.000, and the artefact survives unchanged whatever plate you drop behind the subject.

Why no control on the page can reach it

Tolerance only decides which pixels turn transparent, and a pixel is deleted once the setting clears 200 times its distance to the key colour, plus 9.8. On this frame those rim pixels need 130 for hair, 128 for grey, 184 for skin, 228 for rim-lit skin and 255 for white. The control stops at 100. The single band that 100 can reach is the olive jacket - and at that setting the keyer deletes 100.0% of it, garment included, not just its border.

Spill suppression and despill desaturate both act only where green is the largest channel. Across the hair, grey, skin, rim-lit and white bands, 0.0% of the pixels satisfy that test, because red is the big channel on a warm rim. The band measures 4.2 code values of error with those two controls at zero, at 35 and 10, and at 100 and 100 - identical, because neither of them ever fires.

How to tell this from an alpha problem

Composite the same cutout on a near-black plate and on a near-white one and measure the rim. A transparency problem moves: the error depends on what you place behind it. This does not move. Hair is 8.0 code values wrong on both plates, olive 3.2 on both, grey 0.8, skin 2.1, rim-lit skin 5.4 and white 5.5 - the same number twice, because those pixels are opaque and carry the error inside their own RGB.

The reach is the second fingerprint. Measured inward from the contour, rim-lit skin is +13.8 luma one pixel in, +2.3 at two, +0.2 at three and +0.01 at four. A green fringe decays with coverage; this decays with the sharpening kernel, over about three pixels, and it is a fixed number of pixels at any resolution - 16.2% of the subject's area at 360p, 8.4% at 720p and 5.7% at 1080p.

What actually gets rid of it

Turn the detail down before you shoot. Setting the same model's amount to zero returns every measured band to 0.0 error, and it is the only fix that costs nothing else. Sharpening is a look, and the look can be applied once, at the end, to the finished composite - where there is no longer a colour key downstream for it to fool.

If the footage already exists, the options are few. Halving the frame with the Long edge setting averages the ring away: at 1080p the rim-lit peak falls from +12.6 to +4.5, so roughly 36% of it survives, and you have softened the edge you wanted to keep. Past that, the ring is about three pixels wide and has to be repaired by hand, or the shot has to happen again with the detail setting down.

Related questions

Is this the same thing as a green fringe?

No. A green fringe lives in semi-transparent contour pixels that still carry some of the screen's colour, and its size changes with the plate you put behind the cutout. This border sits on pixels the keyer left at alpha 1.000 and it is a brightness offset, not a colour one. The giveaway is that spill suppression fires on 0.0% of these pixels, while it does fire on a genuine green rim.

Can I raise Tolerance until the border goes away?

Not on any of the materials measured here. The rim pixels need between 130 and 255 depending on the material, and the control stops at 100, so no setting will delete them as background. The one exception is an olive garment, whose rim needs exactly 100 - and at that setting the keyer removes 100.0% of the garment rather than the border.

Does turning sharpening off make the footage too soft?

It makes the captured frame softer, which is the point: the correction is a look, and applying it once to the finished composite costs nothing downstream. In our measurements, amount zero returned every band to 0.0 error. Sharpening before a colour key is the one place where that look is not free.

Does shooting at a higher resolution help?

It makes the ring thinner relative to the subject, because the ring is a fixed number of pixels: 16.2% of the subject's area at 360p against 5.7% at 1080p. But the peak brightness error stays where it was. Only downscaling reduces it, and halving the frame still leaves about 36% of the peak behind.

Open the green screen remover