1 91.427 Computer Graphics I, Fall 2008 Image Formation.

15
1 91.427 Computer Graphics I, Fall 2008 Image Formation

Transcript of 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

Page 1: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

1 91.427 Computer Graphics I, Fall 2008

Image Formation

Page 2: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

2 91.427 Computer Graphics I, Fall 2008

Objectives

•Fundamental imaging notions•Physical basis for image formation

Light Color Perception

•Synthetic camera model•Other models

Page 3: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

3 91.427 Computer Graphics I, Fall 2008

Image Formation

•In computer graphics form images generally two dimensional process analogous to how images formed by physical imaging systems

Cameras Microscopes Telescopes Human visual system

Page 4: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

4 91.427 Computer Graphics I, Fall 2008

Elements of Image Formation

•Objects•Viewer•Light source(s)

•Attributes govern how light interacts with materials in scene

•Note independence of objects, viewer, and light source(s)

Page 5: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

5 91.427 Computer Graphics I, Fall 2008

Light

•Light is the part of the electromagnetic spectrum that causes a reaction in our visual systems

•Generally these are wavelengths in the range of about 350-750 nm (nanometers)

•Long wavelengths appear as reds and short wavelengths as blues

Page 6: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

6 91.427 Computer Graphics I, Fall 2008

Ray Tracing and Geometric Optics

One way to form image:•follow rays of light

from point source

•find which rays enter lens of camera•But, each ray ==> •multiple interactions with objects•before being absorbed or going to infinity

Page 7: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

7 91.427 Computer Graphics I, Fall 2008

Luminance and Color Images

•Luminance Image Monochromatic Values are gray levels Analogous to working with black and white film or television

•Color Image Perceptional attributes: hue, saturation, and lightness

Have to match every frequency in visible spectrum? No!

Page 8: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

8 91.427 Computer Graphics I, Fall 2008

Three-Color Theory

•Human visual system: two types of sensors Rods: monochromatic, night vision Cones

• Color sensitive• Three types of cones• Only three values (tristimulus values) sent to brain

•Need only match these three values ==> Need only three primary colors

Page 9: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

9 91.427 Computer Graphics I, Fall 2008

Shadow Mask CRT

Page 10: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

10

91.427 Computer Graphics I, Fall 2008

Additive and Subtractive Color

•Additive color Form color by adding amounts of three primaries

• CRTs, projection systems, positive film

Primaries = Red (R), Green (G), Blue (B)

•Subtractive color Form color by filtering white light with Cyan (C), Magenta (M), and Yellow (Y) filters

• Light-material interactions• Printing• Negative film

Page 11: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

11

91.427 Computer Graphics I, Fall 2008

Pinhole Camera

xp= -x/z/d yp= -y/z/d

Use trigonometry to find projection of point at (x,y,z)

Equations of simple perspective

zp= d

Page 12: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

12

91.427 Computer Graphics I, Fall 2008

Synthetic Camera Model

center of projection

image plane

projector

p

projection of p

Page 13: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

13

91.427 Computer Graphics I, Fall 2008

Advantages

•Separation of objects, viewer, light sources

•2-D graphics is special case of 3-D graphics

•Leads to simple software API Specify objects, lights, camera, attributes Let implementation determine image

•Leads to fast hardware implementation

Page 14: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

14

91.427 Computer Graphics I, Fall 2008

Global vs Local Lighting

•Cannot compute color or shade of each object independently Some objects blocked from light Light can reflect from object to object Some objects might be translucent

Page 15: 1 91.427 Computer Graphics I, Fall 2008 Image Formation.

15

91.427 Computer Graphics I, Fall 2008

Why not ray tracing?

•Ray tracing more physically based ==>•Why not use to design graphics system?•Possible & simple for simple objects •E.g., polygons & quadrics with simple point sources

•In principle, can produce global lighting effects

•E.g., shadows & multiple reflections •But ray tracing slow & not well-suited for interactive applications