Urgent.News

What's breaking now, across thousands of outlets.

Editions

Tech

Background removal without a green screen is an underdetermined problem. Here's what the maths is doing.

Every pixel in a photograph of a person against a wall is a blend of two things. The compositing equation is the whole problem in one line: C = αF + (1 - α)B C is the pixel you can see. F is the foreground colour, B is the background colour, and α is how much of that pixel belongs to the foreground. Solid shirt, α is 1. Empty wall, α is 0. A single strand of hair crossing that pixel, α is 0.3 and…

Every pixel in a photograph of a person against a wall is a blend of the person's color and the wall's color. The compositing equation tells us how much of each color is present in each pixel. With a green screen, the background color is known, which allows us to solve for the person's color at each pixel. The problem becomes underdetermined without a green screen, requiring additional constraints to find a solution.

Green screening, or chroma keying, eliminates the need for additional constraints by providing the background color. However, this method has limitations, such as spill from the green screen onto the subject, which requires additional processing to correct. Alternative methods involve segmentation, where a model directly outputs a mask for the person, or alpha matting, where the image is split into foreground, background, and unknown regions.

The quality of the final result depends on various factors, such as the distance between the subject and the wall, the contrast between the subject's hair and the background, and the presence of light sources. Proper shooting techniques can significantly improve the outcome when swapping backgrounds in photos.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

INTERFACE SEGREGATION PRINCIPLE

No class should be dependent on methods it doesn't need. An example would be a "Machine" interface that forces the print() , scan() , and fax() methods. Not every machine has these 3 methods.

PRINCÍPIO DA SEGREGAÇÃO DE INTERFACES

Nenhuma classe deve ser dependente de métodos que não precisa. Um exemplo seria uma interface “Máquina”, que força os métodos print( ) , scan( ) e fax( ) . Nem toda máquina tem esses 3 métodos.

Computing WHO growth percentiles on-device

Every baby tracker shows growth percentiles. "Your daughter is in the 72nd percentile for weight." It looks like a lookup — find the row for her age, compare, print a number. It isn't.

The antivirus said 'no malware detected'. It was sitting right there on the disk.

A real incident, and a lesson about green lights. Every command output, version number and CVE ID below is from the actual investigation. Nothing was invented for the narrative.

  • Malware hidden on Synology NAS despite no threats detected by antivirus scan
  • Packers and shell scripts used to evade signature-based malware detection
  • Unpatched vulnerability and exposed remote access feature allowed remote code execution

More from Thursday 20 August →