Log in

View Full Version : Any Chroma Keying Filters out there?


slk001
26th April 2007, 15:25
I am looking for a filter to create a mask to use in LAYER/MASK/OVERLAY that functions as follows. The source for the mask will be a video shot against a green (or blue) screen. I want the filter to return a BLACK pixel for every pixel in the video EXCEPT where the color of the pixel falls within a tolerance range around my GREEN or BLUE pixels, where it would return a WHITE pixel. I would like the tolerance ranges to be independently set for the RED, GREEN and BLUE channels.

A sample flow chart (assuming RGB24 colorspace):

IF CURRENT_PIXEL_COLOR_RED > RED_TOLERANCE_HI OR IF CURRENT_PIXEL_COLOR_RED < RED_TOLERANCE_LOW
AND
IF CURRENT_PIXEL_COLOR_GREEN > GREEN_TOLERANCE_HI OR IF CURRENT_PIXEL_COLOR_GREEN < GREEN_TOLERANCE_LOW
AND
IF CURRENT_PIXEL_COLOR_BLUE > BLUE_TOLERANCE_HI OR IF CURRENT_PIXEL_COLOR_BLUE < BLUE_TOLERANCE_LOW
THEN
CURRENT_PIXEL_COLOR = BLACK
ELSE
CURRENT_PIXEL_COLOR = WHITE

Any ideas?

Wilbert
28th April 2007, 19:32
1) ColorKeyMask could be modified such that the tolerances can be set independently (for R,G,B).

2) Use avs v2.6 (still experimental) and MaskHS.