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

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

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

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

High dynamic range imaging

High dynamic range imaging

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

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

HDR imaging and the Bilateral Filter

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

High dynamic range imaging and tonemapping

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

High Dynamic Range Imaging

High-Dynamic-Range Imaging & Tone Mapping

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

Recovering High Dynamic Range Radiance Maps from Photographs

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

Distributed Algorithms. Image and Video Processing

Realistic Image Synthesis

HDR Images (High Dynamic Range)

Tonemapping and bilateral filtering

HDR images acquisition

Fixing the Gaussian Blur : the Bilateral Filter

Panoramas and High-Dynamic-Range Imaging

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

COMPUTATIONAL PHOTOGRAPHY. Chapter 10

Contrast Image Correction Method

High Dynamic Range Imaging

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

VU Rendering SS Unit 8: Tone Reproduction

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

Digital Radiography using High Dynamic Range Technique

Images and Displays. Lecture Steve Marschner 1

High Dynamic Range Images

Firas Hassan and Joan Carletta The University of Akron

Images and Displays. CS4620 Lecture 15

Why learn about photography in this course?

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

Acquisition Basics. How can we measure material properties? Goal of this Section. Special Purpose Tools. General Purpose Tools

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

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

A Saturation-based Image Fusion Method for Static Scenes

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

High dynamic range and tone mapping Advanced Graphics

Digital cameras for digital cinematography Alfonso Parra AEC

HIGH DYNAMIC RANGE IMAGE ACQUISITION USING FLASH IMAGE

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

Understanding and Using Dynamic Range. Eagle River Camera Club October 2, 2014

HIGH DYNAMIC RANGE IMAGING Nancy Clements Beasley, March 22, 2011

This histogram represents the +½ stop exposure from the bracket illustrated on the first page.

A Locally Tuned Nonlinear Technique for Color Image Enhancement

Dynamic Range. H. David Stein

BBM 413! Fundamentals of! Image Processing!

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

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

HDR formats. Imaging & Randering

Goal of this Section. Capturing Reflectance From Theory to Practice. Acquisition Basics. How can we measure material properties? Special Purpose Tools

Image Enhancement (from Chapter 13) (V6)

Low Dynamic Range Solutions to the High Dynamic Range Imaging Problem

Resolution test with line patterns

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

What is an image? Images and Displays. Representative display technologies. An image is:

SHOOTING FOR HIGH DYNAMIC RANGE IMAGES DAVID STUMP ASC

Admin Deblurring & Deconvolution Different types of blur

HDR imaging Automatic Exposure Time Estimation A novel approach

RECOVERY OF THE RESPONSE CURVE OF A DIGITAL IMAGING PROCESS BY DATA-CENTRIC REGULARIZATION

Flash Photography Enhancement via Intrinsic Relighting

Frequencies and Color

Unit 1: Image Formation

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

Improving digital images with the GNU Image Manipulation Program PHOTO FIX

HIGH DYNAMIC RANGE MAP ESTIMATION VIA FULLY CONNECTED RANDOM FIELDS WITH STOCHASTIC CLIQUES

Cameras. Outline. Pinhole camera. Camera trial #1. Pinhole camera Film camera Digital camera Video camera

Flash Photography Enhancement via Intrinsic Relighting

Digital Imaging Rochester Institute of Technology

Aperture. The lens opening that allows more, or less light onto the sensor formed by a diaphragm inside the actual lens.

Technical Brief. NVIDIA HPDR Technology The Ultimate in High Dynamic- Range Imaging

Tone Adjustment of Underexposed Images Using Dynamic Range Remapping

Prof. Feng Liu. Spring /12/2017

Lenses, exposure, and (de)focus

icam06, HDR, and Image Appearance

Photomatix Light 1.0 User Manual

Camera Post-Processing Pipeline

A Real Time Algorithm for Exposure Fusion of Digital Images

Focusing and Metering

OFFSET AND NOISE COMPENSATION

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

Cameras. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

arxiv: v1 [cs.cv] 29 May 2018

Correcting Over-Exposure in Photographs

IMAGE ENHANCEMENT - POINT PROCESSING

Digital Image Processing

Hello, welcome to the video lecture series on Digital Image Processing.

High Dynamic Range Video with Ghost Removal

Chapters 1-3. Chapter 1: Introduction and applications of photogrammetry Chapter 2: Electro-magnetic radiation. Chapter 3: Basic optics

Image Visibility Restoration Using Fast-Weighted Guided Image Filter

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

Research Article Anisotropic Diffusion for Details Enhancement in Multiexposure Image Fusion

Lecture Notes 11 Introduction to Color Imaging

Elements of Exposure

Transcription:

High Dynamic Range Images 15-463: Rendering and Image Processing Alexei Efros The Grandma Problem 1

Problem: Dynamic Range 1 1500 The real world is high dynamic range. 25,000 400,000 2,000,000,000 Image pixel (312, 284) = 42 42 photos? 2

