- Camera calibration is the process of estimating intrinsic and/or extrinsic parameters. Intrinsic parameters deal with the camera's internal characteristics, such as, its focal length, skew, distortion, and image center. While, extrinsic parameters describe its position and orientation in the world.
- Computer vision is the field of computer science that focuses on creating digital systems that can process, analyze, and make sense of visual data (images or videos) in the same way that humans do.
The cross-platform and open-source library plays a significant role when it comes to the growth of computer vision due to several intuitive factors. With its focus on real-time vision, this library assists students, professionals, and researchers in efficiently implementing computer vision projects, as it provides them with robust machine learning infrastructure which was previously available only in a few mature research labs.
The usage of OpenCV include:
- In-built data structures and input/output
- Building GUI
- Video analysis
- 3D reconstruction
- Feature extraction
- Object detection
The advantages of using OpenCV are as follows:
- First and foremost, OpenCV is available free of cost.
- Since OpenCV library is written in C/C++ it is quite fast.
- Low RAM usage (approx 60–70 mb).
- It is portable as OpenCV can run on any device that can run C.
The goal of the process is to find the 3×3 matrix K, the 3×3 rotation matrix \mathbf{R}, and the 3×1 translation vector \mathbf{t} using a set of known 3D points (X_w, Y_w, Z_w) and their corresponding image coordinates (u, v). When we get the values of intrinsic and extrinsic parameters the camera is said to be calibrated.
In summary, a camera calibration algorithm has the following inputs and outputs-
Inputs : A collection of images with points whose 2D image coordinates and 3D world coordinates are known.
Outputs: The 3×3 camera intrinsic matrix, the rotation and translation of each image. Note : In OpenCV the camera intrinsic matrix does not have the skew parameter.
- Define the coordinates in accordance with the chessboard pattern.
- Take multiple images of the chessboard from different viewpoints in order to cover all the coordinates precisely.
- Locate 2D coordinates of the chessboard.
- Calculate camera distortion.
- Undistort the image using the calculated calibration.
- The dataset reference was taken from https://github.com/YoniChechik/AI_is_Math
- The datset consists of 17 images of a chessboard from different angles.
- Images from different angle ensures that all the aspects of target object are covered. This ensures a higher accuracy in calibrating the distortion.
All the dependencies and required libraries are included in the file requirements.txt
See here
Using the dataset, the distortion coefficeint was calculated as follows-
-
Digital equipment can capture images at resolutions and with detail that far surpasses the human vision system. Computers can also detect and measure the difference between colors with very high accuracy. But making sense of the content of those images is a problem that computers have been struggling with for decades. To a computer, the above picture is an array of pixels, or numerical values that represent colors.
-
Computer vision is the field of computer science that focuses on replicating parts of the complexity of the human vision system and enabling computers to identify and process objects in images and videos in the same way that humans do.
- https://bdtechtalks.com/2019/01/14/what-is-computer-vision/
- https://opencv24-python-tutorials.readthedocs.io/en/latest/
- https://learnopencv.com/camera-calibration-using-opencv/
- http://www.vision.caltech.edu/bouguetj/calib_doc/papers/DevelopmentCameraCalibrationMethodsModels.pdf
- https://github.com/YoniChechik/AI_is_Math
😎 CREATOR- https://github.com/theshredbox