Camera Calibration Made Easy
Here we gonna look into the how camera calibration is performed for the pinhole camera.
Doubt : Why do we need to calibrate the camera ?
- To correct the distortion in the camera.
- To get the relation between pixels present in camera and the real world units.
Doubt : What is the focal length in camera ??
- It is the distance between the lens and image sensor generally in mm. You know that in DSLR camera’s or general cameras we can change the focal length. In layman terms we also call it as the change in the focus.
Learning about the calibration of camera there are two types of calibration
- Intrinsic Calibration.
- Extrinsic Calibration.
PIN HOLE CAMERA introduces the lot of distortion into the images.
- Radial Distortion
- Tangential Distortion
Radial Distortion:
Moving away from the center of image the straight lines will be appear curved.

Tangential Distortion:
Image taking lense is not aligned parllel to the imaging plane. This results areas in image will look nearer than expected.


For the calibration addition to these parameters we also need the information of focal lengths in x,y and optical centers in x,y.
Camera Matrix :

Extrinsic parameters corresponds to rotation and translation vectors which translates a coordinates of a 3D point to a coordinate system.
These distortions need to be corrected first. To find these parameters, we must provide some sample images of a well defined pattern (e.g. a chess board). We find some specific points of which we already know the relative positions (e.g. square corners in the chess board). We know the coordinates of these points in real world space and we know the coordinates in the image, so we can solve for the distortion coefficients. For better results, we need at least 10 test patterns.
The summary of story is that with data of sample images of well defined pattern we will calculate the distortion coefficients.
Doubt : Why we are using the checker-board or chess board ??
- Because we can easily identify the points.
- We have the more number of points and they all lie in the same plane.
- We know the sizes of squares in checker board and location of those points on plane.
- Checker board we are using called the 9/6 checkerboard with 7 squares vertically and 10 squares horizontally.
- But we are actually not concentrating on the squares . We are concentrating on their points of intersection.
All these we are doing to measure the inherent flaws in the camera so that we can deal with the distortion.