Project 1. Linear Approach to Camera Calibration Solution



Objective: To use a linear approach to calibrate a camera and to use the camera parameters to predict the 2D image-domain location of a set of 3D points or a 3D moving object.


  1. Study the lecture note by showing the use of projection matrix that maps objects from 3-D to 2-D, the definition of intrinsic and extrinsic parameters of a camera, and the linear approach to geometric camera calibration.

  2. Given an image test_image.bmp captured by a camera which is posed toward a 3D chess board, we manually selected 27 points whose 2-D image coordinates are saved in the file observe.dat, and whose 3-D coordinates in a world coordinate are stored in the file model.dat. Please use the linear approach to calibrate the camera system by computing the projection matrix (M) from which you can compute the intrinsic and extrinsic parameters, including , u0, v0, α, β, and the rotation matrix (R), and the shift vector (t).

  3. In order to verify the correctness of the camera calibration, please use the projection matrix to map the three set of 3D points, whose 3-D coordinates are {x,y,0|x,y=0,…,10}, {x,10,z|x,z=0,…,10}, {10,y,z|y,z=0,…,10}, respectively, into the 2-D image space. Discuss your results.

  4. Create a video file that shows a 3D object moving in the 3D scene along a specific pre-defined path. For example, a 3D cube (1x1x1) can be displayed by nine lines connecting seven vertexes (see the example below). Each line can be drawn with around 100 samples. (You can see a video example from Slide 13 of the Lecture 8 handout in the slideshow mode.)

Report Requirements:

  1. Briefly discuss the basics of geometric camera modeling.

  2. Briefly discuss the linear approach to camera calibration.

  3. Show the simulation results by figures (Part 3).

  4. Include some sample frames of the video (Part 4) in the report.

  5. The Matlab source code should be included as the appendix of the report with detailed comments. A separate Matlab m-file should also be provided for testing.

  6. Zip all files (DOC, AVI, M-file) into one package and upload it to the D2L system by the due date.

Useful Matlab functions

  • Inner product: DOT(t1,t2), Cross product : CROSS(t1,t2).

  • Singular value decomposition (SVD) : [V D]=EIG(X).

  • Norm of a vector: NORM(vector).

  • Inverse of a matrix: INV(M)

  • Reshape of a vector to a matrix: M=reshape(V,3,4)’ (a transpose is needed to do correct reshaping).

  • AVI and Movie functions

    • im2frame: convert an image to a frame

    • frame2im: convert a frame to an image

    • movie2avi: save a movie as a AVI file