Unformatted text preview:

6.098/6.882 Computational Photography 1Problem Set 1Assigned: Feb 9, 2006Due: Feb 23, 2006NoteThe problems marked with “6.882 only” are for the students who registerfor 6.882. (Of course, students registering for 6.098 may do these problemsaccording to their interests, but they will not be graded.) The problemsmarked “extra credit” are for both 6.882 and 6.098 students. For those whoare not familiar with image processing/manupulation in MATLAB, pleasesee the appendix to this problem set for a brief introduction.Students are encouraged to collaborate on the assignments. However, eachstudent should individually do the coding and the write-up. Please hand insolutions on the due date, and email the code and results (in a zipped file)to TA. In the email please also indicate how much t ime you took on thisproblem set.Please go to webpage http://groups.csail.mit.edu/graphics/classes/CompPhoto06/, download and unzip file ps1.zip under the link “problem setsand solutions”.Problem 1 Pinhole Camera(a) With a pinhole camera, if you photograph a brick wall, with the sensorplane parallel to the brick wall, will the lines of the bricks be pa rallelor converging in the resulting photograph?(b) Suppose you move the camera during an exposure. Under each of thefollowing types of camera motion, will the amount that an o bject isblurred depend on its distance away from the camera (and why)(i) rotation about a vertical axis through the pinhole (vertical axisassumed to be parallel to the sensor plane).(ii) rotation about the optical axis.(iii) translation in a direction para llel to the sensor plane.6.098/6.882 Computational Photography 2Vertical axisOptical axisPinholeSensor planeFigure 1: Pinhole camera schematic, defining the vertical and optical axes.(iv) translation perpendicular to the sensor plane.(c) For a pinhole camera, how will the image change from one obtainedusing a small circular aperture (ignoring diffra ction effects):(i) if you double the size of the aperture?(ii) if you change the aperture to a thin vertical slit?Problem 2 Warm-up Matlab AssignmentUnzip file ps1.zip. Load imag e street.jpg into Matlab. This is the out-put data taken by a CCD color camera before to nescale adjustment. Applya “gamma” tonescale correction of Iout= Iγinwhere γ = 0.5. D isplay the twoimages side-by-side in your answer document.Problem 3 ColorLoad image desk-orange.jpg into MATLAB. The image is from web:http://www.scifun.ed.ac.uk/card/images/left/desk-orange.jpg. Thisis a photog raph taken under Tungsten illumination. (Usually color correctionis done before the tonescale adjustment, but for convenience in viewing theimages, we will apply it after tonescale adjustment here.)“Von kries a da pta tio n” refers to restricting the 3x3 color transformationmatrix to have zeros on all off-diagonal terms. What 3 entries for “von kries6.098/6.882 Computational Photography 3adaptation” color scaling is needed to provide proper color balance to thisimage, under the assumption of(a) “ gray world”–the average pixel intensity fo r each color channel is thesame for all 3 color channels. To minimize the overall brightness change,assume that the averag e pixel value of the color balanced image is [c, c, c]where c is the maximum of the mean value per each uncorrected RGB chan-nel. Show, side-by-side, the uncorrected and color corrected images.(b) the brightest pixel value in each color channel in the image is white?Show, side-by-side, the uncorrected and color corrected images.(c) (6.882 only) For a generic, color-balanced image ( not specific to t heimage above), what 3x3 matrix, applied to every pixel, will increase thecolor saturation o f the image? Your answer should be a formula for thematrix, parameterized by the amount of color saturation desired. Load imageharbor.bmp into Matlab, apply the transform, and display the two imagesside by side.Problem 4 DemosaicingGiven image watchtower.jpg:(a) synthesize the image observed through YGC striped sampling pattern.(b) form the RGB demosaiced image, using a linear interpolation a lg orithmfor demosaicing.(c) form the RGB demosaiced image, using the median filter interpola t io nalgorithm.AssumeYGC=0.5 0.5 00 1 00 0.5 0 .5RGB(d) (extra credit) Put yourself in t he “shoes” of an image demosaicingalgorithm. Guess (by any means–eyeballing it, by plotting color values, byusing a color interpolation algo rithm) what the true values are for the missingcolor samples in waterfall.bmp. Assume that a n initial color interpolationhas been performed for the surrounding pixels and that we only have to inferthe missing color values for the 4 central pixels of the image patch, which liesat the center of the image, or im(64:65,64:65,:) in MATLAB notation.6.098/6.882 Computational Photography 4Your answer to this problem should be 8 numb ers: the 2 missing colors ineach o f the 4 pixels that are missing color samples in the image patch. (Thecolor sampling was made using a Bayer sampling pattern).Scoring for this extra credit problem will be a function of the squared errordistance between your estimated values and the *actual* pixel values thatwere present in the original image.Problem 5 Color Metamerism (Not required; Extra Credit)The Matlab file CIE.mat contains the spectra which will be needed for thisproblem. The vectors cx, cy, and czgive the CIE color matching functionsfor the X, Y , and Z coordinates, respectively. These functions are sampledat 5nm intervals for wavelengths from 40 0 through 7 00 nm.Suppose you have a test color specified as a linear combination of threespectral primaries at 420, 520, and 620 nm, given by (a, b, c)T, respectively.In terms of a, b, and c, what linear combination of light sources at 460, 510,and 590 nm is needed to give a perceptual match to the test color?Appendix Image Operation in MATLABMATLAB is a gr eat tool for scientific computation. There are three reasonswe choose it as the programming language for the class.• MATLAB code is very compact. The learning curve is very short.Because matrix operation is embedded, it is straightforward to codeand easy to debug. There are academic papers coded in only a fewlines (ICCV) or less than a hundred lines (Siggraph).• It is cross-platform for Windows, Linux and Mac OS. For most of thecode it requires no change to be transplant ed from one o perating systemto another.• MATLAB provides a rich library of toolboxes


View Full Document

MIT 6 098 - Problem Set #1

Download Problem Set #1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Problem Set #1 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 #1 2 2 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?