DOC PREVIEW
UW-Madison CS 766 - Homework #1

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS 766: Computer VisionHomework #1Camera Projection, Calibration and RectificationDue: September 28, 2006General information:• This homework is based on the readings in the textbook in Sections 3.1.1 and 3.2 plus the handout by Cipollaand Gee.• Please type your homework.• Please clearly identify your answer.• Do not print out your MATLAB code listing. Please submit your code to the handin directory.Problem Set:1. CCD to Camera TransformationConsider a perfect perspective projection camera with focal length 24 mm and a CCD array of size 16 mm ×12 mm, containing 500 × 500 pixels.(a) Field of View (FOV) is defined as the angle between two po ints at opposite edges of the image (CCD array),either horizontally or vertically. Thus there are two FOVs, one horizontal and one vertical. Assuming theimage center is the ce nter of the image, then FOV is twice the angle between the optical axis and oneedge of the image.i. Give a general expression for computing FOV from focal length and image width.ii. Compute the horizontal FOV and vertical FOV of the given camera.iii. Comment on how FOV affects resolution in an image.(b) Applicationi. Give an expression for computing the pixel coo rdinates of a point in a 3D scene that is given incamera-frame c oordinates. Assume the upper-left corner pixel is (0,0).ii. Compute the pixel where a scene p oint at coordinates (12 m, 7 m, 103 m) is imaged.2. Camera Projection(a) Prove that straight lines project to straight lines under perspective projection. You may do this by makinggeometric arguments using lines and planes, or else algebraic ally using a line parameterized as describedin the section on Vanishing Points, page 8, in the Cipolla and Gee handout.(b) Consider a sphere of radius r with its center at camera coo rdinates (x0, 0, z0), which is imaged using aperfect perspective camera with focal length f and ima ge plane perpendicular to its optical axis. Prove,formally or informally (but convincingly), whether or not the image of the sphere is a circle.1Figure 1: Input image and detected features. On the left is the original image and on the right are the detectedfeature points.3. Camera CalibrationCamera calibr ation is one of the most fundamental vision problems. It refers to the process of calculating theintr ins ic and extrinsic parameters of the camera, which are necessary for many applications such as 3D scenereconstruction. The goal of this problem is to implement a linear calibration algor ithm in MATLAB basedon the method described in Section 3.2 o f the textbook. Provided an input image, we want to compute theintr ins ic (focal length, principal point, etc.) and extrinsic (r otation and translation) parameters of the cameraused to capture this image. Assume no radial distortion.A typical way to calibrate a camera is to take a picture of a calibration object, find 2D features in the imageand derive the calibration from the 2D features and their corresponding positions in 3D. In our case, we use a2m-wide cube as a calibr ation object, textured with a checkerboard pattern. We detect in the image the 2Dfeatures co rresponding to the corners of each tile on the checkerboard.Since we know its size (2m), we can find the 3D pos itio n of each 2D feature relative to the center of thecube. This process of finding correspondences is simple but time consuming, so we did this part for you.~cs766-1/public/html/fall06/hw/hw1/Feature2D.mat and ~cs766-1/public/html/fall06/hw/hw1/Feature3D.matcontain the 2D corner features and the corresponding 3D positions. We also provide you readable form of the twofiles as ~cs766-1/public/html/fall06/hw/hw1/Feature2D.txt and ~cs766-1/public/html/fall06/hw/hw1/Feature3D.txt.(a) Linear camera calibrationCalibrate a projective camera using a simple linear least squares approach and without taking radialdistortion into a c c ount. Given a MATLAB data file that contains 3D coordinates of some points in thescene, along with their corresponding 2D projections in the image, you are to write a MATLAB functioncalled LinearCalib that computes the projective camera parameters. The signature of the function shouldbe as follows:function [CamMatrix] = LinearCalib(Points3D, Points2D)Input:Points2D = a (2 x N) matrix of N 2D pointsPoints3D = a (4 x N) matrix of N 4D Homogeneous coordinatesOutput:CamMatrix = 3 x 4 projective camera matrixSome implementation hints:2• One way to solve this problem is us ing the ”direct linear transformation” algorithm in which you setup the problem as solving a linear system of the form Ap=0 where p is a 12x1 column vector of theentries for the 3 x 4 projective camera matrix and A is a 2n x 12 matrix as describ e d inhttp://www.icaen.uiowa.edu/~dip/LECTURE/3DVisionP1_2.html#knownscene orhttp://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT9/node4.htmlCompute the SVD of A and then the solution is the unit eigenvector with the least eigenvalue. Besure to describe the steps of the method you used in your writeup.• Be sure you understand how to define matrices in MATLAB.Data: In ~cs766-1/public/html/fall06/hw/hw1, you can find two files, Features2D.mat (2D projection) andFeature3D.mat (3D points represented in homogeneous coordinates). The 2D points in Features2D.matare the projections of the 3D points in Features3D.mat. The following is the function to load in the datainto MATLAB.>> load(’/p/course/cs766-dyer/public/html/fall06/hw/hw1/Features2D.mat’);>> load(’/p/course/cs766-dyer/public/html/fall06/hw/hw1/Features3D.mat’);and the following is the method to check whether the data is loaded or not.>> whosName Size Bytes Classf2D 2 x 37 592 double arrayf3D 4 x 37 1184 double arrayGrand total is 222 elements using 1776 bytesHandin: The values of the 3 × 4 pr ojective camera matrix and a description of the steps you used tocompute this matrix. For extra credit, decompo se this matrix into K[R|T] and compute the resultingintr ins ic and extrinsic parameters as sociated with these matrices. Section 3.2.2 in the text and page 32 ofthe Cipolla and Gee paper describe methods fo r doing this decomposition.(b) 3D to 2D projectionYou can check the accuracy of your camera c alibration result by pr ojecting the given 3D points (in ho-mogeneous coordinates) using the camera matrix that was obtained by your linear camera calibrationmethod. Write a function:function [ProjPoints2D] = CameraProject(Points3D,CamMatrix)Input:Points3D = a (4 x N) matrix of N 4D Homogeneous


View Full Document

UW-Madison CS 766 - Homework #1

Documents in this Course
Load more
Download Homework #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 Homework #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 Homework #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?