03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual...

28
03/05/03 © 2003 University of Wisc onsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction

Transcript of 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual...

Page 1: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Last Time

• Tone Reproduction

• If you don’t use perceptual info, some people call it contrast reduction

Page 2: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Today

• Perceptually driven tone-reproduction

Page 3: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Local Tone Reproduction

• Last time I introduced the idea of local tone reproduction methods– Filter to get a high-pass and low pass version of the image

– Reduce the contrast in the low pass

– Add the reduced low-pass to the high-pass to get a new image

• The filter you use should be edge preserving– A filter that smoothes out regions with low gradient, but does not

smooth across high gradients

Page 4: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Edge Preserving Filters(Durand and Dorsey, SIGGRAPH 2002)

• The idea is to take a smoothing filter, say a Gaussian, and multiply it by a function that reduces the weight at sharp edges (and influence function)– It turns out, this is closely related to robust statistical

estimation – the problem of ignoring outliers in statistical data

Page 5: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Robust Estimation

• Instead of least squares estimation, use something that reduces the weight of outliers from the mean– Least squares minimizes sum of squared differences

Page 6: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Results

• Right, a full image• Below, still some artifacts at edges

– Fix by detecting unreliable pixels and smoothing

Page 7: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Gradient Compression(Fattal, Lischinski, Werman, SIGGRAPH 2002)

• Instead of reducing the dynamic range of the data directly, reduce the size of the gradients– Ultimate effect is similar, but it’s easier to make it local

• Reduce large gradients more than small ones– Get most reduction in dynamic range– Small gradients are probably due to texture, large ones due to shadows,

occlusion, different surfaces

Page 8: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Gradient Compression in 2D

• In 1D, you can reduce the gradients and then simply integrate to extract the new signal

• In 2D, the gradient field has to be conservative

• To work around this, seek a final image that has the closest legal gradient field to the desired one– Results in a Poison equation over the image

– Set appropriate boundary conditions and solve to get the image

Page 9: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Details

• Work on luminance channel from CIE XYZ

• Do multi-resolution gradient attenuation– Generate a Gaussian image pyramid

– Use central differences to estimate gradient at each level

– Attenuate by multiplying by an attenuation function:

– Use linear filtering to push low-res results up to high-res

0.98.0 gradient, average times1.0

,

,,

yxH

yxHyx k

kk

Page 10: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Dealing with Color

• Work in RGB space for final image

• For C in (R,G,B) compute:

– s between 0.4 and 0.6 worked well

• Not really the best thing to do

out

s

in

inout L

L

CC

Page 11: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Results

Page 12: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Local Filtering Methods

Page 13: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Ward’s Method

Page 14: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Attenuation Image

Page 15: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Psychophysics

• The study of the perception of physical quantities– Does not try to explain anything, just observes what we observe

• Vital to many areas of graphics– Tone-reproduction: generating the same per perceptual sense with

different dynamic range– Rendering Control: Stopping rendering algorithms when the results

are no longer perceptible– Error metrics: Comparing images with a sense of what is visually

important

• Ferwerda, Pattanaik, Shirley and Goldberg, SIGGRAPH 1996, is a good reference– The next several slides were borrowed from the paper

Page 16: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Dynamic Range (Again)

• Note the names for various ranges of perception– Related to which part of the vision system (rods or cones) is

functioning effectively

Page 17: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Spectral Sensitivity

• Incoming radiance is integrated against these curves to get visual response– To match visual response with a different radiance, have to take these

curves into account• Note in particular the change in color sensitivity

– Rods are NOT color sensitive

Page 18: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Detection Thresholds

• Experiment: Flash a light against a background. How much brighter does the light have to be in order to be noticed?– Sizes measured in degrees of arc

• Not so important in graphics– Most events we deal with

change illumination well beyond the detection threshold

Page 19: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Contrast Thresholds

• Experiment: Show people a grating. What contrast must be present (difference in foreground/background luminance) for the grating to be distinguishable?

• Very important to graphics– Places a limit on the maximum useful display resolution

– Places a limit on the amount of detail that should be distinguishable in a tone-reproduction algorithm

– Useful in measuring the effect of various aliasing and noise effects

• We might expect the curve on the next slide to flatten out at high luminance. Why?

Page 20: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Contrast Thresholds (Acuity)

Page 21: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Adaptation

• Measures the effect of transition from light to dark, and vice versa

• This is light to dark

Page 22: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Adaptation Dark-to-Light

Page 23: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Perceptual Tone Reproduction

• Various tone reproduction algorithms can be modified to exploit these effects

• Deliberately reduce contrast if the light level is low

• Reduce color saturation at low light levels

• Model adaptation level of viewer over time by manipulating contrast and color

Page 24: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Adjusting for Acuity and Color

Page 25: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Adjusting for Adaptation

• Not so easy – you can’t make the monitor appear “painfully bright”

Page 26: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Histograms and Perception

• Ward’s histogram method can be adapted to place limits on resolvable features– Another bound on the magnitude of histogram bins

Page 27: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Other Effects

• To get color washout, reduce (x,y) by an amount that depends on the average luminance– Formulas in Ward’s and Ferwerda’s papers

• Veiling is due to light scattering inside the eye– Responsible for the halos around truly bright objects

– Ward’s method can handle this

– Glare is something different – an adaptation problem

Page 28: 03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.

03/05/03 © 2003 University of Wisconsin

Histograms and Perception