.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MRCAL 1" .TH MRCAL 1 2024-02-14 "mrcal 2.4.1-1" "mrcal: camera projection, calibration toolkit" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME mrcal\-graft\-models \- Combines the intrinsics of one cameramodel with the extrinsics of another .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 3 \& # We have intrinsics.cameramodel containing improved intrinsics from a later \& # calibration, and extrinsics.cameramodel that has the old intrinsics, but the \& # right extrinsics \& \& $ mrcal\-graft\-models \& intrinsics.cameramodel \& extrinsics.cameramodel \& > joint.cameramodel \& \& Combined \& intrinsics from \*(Aqintrinsics.cameramodel\*(Aq \& Extrinsics from \*(Aqexrinsics.cameramodel\*(Aq \& \& $ mrcal\-show\-projection\-diff \& joint.cameramodel \& extrinsics.cameramodel \& \& [A plot pops up showing a low difference, just representing the two sets of \& intrinsics. The recalibrated models have a large implied extrinsics \& difference, but the diff tool computed and applised the implied \& transformation] \& \& $ mrcal\-show\-projection\-diff \& \-\-radius 0 \& joint.cameramodel \& extrinsics.cameramodel \& \& [A plot pops up showing a high difference. Here the diff tool didn\*(Aqt apply the \& implied transformation, so the differences in extrinsics are evident. Thus \& here, joint.cameramodel is not a drop\-in replacement for \& extrinsics.cameramodel] \& \& $ mrcal\-graft\-models \& \-\-radius \-1 \& intrinsics.cameramodel \& extrinsics.cameramodel \& > joint.cameramodel \& \& Transformation cam1 <\-\- cam0: rotation: 8.429 degrees, translation: [0. 0. 0.] m \& Combined \& intrinsics from \*(Aqintrinsics.cameramodel\*(Aq \& Extrinsics from \*(Aqexrinsics.cameramodel\*(Aq \& \& $ mrcal\-show\-projection\-diff \& \-\-radius 0 \& joint.cameramodel \& extrinsics.cameramodel \& \& [A plot pops up showing a low difference. The graft tool applied the implied \& transformation, so the models match without the diff tool needing to transform \& anything. Thus here, joint.cameramodel IS a drop\-in replacement for \& extrinsics.cameramodel] .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This tool combines intrinsics and extrinsics from different sources into a single model. The output is written to standard output. .PP A common use case is a system where the intrinsics are calibrated prior to moving the cameras to their final location, and then computing the extrinsics separately after the cameras are moved. .PP If we have computed such a combined model, and we decide to recompute the intrinsics afterwards, we can graft the new intrinsics to the previous extrinsics. By default, this wouldn't be a drop-in replacement for the previous model, since the intrinsics come with an implied geometric transformation, which will be different in the new intrinsics. By passing a non-zero \-\-radius value, we can compute and apply the implied geometric transformation, so the combined model would be usable as a drop-in replacement. .PP The implied transformation logic is controlled by a number of commandline arguments, same ones as used by the mrcal-show-projection-diff tool. The only difference in options is that THIS tool uses \-\-radius 0 by default, so we do not compute or apply the implied transformation unless asked. Pass \-\-radius with a non-zero argument to compute and apply the implied transformation. .SH OPTIONS .IX Header "OPTIONS" .SS "POSITIONAL ARGUMENTS" .IX Subsection "POSITIONAL ARGUMENTS" .Vb 6 \& intrinsics Input camera model for the intrinsics. If "\-" is given, \& we read standard input. Both the intrinsics and \& extrinsics sources may not be "\-" \& extrinsics Input camera model for the extrinsics. If "\-" is given, \& we read standard input. Both the intrinsics and \& extrinsics sources may not be "\-" .Ve .SS "OPTIONAL ARGUMENTS" .IX Subsection "OPTIONAL ARGUMENTS" .Vb 10 \& \-h, \-\-help show this help message and exit \& \-\-gridn GRIDN GRIDN Used if we\*(Aqre computing the implied\-by\-the\-intrinsics \& transformation. How densely we should sample the \& imager. By default we use a 60x40 grid \& \-\-distance DISTANCE Used if we\*(Aqre computing the implied\-by\-the\-intrinsics \& transformation. By default we compute the implied \& transformation for points infinitely far away from the \& camera. If we want to look closer in, the desired \& observation distance can be given in this argument. We \& can also fit multiple distances at the same time by \& passing them here in a comma\-separated, whitespace\-less \& list \& \-\-where WHERE WHERE Used if we\*(Aqre computing the implied\-by\-the\-intrinsics \& transformation. Center of the region of interest used \& for the transformation fit. It is usually impossible \& for the models to match everywhere, but focusing on a \& particular area can work better. The implied \& transformation will be fit to match as large as \& possible an area centered on this argument. If omitted, \& we will focus on the center of the imager \& \-\-radius RADIUS Used if we\*(Aqre computing the implied\-by\-the\-intrinsics \& transformation. Radius of the region of interest. If \& ==0 (the default), we do NOT fit an implied \& transformation at all. If <0, we use a "reasonable" \& value: the whole imager if we\*(Aqre using uncertainties, \& or min(width,height)/6 if \-\-no\-uncertainties. To fit \& with data across the whole imager in either case, pass \& in a very large radius \& \-\-no\-uncertainties Used if we\*(Aqre computing the implied\-by\-the\-intrinsics \& transformation. By default we use the uncertainties in \& the model to weigh the fit. This will focus the fit on \& the confident region in the models without \-\-where or \& \-\-radius. The computation will run faster with \-\-no\- \& uncertainties, but the default \-\-where and \-\-radius may \& need to be adjusted .Ve .SH REPOSITORY .IX Header "REPOSITORY" .SH AUTHOR .IX Header "AUTHOR" Dima Kogan, \f(CW\*(C`\*(C'\fR .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (c) 2017\-2023 California Institute of Technology ("Caltech"). U.S. Government sponsorship acknowledged. All rights reserved. .PP Licensed under the Apache License, Version 2.0 (the "License"); You may obtain a copy of the License at .PP .Vb 1 \& http://www.apache.org/licenses/LICENSE\-2.0 .Ve