Course Home | Documentation | Lab Hours/Tutoring | Projects | Quizzes | Schedule | Submit

Saint Louis University

Computer Science 1050
Introduction to Computer Science: Multimedia

Michael Goldwasser

Spring 2016

Dept. of Math & Computer Science

Lecture: Chroma Keying

Chroma Key Masking (a.k.a. Green-Screening)

We explore the topic of chromakey masking (i.e., green-screening, not that the key color need be green). We have an interactive Processing sketch (available as chromaKey.pde) which will allow for exploration of the topic (although we do not expect you to read the source code).

Our software allows the user to control several aspects of the masking process as follows:

/*
 * We allow the user to separately control:
 * -- The chroma key color. This is done by clicking on a pixel of either reference image
 * -- The function used for computing relative difference between two colors:
 *      pressing 'M' (the default) gets you Manhatten distance in RGB space
 *      pressing 'E' gets you Euclidean distance in RGB space
 *      pressing 'L' gets you Euclidean distance in L*a*b space 
 * -- The threshold value used for masking can be changed with UP/DOWN arrows
 * -- The image source can be chosen from a collection by typing the
 *    digit that corresponds to its index in the collection (with 0 = default)
 *
 * Finally, if you like what you see, 'S' saves the current screen to file.
 */

The software will show four panels:

Here are a few examples (with the second being much more difficult to achieve, given the clothing color and shadows).

chromaKey0
chromaKey1


Michael Goldwasser
CSCI 1050, Spring 2016
Last modified: Wednesday, 13 April 2016
Course Home | Documentation | Lab Hours/Tutoring | Projects | Quizzes | Schedule | Submit