UW-Madison CS 766 - Homework 1 Camera Projection and Calibration

Unformatted text preview:

Homework 1Camera Projection and CalibrationSeptember 28, 20061. CCD to Camera Transformatio n Consider a perfect perspective projection camera with focal length 24 mmand a CCD arr ay of size 16 mm x 12 mm, containing 500 x 500 pixels.(a) Field of View (FOV) is defined as the angle between two points at opposite edges of the image (CCD array),either horizontally or vertically. Thus there are two FOVs, one horizo ntal and one vertical. Assuming theimage center is the center of the image, then FOV is twice the angle between the optical axis and oneedge of the image.i. Give a g e neral expression for computing FOV from focal length and image width.ii. Compute the horizonal FOV and vertical FOV of the given camera.iii. Comment on how FOV affects resolution in an image.(b) Application:i. Give an expression for computing the pixel coordinates of a point in a 3D scene tha t is given incamera-frame coordinates. Assume the upper-left corner pixel is (0,0).ii. Compute the pixel where a scene point 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 algebraically using a line parameterized as describedin the section on Vanishing Points, pa ge 8, in the Cipolla and Gee handout.(b) Consider a sphere of radius r with its c e nter at camera coor dinates (x0, 0, z0), which is ima ged using aperfect perspective camera with focal length f and image plane perpendicular to its optical axis. Prove,formally or informally (but conv incingly), whether or not the image of the sphere is a circle.3. Camera Calibration(a) Introduction (no question):Camera calibration is one of the most fundamenta l vision tasks. It refers to the process of calculatingthe internal and external parameters of the camera. Cor rect camera calibration is essential to obtainingthe true estimate of camera parameters, which in tur n leads to high accuracy in 3D reconstruction of theworld from the images, among other applications.One of the easiest ways to calibrate a ca mera is to point it at a planar checkerboard pattern, and thenmove the checkerboard pattern in a couple o f non-planar orientations, equiva lently, instead of moving theplanar pattern, one can also move the camera in a similar fashion. Once the checker board ima ges havebeen obtained, 2D corner p oints need to be detected. These 2D corner points will then be thrown into acamera calibration routine to obtain the camera para meters.In this section, we will der ive some camera calibra tion theory and then implement a linear method ofobtaining the camera parameters.1Figure 1: Homography induced by a plane(b) Projective transformations of the plane:To b e gin, we consider the projective transformations of planes in images. Imagine two cameras C1and C2looking at a plane π in the world. Consider a point P on the plane π and its projections p = (u1, v1, 1)Tin image1 and q = (u2, v2, 1)Tin image2. Assume that the two cameras have 3 × 4 projection matrices,M1and M2, associated with them, respectively. Show that there exists a 3 × 3 matrix H such that, forany point P:q ≡ Hp(Recall that ≡ denotes the equality in homogeneous coordinates, meaning that the left and right handside are proportional.)Note, H only depends on the plane and the projection ma trices of the two cameras.Hint: To show this, it may help to define a vector basis (a, b) on the pla ne such that any point P can beexpressed as P = αa + βb + P0(where α and β are scalars).The interesting thing about this result is that by using H we can compute the image of P that wouldbe seen in camera C2from the image of the point in camera C1without knowing its three-dimensionallocation. Such an H is a projective transformation of the plane, also referred to as a planar homography.(c) Estimating homography from the image points:Given a set of points (ui1, vi1), i = 1, . . . , N in image1, and the corresponding set of points (ui2, vi2),i = 1, . . . , N in image2, show that H can be rec overed from two sets of image points using a linearmethod. This should be very similar to the linear camera calibration technique, with the exception thatit has one less column.(d) Camera internal matrix:Under the orthogonal co ordinate system, the camera internal matrix K is defined as below:K =α 0 u00 β v00 0 1Show that under a skewed coordina te system, where the angle between the two coordinate axes is not 900,the camera internal matrix K is given by:K =α −α cot θ u00βsin θv00 0 1Hint: For deriving the coordinates in the skewed coordinate system, try drawing a point in the orthogonalcoordinate system and then super-impo se the skewed coordinate sys tem on top to figure out how thecoordinates may have changed.(e) Camera center:In the notes, the camera matrix is defined as P = K[R|t]. Another way to write the camera matrix is2to explicitly show its dependence on the camera center C. The camera matrix in this formula tion ca n bewritten as follows: P = K[R| − RC] where t = −RC. Show that in this new formulationPC′= 0where C′a homogeneous 4-vector for the camera center in the wo rld co ordinate frame.(f) Projective transformation:Recall that a line in the 2D plane is described by a thre e -vector l such that a point p expresse d inhomogeneous coordinates belongs to the line if l.p = lTp = 0. Consider a projective transformation of theplane described by the 3 ×3 matrix M.What is the 3-vector describing the line l after transformation of the plane by M? (Hint: The obviousanswer lTM is incorrect).Consider the transformation:M =0 0 10 1 01 1 0• What are the transformed points after applying the trans fo rmation M, if the original points were (inEuclidian coordinates): (0, 0), (0, 1), (1, 0)?• What are the transformed lines after applying the transformation M, if the original lines were x = 0and y = 0 (“axes “ of the coordinate system of the plane)?• What is the intersection of the two lines after applying the trans formation?(g) Linear camera calibration:We will now calibrate a camera using a linear model of the projection equations without taking radialdistortion into account. In this task, you will be given a MATLAB data file which contains 3 D coordinatesof some points in the scene, a long with their corresponding 2D projections in the imag e. The g oal of thissubsection is to write a MATLAB function


View Full Document

UW-Madison CS 766 - Homework 1 Camera Projection and Calibration

Documents in this Course
Load more
Download Homework 1 Camera Projection and Calibration
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 Camera Projection and Calibration 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 Camera Projection and Calibration 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?