• 沒有找到結果。

Tone mapping

N/A
N/A
Protected

Academic year: 2022

Share "Tone mapping"

Copied!
35
0
0

加載中.... (立即查看全文)

全文

(1)

Tone mapping

Digital Visual Effects, Spring 2007 Yung-Yu Chuang

2007/3/13

with slides by Fredo Durand, and Alexei Efros

(2)

Tone mapping

• How can we display it?

Linear scaling?, thresholding?

10

-6

10

6

10

-6

10

6

Real world radiance

Display intensity

dynamic range

Pixel value 0 to 255

CRT has 300:1 dynamic range

(3)

Preliminaries

• For color images

• Log domain is usually preferred.

• Gaussian filter. Sampling issues. Efficiency issues.

=

w w d

w w d

w w d

d d d

L L B

L L G

L L R

B G R

(4)

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

(5)

We are more sensitive to contrast

• Weber’s law

% 1

~

b b

I Δ I

background intensity Just-noticeable Difference (JND)

flash

(6)

Global operator (Reinhart et al)

world world display

L L L

= + 1

⎟⎟

⎜⎜

+

=

y x

y x N L

L

,

)) ,

( 1 log(

exp δ

) , ( )

,

( L x y

L y a

x

Lw =

Approximation of scene’s key (how light or dark it is).

Map to 18% of display range for average-key scene

User-specified; high key or low key

(7)

low key (0.18) high key (0.5)

(8)

Frequency domain

• First proposed by Oppenheim in 1968!

• Under simplified assumptions,

image = illuminance * reflectance

low-frequency

attenuate more high-frequency attenuate less

(9)

Oppenheim

• Taking the logarithm to form density image

• Perform FFT on the density image

• Apply frequency-dependent attenuation filter

• Perform inverse FFT

• Take exponential to form the final image

kf c kf

c f

s = − + +

) 1 1

( )

(

(10)

Fast Bilateral Filtering for the Display of

High-Dynamic-Range Images

Frédo Durand & Julie Dorsey

Laboratory for Computer Science

Massachusetts Institute of Technology

(11)

A typical photo

• Sun is overexposed

• Foreground is underexposed

(12)

Gamma compression

• X −> Xγ

• Colors are washed-out

Input Gamma

(13)

Gamma compression on intensity

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

Gamma on intensity Intensity

Color

(14)

Chiu et al. 1993

• Reduce contrast of low-frequencies

• Keep high frequencies

Reduce low frequency Low-freq.

High-freq.

Color

(15)

The halo nightmare

• For strong edges

• Because they contain high frequency

Reduce low frequency Low-freq.

High-freq.

Color

(16)

Durand and Dorsey

• Do not blur across edges

• Non-linear filtering

Output Large-scale

Detail

Color

(17)

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-preserving Gaussian blur

Input

(18)

Start with Gaussian filtering

• Here, input is a step function + noise

output input

=

J f

I

(19)

Start with Gaussian filtering

• Spatial Gaussian f

output input

=

J

f

I

(20)

Start with Gaussian filtering

• Output is blurred

output input

J

= f I

(21)

Gaussian filter as weighted average

• Weight of ξ depends on distance to x

) , (x ξ

f I(ξ )

output input

= ) (x

J

ξ

x x

ξ

(22)

The problem of edges

• Here, “pollutes” our estimate J(x)

• It is too different

x

) ( ξ I

) (x I

) , (x ξ

f I(ξ )

= ) (x

J

ξ

output input

(23)

Principle of Bilateral filtering

[Tomasi and Manduchi 1998]

• Penalty g on the intensity difference

= ) (x

J

f (x,ξ ) g(I(ξ ) − I(x)) I(ξ ) ) ξ

( 1

x k

x I (x )

) ( ξ

I

output input

(24)

Bilateral filtering

[Tomasi and Manduchi 1998]

• Spatial Gaussian f

= ) (x

J

f ( x , ξ )

g(I(ξ ) I(x)) I(ξ )

) ξ

( 1

x k

x

output input

(25)

Bilateral filtering

[Tomasi and Manduchi 1998]

• Spatial Gaussian f

• Gaussian g on the intensity difference

= ) (x

J

f (x,ξ ) g(I(ξ ) − I(x)) I(ξ ) ) ξ

( 1

x k

x

output input

(26)

output input

Normalization factor

[Tomasi and Manduchi 1998]

• k(x)=

= ) (x

J

I(ξ )

) ξ

( 1

x k

x

) , (x ξ

f g(I(ξ ) − I(x))

ξ

) , (x ξ

f g(I(ξ ) − I(x))

(27)

output input

Bilateral filtering is non-linear

[Tomasi and Manduchi 1998]

• The weights are different for each output pixel

= ) (x

J

f (x,ξ ) g(I(ξ ) − I(x)) I(ξ ) ) ξ

( 1

x k

x x

(28)

Contrast reduction

Input HDR image

Contrast too high!

(29)

Contrast reduction

Color

Input HDR image

Intensity

(30)

Contrast reduction

Color

Intensity Large scale

Fast

Bilateral Filter

Input HDR image

(31)

Contrast reduction

Detail

Color

Intensity Large scale

Fast

Bilateral Filter

Input HDR image

(32)

Contrast reduction

Detail

Color

Intensity Large scale

Fast

Bilateral Filter

Reduce contrast

Large scale

Input HDR image

Scale in log domain

(33)

Contrast reduction

Detail

Color

Intensity Large scale

Fast

Bilateral Filter

Reduce contrast

Detail

Large scale

Preserve!

Input HDR image

(34)

Contrast reduction

Detail

Color

Intensity Large scale

Fast

Bilateral Filter

Reduce contrast

Detail

Large scale

Color

Preserve!

Input HDR image Output

(35)

Oppenheim bilateral

參考文獻

相關文件

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

• Fredo Durand, Julie Dorsey, Fast Bilateral Filtering for the Display of High Dynamic Range Images, SIGGRAPH 2002. • Erik Reinhard, Michael Stark, Peter

Input Log(Intensity Log(Intensity) ) Bilateral Smoothing Bilateral Smoothing Gaussian.. Gaussian

• Patrick Ledda, Alan Chalmers, Tom Troscianko, Helge Seetzen, Evaluation of Tone Mapping Operators using a High Dynamic Range Display,

Input Log(Intensity) Log(Intensity ) Bilateral Smoothing Bilateral Smoothing Gaussian.. Gaussian

method void setInt(int j) function char backSpace() function char doubleQuote() function char newLine() }. Class

While we have provided a number of ideas and strategies, we hope that this book will be a useful guide and resource to stimulate teachers’ own ideas and variations, and will

 Register, tone and style are entirely appropriate to the genre and text- type.  Text