CS 248 - Introduction to Computer Graphics

Autumn Quarter, 2004

Marc Levoy

Lecture notes for Tuesday, October 19 (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 Powerpoint slides I showed in class (HTML or PPT or PDF).

**Question for thought:**
What compositing formula was used to create the last slide? 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 19, 2004 06:51:34 PM