Based on 13 images given, compute the parameters and undistort them using OpenCV.
The code takes the tutorial on camera calibration of OpenCV as a reference, so if you need more information, please have a visit at Camera Calibration and Camera Calibration and 3D Reconstruction.
- Read all 13 images in folder "left" and compute the parameters of camera including camera matrix and distortion coefficients.
- return:
- intrinsic matrix;
- distortion coefficients;
- rotation vector for each image;
- translation vector for each image.
- using the parameters got in calibration.py, undistort all 13 images.
- output the 13 images undistorted in folder "calibresult1" and the corressponding undistortion error.
- input a certain image needed to undistort, output the result to folder "calibresult2" and undistortion error.
If you have any question or advice, contact with me
email: [email protected]