Computational Photography Homework #1 Solution

$30.00

Description

Note 1: There will be a total of 7 homeworks. All homeworks together will account for 60% of your final grade. Some homeworks are lighter than others; their relative weights in your final homework grade are determined by the total number of points listed at the top.

Note 2: There will be three types of problems in homeworks: written problems, programming walkthroughs and programming challenges. A homework may or may not contain all three types of problems. For example, Homework 1 has only written problems and programming walkthroughs. Below is a brief description of each problem type.

Written Problem: These are mainly analytical problems. Written solutions must be submitted as a hard copy at the beginning of class on the due date. You will receive credit ONLY if you support your answers with conclusive arguments/sketches/proofs. When in doubt, a mathematical proof is the safest bet.

Programming Walkthrough: These are “lightweight” programming assignments, which essentially walk you through partially complete code and ask you to fill in the missing segments. These assignments are designed with the following two goals: 1) to help you get started with MATLAB (if you are not yet familiar with it), 2) to demonstrate some of the important concepts discussed in class in MATLAB.

Programming Challenge: These are programming challenges to solve a variety of computer vision tasks using MATLAB. In most cases a testing framework or skeleton code will be provided. Your submitted code must work with these.

For all programming walkthroughs and challenges, you may not use any functions from MATLAB’s Image Processing or Computer Vision toolboxes, except for functions that are explicitly permitted. To check if a particular function is from one of these toolboxes, type doc function_name into the Command Window to view the function’s documentation. At the very top of the documentation window, the source of the function will be listed. For example:

In addition, the usage of one or more specific built-in MATLAB commands may be barred. Special instructions regarding allowed or disallowed functions will be explicitly

stated in the description of each programming problem. You are required to submit the completed code and the generated outputs for both programming walkthroughs and challenges. Follow the separate document titled “Guidelines for Programming Assignments” for programming guidelines and submission information.

Written Assignments

Problem 1: What is the one dream functionality that you would love your (or others’) camera to have? Is it possible now? If not, when do you think this would be possible? (0 points)

Programming Assignments

The goal of this programming assignment is to get you started with MATLAB for image processing and computer vision. The accompanying MATLAB script runHw1.m contains instructions and partially complete code to illustrate some of the basic concepts of MATLAB. Your tasks are to fill in the incomplete code, and to generate the results by executing the script. Include both the completed script and the outputs in your submission.

Walkthrough 1: Go through this brief introduction of MATLAB [1]. Have fun experimenting with different commands. Additional tutorials can be found here [2] [3]. You are not required to submit any code for this Walkthrough 1. (0 points)

Walkthrough 2: Fill in the missing parts in hw1_walkthrough2.m to read an image and generate a 2×2 collage as shown below. The four patches of the collage are the original image and its red, green and blue channels. Submit both the completed script and the output. (3 points)

Input [4] Output

Walkthrough 3: Complete hw1_walkthrough3.m to superimpose the “I Love NY” logo on

top of a Manhattan scene. Image Processing Toolbox functions permitted: im2bw, imresize. (4 points)

Inputs [5] [6] Output

3

References and Image Credits

  1. MATLAB Introduction (UCSD). [Online]. http://cseweb.ucsd.edu/~sjb/classes/matlab/matlab.intro.html

  1. MATLAB Documentation Center. [Online]. http://www.mathworks.com/help/documentation-center.html

  1. MATLAB Tutorials. [Online].

http://www.mathworks.com/academia/student_center/tutorials/launchpad.html

  1. [Online]. http://en.wikipedia.org/wiki/File:SelbstPortrait_VG2.jpg

  1. I Love New York logo. [Online]. http://en.wikipedia.org/wiki/File:I_Love_New_York.svg

  1. Ruben Moreno Montoliu. [Online]. http://www.flickr.com/photos/ruben3d/4392232665/

4