Chroma key is a technique for mixing two images or frames together, in which a color (or a small color range) from one image is removed (or made transparent), revealing another image behind it. This technique is also referred to as color keying, colour-separation overlay (CSO; primarily by the BBC), greenscreen, and bluescreen. It is commonly used for weather forecast broadcasts, wherein the presenter appears to be standing in front of a large map, but in the studio it is actually a large blue or green background. The meteorologist stands in front of a bluescreen, and then different weather maps are added on those parts in the image where the color is blue. If the meteorologist himself wears blue clothes, his clothes will become replaced with the background video. This also works for greenscreens, since blue and green are considered the colors least like skin tone. This technique is also used in the entertainment industry, the iconic theatre shots in Mystery Science Theater 3000, for example.
The credit for development of the bluescreen is given to Larry Butler, who won the Academy Award for Special Effects for The Thief of Bagdad. He had invented the blue screen and traveling matte technique in order to achieve the visual effects which were unprecedented in 1940. He was also the first special effects man to have created these effects in Technicolor, which was in its infancy at the time.
In 1950, Warner Bros. employee and ex-Kodak researcher Arthur Widmer began working on an ultra violet traveling matte process. He also began developing bluescreen techniques: one of the first films to use them was the 1958 adaptation of the Ernest Hemingway novella, The Old Man and the Sea, starring Spencer Tracy.
The background footage was shot first and the actor or model was filmed against a bluescreen carrying out their actions. To simply place the foreground shot over the background shot would create a ghostly image over a blue-tinged background. The actor or model must be separated from the background and placed into a specially-made "hole" in the background footage. The bluescreen shot was first rephotographed through a blue filter so that only the background is exposed. A special film is used that creates a black and white negative image — a black background with a subject-shaped hole in the middle. This is called a 'female matte'. The bluescreen shot was then rephotographed again, this time through a red and green filter so that only the foreground image was cast on film, creating a black silhouette on an unexposed (clear) background. This is called a 'male matte'.
The background image is then rephotographed through the male matte, and the shot rephotographed through the female matte. An optical printer with two projectors, a film camera and a 'beam splitter' combines the images together one frame at a time. This part of the process must be very carefully controlled to ensure the absence of 'black lines'. During the 1980s, minicomputers were used to control the optical printer. For The Empire Strikes Back, Richard Edlund created a 'quad optical printer' that accelerated the process considerably and saved money. He received a special Academy Award for his innovation.
One drawback to the traditional traveling matte is that the cameras shooting the images to be composited can't be easily synchronized. For decades, such matte shots had to be done "locked-down" so that neither the matted subject nor the background would move at all. Later, computer-timed motion control cameras alleviated this problem, as both the foreground and background could be filmed with the same camera moves.
Petro Vlahos was awarded an Academy Award for his development of these techniques. His technique exploits the fact that most objects in real-world scenes have a color whose blue color component is similar in intensity to their green color component. Zbig Rybczynski also contributed to bluescreen technology.
Some films make heavy use of chroma key to add backgrounds that are constructed entirely using computer-generated imagery (CGI). Performances from different takes can even be composited together, which allows actors to be filmed separately and then placed together in the same scene. Chroma key allows performers to appear to be in any location without even leaving the studio.
Computer development also made it easier to incorporate motion into composited shots, even when using handheld cameras. Reference-points can now be placed onto the colored background (usually as a painted grid, X's marked with tape, or equally spaced tennis balls attached to the wall). In post-production, a computer can use the references to adjust the position of the background, making it match the movement of the foreground perfectly. Modern advances in software and computational power have even eliminated the need to use grids or tracking marks – the software analyzes the relative motion of colored pixels against other colored pixels and solves the 'motion' to create a camera motion algorithm which can be used in compositing software to match the motion of composited elements to a moving background plate.
Weathermen often use a field monitor to the side of the screen to see where they are putting their hands. A newer technique is to project a faint image onto the screen.
In analog color TV, color is represented by the phase of the chroma subcarrier relative to a reference oscillator. Chroma key is achieved by comparing the phase of the video to the phase corresponding to the preselected color. In-phase portions of the video are replaced by the alternate background video.
In digital color TV, color is represented by a triple of numbers (red, green, blue). Chroma key is achieved by a simple numerical comparison between the video and the preselected color. If the color at a particular point on the screen matches (either exactly, or in a range), then the video at that point is replaced by the alternate background video.
Occasionally, a magenta background is used, as in some software applications where the magenta or fuchsia key value #FF00FF is sometimes referred to as "magic pink".
With better imaging and hardware, many companies are avoiding the confusion often experienced by weather presenters, who must otherwise watch themselves on a monitor to see the image shown behind them, by lightly projecting a copy of the background image onto the blue/green screen. This allows the presenter to accurately point and look at the map without referring to monitors.
A newer technique is to use a retroreflective curtain in the background, along with a ring of bright LEDs around the camera lens. This requires no light to shine on the background other than the LEDs, which use an extremely small amount of power and space unlike big stage lights, and require no rigging. This advance was made possible by the invention of practical blue LEDs in the 1990s, which also allow for emerald green LEDs.
There is also a form of color keying that uses light spectrum invisible to human eye. Called Thermo-Key, it uses infrared as the key color, which would not be replaced by background image during postprocessing.