Keying

from Wikipedia, the free encyclopedia

Keying is a technical term from video editing and describes the cutting out of image elements from the background (mostly based on a key color, hence keying ). A mask ( alpha channel ) is created that defines a transparency for each image area or pixel . Keying is therefore an important technique of visual effects in order to create image compositions ( compositing ).

Keying methods

There are different keying techniques, the approaches of which have different advantages and disadvantages. The aim of all keying approaches is to generate the alpha mask as precisely as possible. Here, semi-transparent elements (for example glass or water), fine contours (for example hair) and motion blur of the foreground object must be taken into account.

No technique is fundamentally better than any other, instead the right keying method must be selected depending on the situation and the source material. In many situations it also makes sense to use several keys on individual areas of the image (e.g. head, shoulders, hands) and to combine the results with one another in order to obtain the final mask.

Chroma key

Demonstration of the production of the television weather report with blue screen technology

This approach is based on a hue (the key color, the  key ) from a color space selected. In addition, tolerances can be defined for similar color tones. The prerequisite for the chroma key is therefore a monochrome background like the blue screen . Colorkey is also used colloquially .

A typical application is the television presenter in front of a weather map.

In the simplest form, the alpha value is calculated for each pixel with the color value ( hue ) , as well as a selected key color value and a tolerance according to the formula:

Color Difference Key

The Color Difference Key approach is also intended for monochrome backgrounds. The differences between the red, green and blue color channels are evaluated in order to create an alpha mask. For each pixel, the alpha value is calculated from the RGB values as follows:

  • For a green screen:
  • For a blue screen:

3D keying

The basic idea of ​​3D keying is the idea of ​​mapping all pixels of an image in three-dimensional space and using a 3D object to enclose the pixels of the background to be keyed. The R, G and B values ​​of an image are normally used for this pixel representation on the X, Y and Z axes. Pixels in this 3D space can be specifically included or excluded via the deformation of the 3D object. All pixels whose RGB or XYZ value lies within this object are viewed as completely transparent. In order to be able to key semitransparent image areas, a second, larger 3D object is used, which includes the semitransparent pixel values. Pixel values ​​that are outside the small but inside the large object are calculated by the distance from the pixel value to the surface of the small object.

Luma Key

The luma or luminance key is based on the brightness values ​​of an image. A brightness value (possibly with a tolerance value) is defined for the release. Image areas that have the defined brightness value are made transparent, other areas are not. A Lumakey is used when the object to be exposed has very strong brightness contrasts with the background.

Difference matte

This method calculates the difference between two images. With this approach, identical image areas of two images are set transparently. Thus, only picture differences remain visible. For a Differencekey, two identical settings of the same scene are required to expose an object. This turns out to be complex in practice, since film grain, wind, light and shadow or a pumping camera are parameters that prevent the recording of two identical images.

Depth Key

If an image has precise depth information ( Z-channel ), a depth key with these values ​​can cut out image areas. For this purpose, a depth value range is selected and defined as visible. All other areas of the image become transparent.

implementation

Many electronic or digital video mixers have keying methods implemented. The keying type (chroma key, luma key, linear key) can be selected and the parameters set via operating elements.

In the field of digital editing systems and video processing, almost all known video processing applications now offer integrated keying solutions. In addition, special keying plugins are offered that enable extensive adjustment options and more complex keys. Well-known keying tools are

  • Primatte (3-D keyer)
  • Ultimatte (Color Difference Keyer)
  • Keylight Keyer (Color-Difference Keyer)

Mask refinement

The mask generated by the keying process can be refined using other methods in order to achieve the desired effect.

Garbage mat
Before using a key, a rough selection can be made around the desired image area in order to exclude disturbing background elements. With the "garbage matte" set, the following key can be set more finely.
Holdout mat
In contrast to the garbage matte, a mask is drawn here to preserve image areas and thus exclude them from the key. This can be used to define areas that have the same color as the background and yet should not appear transparent (such as blue eyes in a blue screen shot).
Spill suppression
Spills are the areas that color areas in the foreground object blue / green due to light reflections from the blue / green background. Hair and edges are predominantly affected. Spill can be suppressed by eliminating unwanted color casts in the foreground using a color correction algorithm. The shift in the color values ​​does not only affect specific pixels, but the entire image.

literature

  • Ron Brinkmann: The Art and Science of Digital Compositing. Morgan Kaufmann Publishers
  • Steve Wright: Digital Compositing for Film and Video. Focal Press
  • Ulrich Schmidt: Professional video technology. Jumper
  • Digital production. (Trade magazine)

Web links

Individual evidence

  1. Christopher Schultz: Digital Keying Methods. P. 9 , accessed February 14, 2017 .
  2. Christopher Schultz: Digital Keying Methods. P. 12 , accessed February 14, 2017 .