Keying: Sample Tools

The Sample Tools are the heart of Primatte Keyer. They contain the “tools” of Primatte, which you will use to perform all of Primatte’s main matte extraction functions. Whatever tool you select here will determine what operation Primatte performs when you make a sample. There are four main components to the Selection tools...

• SET BG COLOR

• CLEAN BG AREA

• CLEAN FG AREA

• FINE TUNING

All sampling takes place in the Canvas window.

SET BG COLOR

SET BG COLOR (where BG stands for Background) is the first step in creating a matte with Primatte Keyer. SET BG COLOR lets you select the color you want to remove from the frame or sequence. This first sample gives Primatte Keyer a starting point for matte creation. While the two most common screen colors are blue and green, Primatte Keyer can extract a matte from any color.

To use the SET BG COLOR tool, position the cursor in the bluescreen area of the Canvas window, near the foreground object. Sample the targeted background color by selecting a small area with the mouse by clicking and dragging to select a range of pixels. After releasing the mouse button Primatte Keyer will start the compositing process and quickly generate a matte. The resulting composite will be seen in the Canvas window.

The image above shows the original bluescreen area being sampled.

The above image is the matte resulting from the initial sample operation. If the foreground image was shot on a properly lit bluescreen stage, Primatte Keyer will do 90% of the matte generation in this first step.

I f you sample a range of pixels in the blue area using either the rectangular sampling method or the point sampling method, Primatte Keyer will average together the different color values of the sampled pixels to obtain a single color value to remove. In many instances Primatte Keyer works better when only a single pixel is sampled instead of a range of pixels.

For example, if the foreground image contains a shadow that you want to keep in the final composite, selecting these shadow pixels when sampling will result in the shadow being keyed out. To prevent the shadow from being included in the matte, simply click once in area outside shadow. Primatte Keyer will select only those pixels with that same color value, leaving the darker pixels of the shadow with the rest of the foreground image.

This first sample that you choose determines the initial color range, so be careful not to sample over any of the foreground area. If you do drag over the foreground area, simply undo, or click the Reset button in the Primatte controls.

Since the initial sample using the SET BG COLOR tool sets the center point for the Primatte algorithm, if you cannot get a good key further down in this lesson, try resetting the Primatte Keyer and starting over with a different initial sample.

CLEAN BG AREA

The next step in the matte creation process is removing the noise from the background areas of the matte, and for this you will use the CLEAN BG AREA tool. Depending on how well your bluescreen element was shot, there will be unwanted white noise areas in the black area of the matte. The CLEAN BG AREA tool lets you quickly sample the noise to remove it.

When the CLEAN BG AREA tool is selected, you will sample pixels in the Canvas window known to be 100% background. White noisy areas in the 100% background region will become black.

Only sample areas that you know to be entirely in the bluescreen area and which you want completely removed. You may need to sample the noisy areas several times to clean the background area.

Primatte Keyer will process the sampled areas and eliminate the noise.

You should sample the white milky areas as often as necessary to remove the noise from the background.

If you are having trouble seeing any noise, try increasing the gamma of your monitor. Increasing the gamma can make it much easier to see dark noise in the matte. Or, if you are on a flat panel monitor, try looking at the monitor from an angle. This can also enable you to see noise that is often times not visible when looking head-on.

While using the CLEAN BG AREA tool to sample the background noise it is possible to unintentionally cause too much detail to be removed from the foreground element. The following image shows a matte with incorrect sampling that has removed the semi-transparent hair detail from our foreground subject.

The sample region above was too close to the wispy hair, and as a result too much detail has been removed (see below).

There is no need to eliminate all noise in the bluescreen portions of the image. If you attempt to carefully remove all the noise around the foreground object, an accurate matte is nearly impossible to create and the resulting composite will not look convincing. You can always recover some detail later in the process using the Fine Tuning tool.

CLEAN FG AREA

CLEAN FG AREA is essentially the opposite of CLEAN BG AREA, letting you sample away any dark areas in the middle of the white foreground area.

When this operational mode is selected, the user samples pixels in the bluescreen element known to be 100% foreground. The color of the sampled pixels will be registered by Primatte to be the same color as in the original foreground image. This will make dark gray areas in the 100% foreground region become white. CLEAN FG AREA is usually the third step in using Primatte. To use CLEAN FG AREA simply sample the image in exactly the same manner as you did when using CLEAN BG AREA. Instead of sampling the dark pixels in the background area, sample the darker areas in the foreground area until they are completely white. An example sample is in the image below.

This image shows the result of that sample...

The same usage rules for CLEAN BG AREA also apply to CLEAN FG AREA. For example, these dark regions should be in areas that are supposed to be 100% foreground and white. Do not sample fine detail areas such as hair, glass or water. Avoid selecting any areas that are transition areas — areas where the foreground and background elements are going to be blended together such as the edges of the foreground objects.

Do NOT select the soft edged transition foreground and background. Selecting these regions will produce unwanted results.

FINE TUNING

The FINE TUNING controls allow you to select problem areas in your image in order to correct them, such as areas with color spill, or elements that have too little or too much transparency. The FINE TUNING controls work in conjunction with the three sliders that appear directly beneath it. The sliders are named Spill, Transparency, and Detail.

To get the most of the explanations contained below an understanding of Primatte’s internal algorithm, known as the Polyhedral Slicing Algorithm, is essential. Please refer to The Primatte Algorithm - How Primatte actually works.

Spill Slider

The Spill Slider performs a color adjustment on the foreground by controlling the amount of the background color present in the sampled foreground area.

The image below shows us the foreground image. As you can see there is quite a bit of blue spill on the inside of the woman’s arm.

To remove this spill we will simply do a sample of the area in question.

The Spill Slider's value represents the amount of spill removal applied to the image. To remove more spill we need to increase this value.

The image above shows the blue spill areas on the arm before the Spill Slider value was increased from 0.38 to 0.44. The image below shows it after the adjustment...

Note that only the blue spill color region has been affected, the rest of the image is unchanged. Repeat this process on all color regions with blue spill until all spill is removed. For the above example, you might select some spill in the light flesh tones, remove it, then the dark flesh tones, remove it and then sample on the red sweater color regions. The slider adjustment will only affect spill in the color region selected before moving the slider.

After performing a spill removal operation you may notice a yellow or magenta tint on the foreground. Try lowering the spill removal value to compensate for this tinting. After resampling, increase the Spill value in small increments, such as 0.1. A small value change can often result in a significant change in color to the image.

Transparency

The Transparency Slider adjusts the opacity of the matte by increasing the transparency of the sampled color range. Use the Transparency Slider to adjust the softness of foreground areas such as shadows.

As with the Spill Slider, increasing the Transparency Slider value will make the sampled area more transparent. In the example above, a sample is made of the cigarette's shadow.

The Transparency Slider's value is increased slightly and the shadow becomes more transparent.

Detail

The Detail Slider restores the visibility of foreground pixels that have disappeared because of a close similarity to the background color. Use the Detail Slider to restore lost detail like hair or smoke.

In the image above, some smoke detail had been lost during the spill removal procedure. A sample is made where the smoke used to be and the value of the Detail Slider is decreased.

The result is to increase the amount of detail visible in the element.