Camera calibration out of MP4 file to gain camera matrix and distortion coefficients.
- Create MP4 video file via your camera filming
Calibration_Grid.png
from different angles. - Save your video file to cloned repository.
python Calibration.py your_video_file.mp4
- Wait for the process to finish, camera matrix and distortion coefficients will be printed.
Clone the repository:
git clone https://github.com/Maxim-CE/camera-calibration.git
cd camera-calibration
python Calibration.py WebCam.mp4
After calibrating WebCam.mp4
you will receive the following output:
Camera matrix:
fx: 461.055785824
fy: 462.176713292
cx: 309.244676708
cy: 260.948393979
Distortion coefficients:
k1: 0.842991751189
k2: -7.12936636647
p1: 0.00304382955902
p2: 0.000725384370557
k3: 20.295080211
For more information about camera calibration and original calibration code from this repository please visit: https://docs.opencv.org/3.4.3/dc/dbb/tutorial_py_calibration.html