High Dynamic Range Images 15-463: Rendering and Image Processing Alexei Efros.

Slides:



Advertisements
Similar presentations
Set the Camera Options  Resolution  Focus  Exposure  Zoom  Flash  Self-Timer/Remote Control.
Advertisements

High Dynamic Range Imaging Samu Kemppainen VBM02S.
Cameras Digital Visual Effects, Spring 2005 Yung-Yu Chuang 2005/3/2 with slides by Brian Curless, Steve Seitz and Alexei Efros.
Computational Photography: Color perception, light spectra, contrast Connelly Barnes.
Digital Photography with Flash and No-Flash Image Pairs By: Georg PetschniggManeesh Agrawala Hugues HoppeRichard Szeliski Michael CohenKentaro Toyama,
16421: Vision Sensors Lecture 6: Radiometry and Radiometric Calibration Instructor: S. Narasimhan Wean 5312, T-R 1:30pm – 2:50pm.
Computer graphics & visualization HDRI. computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization.
Recap of Previous Lecture Matting foreground from background Using a single known background (and a constrained foreground) Using two known backgrounds.
10/14/14 Image-based Lighting Computational Photography Derek Hoiem, University of Illinois Many slides from Debevec, some from Efros T2.
High Dynamic Range Images : Computational Photography Alexei Efros, CMU, Fall 2005 …with a lot of slides stolen from Paul Debevec and Yuanzhen Li,
Capturing Light… in man and machine : Computational Photography Alexei Efros, CMU, Fall 2006 Some figures from Steve Seitz, Steve Palmer, Paul Debevec,
1 Comp300a: Introduction to Computer Vision L. QUAN.
High Dynamic Range Images : Computational Photography Alexei Efros, CMU, Fall 2006 …with a lot of slides stolen from Paul Debevec and Yuanzhen Li,
Image Forgery Detection by Gamma Correction Differences.
Photographic Tone Reproduction for Digital Images Erik Reinhard Utah Mike Stark Peter Shirley Jim Ferwerda Cornell.
High Dynamic Range Imaging: Spatially Varying Pixel Exposures Shree K. Nayar, Tomoo Mitsunaga CPSC 643 Presentation # 2 Brien Flewelling March 4 th, 2009.
1 Photographic Tone Reproduction for Digital Images Brandon Lloyd COMP238 October 2002.
10/16/14 Image-based Lighting (Part 2) Computational Photography Derek Hoiem, University of Illinois Many slides from Debevec, some from Efros, Kevin Karsch.
Gradient Domain High Dynamic Range Compression
Computational Photography lecture 13 – HDR CS 590 Spring 2014 Prof. Alex Berg (Credits to many other folks on individual slides)
Light and shading Source: A. Efros.
Photography Is the capture of reflective light on light sensitive material. Film-Base Photography used “silver” as the light sensitive material. Digital.
Noise Estimation from a Single Image Ce Liu William T. FreemanRichard Szeliski Sing Bing Kang.
How the Camera Works ( both film and digital )
11/18/10 Image-based Lighting (Part 2) Computational Photography Derek Hoiem, University of Illinois Many slides from Debevec, some from Efros T2.
Perception-motivated High Dynamic Range Video Encoding
Fast Bilateral Filtering
Tone mapping with slides by Fredo Durand, and Alexei Efros Digital Image Synthesis Yung-Yu Chuang 11/08/2005.
Recovering High Dynamic Range Radiance Maps from Photographs [Debevec, Malik - SIGGRAPH’97] Presented by Sam Hasinoff CSC2522 – Advanced Image Synthesis.
High dynamic range imaging. Camera pipeline 12 bits8 bits.
1 CS6825: Image Formation How are images created. How are images created.
11/15/11 Image-based Lighting Computational Photography Derek Hoiem, University of Illinois Many slides from Debevec, some from Efros T2.
Image-Based Rendering from a Single Image Kim Sang Hoon Samuel Boivin – Andre Gagalowicz INRIA.
High Dynamic Range Images cs195g: Computational Photography James Hays, Brown, Spring 2010 slides from Alexei A. Efros and Paul Debevec.
EE 7700 High Dynamic Range Imaging. Bahadir K. Gunturk2 References Slides and papers by Debevec, Ward, Pattaniak, Nayar, Durand, et al…
16421: Vision Sensors Lecture 7: High Dynamic Range Imaging Instructor: S. Narasimhan Wean 5312, T-R 1:30pm – 3:00pm.
Computational photography CS4670: Computer Vision Noah Snavely.
 Is the technique of taking several shots of the same subject using different aperture, shutter speed or ISO settings  Why do you think you would want.
