Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Feathering the mask did not fix the halo around a blurred background: 29.40 vs 21.53

You cut a person out of a clip, blur the background, and a faint ring of the person's own color sits along the edge. The usual advice is to feather the mask. In this test that made the ring score worse, so here are the numbers. Labels used below: [measured] means a number from this test, [not tested] means it was not run. Everything was run once, on one 3-second clip and some synthetic figures,…

Blurring the background of a video clip and then feathering the person's mask to isolate them can sometimes result in a halo or ring around the person. In a test, a black figure was cut out of a clip with a 18-pixel blur on a light wall. The edge band scored 21.53 without any feathering. When the mask was feathered by 3 pixels, the score increased to 29.40, indicating a worse appearance.

Shrink the mask by 2 pixels and feather by 2 pixels, and the score improved slightly to 21.93. The metric revealed that feathering often pushes the person's color into the measured band, making the halo appear worse than it actually is. A more effective approach was to remove the person from the frame, blur the background, and then place the person back on top.

This method reduced the edge score from 17.10 to 0.63 in one test. Removing the person from the frame, blurring the result, and then adding the person back on top reduced the edge score from 17.10 to 0.63. Other tests showed that smaller masks, holes in the background, and certain inpainting methods could also impact the halo's visibility.

The cost and performance of different methods were also considered, with the CPU implementation being slower than the Telea fill method. ImgIng's video matting tool utilizes blurred backgrounds, which can result in a halo appearing around the person. To achieve a cleaner edge, it is recommended to blur the background layer that has the person removed instead of blurring the entire footage and then placing a keyed copy of the person over it.

For more complex scenarios, such as deep learning inpainting and hand-held shots, further testing may be necessary.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Bind a license to a key the device holds

A hardware fingerprint feels like it binds a license to a machine. It does not. It binds the license to a string the machine computed about itself — a hash of the machine GUID, the volume serial, the…

What Is Running in the Background of Your Mac?

Why I built Daemon Inspector, what it found on my own Mac, and what the App Sandbox taught me along the way. What Is Running in the Background of Your Mac?Every Mac runs dozens of programs you never…

  • Daemon Inspector reveals hidden background programs on Mac
  • Categorizes items by owner, necessity, and status
  • Provides commands to disable/remove items safely

More from Wednesday 25 November →