CS 248 - Introduction to Computer Graphics

Autumn Quarter, 2008

Marc Levoy

Lecture notes for Tuesday, October 14 (last half of class)

- Definition of digital compositing
- 1-bit matte
- 8-bit matte - the alpha channel
- Derivation of the OVER operator
- The assumption of uncorrelated mattes
- The compositing algebra
- Premultiplied alpha

Press here for the buddha picture I showed in class.

**Question for thought:**
What compositing formula was used to create this image? Treat the
background, the buddha, and each airbrush stroke as a separate image having
color and alpha channels. Your formula should be of the form "A *op1* B
*op2* C *op3*...", optionally with parentheses, where A, B, and C
are images and *op1*, *op2*, and *op3* are taken from the
list of 12 Porter and Duff compositing operators.

To save time in class, I didn't discuss the relationship (above) between binomial coefficients and the expectation of two independent random variables, but it's an interesting fact.

**
Reference:
**
Wallace, B.,
Merging and Transformation of Raster Images for Cartoon Animation,

*Computer Graphics* (Proc. SIGGRAPH '81),
Vol 15, No. 3, August, 1981, pp. 253-262.

**
Reference:
**
Porter, T., Duff., T.,
Compositing digital images,

*Computer Graphics* (Proc. SIGGRAPH '84),
Vol. 18, No. 3, 1984, ACM, pp. 253-259.

For more details about these formulations, and discussion of the history of digital composition, click here.

levoy@cs.stanford.edu

Last update: October 14, 2008 06:08:35 PM