Dynamic Range And Granularity. Dynamic range is important. It is defined as the difference between light and dark areas of an image. All digital images.
Physiology of Vision: a swift overview : Advanced Machine Perception A. Efros, CMU, Spring 2006 Some figures from Steve Palmer.
In Photography, there is an Exposure Triangle (Reciprocity Theory) Aperture – size of the iris opening, how much light come into the “window” Shutter Speed.
16421: Vision Sensors Lecture 7: High Dynamic Range Imaging Instructor: S. Narasimhan Wean 5312, T-R 1:30pm – 3:00pm.
Capturing light Source: A. Efros.
Digital Cameras And Digital Information. How a Camera works Light passes through the lens Shutter opens for an instant Film is exposed to light Film is.
INFORMATIK Design of a Tone Mapping Operator for High Dynamic Range Images based upon Psychophysical Evaluation and Preference Mapping Design of a Tone.
Film Digital Image Synthesis Yung-Yu Chuang 11/5/2008 with slides by Pat Hanrahan and Matt Pharr.
In the Know … Technological Vocabulary. Movin’ on Up Terms 1. Available Light – Light in a room (sunlight or existing room light) 2. Bit Depth – the color.
High Dynamic Range Images : Computational Photography Alexei Efros, CMU, Spring 2010 …with a lot of slides stolen from Paul Debevec © Alyosha Efros.
Rendering Synthetic Objects into Real Scenes: Bridging Traditional and Image-based Graphics with Global Illumination and High Dynamic Range Photography.
Panorama artifacts online –send your votes to Li Announcements.
11/16/10 Image-based Lighting Computational Photography Derek Hoiem, University of Illinois Many slides from Debevec, some from Efros T2.
How digital cameras work The Exposure The big difference between traditional film cameras and digital cameras is how they capture the image. Instead of.
High dynamic range imaging Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/8 with slides by Fedro Durand, Brian Curless, Steve Seitz and Alexei.
Lenses Contain both convex and concave lenses. Lenses Many concave and convex lenses, called elements are grouped together to produce a specific magnification.
03/03/03© 2003 University of Wisconsin Last Time Subsurface scattering models Sky models.
Tone mapping Digital Visual Effects, Spring 2007 Yung-Yu Chuang 2007/3/13 with slides by Fredo Durand, and Alexei Efros.
Singular Value Decomposition on solving Least Square optimization and Implementation 陳宏毅.
Distributed Ray Tracing. Can you get this with ray tracing?
(High Dynamic Range Imagery)
CPSC 6040 Computer Graphics Images
Physiology of Vision: a swift overview
Image Processing and Reconstructions Tools
Chapter I, Digital Imaging Fundamentals: Lesson II Capture
Fast Bilateral Filtering for the Display of High-Dynamic-Range Images
Point Processing CS194: Image Manipulation & Computational Photography
High Dynamic Range Images
Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2006/3/8
Digital Image Synthesis Yung-Yu Chuang 11/01/2005
Digital Image Synthesis Yung-Yu Chuang 11/8/2007
Presentation transcript:

High Dynamic Range Images : Rendering and Image Processing Alexei Efros

The Grandma Problem

Problem: Dynamic Range , ,000 2,000,000,000 The real world is high dynamic range.

pixel (312, 284) = 42 Image 42 photos?

Long Exposure Real world Picture 0 to 255 High dynamic range

Short Exposure Real world Picture High dynamic range 0 to 255

Camera Calibration Geometric –How pixel coordinates relate to directions in the world Photometric –How pixel values relate to radiance amounts in the world Geometric –How pixel coordinates relate to directions in the world Photometric –How pixel values relate to radiance amounts in the world

The Image Acquisition Pipeline scene radiance (W/sr/m ) scene radiance (W/sr/m )  sensor irradiance sensor irradiance sensor exposure sensor exposure latent image latent image Lens Shutter Film Electronic Camera 2 2 tttt

film density film density analog voltages analog voltages digital values digital values pixel values pixel values Development CCD ADC Remapping

log Exposure = log (Radiance *  t) Imaging system response function Pixelvalue (CCD photon count)

