36
Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Embed Size (px)

Citation preview

Page 1: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Tone mapping

with slides by Fredo Durand, and Alexei Efros

Digital Image SynthesisYung-Yu Chuang11/08/2005

Page 2: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Tone mapping

• How can we display it?Linear scaling?, thresholding?

10-6 106

10-6 106

Real worldradiance

Displayintensity

dynamic range

Pixel value 0 to 255

CRT has 300:1 dynamic range

Page 3: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Global operator (Reinhart et al)

world

worlddisplay L

LL

1

Page 4: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Global operator results

Page 5: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

What does the eye sees?

The eye has a huge dynamic rangeDo we see a true radiance map?

Page 6: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Eye is not a photometer!

• "Every light is a shade, compared to the higher lights, till you come to the sun; and every shade is a light, compared to the deeper shades, till you come to the night."

— John Ruskin, 1879

Page 7: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Compressing dynamic range

rang

era

nge

Page 8: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Fast Bilateral Filteringfor the Display ofHigh-Dynamic-Range Images

Frédo Durand & Julie DorseyLaboratory for Computer ScienceMassachusetts Institute of Technology

Page 9: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

High-dynamic-range (HDR) images

• CG Images

• Multiple exposure photo [Debevec & Malik 1997]

• HDR sensors

HDR valuefor each pixel

Recover response curve

Page 10: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

A typical photo

• Sun is overexposed• Foreground is underexposed

Page 11: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Gamma compression

• X X

• Colors are washed-outInput Gamma

Page 12: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Gamma compression on intensity

• Colors are OK, but details (intensity high-frequency) are blurred

Gamma on intensityIntensity

Color

Page 13: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Chiu et al. 1993

• Reduce contrast of low-frequencies• Keep high frequencies

Reduce low frequencyLow-freq.

High-freq.

Color

Page 14: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

The halo nightmare

• For strong edges• Because they contain high frequency

Reduce low frequencyLow-freq.

High-freq.

Color

Page 15: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Our approach

• Do not blur across edges• Non-linear filtering

OutputLarge-scale

Detail

Color

Page 16: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Edge-preserving filtering

• Blur, but not across edges

• Anisotropic diffusion [Perona & Malik 90]– Blurring as heat flow– LCIS [Tumblin & Turk]

• Bilateral filtering [Tomasi & Manduci, 98]

Edge-preservingGaussian blurInput

Page 17: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Comparison with our approach

• We use only 2 scales• Can be seen as illumination and reflectance• Different edge-preserving filter from LCIS

OutputLarge-scale Detail

Compressed

Page 18: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Start with Gaussian filtering

• Here, input is a step function + noise

output input

J f I

Page 19: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Start with Gaussian filtering

• Spatial Gaussian f

output input

J f I

Page 20: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Start with Gaussian filtering

• Output is blurred

output input

J f I

Page 21: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Gaussian filter as weighted average• Weight of depends on distance to x

),( xf )(I

output input

)(xJ

xx

Page 22: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

The problem of edges

• Here, “pollutes” our estimate J(x)• It is too different

x

)(I

)(xI

),( xf )(I)(xJ

output input

Page 23: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Principle of Bilateral filtering• [Tomasi and Manduchi 1998]

• Penalty g on the intensity difference

)(xJ ),( xf ))()(( xIIg )(I)(

1

xk

x)(xI

)(I

output input

Page 24: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Bilateral filtering• [Tomasi and Manduchi 1998]

• Spatial Gaussian f

)(xJ ),( xf ))()(( xIIg )(I)(

1

xk

x

output input

Page 25: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Bilateral filtering• [Tomasi and Manduchi 1998]

• Spatial Gaussian f• Gaussian g on the intensity difference

)(xJ ),( xf ))()(( xIIg )(I)(

1

xk

x

output input

Page 26: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

output input

Normalization factor• [Tomasi and Manduchi 1998]

• k(x)=

)(xJ )(I)(

1

xk

x

),( xf ))()(( xIIg

),( xf ))()(( xIIg

Page 27: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

output input

Bilateral filtering is non-linear• [Tomasi and Manduchi 1998]

• The weights are different for each output pixel

)(xJ ),( xf ))()(( xIIg )(I)(

1

xk

x x

Page 28: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Contrast reductionInput HDR image

Contrast too high!

Page 29: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Contrast reduction

Color

Input HDR image

Intensity

Page 30: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Contrast reduction

Color

Intensity Large scale

FastBilateral Filter

Input HDR image

Page 31: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Contrast reduction

Detail

Color

Intensity Large scale

FastBilateral Filter

Input HDR image

Page 32: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Contrast reduction

Detail

Color

Intensity Large scale

FastBilateral Filter

Reducecontrast

Large scale

Input HDR image

Scale in log domain

Page 33: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Contrast reduction

Detail

Color

Intensity Large scale

FastBilateral Filter

Reducecontrast

Detail

Large scale

Preserve!

Input HDR image

Page 34: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Contrast reduction

Detail

Color

Intensity Large scale

FastBilateral Filter

Reducecontrast

Detail

Large scale

Color

Preserve!

Input HDR image Output

Page 35: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Informal comparison

Bilateral[Durand et al.]

Photographic[Reinhard et al.]

Gradient domain[Fattal et al.]

Page 36: Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005

Informal comparison

Bilateral[Durand et al.]

Photographic[Reinhard et al.]

Gradient domain[Fattal et al.]