Thursday, March 11, 2010

Activity 6 - Camera Calibration

Camera calibration is usually done to obtain the necessary parameters for relating the image (pixel) coordinates into the real world coordinates. This is an essential procedure in three-dimensional (3D) object reconstructions because 3D rendering requires the physical transformation values of the real world coordinates into image coordinates done by the camera.
Two techniques are presented in this activity. One is by utilizing a 3D calibration checkerboard while the other uses a flat (2D) checkerboard only. In the first method, the 3D calibration checkerboard (in the image below) would provide the real world coordinates.

The image coordinates can then be obtained from the pixel location of the points of the real world coordinates in the image of the checkerboard. Sample real world coordinates and their corresponding image coordinates are used to solve for the properties(parameters) of the camera, as shown in the equation below:
The a's constitute a matrix A that holds the camera properties.

For the second method, the Camera Calibration Toolbox in MATLAB was used. The toolbox was downloaded from http://www.vision.caltech.edu/bouguetj/calib_doc/, which also includes examples in using the toolbox. Multiple images of the flat checkerboard was imaged and loaded in the toolbox. Then, for each image, the corners of the checkerboard was pinpointed to be used by the program for obtaining the parameters of the camera. The number of boxes along the length and width of the checkerboard, and the dimension of each box was also specified. The multiple images used for the toolbox would produce a statistical measurement of the camera parameters, and essentially, a more accurate measure compared to first method. The flat checkerboard images are shown below
The results of the two methods are presented in the table below. The outputs of the two methods are comparable, with the values of the first method close to the range of values of the second method, showing the consistency of the calculation between the two. However, an anomalous value of a negative focal length along the y for the first method, is obtained. This is difficult to reconcile because it has no logical physical meaning. It may have occurred due to an error in the mathematical calculation.
Human error may have been the major factor in the errors of results and the difference between the two results. Locating the points, such as the real world coordinates in the first method and the flat checkerboard corners in the second method, is a tedious task resulting to inconsistency in the judgment of pinpointing the coordinates. Moreover, the finite resolution of the camera limits the accuracy of the calculation in terms of localizing the coordinates.

No comments:

Post a Comment