Friday, July 25, 2008

Color Keying in Software

Chroma keying is a technique that is used to remove a color from an image and show a different image in place of that color. In this article different quality and speed optimized techniques will be shown regarding how one can make color keying in software.


This method uses solely the hue of a color, so that its saturation and value, such as in a shadow, are not relevant. This is a method that can be both used for RGB and HSV color spaces. The basic idea is that one defines an angle in the hue circle within the HSV color space; this angle is your chromakey. For every pixel being drawn one looks up its hue value, compares it to the defined angle to determine its alpha channel value. In the case of an RGB color space, the RGB value has to be converted to HSV to do the lookup (see Transformation from RGB to HSV). It is also advised to check if the value V within the HSV color space exceeds at least 50% in order to eliminate all kinds of white, gray and black shades.


The human visual system is less sensitive to the position and motion of color than luminance; bandwidth can be optimized by storing more luminance detail than color detail. At normal viewing distances, there is no perceptible loss incurred by sampling the color detail at a lower rate. In video systems, this is achieved through the use of color difference components. The signal is divided into a luma (Y') component and two color difference components (chroma).


Chroma subsampling deviates from color science in that the luma and chroma components are formed as a weighted sum of gamma-corrected (tristimulus) R'G'B' components instead of linear (tristimulus) RGB components. As a result, luminance and color detail are not completely independent of one another. There is some "bleeding" of luminance and color information between the luma and chroma components. The error is greatest for highly-saturated colors and can be somewhat noticeable in between the magenta and green bars of a color bars test pattern (that has chroma subsampling applied). This engineering approximation (by reversing the order of operations between gamma corrections and forming the weighted sum) allows color sub sampling to be more easily implemented.

Wednesday, July 23, 2008

Chroma Key Photography Techniques

Since digital cameras became mainstream with pros, there's been an increasing interest in Chromakey photography. Chromakey is the process of using a green screen or blue screen as a background and then removing that background (and replacing it with something else) in software. Like many things in photography, shooting Chromakey is as much art as science. There's a learning curve, and you definitely want to try your set-up before throwing clients in front of it. There are a few components that go into a good Chromakey photo shoot: lighting, subject positioning, and the background. There are many different ways to combine these successfully, as they all interact with each other. What "works" will depend on your equipment, what the subject is, and the environment you're shooting in.



For amateur or hobbyist photographers and video producers, coming up with the money for a nice, $200 (and up!) backdrop and the expensive stands and hangers required to help support it isn't very easy. Rather, they need a way to make a nice-looking background that is both good looking and easy to transport.

In this article, I will show you how you can make a great portable backdrop frame that allows you to transport your backdrops and hang them at any height and width you would like—all for under $50, using parts from your local fabric and hardware stores. Getting a good chroma key, depends on more than only the background, and requires other equipment and computer software.


Fabric Options for Backgrounds/Backdrops and Chromakeying

In researching on the Internet, I have found many different opinions as to which fabric is the best to use for backdrops, which fabrics are best for green screening and blue screening, and what fabrics last longer with or without paint, etc.

In my experience, it is easiest to go to a fabric store (or a store with fabrics in it, such as Wal-Mart) with some ideas in mind, and look through all the different fabrics to find something that suits your purposes. If you want a plain and simple background, there are many solid color backgrounds; if you want something more radical, you could get one of the many cartoon character backgrounds, a 'clouds' background, etc. Prices for different fabrics vary widely (especially depending upon the width of the fabric), and I usually like narrower (around 48") fabric, because it's easier to manage (and it fits in my car for portability better!).

But I will offer my advice on a few specific types of backgrounds and what fabric/thickness works best for them. Also, when selecting a fabric, you must keep in mind how the lights you use (whether they are $30 halogen work lights or $500 soft boxes) reflect off the fabric. If you need to, ask for a sample of the fabric (these are usually free) and take some pictures of it under different lighting conditions.

See my guide for lighting for photography and video (not yet posted) and lighting for green/blue screen compositing or chromakeying (not yet posted)

Fabric types/backgrounds:



  • Muslin is a strong, sturdy fabric for painting on, or as a simple white or tan-colored backdrop. You can use acrylic or oil paints (found at art supply stores) or paints you can find at home-supply stores to make professional-looking backdrops for portraits and the like. The only problem with muslin is that it is prone to wrinkling (but this may not matter if you paint it. Be sure to wash the muslin right after you buy it and iron it to get out as many of the wrinkles you can. Make sure you buy PVC or metal piping that is sturdy enough to hold some of the thicker muslins. Do a Google search for 'paint muslin backdrop' to find out more?

  • Cotton, one of the more common fabrics found in a fabric store, is fairly easy to keep clean, but not so easy to paint on. Cotton is best for solid dyed colors. Make sure you wash and iron the backdrop before rolling it, or the wrinkles may be very hard to remove!

  • Rayon is a very lightweight fabric that can be had for a low price and is easy to transport, roll, and keep wrinkle-free. However, because it is so thin, you have to be careful when lighting it (sometimes lights behind the screen will make the lighting very uneven).

  • Polyester is a very low maintenance fabric, and is relatively easy to keep wrinkle-free. Simply make sure you've washed and dried it, and then take it out as soon as you can to avoid wrinkles. Light reflects off polyester a little brighter than most cotton, so make sure you account for that when lighting backdrops. You can purchase polyester in many different thicknesses (and many different prices); make sure your backdrop support frame is sturdy enough to hold it.


For Compositing: Professionals usually have access to professional-quality blue and green paints and fabrics for building high-quality backdrops. However, the average photographer or videographer does not have so much money. In my experience, the 'greenest green' or 'bluest blue' you can find will work fairly well (especially for photographs which you'd like to edit in Photoshop).

Friday, July 18, 2008

Chromakeys

Discover the full power of green screen, animation, color grading and masking with Composite Lab Pro. If you want to make a superhero fly or go invisible, turn actors into giants, create picture-in-picture presentations or color grade your movies to look cinematic, Composite Lab Pro has everything you need.


Chromakeying is a technique that is used to remove a color from an image and show a different image in place of that color. In this article different quality and speed optimized techniques will be shown regarding how one can make color keying in software.


And the popular cure-all seems to be the proper lighting of your Chromakey wall (or back-drop). Not just a wimpy little 100 watt light aimed somewhere in the general direction of the background, but a host of lights that literally flood the background.

We’re talking a minimum of two 250 watt quartz halogens aimed at the backdrop from high and off to each side so that they will not inadvertently cast any shadows from your key subject (who should be standing at least three feet out from the backdrop).

The key subject should be illuminated with it’s own key light (another 250 watt plus) that is preferably diffused with either an umbrella or a diffusion filter.

If your camera and Panasonic MX-50 video mixer will not recognize your background as a solid, evenly lit blue, then the Chroma Keying will go crazy trying to determine where the background ends and the key subject begins.

Hence, the “jaggies.”

Every now and then, the background color of blue will reflect back onto the key subject. And this, of course, will cause background video to be keyed in onto the key subject, which you don’t want to do.

This reflected blue can be mostly eliminated by placing light colored amber gels over your background lights (the two lights that flood your backdrop). More specifically, ask for “bastard amber” at your local photo shop when purchasing these gels. They’ll know what you’re talking about.

As for the key subject light, place it about three or four feet off to one side or the other of the camera so as not to cast any direct shadows onto the background.


Once you have adjusted your “hue” and “slice” control on the Panasonic WJ-MX50 for optimum Chroma-key effect that you view on your monitor, slight adjustments of the angle and location of all of your lights will make the effect that much better.

Tuesday, November 6, 2007

Primatte Chromakey 2.0 - WIN

Primatte Chromakey technology engenders unique effects for motion pictures and TV over a long period of time. And now this most valuable gizmo has caught the eyes of Professional photographers and designers for blue/green screen work.

Primatte's tools are simple to use. The interface is incorporated without a glitch into Photoshop, ruling out the necessity to switch into other applications. All you have to do to characterize the tonal values is to click and drag to extract.

Key Features

· Customize Background
A foreground image of any resolution shot against a single color with transparent pixels could be customized into new background or utilize the masked image.

Alter background Color
The background color cast or spill reflected on the subject of already shot photograph can be altered.

· Preserve Semi transparent Details
Minute details of the image like wisps of hair, water, smoke. etc., can be preserved

Primatte Chromakey 2.0 - MAC

Primatte Chromakey technology engenders unique effects for motion pictures and TV over a long period of time. And now this most valuable gizmo has caught the eyes of Professional photographers and designers for blue/green screen work.

Primatte's tools are simple to use. The interface is incorporated without a glitch into Photoshop, ruling out the necessity to switch into other applications. All you have to do to characterize the tonal values is to click and drag to extract.

Key Features

Customize Background
A foreground image of any resolution shot against a single color with transparent pixels could be customized into new background or utilize the masked image.

Alter background Color
The background color cast or spill reflected on the subject of already shot photograph can be altered.

Preserve Semi transparent Details
Minute details of the image like wisps of hair, water, smoke. etc., can be preserved

History of Chroma Key

Prior to the introduction of digital compositing, the process was complex and time consuming known as "traveling matte". The blue screen and and traveling matte method were developed in the 1930s and were used to create special effects for The Thief of Bagdad.

The credit for development of the blue screen is given to Larry Butler, who won the Academy Award for Special Effects for the Thief of Baghdad in 1940. 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. [2]

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.

In the past decade, the use of green has become dominant in film special effects. The main reason for this is that green not only has a higher luminance value than blue but also in early digital formats the green channel was sampled twice as often as the blue, making it easier to work with. The choice of color is up to the effects artists and the needs of the specific shot. Red is usually avoided due to its prevalence in normal human skin pigments, but can be often used for objects and scenes which do not involve people.

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.

Reversible Chroma Key green and blue

Features:

This backdrop offers efficient Chromakey ability in an easy to use product. It's two Chromakey colors on one frame.

Reversible - Double-sided in green and blue, making the backdrop versatile enough to fulfill most photo shoot needs.

Fabric - Reversible in Chroma-Key Green and Blue, the fabric prevents shoot-through.

Large size 5 ft X 7 ft- allows for many uses.

Double-riveted frame - to make it extremely durable

Folds down to 1/3 it's actual size and stores in the included carry bag to make storing and transporting easy and convenient.
D
oes not reflect.