The K0 keyer takes an input image:

Background colors can be selected manually, or a color array can be provided by CyberGaffer.

All background colors and their interpolations are found in the input image.

The remaining areas in the image are filled by propagating the nearest known background color. This produces a clean, complete background image:


Inside the RGB color cube, a surface is defined using the colors W, L, R, and black.
The algorithm estimates the original foreground color and calculates its presence in the mixture as alpha.
For example, a color a is transformed into color b with an alpha of 0.52.
Users can adjust the surface by modifying the W, L, and R colors. This helps eliminate edge artifacts and results in more accurate color recovery.
Final results of the keying process:
Recovered Foreground

Alpha Channel

Keying quality is assessed by compositing the result onto solid black and white backgrounds. Color restoration errors become most visible in these conditions:
On White

On Black
