{
  "id": 21757062,
  "title": "Before you ship background blur, price the halo fix: about 2.5x CPU per 1080p frame",
  "url": "https://urgent.news/2026/11/25/before-you-ship-background-blur-price-the-halo-fix-about-2-5x-cpu-per",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-25T08:10:13.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/shu_jing_915fa287b22539ad/before-you-ship-background-blur-price-the-halo-fix-about-25x-cpu-per-1080p-frame-2f8m"
  },
  "original_language": "en",
  "account": "When you add background blur to a person in a video, the glow around their shoulders that results is not free. On a 1080p frame, filling the person's hole with Telea inpainting before applying the blur takes 398.0 ms on the CPU, compared to 162.4 ms for a plain blur – about 2.5 times longer. The halo's intensity varies depending on the background, with it being removed almost entirely on a simple wall but having little effect on a busy bookshelf in some cases. However, in one scenario, it even made things worse. The halo originates from the person's color mixing into the background, with darker jackets creating darker edges and brighter jackets causing brighter rims. The stronger the blur, the larger the halo becomes, reaching up to 66 pixels in width for a Gaussian sigma of 40. There is a noticeable threshold around sigma 2.3 where the halo's impact becomes noticeable. Implementing the fix – removing the person first, filling the hole with Telea, then blurring and pasting back the person – reduces the halo's visibility significantly. For instance, on a black figure against a light wall, the first 4-pixels error decreases from 21.53 to 0.53. This is particularly relevant for products offering a strength slider, as the top of the slider is where the halo's cost becomes too high to ignore. There are three key risks to consider before committing to this fix: a mask that is too small can leave an edge in the background, making the error only slightly reduce; increasing the hole's size doesn't always guarantee a better result; and feathering the edge does not improve the background fill. Importantly, Telea and normalized convolution estimates do not recreate the real background behind the person, which may be a limitation to keep in mind. A practical budget rule is that at 1080p, plain blur takes 162.4 ms per frame on one CPU thread, normalized convolution takes 389.8 ms, and Telea takes 398.0 ms. For a 10-second clip at 30 fps (300 frames), the approximate CPU time would be around 49 seconds for plain blur and 119 seconds for the other methods. ImgIng, a video matting service, has a beta version that experiences similar halo issues, which can be addressed by exporting a transparent video (WebM) and applying the fix on your own system. However, keep in mind that these numbers are estimates based on OpenCV on a CPU, an Apple-silicon Mac, and one run, and do not account for GPU acceleration or browser performance.",
  "summary": "If you let a user blur the background behind a matted person, the fix for the glow around their shoulders is not free. On 1080p frames, filling the person's hole with Telea inpainting before the blur took 398.0 ms per frame on the CPU, against 162.4 ms for the plain blur. That is about 2.5 times. On a simple wall it removed nearly all of the halo. On a busy bookshelf it removed much less, and in…",
  "key_points": [],
  "editors_take": "Eliminating visual artifacts in video background blur requires a significant increase in CPU processing time that developers must account for when designing user-facing strength sliders.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}