项目作者: r-oung

项目描述 :
Camera Calibration
高级语言: Python
项目地址: git://github.com/r-oung/camera-calibration.git
创建时间: 2021-05-11T08:31:10Z
项目社区:https://github.com/r-oung/camera-calibration

开源协议:

下载


Camera Calibration

Standard OpenCV Camera Calibration

Setup

Run setup.sh to create a virtual environment and install dependencies:

  1. ./setup.sh

Activate the virtual environment:

  1. source venv/bin/activate

Usage

Take photos (at least 10) of the chessboard pattern patterns/chessboard.png from various angles. Replace the sample photos in the images folder with the ones you took. Run the script:

  1. python calibrate images/
  2. Intrinsic Parameters:
  3. fx: 534.0708836434115
  4. fy: 534.1191459522821
  5. cx: 341.5340755262212
  6. cy: 232.94565259795462
  7. Distortion Coefficients:
  8. k1: -0.29297163675274435
  9. k2: +0.10770696223452401
  10. p1: +0.0013103837668586803
  11. p2: -3.110188108687015e-05
  12. k3: +0.04347981037293046
  13. Re-projection error: 0.023686000375385673

Parameters

Variables Description
fx, fy Focal length
cx, cy Optical center
k1, k2, k3 Radial distortion
p1, p2 Tangential distortion

Re-projection error: The closer this value is to zero, the more accurate the parameters are.

Troubleshooting

pip install fails with ModuleNotFoundError: No module named 'skbuild'

Upgrade pip with pip install --upgrade pip. For details, see: https://github.com/opencv/opencv-python#frequently-asked-questions