| ChromaKey |
Function
The ChromaKey function examines the HSV values of an image and pulls a matte
based upon the parameters. In the interface, you can scrub a color in the
Viewer. However, disable the matteMult parameter before you scrub. The hue,
saturation, and
value of an image each have a set of parameters to describe the exact HSV values
you are
keying, as a range from that midpoint, a falloff value, and a sharpness value
to describe the
falloff curve. This is illustrated in the following image.
The ChromaKey function is not Shake’s strongest feature. It is recommended
to use Color– ColorReplace; select your blue screen color; choose your
destination color (any other color); and then enable affectAlpha.
A typical application is blue screen or green screen removal. You can stack multiple ChromaKey nodes to extract different ranges. With the arithmetic parameter, you can choose to add to, subtract from, or replace the current mask.
|
Parameters
|
Type
|
Defaults
|
Function
|
| hue, sat, val |
float
|
.666, 1, 1 | Picks the center value to be pulled on hue, saturation, and value. |
| Range |
float
|
.2, .4, .8 | Plus and minus from the initial hue, sat, or value that is picked |
| Falloff |
float
|
.1,.8,.1 |
Describes the falloff range from hueRange that is picked, with the values ramping down |
| Sharpness |
float
|
.5, .5, .5 |
Describes the falloff curve from hueRange to hueFalloff. 0 = linear dropoff |
| matteMult |
int
|
1 |
toggle to pre-multiply the RGB channels by the pulled mask 0 = no pre-multiply |
| arithemetic |
int
|
0 | 0 = replace existing mask 1 = add to existing mask 2 = subtract from existing mask |
Synopsis
image ChromaKey( image, float hue, float hueRange, float hueFalloff, float hueSharpness, float sat, float satRange, float satFalloff, float satSharpness, float val, float valRange, float valFalloff, float valSharpness, int matteMult, int arithmetic );
Script
image = ChromaKey( image, hue, hueRange, hueFalloff, hueSharpness, sat, satRange, satFalloff, satSharpness, val, valRange, valFalloff, valSharpness, matteMult, arithmetic );
Command Line
-chromakey hue hueRange etc...
Example
shake parrot.jpg -chromakey .66 .2 .1 .5 1 .4 .8 .5 1 .8 .1 .5
See Also
LumaKey