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

Similar documents
Tonemapping and bilateral filtering

Fixing the Gaussian Blur : the Bilateral Filter

High dynamic range imaging and tonemapping

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

Image Deblurring with Blurred/Noisy Image Pairs

Realistic Image Synthesis

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

Contrast Image Correction Method

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

6.098/6.882 Computational Photography 1. Problem Set 1. Assigned: Feb 9, 2006 Due: Feb 23, 2006

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

6.A44 Computational Photography

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

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

Denoising and Effective Contrast Enhancement for Dynamic Range Mapping

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

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

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

Aperture & Shutter Speed Review

High Dynamic Range Photography

How to combine images in Photoshop

Flash Photography Enhancement via Intrinsic Relighting

A Saturation-based Image Fusion Method for Static Scenes

Problem Session 6. Computa(onal Imaging and Display EE 367 / CS 448I

Aperture & Shutter Speed Review

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

Computational Photography

A Beginner s Guide To Exposure

Aperture & Shutter Speed. Review

Distributed Algorithms. Image and Video Processing

Prof. Feng Liu. Spring /12/2017

DIGITAL PHOTOGRAPHY CAMERA MANUAL

PTC School of Photography. Beginning Course Class 2 - Exposure

HDR images acquisition

High-Dynamic-Range Imaging & Tone Mapping

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

A Study on Image Enhancement and Resolution through fused approach of Guided Filter and high-resolution Filter

Firas Hassan and Joan Carletta The University of Akron

Photomatix Pro 3.1 User Manual

Computational Photography and Video. Prof. Marc Pollefeys

CSC 320 H1S CSC320 Exam Study Guide (Last updated: April 2, 2015) Winter 2015

High dynamic range imaging

Admin Deblurring & Deconvolution Different types of blur

CS354 Computer Graphics Computational Photography. Qixing Huang April 23 th 2018

High dynamic range imaging

This talk is oriented toward artists.

Computational Photography Image Stabilization

MIT CSAIL Advances in Computer Vision Fall Problem Set 6: Anaglyph Camera Obscura

Princeton University COS429 Computer Vision Problem Set 1: Building a Camera

Maine Day in May. 54 Chapter 2: Painterly Techniques for Non-Painters

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

Nova Full-Screen Calibration System

KNOW YOUR CAMERA LEARNING ACTIVITY - WEEK 9

Automatic Content-aware Non-Photorealistic Rendering of Images

Fast and High-Quality Image Blending on Mobile Phones

Focus Stacking Tutorial (Rev. 1.)

Analysis of the SUSAN Structure-Preserving Noise-Reduction Algorithm

Computing for Engineers in Python

NEW HIERARCHICAL NOISE REDUCTION 1

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

Image Processing COS 426

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

Lenses, exposure, and (de)focus

Photomatix Light 1.0 User Manual

Photography Basics. Exposure

A Novel Hybrid Exposure Fusion Using Boosting Laplacian Pyramid

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

HDR Images (High Dynamic Range)

Image Visibility Restoration Using Fast-Weighted Guided Image Filter

Best Camera Settings For Outdoor Group Photos

Focusing and Metering

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

High Dynamic Range (HDR) Photography in Photoshop CS2

High Dynamic Range Imaging

Midterm Examination CS 534: Computational Photography

! 1! Digital Photography! 2! 1!

Tyler Stableford s Custom Functions for the Canon EOS 5D Mark II

L I F E L O N G L E A R N I N G C O L L A B O R AT I V E - FA L L S N A P I X : P H O T O G R A P H Y

ONE OF THE MOST IMPORTANT SETTINGS ON YOUR CAMERA!

IMAGE ENHANCEMENT - POINT PROCESSING

Photomatix Pro User Manual. Photomatix Pro 3.0 User Manual

FOCUS, EXPOSURE (& METERING) BVCC May 2018

A Kalman-Filtering Approach to High Dynamic Range Imaging for Measurement Applications

Photography for Model Railroaders

Deblurring. Basics, Problem definition and variants

More image filtering , , Computational Photography Fall 2017, Lecture 4

Multispectral Image Dense Matching

Picture Style Editor Ver Instruction Manual

Improved motion invariant imaging with time varying shutter functions

JULY 6, Creating A Long Exposure Look Without The Wait or ND Filter

Topic 1 - A Closer Look At Exposure Shutter Speeds

Image Processing by Bilateral Filtering Method

Panoramas and the Info Palette By: Martin Kesselman 5/25/09

Movie 7. Merge to HDR Pro

1. HDR projects Quick guide Program & interface HDR creation Tone mapping / post-processing... 14

HDR Darkroom 2 User Manual

by Don Dement DPCA 3 Dec 2012

DIGITAL INFRARED PHOTOGRAPHY By Steve Zimic

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

Transcription:

6.098/6.882 Computational Photography 1 Problem Set 3 Assigned: March 9, 2006 Due: March 23, 2006 Problem 1 (Optional) Multiple-Exposure HDR Images Even though this problem is optional, we recommend you to go through the capturing process and create your own HDR image. This can be done in groups of up to three people. Please identify your collaborators. Use HDRShop to combine multiple exposures. Get HDRShop from http:// gl.ict.usc.edu/hdrshop/. Use v1 (free). For Linux and Mac OS users, you can download Photoshphere from http://www.anyhere.com/. Calibrate the camera response curve You need many pictures for this job (e.g. 10 every 1/3 stop). Use manual mode (M). Set small aperture. Vary shutter speed in 1/3 stops, that is, one step at a time (e.g. from 1/10 to 1/13 to 1/16 to 20, etc.) Take maybe 10 images from underexposed to overexposed. Avoid moving the camera when you change the shutter speed. Of course, use the tripod. Save images on computer and go to HDRShop. Go to menu Create >Calibrate camera curve. Select image sequence (you might need to select them in small groups). Indicate increment between images (click on 1/3 F-stop). Click Go. When the curve looks nice, press stop and save curve.

6.098/6.882 Computational Photography 2 Use the bracketing mode on the camera to take a sequence of 3 pictures Find a scene with high contrast. A good example is a scene with both indoor and outdoor parts. Check that the scene is too contrasted by taking a picture and checking on the back LCD that part of it is under- or overexposed. On a Nikon, Press BKT (top left) and rotate the back dial to set it on. Put the top-left dial on C (continuous) so that when you keep the shutter pressed, it takes the series of 3 pictures. On a Canon, you need to go somewhere in the menu. Use a remote shutter release to avoid camera shake if possible. Assemble a high-dynamic-range image using HDRShop Create >Assemble HDR from image sequence. Load images, indicate increment (e.g. 3 stops). Change camera response curve (custom curve, Browse to select your new curve). Press generate Images. Play with the view menu, in particular with exposure. Save as.hdr Problem 2 Tone Mapping Using the Bilateral Filter We now want to reduce the dynamic range of our image to display it on a low-dynamic range device. For this, you will implement a simplified (read: slow) version of Durand and Dorsey s 2002 algorithm. This algorithm only modifies the luminance of an image: it reduces the contrast of the large-scale variation of luminance but preserves local detail. For this, it decomposes the luminance image into a large-scale (a.k.a. base) layer and a detail layer using the bilateral filter. All computation on luminance is performed in the log domain. The bilateral filter blurs an image except across strong edges. For each pixel, the output is a weighted average of the neighboring pixels where the

6.098/6.882 Computational Photography 3 weight depends on both the spatial distance and the intensity difference: J s = 1 k(s) p N s exp{ where k(s) is a normalization term k(s) = p N s exp{ (p s)2 2σ 2 d (p s)2 2σ 2 d } exp{ (I p I s ) 2 }I 2σr 2 p } exp{ (I p I s ) 2 }. 2σr 2 N s is the neighborhood of s. s and p are both coordinates of image lattice. So there are three parameters for bilateral filtering, the half size of the neighborhood w (the neighborhood is (2w +1) (2w + 1)), spatial standard deviation σ d and range standard deviation σ r. Here is the pseudo code of applying bilateral filtering for tone mapping. input intensity= 1/61*(R*20+G*40+B) r=r/(input intensity), g=g/input intensity, B=B/input intensity log(base)=bilateral(log(input intensity)) log(detail)=log(input intensity)-log(base) compressfactor=log(output range)/(max(log(base))-min(log(base))); log_offset=-max(log(base))*compressfactor; log (output intensity)=log(base)*compressionfactor+log_offset+log(detail) R output = r*exp(log(output intensity)), etc. The main parameter of this code is output range, which depends the amount of remaining large-scale contrast that you want in the output. A value of 10 to 30 works well. (a) Write a MATLAB function Im=imbltflt(im,wsize,sigma_d,sigma_r) to implement bilateral filtering. Argument im is the input image. Parameter wsize, sigma_d and sigma_r correspond to w, σ d and σ r in the above equations. Try to avoid writing four loops. Two loops (over image coordinate) are OK. Load image einstein.jpg, addawgnwith σ =0.05 (as you did in ps2), and apply bilateral filter to denoise the noise contaminated image. Use parameter w =5, σ d =2, σ r =0.12. Display the noisy image and denoised image. (b) Load HDR image vinesunset.hdr using the enclosed MATLAB code read_rle_rgbe.m (from http://www.cis.rit.edu/mcsl/icam/hdr/). Implement tone mapping using Gaussian filtering, fspecial( gaussian,21,8),

6.098/6.882 Computational Photography 4 instead of bilateral filtering. Set output range to be 30. Display the LDR image. Do you see any artifacts? (c) Now replace the Gaussian filter with the bilateral filter. Set the parameter w =10,σ d =8,σ r =0.2. Display the LDR image. Do the halo artifacts disappear? Compare the result with (b). (d) (Extra credit) Implement the uncertainty fix ; implement fast bilateral filtering; implement the trilateral filter Problem 3 Poisson Image Editing Your goal is to create a photomontage by pasting an image region onto a new background using Poisson image editing. Please read Pérez et al s SIGGRAPH 2003 paper Poisson Image Editing. Focus on Section 2 and 3.1. Implement the algorithm from Equation (7) to (11). The main task of Poisson image editing is to solve the huge linear system Ax = b in Equation (7). You can explicitly represent A using sparse matrices, and solve it using MATLAB command \. This method should work for the provided examples, but cannot scale up for big masks. We do not recommend this approach, though it is fine for you to use it. We recommend conjugate gradient (CG) approach. The basic idea of conjugate gradient method is that the solution to Ax=b can be represented by a set of vectors, and these vectors are Aorthogonalbetween one and another. It is mandatory that matrix A is positive definite. In energy minimization problems A is always semi-positive definite. In our problem matrix A is the second-order derivative matrix which is positive definite. There are two reasons that (preconditioned) conjugate gradient method is favored in image processing/editing For image processing matrix A is huge. The space complexity for LU decomposition is O(n 3 ), too big for images. But CG only requires matrix multiplication in each iteration, which is essentially filtering. Space complexity is O(n 2 ) CG gives good results within a few iterations. Normally the result is good enough if the number of iteration is image width or height, or even less. So CG is efficient. It can be much faster, converging in less

6.098/6.882 Computational Photography 5 than ten iterations, if a good preconditioner is used (not required for the homework). The conjugate gradient method can be summarized in the following pseudo code Given A, b and an initial guess of x, solve Ax=b iteratively 1. r = b Ax % residual 2. for k =1:n ρ k = r 2 If k =1 then p = r else p = r + ρ k ρ k 1 p % direction q = Ap α = ρ k /(p T q) x = x + αp % new point r = r αq % residual 3. Output x Your task is to replace Ax by filtering and other MATLAB operations. For this example you will get good enough result with n = 100. To debug you can monitor the norm of r which should be monotonically decreasing. (a) Load image bear.bmp and a binary mask mask.bmp. Seamlessly paste it onto image waterpool.bmp so that the top-left coordinate of the mask is (20, 150) at the background image. Try also (20, 1) and see how the results are different. (b) So far we have implemented three methods for seamless pasting, i.e. multi-scale blending, matting and Poisson image editing. Compare the three methods in terms of advantage, limitation, speed, application scenario and so on. You may list a table and describe in three paragraphs. Problem 4 (6.882 only) Paper Review Go to page http://groups.csail.mit.edu/graphics/classes/compphoto06 /papers.htm. It is also included in the zip file. Choose a paper from the literature among the ones proposed on the web page. Alternatively, a different paper can be used with permission of the instructors. Use the SIGGRAPH review form in the zipd file and evaluate the article.