Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/8 Tone mapping Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/8 Basics for cameras Some things you might want to know when you shoot pictures First time, not well-organized yet Scribe Assignments Slides available before Thursday with slides by Fredo Durand, and Alexei Efros
Tone mapping 10-6 106 10-6 106 Pixel value 0 to 255 How can we display it? Linear scaling?, thresholding? 10-6 106 dynamic range Real world radiance 10-6 106 Display intensity Pixel value 0 to 255 CRT has 300:1 dynamic range
Global operator (Reinhart et al)
Global operator results
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
Compressing dynamic range
Fast Bilateral Filtering for the Display of High-Dynamic-Range Images Frédo Durand & Julie Dorsey Laboratory for Computer Science Massachusetts Institute of Technology
A typical photo Sun is overexposed Foreground is underexposed
Gamma compression X -> Xg Colors are washed-out Input Gamma
Gamma compression on intensity Colors are OK, but details (intensity high-frequency) are blurred Intensity Gamma on intensity Color
Chiu et al. 1993 Reduce contrast of low-frequencies Keep high frequencies Low-freq. Reduce low frequency High-freq. Color
The halo nightmare For strong edges Because they contain high frequency Low-freq. Reduce low frequency High-freq. Color
Durand and Dorsey Do not blur across edges Non-linear filtering Large-scale Output Detail Color
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] Input Gaussian blur Edge-preserving
Start with Gaussian filtering Here, input is a step function + noise output input
Start with Gaussian filtering Spatial Gaussian f output input
Start with Gaussian filtering Output is blurred output input
Gaussian filter as weighted average Weight of x depends on distance to x output input
The problem of edges Here, “pollutes” our estimate J(x) It is too different output input
Principle of Bilateral filtering [Tomasi and Manduchi 1998] Penalty g on the intensity difference output input
Bilateral filtering Spatial Gaussian f output input [Tomasi and Manduchi 1998] Spatial Gaussian f output input
Bilateral filtering Spatial Gaussian f [Tomasi and Manduchi 1998] Spatial Gaussian f Gaussian g on the intensity difference output input
Normalization factor [Tomasi and Manduchi 1998] k(x)= output input
Bilateral filtering is non-linear [Tomasi and Manduchi 1998] The weights are different for each output pixel output input
Contrast reduction Input HDR image Contrast too high!
Contrast reduction Input HDR image Intensity Color
Contrast reduction Large scale Intensity Fast Bilateral Filter Input HDR image Large scale Intensity Fast Bilateral Filter Color
Contrast reduction Large scale Fast Bilateral Filter Detail Input HDR image Large scale Intensity Fast Bilateral Filter Detail Color
Contrast reduction Scale in log domain Large scale Large scale Input HDR image Scale in log domain Large scale Large scale Intensity Reduce contrast Fast Bilateral Filter Detail Color
Contrast reduction Large scale Large scale Reduce contrast Input HDR image Large scale Large scale Intensity Reduce contrast Fast Bilateral Filter Detail Detail Preserve! Color
Contrast reduction Output Large scale Large scale Reduce contrast Input HDR image Output Large scale Large scale Intensity Reduce contrast Fast Bilateral Filter Detail Detail Preserve! Color Color