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
mrcal-calibrate-cameras
: Calibrate N cameras. This is the main tool to solve "calibration" problems, and a how-to page describes this specific use case.mrcal-cull-corners
: Filters acorners.vnl
on stdin to cut out some points. Used primarily for testing
Visualization
mrcal-show-projection-diff
: visualize the difference in projection between N modelsmrcal-show-projection-uncertainty
: visualize the expected projection error due to uncertainty in the calibration-time inputmrcal-show-valid-intrinsics-region
: visualize the region where a model's intrinsics are validmrcal-show-geometry
: show a visual representation of the geometry represented by some camera models on disk, and optionally, the chessboard observations used to compute that geometrymrcal-show-distortion-off-pinhole
: visualize the deviation of a specific lens model from a pinhole modelmrcal-show-splined-model-correction
: visualize the projection corrections defined by a splined modelmrcal-show-residuals-board-observation
: visualize calibration residuals for one or more observations of a boardmrcal-show-residuals
: visualize calibration residuals in an imager
Camera model manipulation
mrcal-convert-lensmodel
: Fits the behavior of one lens model to anothermrcal-graft-models
: Combines the intrinsics of one cameramodel with the extrinsics of anothermrcal-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 usedmrcal-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 usedmrcal-to-kalibr
: Converts a model stored in the native.cameramodel
file format to the.yaml
format used by kalibr.mrcal-from-kalibr
: Converts a model stored in.yaml
files used by kalibr to the.cameramodel
format.mrcal-from-ros
: Converts a model stored in.yaml
files used by ROS and OpenCV to the.cameramodel
format.
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
mrcal-is-within-valid-intrinsics-region
: Augments a vnlog of pixel coordinates with a column indicating whether or not each point lies within the valid-intrinsics region
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.