-
Notifications
You must be signed in to change notification settings - Fork 4
Camera Calibration
Calibration of the camera is the method in computer vision to find the properties of the camera hardware. It is a major prerequisite for performing any type of measurement using camera or 3D projections and reconstructions. Three specific kinds of camera calibration techniques exists :
-
Photogrammetric calibration : This technique makes use of a calibration object of specific size and geometric properties whose geometry in 3D space is very precisely known. This calibration object usually have 2-3 orthogonal planes.
-
Self-calibration : This method doesn’t make use of any kind of calibration object. Camera displacement information from multiple images is used to get the calibration parameters for the camera. Although these methods are very flexible as no setup is required, but these methods are still not mature and cannot always give reliable results.
-
Hybrid system : This methods make use of simple planar patterns to find the calibration parameters. Unlike the photogrammetric methods, this method doesn’t require any specific motion information and makes use of only the 2D metric information obtained from the image. Few types of planar calibration boards include checkerboard targets, circular targets, charuco targets etc. This method is also referred to as ”Zhangs Camera Calibration Algorithm”.
There are two types of distortions that are majorly found in the cameras :
-
Radial distortion : This types of distortion causes the straight lines present in the images to appear curved. This phenomenon is caused because the light gets bent more near the edges compared to the optical center. The smaller the lens, the more the radial distortion. These can be further divided into Barrel distortion and Pincushion distortion.
-
Tangential distortion : This type of distortion occurs when the image and the lens plane of the camera are not parallel. This also include an offset between the lens and image plane centre.
For this report, the Zhang’s Algorithm is used to obtain the calibration characteristics. Apart from having a very simple setup, this method can be used to obtain precise enough values for both the intrinsic and the extrinsic parameters.
Zhang’s Algorithm make use of planar calibration targets to calculate the camera intrinsic and extrinsic parameters. For many of the modern cameras, we consider the reduced models to find the calibration parameters as they give a fairly good estimates of the camera properties and are simple to calculate. The following are the assumptions that Matlab and OpenCV calibration functions consider when performing calibrations :
-
The algorithm is used to measure only the radial distortion not tangential distortion. This is because for webcams and other simple cameras the radial distortion is the major source of distortion. The tangential distortion of modern cameras are nearly negligible due to very less imperfections in manufacturing. Ie. 6th Order Calibration Models (Radial + Tangential) are not considered for the calculations by default in Matlab Camera Calibration Toolkit[1]. But OpenCV considers both the tangential and the radial distortions k1, k2, p1, p2, k3 [2]
-
According to the Matlab Camera Calibration Toolbox documentation it is given ”For standard field of views (non wide-angle cameras), it is often not necessary (and not recommended) to push the radial component of distortion model beyond the 4th order (i.e. keeping kc(5)=0)”[1]. But OpenCV considers even the 6th order component, also referred to as k3, of the distortion model[2].
-
The modern camera pixels are rectangular in shape so the skew component in the calibration matrix is not considered [2][1]
-
There are no particular number of images that must be used for the calibration. According to the paper by [3] it is given that ”...the camera to observe a planar pattern from a few (at least two) different orientations”. But OpenCV recommends atleast 10 images to get a very reasonably good calibration parameters.
-
For a fixed camera the intrinsic parameters can be reused for capturing multiple images. It is very important to fix the camera focus before capturing the images for calibration task.
[1] 2015. [Online]. Available: http://www.vision.caltech.edu/bouguetj/calibdoc/htmls/parameters.html
[2] 2018. [Online]. Available: https://docs.opencv.org/3.4.3/dc/dbb/tutorial_py_calibration.html
[3] Z. Zhang, “A flexible new technique for camera calibration,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 22, pp. 1330–1334, 2000.
[4] W. Burger, “Zhangs camera calibration algorithm: In-depth tutorial and implementation,” University of Applied Sciences Upper Austria, School of Informatics, Communications and Media, Dept. of Digital Media, Hagenberg, Austria, Tech. Rep. HGB16-05, May 2016. [Online]. Available: http://staff.fh-hagenberg.at/burger/
[5] 2014. [Online]. Available: https://fivedots.coe.psu.ac.th/∼ad/jg/nuiN13/depthProcessing.pdf