! High&Dynamic!Range!Imaging! Slides!from!Marc!Pollefeys,!Gabriel! Brostow!(and!Alyosha!Efros!and! others)!!

Similar documents
The Dynamic Range Problem. High Dynamic Range (HDR) Multiple Exposure Photography. Multiple Exposure Photography. Dr. Yossi Rubner.

HDR imaging and the Bilateral Filter

High Dynamic Range Images : Rendering and Image Processing Alexei Efros. The Grandma Problem

Fast Bilateral Filtering for the Display of High-Dynamic-Range Images

Tone mapping. Digital Visual Effects, Spring 2009 Yung-Yu Chuang. with slides by Fredo Durand, and Alexei Efros

High-Dynamic-Range Imaging & Tone Mapping

High dynamic range imaging

High dynamic range imaging

Fast Bilateral Filtering for the Display of High-Dynamic-Range Images

High dynamic range imaging and tonemapping

Fixing the Gaussian Blur : the Bilateral Filter

High Dynamic Range Imaging

Realistic Image Synthesis

Denoising and Effective Contrast Enhancement for Dynamic Range Mapping

Tone mapping. Tone mapping The ultimate goal is a visual match. Eye is not a photometer! How should we map scene luminances (up to

Prof. Trevor Darrell Lecture 23: Segmentation II & Computational Photography Teaser

Cameras. Outline. Pinhole camera. Camera trial #1. Pinhole camera Film camera Digital camera Video camera High dynamic range imaging

Burst Photography! EE367/CS448I: Computational Imaging and Display! stanford.edu/class/ee367! Lecture 7! Gordon Wetzstein! Stanford University!

Tonemapping and bilateral filtering

Prof. Feng Liu. Spring /12/2017

The ultimate camera. Computational Photography. Creating the ultimate camera. The ultimate camera. What does it do?

Recovering High Dynamic Range Radiance Maps from Photographs

HDR images acquisition

Panoramas and High-Dynamic-Range Imaging

Prof. Feng Liu. Winter /10/2019

HDR Images (High Dynamic Range)

Correcting Over-Exposure in Photographs

Limitations of the Medium, compensation or accentuation

Limitations of the medium

Flash Photography Enhancement via Intrinsic Relighting

COMPUTATIONAL PHOTOGRAPHY. Chapter 10

Distributed Algorithms. Image and Video Processing

Firas Hassan and Joan Carletta The University of Akron

Images and Displays. CS4620 Lecture 15

High dynamic range and tone mapping Advanced Graphics

25/02/2017. C = L max L min. L max C 10. = log 10. = log 2 C 2. Cornell Box: need for tone-mapping in graphics. Dynamic range

Deblurring. Basics, Problem definition and variants

Problem Set 3. Assigned: March 9, 2006 Due: March 23, (Optional) Multiple-Exposure HDR Images

Computational Illumination Frédo Durand MIT - EECS

Low Dynamic Range Solutions to the High Dynamic Range Imaging Problem

MODIFICATION OF ADAPTIVE LOGARITHMIC METHOD FOR DISPLAYING HIGH CONTRAST SCENES BY AUTOMATING THE BIAS VALUE PARAMETER

Agenda. Fusion and Reconstruction. Image Fusion & Reconstruction. Image Fusion & Reconstruction. Dr. Yossi Rubner.

Camera Image Processing Pipeline: Part II

Camera Image Processing Pipeline: Part II

Flash Photography Enhancement via Intrinsic Relighting

Camera Post-Processing Pipeline

Why learn about photography in this course?

Applications of Flash and No-Flash Image Pairs in Mobile Phone Photography

lecture 24 image capture - photography: model of image formation - image blur - camera settings (f-number, shutter speed) - exposure - camera response

Image acquisition. In both cases, the digital sensing element is one of the following: Line array Area array. Single sensor

VU Rendering SS Unit 8: Tone Reproduction

A Locally Tuned Nonlinear Technique for Color Image Enhancement

Flash Photography Enhancement via Intrinsic Relighting

Extended Dynamic Range Imaging: A Spatial Down-Sampling Approach

Admin Deblurring & Deconvolution Different types of blur

BBM 413! Fundamentals of! Image Processing!

BBM 413 Fundamentals of Image Processing. Erkut Erdem Dept. of Computer Engineering Hacettepe University. Point Operations Histogram Processing

Templates and Image Pyramids

BBM 413 Fundamentals of Image Processing. Erkut Erdem Dept. of Computer Engineering Hacettepe University. Point Operations Histogram Processing

PHOTOGRAPHY: MINI-SYMPOSIUM

ISSN Vol.03,Issue.29 October-2014, Pages:

A Model of Retinal Local Adaptation for the Tone Mapping of CFA Images

Computational Photography and Video. Prof. Marc Pollefeys

Templates and Image Pyramids

CSE 332/564: Visualization. Fundamentals of Color. Perception of Light Intensity. Computer Science Department Stony Brook University

High Dynamic Range Imaging

CS 89.15/189.5, Fall 2015 ASPECTS OF DIGITAL PHOTOGRAPHY COMPUTATIONAL. Image Processing Basics. Wojciech Jarosz

Images and Displays. Lecture Steve Marschner 1

Computational Photography

Dynamic Range. H. David Stein

Continuous Flash. October 1, Technical Report MSR-TR Microsoft Research Microsoft Corporation One Microsoft Way Redmond, WA 98052

High Dynamic Range Video with Ghost Removal

Images. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 38

Computational Approaches to Cameras

Image Deblurring with Blurred/Noisy Image Pairs

Image Visibility Restoration Using Fast-Weighted Guided Image Filter

Automatic High Dynamic Range Image Generation for Dynamic Scenes

Introduction to Image Processing and Computer Vision -- Noise, Dynamic Range and Color --

Inexpensive High Dynamic Range Video for Large Scale Security and Surveillance

HIGH DYNAMIC RANGE IMAGE ACQUISITION USING FLASH IMAGE

High Dynamic Range Image Formats

High Dynamic Range (HDR) photography is a combination of a specialized image capture technique and image processing.

Local Adjustment Tools

A Real Time Algorithm for Exposure Fusion of Digital Images

Cameras. Shrinking the aperture. Camera trial #1. Pinhole camera. Digital Visual Effects Yung-Yu Chuang. Put a piece of film in front of an object.

Computational Cameras. Rahul Raguram COMP

1. Any wide view of a physical space. a. Panorama c. Landscape e. Panning b. Grayscale d. Aperture

Contrast Image Correction Method


Tone Adjustment of Underexposed Images Using Dynamic Range Remapping

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

HDR Video Compression Using High Efficiency Video Coding (HEVC)

SSRG International Journal of Electronics and Communication Engineering (SSRG-IJECE) Volume 2 Issue 8 August 2015

Simulating Film Response Curves from a Pair of LDR Images Asla Sa, Luiz Velho, Paulo Cezar Carvalho. Technical Report TR Relatório Técnico

A Saturation-based Image Fusion Method for Static Scenes

High Dynamic Range image capturing by Spatial Varying Exposed Color Filter Array with specific Demosaicking Algorithm

Automatic Selection of Brackets for HDR Image Creation

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

Capturing Light in man and machine. Some figures from Steve Seitz, Steve Palmer, Paul Debevec, and Gonzalez et al.

Photomatix Pro 3.1 User Manual

Transcription:

! High&Dynamic!Range!Imaging! Slides!from!Marc!Pollefeys,!Gabriel! Brostow!(and!Alyosha!Efros!and! others)!!

Today! High!Dynamic!Range!Imaging!(LDR&>HDR)! Tone!mapping!(HDR&>LDR!display)!

The!Problem!

Problem:!Dynamic!Range! 1 1500 The real world is high dynamic range. 25,000 400,000 2,000,000,000

Multiple exposure photography Sequentially measure all segments of the range Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 Low contrast

Multiple exposure photography Sequentially measure all segments of the range Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 Low contrast

Multiple exposure photography Sequentially measure all segments of the range Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 Low contrast

Multiple exposure photography Sequentially measure all segments of the range Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 Low contrast

Multiple exposure photography Sequentially measure all segments of the range Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 Low contrast

Multiple exposure photography Sequentially measure all segments of the range Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 Low contrast

How do we vary exposure? Options: Shutter speed Aperture ISO Neutral density filter Slide inspired by Siggraph 2005 course on HDR

Tradeoffs Shutter speed Range: ~30 sec to 1/4000sec (6 orders of magnitude) Pros: reliable, linear Cons: sometimes noise for long exposure Aperture Range: ~f/1.4 to f/22 (2.5 orders of magnitude) Cons: changes depth of field Useful when desperate ISO Range: ~100 to 1600 (1.5 orders of magnitude) Cons: noise Useful when desperate Neutral density filter Range: up to 4 densities (4 orders of magnitude) & can be stacked Cons: not perfectly neutral (color shift), not very precise, need to touch camera (shake) Pros: works with strobe/flash, good complement when desperate Slide after Siggraph 2005 course on HDR

HDR image using multiple exposure Given N photos at different exposure Recover a HDR color for each pixel

If we know the response curve Just look up the inverse of the response curve But how do we get the curve? Pixel value scene value

Calibrating the response curve Two basic solutions Vary scene luminance and see pixel values Assumes we control and know scene luminance Vary exposure and see pixel value for one scene luminance can usually not vary exposure more finely than by 1/3 stop Best of both: Vary exposure Exploit the large number of pixels

The Algorithm Image series 1 2 3 Δt = 10 sec 1 2 3 Δt = 1 sec 3 1 2 Δt = 1/10 sec 3 1 2 Δt = 1/100 sec Pixel Value Z = f(exposure) Exposure = Radiance Δt log Exposure = log Radiance + log Δt 1 2 3 Δt = 1/1000 sec Slide stolen from Fredo Durand who adapted it from Alyosha Efros who borrowed it from Paul Debevec.

Response curve Exposure is unknown, fit to find a smooth curve Assuming unit radiance for each pixel After adjusting radiances to obtain a smooth response curve Pixel value 3 2 1 Pixel value log Exposure log Exposure Slide stolen from Alyosha Efros who stole it from Paul Debevec

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: N P [ ] 2 log Radiance + log Δt g( Z ) + λ i j ij i= 1 j= 1 log Radiance + log Δt = i j g( Z ij ) Z max z= Z min g"" ( z) 2 fitting term smoothness term Slide stolen from Alyosha Efros who stole it from Paul Debevec

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 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; g = x(1:n); le = x(n+1:size(x,1)); %% Solve the system using SVD Slide stolen from Alyosha Efros who stole it from Paul Debevec

Result: digital camera Kodak DCS460 1/30 to 30 sec Recovered response curve Pixel value log Exposure Slide stolen from Alyosha Efros who stole it from Paul Debevec

Reconstructed radiance map Slide stolen from Alyosha Efros who stole it from Paul Debevec

Result: color film Kodak Gold ASA 100, PhotoCD Slide stolen from Alyosha Efros who stole it from Paul Debevec

Recovered response curves Red Green Blue RGB Slide stolen from Alyosha Efros who stole it from Paul Debevec

The Radiance map Slide stolen from Alyosha Efros who stole it from Paul Debevec

The Radiance map Linearly scaled to display device Slide stolen from Alyosha Efros who stole it from Paul Debevec

Real World HDR capture Ward, Journal of Graphics Tools, 2003 http://www.anyhere.com/gward/papers/jgtpap2.pdf Implemented in Photosphere http://www.anyhere.com/ Image registration (no need for tripod) Lens flare removal Ghost removal Images Greg Ward

Image registration How to robustly compare images of different exposure? Use a black and white version of the image thresholded at the median Median-Threshold Bitmap (MTB) Find the translation that minimizes difference Accelerate using pyramid

Slide from Siggraph 2005 course on HDR

Extension: HDR video Kang et al. Siggraph 2003 http://portal.acm.org/citation.cfm?id=882262.882270

HDR encoding Most formats are lossless Adobe DNG (digital negative) Specific for RAW files, avoid proprietary formats RGBE 24 bits/pixels as usual, plus 8 bit of common exponent Introduced by Greg Ward for Radiance (light simulation) Enormous dynamic range OpenEXR By Industrial Light + Magic, also standard in graphics hardware 16bit per channel (48 bits per pixel) 10 mantissa, sign, 5 exponent Fine quantization (because 10 bit mantissa), only 9.6 orders of magnitude JPEG 2000 Has a 16 bit mode, lossy

HDR Cameras HDR sensors using CMOS Use a log response curve e.g. SMaL, Assorted pixels Fuji Nayar et al. Fuji SuperCCD Per-pixel exposure Filter Integration time Multiple cameras using beam splitters Other computational photography tricks

Now!What?!

Sunnybrook!HDR!display! Slide from the 2005 Siggraph course on HDR

Slide from the 2005 Siggraph course on HDR

Slide from the 2005 Siggraph course on HDR

ht! Slide from the 2005 Siggraph course on HDR

BrightSide DR37-P (now Dolby)

How!humans!deal!with!dynamic!range! We're!sensiNve!to!contrast!(mulNplicaNve)! A!raNo!of!1:2!is!perceived!as!the!same!contrast!as!a!raNo!of!! 100!to!200! Makes!sense!because!illuminaNon!has!a!mulNplicaNve!effect! Use!the!log!domain!as!much!as!possible!! Dynamic!adaptaNon!(very!local!in!reNna)! Pupil!(not!so!important)! Neural! Chemical! Different!sensiNvity!to!spaNal!frequencies!!

Contrast!SensiNvity! Sine!Wave!graNng! What!contrast!is!necessary!to!make!the! granng!visible?!

Contrast!SensiNvity!FuncNon!(CSF)! Decreasing contrast Increasing spatial frequency

Contrast!SensiNvity!FuncNon!(CSF)! Low!sensiNvity! to!low!frequencies! Importance!of! medium!to!high! frequencies! Most!methods!to!deal! with!dynamic!range! reduce!the!contrast!of! low!frequencies! But!keep!the!color!

The second half: contrast reduction Input: high-dynamic-range image (floating point per pixel)

Naïve technique Scene has 1:10,000 contrast, display has 1:100 Simplest contrast reduction?

Naïve: Gamma compression X > X γ (where γ=0.5 in our case) But colors are washed-out. Why? Input Gamma

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

Oppenheim 1968, Chiu et al. 1993 Reduce contrast of low-frequencies Keep high frequencies Low-freq. Reduce low frequency High-freq. Color

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

Approach Do not blur across edges Non-linear filtering Large-scale Output Detail Color

Bilateral filter Tomasi and Manduci 1998 http://www.cse.ucsc.edu/~manduchi/papers/ ICCV98.pdf Related to SUSAN filter [Smith and Brady 95] http://citeseer.ist.psu.edu/smith95susan.html Digital-TV [Chan, Osher and Chen 2001] http://citeseer.ist.psu.edu/chan01digital.html sigma filter http://www.geogr.ku.dk/chips/manual/f187.htm

Start with Gaussian filtering Here, input is a step function + noise J = f I output input

Start with Gaussian filtering Spatial Gaussian f = J f I output input

Start with Gaussian filtering Output is blurred J = f I output input

Gaussian filter as weighted average Weight of ξ depends on distance to x J (x) = ξ f ( x, ξ ) I (ξ ) x ξ x output input

The problem of edges Here, I (ξ ) It is too different pollutes our estimate J(x) J (x) = ξ f ( x, ξ ) I (ξ ) I(x) x I (ξ ) output input

Principle of Bilateral filtering [Tomasi and Manduchi 1998] Penalty g on the intensity difference 1 J (x) = f ( x, ξ ) g( I( ξ ) I( x)) I (ξ ) k( x) ξ x I(x) I (ξ ) output input

Bilateral filtering [Tomasi and Manduchi 1998] Spatial Gaussian f 1 J (x) = f ( x, ξ ) g( I( ξ ) I( x)) I (ξ ) k( x) ξ x output input

Bilateral filtering [Tomasi and Manduchi 1998] Spatial Gaussian f Gaussian g on the intensity difference 1 J (x) = ( x, ξ ) k( x) ξ f g( I( ) I( x)) ξ I (ξ ) x output input

Normalization factor [Tomasi and Manduchi 1998] k(x)= x, ξ f ( ξ ) g( I( ξ ) I( x)) J (x) = 1 k( x) ξ f ( x, ξ ) g( I( ξ ) I( x)) I (ξ ) x output input

Bilateral filtering is non-linear [Tomasi and Manduchi 1998] The weights are different for each output pixel 1 J (x) = f ( x, ξ ) g( I( ξ ) I( x)) I (ξ ) k( x) ξ x x output input

Other view The bilateral filter uses the 3D distance

Handling uncertainty Sometimes, not enough similar pixels Happens for specular highlights Can be detected using normalization k(x) Simple fix (average with output of neighbors) Weights with high uncertainty Uncertainty

Contrast reduction Input HDR image Contrast too high!

Contrast reduction Input HDR image Intensity Color

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

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

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

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

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

Reduction To reduce contrast of base layer scale in the log domain! γ exponent in linear space Set a target range: log 10 (5) Compute range in the base (log) layer: (max-min) Deduce γ using an elaborate operation known as division You finally need to normalize so that the biggest value in the (linear) base is 1 (0 in log): Offset the compressed based by its max

Other tone mapping references J. DiCarlo and B. Wandell, Rendering High Dynamic Range Images http://www-isl.stanford.edu/%7eabbas/group/papers_and_pub/spie00_jeff.pdf Choudhury, P., Tumblin, J., " The Trilateral Filter for High Contrast Images and Meshes". http:// www.cs.northwestern.edu/~jet/publications.html Tumblin, J., Turk, G., " Low Curvature Image Simplifiers (LCIS): A Boundary Hierarchy for Detail-Preserving Contrast Reduction.'' http://www.cs.northwestern.edu/~jet/publications.html Tumblin, J., "Three Methods For Detail-Preserving Contrast Reduction For Displayed Images'' http://www.cs.northwestern.edu/~jet/publications.html Photographic Tone Reproduction for Digital Images Erik Reinhard, Mike Stark, Peter Shirley and Jim Ferwerda http://www.cs.utah.edu/%7ereinhard/cdrom/ Ashikhmin, M. ``A Tone Mapping Algorithm for High Contrast Images'' http://www.cs.sunysb.edu/~ash/tm.pdf Retinex at Nasa http://dragon.larc.nasa.gov/retinex/background/retpubs.html Gradient Domain High Dynamic Range Compression Raanan Fattal, Dani Lischinski, Michael Werman http://www.cs.huji.ac.il/~danix/hdr/ Li et al. : Wavelets and activity maps http://web.mit.edu/yzli/www/hdr_companding.htm

Tone mapping code http://www.mpi-sb.mpg.de/resources/pfstools/ http://scanline.ca/exrtools/ http://www.cs.utah.edu/~reinhard/cdrom/source.html http://www.cis.rit.edu/mcsl/icam/hdr/