32
Colors

Colors

  • Upload
    baka

  • View
    26

  • Download
    0

Embed Size (px)

DESCRIPTION

Colors. Color Systems. In computer graphics, we use RGB colors. But… Can it represent all colors? Is it linear? For example, (1.0, 1.0, 1.0) is white (1.0, 0.0, 0.0) is red Is (1.0, 0.5, 0.5) half white and half red? - PowerPoint PPT Presentation

Citation preview

Page 1: Colors

Colors

Page 2: Colors

Color Systems

• In computer graphics, we use RGB colors. But…– Can it represent all colors?– Is it linear? For example,

• (1.0, 1.0, 1.0) is white• (1.0, 0.0, 0.0) is red• Is (1.0, 0.5, 0.5) half white and half red?• Does the color (r, g, b)*0.5 look like the color

(r, g, b) in half intensity?

Page 3: Colors

What is a Color, After All?• We may define a

color by its wavelength.

• However, most colors have energy spread in every wavelength.

Figure 5.1 in Pharr’s book: (a) Fluorescent light(b) Lemon skin

Page 4: Colors

What is a Color (II)• What is more interesting is that different

energy distributions may be perceived as the same color!

Page 5: Colors

Additive vs. Subtractive Color

Page 6: Colors

The CIE Color Matching

Page 7: Colors

CIE XYZ Space• To get rid of the negative values, CIE defined

3 new hypothetical light sources .

Page 8: Colors

Color and Spectrum in PBRT

• XYZ color:

• Spectrum class in PBRT:Class COREDLL spectrum {

public:

private:

float c[COLOR_SAMPLES];

}

dXSx )()(

dYSy )()(

dZSz )()(

Page 9: Colors
Page 10: Colors

Linearity• Unfortunately equal steps in the XYZ space

does not produce perceptually equal steps in the color.

Page 11: Colors

CIE L*u*v Space

• Designed to be perceptually uniform.

Page 12: Colors

Other Color Space

• HSV: hue, saturation, value.

• HSL: hue, saturation, lightness.

From: http://en.wikipedia.org/wiki/File:Hsl-hsv_models.svg

Page 13: Colors

Gamma Correction

• For a monitor, the light intensity follows an exponential curve such as:

Page 14: Colors

How to Determine the Gamma?

• How to detect the gamma of your monitor? Compare it with dithering: (Hint: how do you produce a square with 50% gray on the screen?)

Page 15: Colors

Basic Radiometry

Page 16: Colors

What Do You Mean By Light Intensity?

• What does I in rendering equation mean?

• The power of light source– E.g., wattage of a light bulb.– Flux (Φ) measured in watts (W) or

joules/second

• Does it change with distance?– Another radiometric quantity needed here.

Page 17: Colors

Radiance and Irradiance• See Pharr’s 5.4.1 (2nd

Ed.)• Irradiance E

– Area density of flux.– Measured in W/m2

– E = Φ / 4πr2

dLE in cos

From Watt’s p.278

Page 18: Colors

Radiance and Irradiance• Intensity and solid angle • Radiance L

– Light energy density– Measured in W/(sr-m2)– Remains constant along a ray

dLE in cos

From Watt’s p.278

Page 19: Colors

Analogy to River Flow

• How do you compare the water flow of two rivers?

• How do you measure the intake of a irrigation canal attached to the river?

Page 20: Colors

Exercise (Sanity Check)

• Q1: What do you mean when you say object A is “brighter” than object B? Does it refer to intensity, radiance, or irradiance?

Page 21: Colors

High Dynamic Range (HDR) Images

Page 22: Colors

What is Dynamic Range?

• What does the brightness (or darkness) mean in a photograph?

Page 23: Colors

An Example

Page 24: Colors

Recovering High Dynamic Range Radiance Maps from

Photographs• By Paul Debevec (SIGGRAPH 1997)• Step 1: Recovering the film response

curve.• Step 2: Recovering the radiance map

given the response curve.

Page 25: Colors

Recovering the Response Curve

Page 26: Colors
Page 27: Colors
Page 28: Colors

File Format

• RGBE (.hdr) format that is used in Greg Ward’s RADIANCE.

• OpenEXR: also used in Pharr’s PBRT• For more information, see:

– http://ict.debevec.org/~debevec/Research/HDR/– http://en.wikipedia.org/wiki/High-dynamic-range_i

maging

Page 29: Colors

Tone Mapping

• Converting HDR intensity to displayable range

• In general: [0, infinity) to [0, 1)• Global – spatially uniform• Local – spatially varying in each pixel

according to the local features of the image.

Page 30: Colors

 Creative Commons Attribution-Share Alike 3.0 Unported license. Source: http://en.wikipedia.org/wiki/File:Dundus_Square.jpg

Page 31: Colors

Creative Commons Attribution-Share Alike 3.0 Unported license. Source: http://upload.wikimedia.org/wikipedia/commons/b/b3/HDRI-Example.jpg

Page 32: Colors

Tone Mapping In Digital Photography

 Creative Commons Attribution 2.0 Generic license. Source: http://en.wikipedia.org/wiki/File:Dundus_Square.jpg