When you replace a video background with a blurred copy of the original, a smeared ring often shows up around the person. The usual first guess is that the matting mask is sloppy. In the run described here, the ring appears even when the mask is good, because the blur is applied to a picture that still contains the person.

The numbers below come from one 3-second, 90-frame clip, a few synthetic test figures, and a single run on an Apple-silicon Mac with Python, NumPy and OpenCV. Treat them as readings from these samples, not as general constants. The real footage comes from Wikimedia Commons, VOA Learning English, public domain, cropped, keyed, and placed on a new background. The other test images are self-made.

Blur spreads the person into the wall

Think of the frame as two layers. The bottom layer is the original picture, person and wall together. The top layer is the sharp person cut out with the mask. The common recipe blurs the bottom layer, then pastes the sharp person on top.

Here is the catch. The bottom layer was blurred while the person was still in it, so the person's color has already been averaged into the wall pixels next to the outline. Pasting the sharp person on top hides the person-shaped area, but it cannot take back the color that leaked outward. That leaked color is the ring.

The other order is to remove the person first, fill the hole from the surrounding wall, blur that, and only then paste the person on top. Same mask, same blur, different order.

One mask, two orders

The readings use CIELAB color difference (ΔE) in a band 0 to 4 pixels outside the person, measured against the ideal result of a person pasted on a clean, blurred background. Blur strength is a Gaussian sigma of 18. On the real clip, averaged over 90 frames, blurring first gives 17.10 and filling the hole first gives 0.63. A ΔE around 2.3 is roughly where a difference starts to be noticeable, but no one looked at these frames in a viewing test, so that line is only a reference.

Strength matters too. On a synthetic figure, sigma 6, 18 and 40 gave visible rings about 11, 30 and 66 pixels wide, with edge ΔE of 16.72, 21.53 and 24.23. Dividing width by sigma gives roughly 1.6 to 1.8, which is arithmetic on these three readings, not a rule.

The color of the ring is the person's own color. In the synthetic figures, the RGB shift next to the shoulder was (−58, −63, −62) for black clothing, (+4, −60, −59) for red and (+20, +16, +15) for white. So dark clothes on a light wall give a dark edge, red clothes give a red tint, and only the white case is brighter than the wall. It does not have to look like a glow.

Mask tweaks barely touch it

Feathering only softens the person layer. The wall already contains the leaked color, so feathering has nothing to remove. On the synthetic figure with a light wall, the readings were these.

Method Light wall High-contrast shelf
Blur first 21.53 15.75
Blur first, feather 3 px 29.40 20.29
Fill hole, mask 3 px smaller than person 17.98 13.44
Fill hole, mask on the outline 0.34 6.72
Fill hole, mask grown 15 px 1.94 21.47

Feathering made the number worse. Part of that is the metric, since feathering pushes person color into the measured band, so read it as "does not help" rather than "hurts by this much". A mask smaller than the person leaves edge pixels in the part that gets blurred, so filling the hole does almost nothing. Growing the mask too far is also a problem: on the shelf, 21.47 is worse than not fixing at all.

The fill is a smooth guess from nearby pixels, not the real hidden background. That is why the shelf keeps a residue of 6.72 while the plain wall drops to 0.34. Only Telea, Navier-Stokes and normalized convolution from OpenCV were tried. Learned inpainting models were not.

The fix costs time. At 1080p on a single CPU thread, blurring alone took 162.4 ms per frame and the Telea fill plus blur took 398.0 ms, about 2.5 times as much. That says nothing about GPU or in-browser speed. Flicker also differs: on this static-background clip the ring moved with the person, with a frame-to-frame difference of 0.322 against 0.016 to 0.052 after filling. Moving backgrounds were not tested.

Where ImgIng fits in this

The mask for the real-person clip came from the video background tool in ImgIng https://imging.ai/ , a Beta feature that is meant for desktop Chrome or Edge. Its "blur original scene" background option gave an edge that matched what blurring the whole original picture, person included, would predict, so the ring shows up there too. For a clean edge, pick the transparent background, which in that tool exports WebM only, and composite in the order above. Check that whoever receives the file can open WebM. Long videos, 4K, older devices, fast motion, semi-transparent objects and shot cuts may be slow or show edge errors, and none of those were measured here.