Varying Exposure

Camera is not a photometer! Limited dynamic range  Perhaps use multiple exposures? Unknown, nonlinear response  Not possible to convert pixel values to radiance Solution: –Recover response curve from multiple exposures, then reconstruct the radiance map Limited dynamic range  Perhaps use multiple exposures? Unknown, nonlinear response  Not possible to convert pixel values to radiance Solution: –Recover response curve from multiple exposures, then reconstruct the radiance map

Recovering High Dynamic Range Radiance Maps from Photographs Paul Debevec Jitendra Malik Paul Debevec Jitendra Malik August 1997 Computer Science Division University of California at Berkeley Computer Science Division University of California at Berkeley

Ways to vary exposure  Shutter Speed (*)  F/stop (aperture, iris)  Neutral Density (ND) Filters  Shutter Speed (*)  F/stop (aperture, iris)  Neutral Density (ND) Filters

Shutter Speed Ranges: Canon D30: 30 to 1/4,000 sec. Sony VX2000: ¼ to 1/10,000 sec. Pros: Directly varies the exposure Usually accurate and repeatable Issues: Noise in long exposures Ranges: Canon D30: 30 to 1/4,000 sec. Sony VX2000: ¼ to 1/10,000 sec. Pros: Directly varies the exposure Usually accurate and repeatable Issues: Noise in long exposures

Shutter Speed Note: shutter times usually obey a power series – each “stop” is a factor of 2 ¼, 1/8, 1/15, 1/30, 1/60, 1/125, 1/250, 1/500, 1/1000 sec Usually really is: ¼, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512, 1/1024 sec Note: shutter times usually obey a power series – each “stop” is a factor of 2 ¼, 1/8, 1/15, 1/30, 1/60, 1/125, 1/250, 1/500, 1/1000 sec Usually really is: ¼, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512, 1/1024 sec

 t = 1 sec  t = 1/16 sec  t = 4 sec  t = 1/64 sec The Algorithm Image series  t = 1/4 sec Exposure = Radiance   t log Exposure = log Radiance  log  t Pixel Value Z = f(Exposure)

Response Curve ln Exposure Assuming unit radiance for each pixel Assuming unit radiance for each pixel After adjusting radiances to obtain a smooth response curve Pixel value ln Exposure Pixel value

The Math Let g(z) be the discrete inverse response function For each pixel site i in each image j, want: Solve the overdetermined linear system: Let g(z) be the discrete inverse response function For each pixel site i in each image j, want: Solve the overdetermined linear system: fitting termsmoothness term

Matlab Code function [g,lE]=gsolve(Z,B,l,w) n = 256; A = zeros(size(Z,1)*size(Z,2)+n+1,n+size(Z,1)); b = zeros(size(A,1),1); k = 1; % Include the data-fitting equations for i=1:size(Z,1) for j=1:size(Z,2) wij = w(Z(i,j)+1); A(k,Z(i,j)+1) = wij; A(k,n+i) = -wij; b(k,1) = wij * B(i,j); k=k+1; end A(k,129) = 1; % Fix the curve by setting its middle value to 0 k=k+1; for i=1:n-2 % Include the smoothness equations A(k,i)=l*w(i+1); A(k,i+1)=-2*l*w(i+1); A(k,i+2)=l*w(i+1); k=k+1; end x = A\b; % Solve the system using SVD g = x(1:n); lE = x(n+1:size(x,1));

Results: Digital Camera Recovered response curve log Exposure Pixel value Kodak DCS460 1/30 to 30 sec

Reconstructed radiance map

Results: Color Film Kodak Gold ASA 100, PhotoCD

Recovered Response Curves RedGreen RGBBlue

The Radiance Map

Linearly scaled to display device

Portable FloatMap (.pfm) 12 bytes per pixel, 4 for each channel signexponentmantissa PF Floating Point TIFF similar Text header similar to Jeff Poskanzer’s.ppm image format:

(145, 215, 87, 149) = (145, 215, 87) * 2^( ) = ( , , ) (145, 215, 87, 149) = (145, 215, 87) * 2^( ) = ( , , ) Red Green Blue Exponent 32 bits / pixel (145, 215, 87, 103) = (145, 215, 87) * 2^( ) = ( , , ) (145, 215, 87, 103) = (145, 215, 87) * 2^( ) = ( , , ) Ward, Greg. "Real Pixels," in Graphics Gems IV, edited by James Arvo, Academic Press, 1994 Radiance Format (.pic,.hdr)

