Skip to main content

Calibrate intrinsic and extrinsic parameters of cameras with charuco boards

Project description

calibcam

A charuco based calibrator for camera setups (intrinsic and extrinsic parameters), including omnidirectional cameras.

First, OpenCV is used for single camera calibration., followed by an initial estimation of camera positions and orientations. Subsequently, all intrinsic and extrinsic parameters are optimised for reprojection error using Jax autograd.

See calibcamlib for a library for triangualtion, reprojection etc.

Board

calibcam uses Charuco boards for calibration. The board needs to be presented in different angles, positions and distances to each camera. Relative camera positions are estimated from frames in which the board is visible in multiple cameras. We recommend recording with 2 fps while moving the board around, spending around a minute on each camera.

Creation

See board.py in example folder for the generation of both printable PNG and board configuration file for calibcam.

Installation

Install bbo-calibcam via pip, or create conda environment from environment.yml.

Usage

  1. Collect data as described in Board section.
  2. Run calibcam with python -m calibcam --videos [LIST OF VIDEOS TO INCLUDE] --board [PATH TO BOARD.NPY file]. We recommend keeping a copy of the board file with the videos for documentation purposes.
  3. Check number of detections per camera in the output. Values should range between 80 and 300. If too few detections are made, check recording conditions (lighting, blur ...) and collect new calibration data. If too many frames are detected, convergence may be slow or run out of memory. Reduce detections adding a frame skip with --frame_step.
  4. Check reprojection error at the end of the output. Median errors should be <0.5px.

BBO internal MATLAB use only:

Use MATLAB function mcl = cameralib.helper.mcl_from_calibcam([PATH TO MAT FILE OUTPUT OF CALIBRATION]) from bboanlysis_m to generate an MCL file.

Format

Result

multicam_calibration.npy/mat/yml holds a dictionary/struct with the calibration result. The filed "calibs" holds an array of calibration dictionarys/structs with entries

* 'rvec_cam': (3,) - Rotation vector of the respective cam (world->cam)
* 'tvec_cam': (3,) - Translation vector of the respective cam (world->cam)
* 'A': (3,3) - Camera matrix
* 'k': (5,) - Camera distortion coefficients

For further structure, refer to camcalibrator.build_result()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bbo-calibcam-2.4.2.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

bbo_calibcam-2.4.2-py3-none-any.whl (43.2 kB view details)

Uploaded Python 3

File details

Details for the file bbo-calibcam-2.4.2.tar.gz.

File metadata

  • Download URL: bbo-calibcam-2.4.2.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for bbo-calibcam-2.4.2.tar.gz
Algorithm Hash digest
SHA256 b6cc61e2e99ff45ecbf3b257056225593f252f3234dde8c285458221cfa46ee9
MD5 1bc97619883946f43bf1657c18016bb2
BLAKE2b-256 369ae3301dc5f47f967b4af4cd933104dbf9334b9741a9198059999a7e0a1453

See more details on using hashes here.

File details

Details for the file bbo_calibcam-2.4.2-py3-none-any.whl.

File metadata

  • Download URL: bbo_calibcam-2.4.2-py3-none-any.whl
  • Upload date:
  • Size: 43.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for bbo_calibcam-2.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 111c574074cc35a947dbea0fd1dab48a5e673ada67ac1cf82d877e8ffe26c7ad
MD5 bd5d6e2251837ba2d617102256c3f2e1
BLAKE2b-256 323b5b7b7d8b3f23786e462156f3e1732291ddd3511ba799bc10b04066074395

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page