Source code is compose of a single python class which you can import in your code. You can either feed already calibrated camera matrix to undistort images or you can provide chessboard images with different orientation to generate camera matrix.
- generate calibration matrix
- undistort a loaded frame
- undistort images from directory
- shifted original image point in undistorted image
- undistort videos
- generate calibration matrix using video
- generate calibration matrix using webcam
Currently, our source code use the chessboard mentioned below. Its dimension is (6,9), we take dimensions in terms of corners inside the chess board. To create your own chess board pattern, please visit the following link.
Go through the below resourses in the following order in order to get better understanding regarding the calibration. Althought the sections below cover each and everything in terms of OpenCv, but we would recommend you to go through this amazing playlist by Professor Shree K. Nayar on his YouTube channel.
In geometric image formation we learn how the points in 3D space are related/projected to the points in 2D image plane.
As real world camera involve lenses, we need to get an understanding regarding lens effects on an image formation.
When using camera as visual sensor, it is important to know its parameters for effective usage. Here are some steps you could take to get accurate camera calibration.