27
Gradient Domain High Gradient Domain High Dynamic Range Dynamic Range Compression Compression Raanan Fattal Raanan Fattal Dani Lischinski Dani Lischinski Michael Werman Michael Werman

Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

  • View
    216

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Gradient Domain High Gradient Domain High Dynamic Range CompressionDynamic Range Compression

Raanan FattalRaanan Fattal

Dani LischinskiDani Lischinski

Michael WermanMichael Werman

Page 2: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

The Dynamic Range ProblemThe Dynamic Range Problem

What’s wrong with What’s wrong with these images?these images?

What would your eye What would your eye see?see?

How could you put all How could you put all this information into this information into one image?one image?

Page 3: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Whole Image SolutionsWhole Image Solutions

Tone Reproduction CurvesTone Reproduction CurvesRe-mapping of luminance valuesRe-mapping of luminance valuesEasy to computeEasy to computeSuffer from quantizationSuffer from quantization

ExamplesExamplesLinear scalingLinear scalingGamma correctionGamma correctionMore sophisticated models…More sophisticated models…

Page 4: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Ward Larson ModelWard Larson Model

One of the best total One of the best total image methodsimage methods

Based on models of Based on models of display capabilities display capabilities and human visionand human vision

Still suffers from loss Still suffers from loss of local contrastof local contrast

Notice washed-out Notice washed-out appearance of the appearance of the outside areaoutside area

Page 5: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Local SolutionsLocal Solutions

Tone Reproduction OperatorsTone Reproduction OperatorsTake local context into accountTake local context into accountAttempt to solve the local contrast problemAttempt to solve the local contrast problem

Older MethodsOlder MethodsBased on estimating illuminance and Based on estimating illuminance and

reflectance for each part of the imagereflectance for each part of the imageSuffer from artifacts, dark halosSuffer from artifacts, dark halos

Page 6: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Low Curvature Image SimplifierLow Curvature Image Simplifier

Tumblin and Turk, Tumblin and Turk, 19991999

Scale luminance of Scale luminance of smoothed imagesmoothed image

Add back detailsAdd back details 8 parameters8 parameters Computationally Computationally

intensiveintensive

Page 7: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Gradient Domain MethodGradient Domain Method

Page 8: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Basic AssumptionsBasic Assumptions

The eye responds more to local intensity The eye responds more to local intensity differences than global illuminationdifferences than global illumination

A HDR image must have some large A HDR image must have some large magnitude gradientsmagnitude gradients

Fine details consist only of smaller Fine details consist only of smaller magnitude gradients magnitude gradients

Page 9: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Basic MethodBasic Method

Take the log of the luminancesTake the log of the luminancesCalculate the gradient at each pointCalculate the gradient at each pointScale the magnitudes of the gradients with Scale the magnitudes of the gradients with

a progressive scaling function (Large a progressive scaling function (Large magnitudes are scaled down more than magnitudes are scaled down more than small magnitudes)small magnitudes)

Re-integrate the gradients and invert the Re-integrate the gradients and invert the log to get the final imagelog to get the final image

Page 10: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

1D Example1D Example

Original Signal F(x)Original Signal F(x) - Dynamic range: 2415:1- Dynamic range: 2415:1

Page 11: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

1D Example1D Example

ln F(x)ln F(x)

Page 12: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

1D Example1D Example

F’(x)F’(x)

Page 13: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

1D Example1D Example

G(x) = F’(x) after applying the attenuating functionG(x) = F’(x) after applying the attenuating function

Page 14: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

1D Example1D Example

I(x) = Integrate G(x)I(x) = Integrate G(x)

Page 15: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

1D Example1D Example

eeI(x)I(x) - New dynamic range: 7.5:1- New dynamic range: 7.5:1

Page 16: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Changes for 2DChanges for 2D

Use gradients instead of derivativesUse gradients instead of derivativesMay produce a non-integrable vector field May produce a non-integrable vector field

after scalingafter scalingTransform scaled vectors into a Transform scaled vectors into a

conservative field whose gradients are conservative field whose gradients are closest to G(x)closest to G(x)

Page 17: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Attenuation MapAttenuation Map

Page 18: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Attenuation DetailsAttenuation Details

Images contain edges at multiple levels of Images contain edges at multiple levels of detaildetail

How do we handle this?How do we handle this?Compute gradients for many different Compute gradients for many different

resolutions of the imageresolutions of the imageThe set of different resolution images The set of different resolution images

composes a Gaussian pyramidcomposes a Gaussian pyramid

Page 19: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Creating the Final ImageCreating the Final Image

How do we recombine the different How do we recombine the different resolution levels?resolution levels?Start with coarsest imageStart with coarsest imageCalculate scaling factorsCalculate scaling factorsLinearly interpolate those factors for each Linearly interpolate those factors for each

point in the next image, and multiply with the point in the next image, and multiply with the local scaling factorlocal scaling factor

Apply the combined factors to the highest Apply the combined factors to the highest resolution imageresolution image

Page 20: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

The Attenuation FunctionThe Attenuation Function

αα = average gradient = average gradient magnitude for each magnitude for each level times 0.1level times 0.1

ββ = adjustable gain = adjustable gain (between 0.8 and 0.9)(between 0.8 and 0.9)

Page 21: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

PerformancePerformance

On an 1800 MHz Pentium 4:On an 1800 MHz Pentium 4:Computing a 512x384 image takes 1.1 Computing a 512x384 image takes 1.1

secondssecondsComputing a 1024x768 image takes 4.5 Computing a 1024x768 image takes 4.5

secondssecondsLCIS takes 8.5 minutes to compute a LCIS takes 8.5 minutes to compute a

751x1130 image751x1130 image

Page 22: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

ExamplesExamples

Streetlight on a foggy Streetlight on a foggy nightnight

Dynamic range Dynamic range 100,000:1100,000:1

Page 23: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

ExamplesExamples

Stanford Memorial Stanford Memorial ChurchChurch

DR 250,000:1DR 250,000:1

Page 24: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

ApplicationsApplications

Enhancing contrast for LDR imagesEnhancing contrast for LDR imagesCombining photographs of different Combining photographs of different

exposure levels to enhance detail or stitch exposure levels to enhance detail or stitch together for panoramastogether for panoramas

Medical image enhancementsMedical image enhancements

Page 25: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

PanoramasPanoramas

Page 26: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Medical ImagingMedical Imaging

Page 27: Gradient Domain High Dynamic Range Compression Raanan Fattal Dani Lischinski Michael Werman

Questions / CreditsQuestions / Credits

Any questions?Any questions?

All pictures in this presentation are from All pictures in this presentation are from the original paperthe original paper