MRCAL(1)

πŸ“¦
version 2.5.2 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– MRCAL(1) β€” mrcal: camera projection, calibration toolkit πŸ’–

okay bestie, welcome to the mrcal corner of the manual. section 1. camera projection + calibration toolkit. let's get into it 🫢


✨ NAME ✨

mrcal-to-kalibr β€” converts cameramodel(s) to the file format used by kalibr πŸŽ€


🌸 SYNOPSIS 🌸

  $ mrcal-to-kalibr model1.cameramodel model2.cameramodel > model.yaml

  [model.yaml is now a kalibr model describing the two cameras]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the file formats that mrcal supports? they're all documented over at <https://mrcal.secretsauce.net/cameramodels.html#cameramodel-file-formats> β€” go look, it's giving documentation ✨

This tool converts the given model(s) to the .yaml format used by kalibr. And listen β€” no changes to the content are made. none. zero. it's purely a format converter, periodt. (if you actually want to fit different lens models, that's a whole different tool: mrcal-convert-lensmodel. don't get it twisted πŸ’…)

now here's the tea πŸ“ unlike mrcal .cameramodel files where one camera = one file, the .yaml files used by kalibr are intended to describe multiple cameras. so this format conversion tool will write out a single kalibr .yaml model containing ALL the given models. and the names of the models in the kalibr data will be "cam0", "cam1", ... (yes bestie, it just counts up, iconic behavior honestly πŸ‘‘)

Since we always write out one kalibr model and since we don't know what it should be called, the output of this tool always goes to standard output. no filename, no guessing, just vibes. 😌

If the model is omitted or given as -, the input is read from standard input, and only the one input model is processed. (one model only in that case, we don't multitask from stdin 🧚)

By default we set the extrinsics of camera-0 as they appear in the input: the reference coordinate system is set to the previous" camera from camera-0. If we want to force camera-0 to have an identity transform, pass --cam0-at-reference.

The kalibr format is described at <https://github.com/ethz-asl/kalibr/wiki/Yaml-formats> πŸ“š

At this time we only support

  • LENSMODEL_PINHOLE
  • LENSMODEL_OPENCV4
  • LENSMODEL_CAHVOR (experimental)
  • LENSMODEL_CAHVORE (experimental)

which corresponds to

camera_model == 'pinhole' and distortion_model in ('radtan','none')
lowkey important: LENSMODEL_CAHVOR and LENSMODEL_CAHVORE are marked experimental in the original. not me making stuff up, that's literally what it says. 🫑

πŸ’… OPTIONS πŸ’…

πŸŽ€ POSITIONAL ARGUMENTS πŸŽ€

  • model β€” Input camera model. that's the one. the moment. the main character. πŸ‘‘

⭐ OPTIONAL ARGUMENTS ⭐

  • -h, --help β€” show this help message and exit. the classic. we love her. πŸ’–
  • --cam0-at-reference β€” By default we set the extrinsics of camera-0 as they appear in the input. If we want to force camera-0 to have an identity transform, pass --cam0-at-reference. Usually this will be the case anyway in the input data, but this option makes sure. (she's just here to be certain, and honestly? respect. 🫢)

πŸ”₯ REPOSITORY πŸ”₯

<https://www.github.com/dkogan/mrcal> β€” come hang out, the source is right there 🌈


πŸ¦‹ AUTHOR πŸ¦‹

Dima Kogan, "<dima@secretsauce.net>" ✨


Copyright (c) 2017-2023 California Institute of Technology ("Caltech"). U.S. Government sponsorship acknowledged. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

okay that's the whole page, bestie, you ate it up πŸ’– this was mrcal version 2.5.2-4build1, dated 2026-03-20, section MRCAL(1) of the manual. go convert some cameramodels and slay πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from