Long Exposure Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 0 to 255 Short Exposure Real world 10-6 High dynamic range 10 6 Picture 10-6 10 6 0 to 255 3

Camera Calibration Geometric How pixel coordinates relate to directions in the world Photometric How pixel values relate to radiance amounts in the world Lens Shutter Film scene radiance (W/sr/m ) 22 sensor irradiance t sensor exposure latent image Electronic Camera The Image Acquisition Pipeline 4

Development CCD ADC Remapping film density analog voltages digital values pixel values Imaging system response function 255 Pixel value 0 log Exposure = log (Radiance * t) (CCD photon count) 5

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 6

Recovering High Dynamic Range Radiance Maps from Photographs Paul Debevec Jitendra Malik Computer Science Division University of California at Berkeley August 1997 Ways to vary exposure Shutter Speed (*) F/stop (aperture, iris) Neutral Density (ND) Filters 7

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

1 2 3 t = 1/64 sec The Algorithm 1 2 3 t = 1/16 sec Image series 1 2 3 t = 1/4 sec 1 2 3 t = 1 sec Pixel Value Z = f(exposure) Exposure = Radiance t log Exposure = log Radiance + log t 1 2 3 t = 4 sec Response Curve Assuming unit radiance for each pixel After adjusting radiances to obtain a smooth response curve Pixel value 3 2 1 Pixel value ln Exposure ln Exposure 9

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 [ ln Radiance i + ln t j g(z ij )] 2 +λ g (z) 2 i=1 j=1 ln Radiance i +ln t j = g(z ij ) Z max z=z min fitting term smoothness 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 end A(k,129) = 1; k=k+1; %% Fix the curve by setting its middle value to 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)); 10

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

Results: Color Film Kodak Gold ASA 100, PhotoCD Recovered Response Curves Red Green Blue RGB 12

The Radiance Map The Radiance Map Linearly scaled to display device 13

Portable FloatMap (.pfm) 12 bytes per pixel, 4 for each channel sign exponent mantissa Text header similar to Jeff Poskanzer s.ppm image format: Floating Point TIFF similar PF 768 512 1 <binary image data> Radiance Format (.pic,.hdr) 32 bits / pixel Red Green Blue Exponent (145, 215, 87, 149) = (145, 215, 87) * 2^(149-128) = (1190000, 1760000, 713000) (145, 215, 87, 103) = (145, 215, 87) * 2^(103-128) = (0.00000432, 0.00000641, 0.00000259) Ward, Greg. "Real Pixels," in Graphics Gems IV, edited by James Arvo, Academic Press, 1994 14

ILM s OpenEXR (.exr) 6 bytes per pixel, 2 for each channel, compressed sign exponent mantissa 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 http://www.openexr.net/ Now What? 15

Real World Ray Traced World (Radiance) Tone Mapping How can we do this? Linear scaling?, thresholding? Suggestions? 10-6 High dynamic range 10 6 Display/ Printer 10-6 10 6 0 to 255 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 16

Global Operator (Reinhart et al) L display L = 1+ L world world Global Operator Results 17

Reinhart Operator Darkest 0.1% scaled to display device What do we see? Vs. 18

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 19

Cornsweet Illusion Sine wave Campbell-Robson contrast sensitivity curve 20

Metamores Can we use this for range compression? Compressing Dynamic Range range range This reminds you of anything? 21

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] Recover response curve HDR value for each pixel HDR sensors 22

A typical photo Sun is overexposed Foreground is underexposed Gamma compression X > X γ Colors are washed-out Input Gamma 23

Gamma compression on intensity Colors are OK, but details (intensity high-frequency) are blurred Intensity Gamma on intensity Color Chiu et al. 1993 Reduce contrast of low-frequencies Keep high frequencies Low-freq. Reduce low frequency High-freq. Color 24

The halo nightmare For strong edges Because they contain high frequency Low-freq. Reduce low frequency High-freq. Color Our approach Do not blur across edges Non-linear filtering Large-scale Output Detail Color 25

Multiscale decomposition Multiscale retinex [Jobson et al. 1997] Low-freq. Mid-freq. Mid-freq. High-freq. Compressed Compressed Compressed Edge-preserving filtering Blur, but not across edges Input Gaussian blur Edge-preserving Anisotropic diffusion [Perona & Malik 90] Blurring as heat flow LCIS [Tumblin & Turk] Bilateral filtering [Tomasi & Manduci, 98] 26

Comparison with our approach We use only 2 scales Can be seen as illumination and reflectance Different edge-preserving filter from LCIS Large-scale Detail Output Compressed Start with Gaussian filtering Here, input is a step function + noise J output = f I input 27

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

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(ξ ) pollutes our estimate J(x) It is too different J (x) = ξ f ( x, ξ ) I (ξ ) x I(ξ ) I(x) output input 29

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) ξ I(x) 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 30

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

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 Contrast reduction Input HDR image Contrast too high! 32

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

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

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 35

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