Tone Reproduction Tone Reproduction Tone Reproduction Erik Reinhard University of Central Florida School of Computer Science reinhard@cs.ucf.edu
Preparing Images for Display Preparing Images for Display • Need to map floating point numbers to Need to map floating point numbers to • bytes bytes • Need to preserve some aspect of the image: Need to preserve some aspect of the image: • – Contrast Contrast – – Visibility Visibility – – Brightness Brightness – – … … –
Global vs. Local Global vs. Local • Global Global • – Scale each pixel according to a fixed curve Scale each pixel according to a fixed curve – – Key issue: shape of curve Key issue: shape of curve – • Local Local • – Scale each pixel by a curve that is modulated by Scale each pixel by a curve that is modulated by – a local average a local average – Key issue: size of local neighborhood Key issue: size of local neighborhood –
Global Operators Global Operators Ward Tumblin Ferwerda
Global Operators Global Operators Ward Tumblin Ferwerda
Pattanaik Local Operator Local Operator
Spatial Processing Spatial Processing • Circularly symmetric Circularly symmetric • receptive fields receptive fields • Center Center- - surround mechanisms surround mechanisms • – Laplacian Laplacian of Gaussian of Gaussian – – Difference of Gaussians Difference of Gaussians – – Blommaert Blommaert – • Scale space model Scale space model •
Scale Space Scale Space (Histogram Equalized Images) (Histogram Equalized Images)
Tone Reproduction Idea Tone Reproduction Idea • Modify existing global • Modify existing global operator to be a local operator to be a local 2 . 5 ⎡ ⎤ 0 . 4 ⎛ ⎞ L + operator, e.g. Greg Ward’s ⎜ ⎟ operator, e.g. Greg Ward’s ⎢ ⎥ 1 . 219 max d ⎝ ⎠ 2 L ( x , y ) ⎢ ⎥ = L + output ⎢ 0 . 4 ⎥ L 1 . 219 L d max w ⎢ ⎥ • Use spatial processing to • Use spatial processing to ⎣ ⎦ determine a local determine a local 2 . 5 ⎡ ⎤ 0 . 4 ⎛ ⎞ L adaptation level for each adaptation level for each + ⎜ ⎟ ⎢ ⎥ 1 . 219 d max ⎝ ⎠ 2 L ( x , y ) ⎢ ⎥ = pixel pixel L + output ⎢ ⎥ 0 . 4 L 1 . 219 L ( x , y ) d max a ⎢ ⎥ ⎣ ⎦
Blommaert Brightness Model Brightness Model Blommaert − 2 r 1 Gaussian filter = 2 2 k s R e i π i 2 2 k s i = ⊗ Neural response ( , , ) ( , ) V x y s L u v R i i − ( , , ) ( , , ) V x y s V x y s = Center/ surround 1 2 V ( x , y , s ) W ( s ) ϕ + 2 V ( x , y , s ) 2 1 s s ∑ n = Brightness B ( x , y ) V ( x , y , s ) s 0
Brightness Brightness s ∑ n = B ( x , y ) V ( x , y , s ) s 0
Scale Selection Alternatives Scale Selection Alternatives How large should a local neighborhood be? V ( x , y , s ( x , y )) = m B ( x , y ) Mean value − s s n 0 < ε s : V ( x , y , s ( x , y )) Thresholded m m
Mean Value Mean Value ( , , ( , )) V x y s x y = m B ( x , y ) − s s n 0
Thresholded Thresholded < ε s : V ( x , y , s ) m m
Tone- - Mapping Mapping Tone = L ( x , y ) V ( x , y , s ( x , y )) Local adaptation a 1 m 2 . 5 ⎡ ⎤ 0 . 4 ⎛ ⎞ L + ⎜ ⎟ ⎢ ⎥ 1 . 219 d max ⎝ ⎠ 2 L ( x , y ) ⎢ ⎥ = Greg Ward’s tone- L + output ⎢ 0 . 4 ⎥ L 1 . 219 L ( x , y ) mapping with local d max a ⎢ ⎥ ⎣ ⎦ adaptation
Results Results • Good results, but something odd about scale Good results, but something odd about scale • selection: selection: • For most pixels, a large scale was selected For most pixels, a large scale was selected • • Implication: a simpler algorithm should be Implication: a simpler algorithm should be • possible possible
Simplify Algorithm Simplify Algorithm 2 . 5 ⎡ ⎤ 0 . 4 ⎛ ⎞ L + ⎜ ⎟ ⎢ ⎥ 1 . 219 max d Greg Ward’s tone- ⎝ ⎠ 2 L ( x , y ) ⎢ ⎥ = L mapping with local + output ⎢ 0 . 4 ⎥ 1 . 219 ( , ) L L x y adaptation d max a ⎢ ⎥ ⎣ ⎦ L ( x , y ) ≈ L Simplify + output 1 L ( x , y ) a Fix overall lightness = L ( x , y ) L ( x , y ) of image w L w
Global Operator Results Global Operator Results Our method Ward
Global Operator Results Global Operator Results Our method Ward
� Local Global � Local Global ( , ) L x y = L Global operator + output 1 L ( x , y ) L ( x , y ) = L Local operator + output 1 V ( x , y , s ( x , y )) 1 m
Local Operator Results Local Operator Results Global Local
Local Operator Results Local Operator Results Global Local Pattanaik
Lesson Learned Lesson Learned • A good local average is obtained by using a A good local average is obtained by using a • (Gaussian) blurred pixel. (Gaussian) blurred pixel. • The amount of blur to apply varies per pixel The amount of blur to apply varies per pixel • • The filter kernel should as large as possible, The filter kernel should as large as possible, • without crossing sharp contrast boundaries without crossing sharp contrast boundaries • This is why the scale selection mechanism This is why the scale selection mechanism • works! works!
Global Operators Global Operators • Usually a sigmoid: Usually a sigmoid: • n L = w L + σ d n n L ( L ) w a • Sigma is the semi Sigma is the semi- - saturation constant saturation constant • • Most global operators can be rewritten into Most global operators can be rewritten into • a form similar to this a form similar to this
Global Operators - - Sigmoid Sigmoid Global Operators Drago
La La • Adaptation luminance computed as Adaptation luminance computed as • – Global average Global average – • Log average luminance Log average luminance • • Interpolation scheme Interpolation scheme • – Local average Local average – • Use four neighbors (good enough in practice) Use four neighbors (good enough in practice) • • Scale selection mechanism Scale selection mechanism • • Bilateral filter Bilateral filter • • Typically small filter kernels Typically small filter kernels •
Photoreceptor- - based based Photoreceptor R = w R + σ d R ( L ) w a G = w G + σ d G ( L ) w a n L = B w L = w + σ B d n n L ( L ) + σ d w a B ( L ) w a = + − ( 1 ) L aL a L a w pixel σ = n ( L ) fL a a Also interpolate between R,G,B values and pixel luminance
Interpolation Scheme for La Interpolation Scheme for La Luminance interpolation
Interpolation Scheme for La Interpolation Scheme for La Between R,G,B and luminance
Bilateral filter Bilateral filter
Local La Local La Local bilateral Global Local SUSAN
Conclusions Conclusions • Most tone reproduction operators are Most tone reproduction operators are • sigmoidal sigmoidal • Can be either local or global Can be either local or global • • Filter kernels (local) should be small, but in Filter kernels (local) should be small, but in • any case should not cross sharp contrast any case should not cross sharp contrast boundaries boundaries
Conclusions Conclusions • Sigmoids Sigmoids also part of most color appearance also part of most color appearance • models models • Color appearance and tone reproduction will Color appearance and tone reproduction will • converge converge
Recommend
More recommend