Computer Graphics WS07/08 –Tone Mapping
Computer Graphics
- HDR & Tone Mapping -
Computer Graphics - HDR & Tone Mapping - Hendrik Lensch - - PowerPoint PPT Presentation
Computer Graphics - HDR & Tone Mapping - Hendrik Lensch Computer Graphics WS07/08 Tone Mapping Overview Last time Gamma Correction Color spaces Today Terms and Definitions Tone Mapping Next lecture
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– Gamma Correction – Color spaces
– Terms and Definitions – Tone Mapping
– Transformations
Computer Graphics WS07/08 –Tone Mapping
Luminance [cd/m2]
10-6 10-4 10-2 100 102 104 106 108
Dynamic Range 1:500 1:1500 1:30
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– capture additional over and underexposed images
Computer Graphics WS07/08 –Tone Mapping
– capture additional over and underexposed images
Computer Graphics WS07/08 –Tone Mapping
– capture additional over and underexposed images – how much variation? – how to combine?
Computer Graphics WS07/08 –Tone Mapping
– natural scenes: 18 stops (2^18) – human: 17stops (after adaptation 30stops ~ 1:1,000,000,000) – camera: 10-16stops
[Stumpfel et al. 00]
Computer Graphics WS07/08 –Tone Mapping
– dynamic range of sensor 1:1000 – exposure variation (handheld camera/non- static scene): 1/60th s – 1/6000th s exposure time 1:100 – varying aperture f/2.0 – f/22.0 ~1:100 – exposure bias/varying “sensitivity” 1:10 – total (sequential) 1:100,000,000
Computer Graphics WS07/08 –Tone Mapping
– combine multiple images with different exposure settings – makes use of available sequential dynamic range
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– limited dynamic range of cameras is a problem
– some modern CMOS imagers have a higher and often sufficient dynamic range than most CCD imagers
Computer Graphics WS07/08 –Tone Mapping
– analog film with several emulsions of different sensitivity levels by Wyckoff in the 1960s
– commonly used method for digital photography by Debevec and Malik (1997)
constraint
– newer method by Robertson et al. (1999)
Computer Graphics WS07/08 –Tone Mapping
general idea of High Dynamic Range (HDR) imaging: – combine multiple images with different exposure times
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
input: – series of i images with exposure times ti and pixel values yij task: – find irradiance (luminance) xj – recover response curve
j i ij
ij
y j i ij
−
1
ij
Computer Graphics WS07/08 –Tone Mapping
input: – series of i images with exposure times ti and pixel values yij – a weighting function wij = wij(yij) (bell shaped curve) – a camera response curve
⇒calculate HDR values xj from images using
i i ij i y i ij j
ij
2
ij
Computer Graphics WS07/08 –Tone Mapping
– minimization of objective function O using Gauss-Seidel relaxation yields – normalization of I so that I128=1.0
2 ,
j i j i y ij
ij −
,
ij m E j i j i m m
m
∈
ij
Computer Graphics WS07/08 –Tone Mapping
both steps – calculation of a HDR image using I – optimization of I using the HDR image are now iterated until convergence
Computer Graphics WS07/08 –Tone Mapping
ij
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– for 8 bit images – possible correction at both ends (over/underexposure) – motivated by general noise model
⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ − − =
2 2
5 . 127 ) 5 . 127 ( 4 exp
ij ij
y w
Computer Graphics WS07/08 –Tone Mapping
– method very easy – doesn’t make assumptions about response curve shape – converges fast – takes all available input data into account – can be extended to >8 bit color depth – 16bit should be followed by smoothing
Computer Graphics WS07/08 –Tone Mapping
– grey card, out of focus, smooth illumination gradient
– uniform histogram of values – no color processing or sharpening interfering with the result
Computer Graphics WS07/08 –Tone Mapping
– depends on scene dynamic range and on quality requirements – most often a difference of two stops (factor of 4) between exposures is sufficient – [Grossberg & Nayar 2003]
Computer Graphics WS07/08 –Tone Mapping
– LDR [Bennett & McMillan 2005] – HDR image formats [OpenExr, HDR JPEG] – HDR MPEG Encoding [Mantiuk et al. 2004] – HDR + motion compensation [Kang et al. 2003]
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– Factor between the highest and the smallest representable value – Two strategies
– Simple contrast – Weber fraction (step fct.) – Michelson contrast (sinusoidal fct.) – Logarithmic ratio – Signal to noise ratio (SNR) – Best for HVS: CW and CL
min max S
min max min max M
min W
min max L
10
min max SNR
10
Computer Graphics WS07/08 –Tone Mapping
– Including high contrast – Michelson does not work too well
– Good fits for CW and CL – Simplified linear model for CL
0.537756
– [Mantiuk et al., 2006]
Computer Graphics WS07/08 –Tone Mapping
– Smallest detectable contrast in a uniform field of view
– Smallest visible difference between two similar signals – Works in the suprathreshold domain (signals above threshold)
Computer Graphics WS07/08 –Tone Mapping
– Luminance of typical desktop displays:
– Luminance range for human visual perception
Shadows under starlight
Snow in direct sun light
– Compress the dynamic range of an input image – Reproduce human perception to closely match that of the real scene
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– Problem: light sources are often several orders of magnitude brighter than the rest
Rest will be black
– Scaling to a value slightly below 1 – Capping light source values to 1
– Absolute brightness gets lost:
– Linear scaling in the logarithmic domain
– Typically using log10
Computer Graphics WS07/08 –Tone Mapping
– Create model of the observer – Requirement:
– Compute Tone-Mapping using concatenation and inversion of
– Model usually operates only on luminance (no color)
Computer Graphics WS07/08 –Tone Mapping
– Maintain visible contrast differences in the image
– Just noticeable contrast according to Blackwell [CIE`81] (subjective measurements) – La: Adaptation level of eye (luminance) – Goal: linear scaling factor m(La)
display luminance
world luminance
5 . 2 4 . 0 )
a a
Adaptation L Adaptation La
a [log cd/m
[log cd/m2
2]
] Threshold Threshold Δ ΔL L [log cd/m [log cd/m2
2]
]
Computer Graphics WS07/08 –Tone Mapping
– Assume JND for real and virtual image are the same
ΔL(Lwa)
ΔL(Lda)
– Substitution results in – With Lda=Ldmax/2 and scaling factor sf in [0..1]
wa wa da
5 . 2 4 . 4 .
wa da wa
5 . 2 4 . 4 . max max
wa d d
Computer Graphics WS07/08 –Tone Mapping
– Depends on light distribution in field of view of observer – Simple approximation using a single value
log10(B)= a(Lin) log10(Lin) + b(Lin) Power-Law [Stevens`61]
log10(Lwa)= E{log10(Lin)} + 0.84
– Single factor for entire image
– Adaptation mainly acts on the 1 degree fov (fovea) – Results in clamping for too bright regions
Computer Graphics WS07/08 –Tone Mapping
– Computing an adjustment image
– Computing the histogram of the image
– Adjusting the histogram based on restrictions of human visual system
linear dark linear bright equalized
Computer Graphics WS07/08 –Tone Mapping
– Assumes known view point – Average image
Computer Graphics WS07/08 –Tone Mapping
– f(Bw): Number of sample per bin – P(Bw): Accumulated probability (sum of sample counts) – T: Sum over all f(Bw) – Mapping
min max min w d d d d
Computer Graphics WS07/08 –Tone Mapping
Linear Mapping Naïve Histogram-Adjustment Histogram-Adjustment considering the human visual system
Computer Graphics WS07/08 –Tone Mapping
– Too strong emphasis on contrast in highly populated regions of the dynamic range – Idea:
contrast images)
leads to
w d w d w w d d
min max min w d d d d
w d w d d w d w d
min max
Computer Graphics WS07/08 –Tone Mapping
– Limiting the sample count per bin in histogram – Implementation
min max d d w
N L L b b f T
w w i
) log( ) log( ) (
min max −
= Δ =∑
Computer Graphics WS07/08 –Tone Mapping
– Fails for cases where no compression is necessary
– Use modified f(Bw) in naïve histogram equalization
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– Limiting the contrast to the ratio of JNDs (global scale factor) – That results in – Implementation is the similar as for previous histogram limiting
w t d t w d
d d d w w t d t w
min max −
Computer Graphics WS07/08 –Tone Mapping
Bright Bathroom Dark Bathroom (1/100) with reduced contrast
Computer Graphics WS07/08 –Tone Mapping
Bright Bathroom Dark Bathroom (1/100) with reduced contrast
Computer Graphics WS07/08 –Tone Mapping
– Bright light sources result in veiling (German: Schleier)
– Results in correction to adaptation level
– Moderate illumination in periphery does not contribute to adaptation
– But: glare in the periphery does change the adaptation
– Compute a veiled image by filtering over peripheral region
>
f
f a θ θ
2
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– Simple blur filter
Computer Graphics WS07/08 –Tone Mapping
Maximum Tone-Mapping Tumblin/Rushmeier Tone-Mapping Ward`94 Tone-Mapping Ward`97 Tone-Mapping
Computer Graphics WS07/08 –Tone Mapping
Tumblin/Rushmeier Tone-Mapping Ward`94 Tone-Mapping Ward`97 Tone-Mapping
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
– either enhance everything – or require manual intervention – change image appearance
– no dynamic range left for enhancement
tone mapping result HDR image (reference)
Computer Graphics WS07/08 –Tone Mapping
Reference HDR Image Tone Mapped Image Measure Lost Contrast at Several Feature Scales Enhance Lost Contrast in Tone Mapped Image
Enhanced TM Image
communicate lost image contents maintain image appearance
Computer Graphics WS07/08 –Tone Mapping
– gradual darkening / brightening towards a contrasting edge – contrast appears with ‘economic’ use of dynamic range
Enhanced Image
Computer Graphics WS07/08 –Tone Mapping
SIGNAL (e.g. TM) REFERENCE (e.g. HDR)
REFERENCE RESTORED
Computer Graphics WS07/08 –Tone Mapping
SIGNAL (texture preserved) REFERENCE (with texture)
Computer Graphics WS07/08 –Tone Mapping
Reference HDR Image Tone Mapped Image Measure Lost Contrast at Several Feature Scales
1 2 3 4 5 6 7 1
1 4 7 change in contrast at several scales
Computer Graphics WS07/08 –Tone Mapping
1 4 7
Computer Graphics WS07/08 –Tone Mapping
reference HDR image (clipped) countershading of tone mapping countershading profiles tone mapping
Computer Graphics WS07/08 –Tone Mapping
reference HDR image (clipped) countershading of tone mapping countershading profiles tone mapping
Computer Graphics WS07/08 –Tone Mapping
tone mapping unsharp masking adaptive countershading
Computer Graphics WS07/08 –Tone Mapping
– Sensitive to contrast, insensitive to absolute luminance difference – Mach bands: reduced resolution at discontinuities – “Very high contrast, although important on a global scale, cannot be perceived by humans at high spatial frequencies”
– High-resolution transparency filter to modulate high-intensity (low-resolution) image from a second display – Transparency filter: LCD screen – High intensity image: video projector, array of superluminous LEDs – dynamic range: >50,000:1 – maximum intensity: 2700 cd/m^2, 8500 cd/m^2
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping
Computer Graphics WS07/08 –Tone Mapping