ILM’s OpenEXR (.exr) 6 bytes per pixel, 2 for each channel, compressed signexponentmantissa Several lossless compression options, 2:1 typical Compatible with the “half” datatype in NVidia's Cg Supported natively on GeForce FX and Quadro FX Available at

Now What?

Tone Mapping Real World Ray Traced World (Radiance) Display/ Printer 0 to 255 High dynamic range How can we do this? Linear scaling?, thresholding? Suggestions? How can we do this? Linear scaling?, thresholding? Suggestions?

Simple Global Operator Compression curve needs to –Bring everything within range –Leave dark areas alone In other words –Asymptote at 255 –Derivative of 1 at 0 Compression curve needs to –Bring everything within range –Leave dark areas alone In other words –Asymptote at 255 –Derivative of 1 at 0

Global Operator (Reinhart et al)

Global Operator Results

Darkest 0.1% scaled to display device Reinhart Operator

What do we see? Vs.

What does the eye sees? The eye has a huge dynamic range Do we see a true radiance map?

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 "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

Cornsweet Illusion

Campbell-Robson contrast sensitivity curve Sine wave

Metamores Can we use this for range compression?

Compressing Dynamic Range range This reminds you of anything?

Fast Bilateral Filtering for the Display of High-Dynamic-Range Images Frédo Durand & Julie Dorsey Laboratory for Computer Science Massachusetts Institute of Technology

High-dynamic-range (HDR) images CG Images Multiple exposure photo [Debevec & Malik 1997] HDR sensors HDR value for each pixel Recover response curve

A typical photo Sun is overexposed Foreground is underexposed

Gamma compression X  X  Colors are washed-out InputGamma

Gamma compression on intensity Colors are OK, but details (intensity high-frequency) are blurred Gamma on intensityIntensity Color

Chiu et al Reduce contrast of low-frequencies Keep high frequencies Reduce low frequencyLow-freq. High-freq. Color

The halo nightmare For strong edges Because they contain high frequency Reduce low frequencyLow-freq. High-freq. Color

Our approach Do not blur across edges Non-linear filtering OutputLarge-scale Detail Color

Multiscale decomposition Multiscale retinex [Jobson et al. 1997] Low-freq.High-freq.Mid-freq. Compressed

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-preservingGaussian blurInput

Comparison with our approach We use only 2 scales Can be seen as illumination and reflectance Different edge-preserving filter from LCIS OutputLarge-scaleDetail Compressed

Start with Gaussian filtering Here, input is a step function + noise outputinput

Start with Gaussian filtering Spatial Gaussian f outputinput

Start with Gaussian filtering Output is blurred outputinput

Gaussian filter as weighted average Weight of  depends on distance to x outputinput

The problem of edges Here, “pollutes” our estimate J(x) It is too different outputinput

Principle of Bilateral filtering [Tomasi and Manduchi 1998] Penalty g on the intensity difference outputinput

Bilateral filtering [Tomasi and Manduchi 1998] Spatial Gaussian f outputinput

Bilateral filtering [Tomasi and Manduchi 1998] Spatial Gaussian f Gaussian g on the intensity difference outputinput

Normalization factor [Tomasi and Manduchi 1998] k(x)= outputinput

Bilateral filtering is non-linear [Tomasi and Manduchi 1998] The weights are different for each output pixel outputinput

Contrast reduction Input HDR image Contrast too high!

Contrast reduction Color Input HDR image Intensity

Contrast reduction Color Intensity Large scale Fast Bilateral Filter Input HDR image

Contrast reduction Detail Color Intensity Large scale Fast Bilateral Filter Input HDR image

Contrast reduction Detail Color Intensity Large scale Fast Bilateral Filter Reduce contrast Large scale Input HDR image Scale in log domain

Contrast reduction Detail Color Intensity Large scale Fast Bilateral Filter Reduce contrast Detail Large scale Preserve! Input HDR image

Contrast reduction Detail Color Intensity Large scale Fast Bilateral Filter Reduce contrast Detail Large scale Color Preserve! Input HDR image Output

Informal comparison Bilateral [Durand et al.] Photographic [Reinhard et al.]

Informal comparison Bilateral [Durand et al.] Photographic [Reinhard et al.]