mrcal commandline tools

A number of commandline tools are available for common tasks, obviating the need to write any code. The available tools, with links to their manpages:

Calibration

Visualization

Camera model manipulation

  • mrcal-convert-lensmodel: Fits the behavior of one lens model to another
  • mrcal-graft-models: Combines the intrinsics of one cameramodel with the extrinsics of another
  • mrcal-to-cahvor: Converts a model stored in the native .cameramodel file format to the .cahvor format. This exists for compatibility only, and does not touch the data: any lens model may be used
  • mrcal-from-cahvor: Converts a model stored in the .cahvor file format to the .cameramodel format. This exists for compatibility only, and does not touch the data: any lens model may be used

Reprojection

  • mrcal-reproject-image: Given image(s) and lens model(s), produces a new set of images that observe the same scene with a different model. Several flavors of functionality are included here, such as undistortion-to-pinhole, re-rotation, and remapping to infinity.
  • mrcal-reproject-points: Given two lens models and a set of pixel coodinates, maps them from one lens model to the other

Miscellaneous utilities

Stereo and triangulation

  • mrcal-stereo: Dense stereo processing. Given pairs of images captured by a given pair of camera models, runs stereo matching to produce disparity and range images.
  • mrcal-triangulate: Sparse stereo processing. Given a pair of images captured by a given pair of camera models, reports the range to a queried feature and its sensitivities to all the inputs. Very useful in diagnosing accuracy issues in the intrinsics and extrinsics.