Urgent.News

What's breaking now, across thousands of outlets.

Tech

Every despill formula bets on colours your subject isn't wearing

A despill step is usually one line of maths, picked from whichever tutorial came first. To see what the three common lines cost, the comparison here uses a self-made 1280×720 test card with a green screen at RGB(20,175,65) and ten patches: hair strands, a white shirt, a light-blue shirt, light and dark skin, a yellow object and a grey veil at α=0.45. Clean foreground and alpha are known. The…

Every despill formula relies on color assumptions in the subject. A comparison uses a 1280×720 test card with a green screen at RGB(20,175,65) and ten patches: hair strands, shirts of varying colors, skin tones, yellow and grey. The spill was added artificially and results are compared to the original using ΔE76 for color difference and HSV angle for hue. One Mac with Python and NumPy was used for processing. The despill step is usually a single line of math, and three common methods were compared on this test card.

Average-limit assumes no color in the shot is greener than (R+B)/2, resulting in minimal green removal. Yellow and light-blue shirt patches showed higher ΔE values (39.4 and 12.3, respectively) with noticeable hue shifts. Max-limit assumes spill always pushes green to the top channel, leaving yellow and skin interior untouched but causing hue shifts in light-blue shirt and light skin edges. Complement-fill assumes removed green should return as magenta, causing noticeable hue shifts in the light-skin edge and yellow patch.

The choice of despill formula depends on the shot. Average-limit is best for yellow props, while max-limit is safer for pale blue clothes or light skin under heavy spill. Complement-fill trades skin tone for brightness. Adding a step to subtract the screen color before despilling prevents unintended color shifts. AI matting also requires the same color assumption choice.

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

OpenTelemetry Collector to Loki Without Losing Trace Context

Originally published on kuryzhev.cloud The scenario A checkout request fails, you find the error in Grafana, and the log line has no trace link.

  • Preserve trace context in logs using OpenTelemetry SDK log bridge or appender
  • Configure OpenTelemetry Collector pipeline with OTLP, filelog receiver, and traceparser operator
  • Do not label trace context as labels in Loki to maintain correlation with Tempo

More from Wednesday 18 November →