Unformatted text preview:

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 simpli ed read slow version of Durand and Dorsey s 2002 algorithm This algorithm only modi es 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 lter All computation on luminance is performed in the log domain The bilateral lter 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 di erence Js 1 p s 2 Ip Is 2 exp exp Ip k s p Ns 2 d2 2 r2 where k s is a normalization term k s p Ns exp p s 2 Ip Is 2 exp 2 d2 2 r2 Ns is the neighborhood of s s and p are both coordinates of image lattice So there are three parameters for bilateral ltering 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 ltering 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 ltering 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 add AWGN with 0 05 as you did in ps2 and apply bilateral lter 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 ltering fspecial gaussian 21 8 6 098 6 882 Computational Photography 4 instead of bilateral ltering Set output range to be 30 Display the LDR image Do you see any artifacts c Now replace the Gaussian lter with the bilateral lter 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 x implement fast bilateral ltering implement the trilateral lter 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 Pe 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 ne 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 A orthogonal between one and another It is mandatory that matrix A is positive de nite In energy minimization problems A is always semi positive de nite In our problem matrix A is the second order derivative matrix which is positive de nite 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 n3 too big for images But CG only requires matrix multiplication in each iteration which is essentially ltering Space complexity is O n2 CG gives good results within a few iterations Normally the result …


View Full Document

MIT 6 098 - Problem Set #3

Loading Unlocking...
Login

Join to view Problem Set #3 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Problem Set #3 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?