.\" -*- 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-04 "mrcal 2.3-4.1~exp1" "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\-show\-residuals \- Visualize calibration residuals in an imager .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& $ mrcal\-show\-residuals \-\-vectorfield left.cameramodel \& \& ... a plot pops up showing the vector field of residuals for this camera .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This tool supports several different modes, selected by the commandline arguments. Exactly one of these mode options must be given: .PP .Vb 3 \& \-\-vectorfield Visualize the optimized residuals as a vector field. Each \& vector runs from the observed chessboard corner to its \& prediction at the optimal solution. \& \& \-\-magnitudes Visualize the optimized residual magnitudes as color\-coded \& points. Similar to \-\-vectorfield, but instead of a vector, each \& residual is plotted as a colored circle, coded by the MAGNITUDE \& of the error. This is usually more legible. \& \& \-\-directions Visualize the optimized residual directions as color\-coded \& points. Similar to \-\-vectorfield, but instead of a vector, each \& residual is plotted as a colored circle, coded by the DIRECTION \& of the error. This is very useful in detecting biases caused by \& a poorly\-fitting lens model: these show up as clusters of \& similar color, instead of a random distribution. \& \& \-\-regional Visualize the optimized residuals, broken up by region. The imager \& of a camera is subdivided into bins. The residual statistics are \& then computed for each bin separately. We can then clearly see \& areas of insufficient data (observation counts will be low). And \& we can clearly see lens\-model\-induced biases (non\-zero mean) and \& we can see heteroscedasticity (uneven standard deviation). The \& mrcal\-calibrate\-cameras tool uses these metrics to construct a \& valid\-intrinsics region for the models it computes. This serves as \& a quick/dirty method of modeling projection reliability, which can \& be used even if projection uncertainty cannot be computed. \& \& \-\-histogram Visualize the distribution of the optimized residuals. We display \& a histogram of residuals and overlay it with an idealized \& gaussian distribution. .Ve .SH OPTIONS .IX Header "OPTIONS" .SS "POSITIONAL ARGUMENTS" .IX Subsection "POSITIONAL ARGUMENTS" .Vb 4 \& model Camera model that contains the optimization_inputs \& that describe the solve. The displayed observations \& may come from ANY of the cameras in the solve, not \& necessarily the one given by this model .Ve .SS "OPTIONAL ARGUMENTS" .IX Subsection "OPTIONAL ARGUMENTS" .Vb 10 \& \-h, \-\-help show this help message and exit \& \-\-vectorfield Visualize the optimized residuals as a vector field \& \-\-magnitudes Visualize the optimized residual magnitudes as color\- \& coded points \& \-\-directions Visualize the optimized residual directions as color\- \& coded points \& \-\-regional Visualize the optimized residuals, broken up by region \& \-\-histogram Visualize the distribution of the optimized residuals \& \-\-histogram\-this\-camera \& If given, we show the histogram for residuals for THIS \& camera only. Otherwise (by default) we display the \& residuals for all the cameras in this solve. Implies \& \-\-histogram \& \-\-valid\-intrinsics\-region \& If given, I overlay the valid\-intrinsics regions onto \& the plot. Applies to all the modes except \-\-histogram \& \-\-gridn GRIDN GRIDN How densely we should bin the imager. By default we \& use a 20x14 grid of bins. Applies only if \-\-regional \& \-\-binwidth BINWIDTH The width of binds used for the histogram. Defaults to \& 0.02 pixels. Applies only if \-\-histogram \& \-\-vectorscale VECTORSCALE \& Scale all the vectors by this factor. Useful to \& improve legibility if the vectors are too small to \& see. Applies only if \-\-vectorfield \& \-\-title TITLE Title string for the plot. Overrides the default \& title. Exclusive with \-\-extratitle \& \-\-extratitle EXTRATITLE \& Additional string for the plot to append to the \& default title. Exclusive with \-\-title \& \-\-hardcopy HARDCOPY Write the output to disk, instead of making an \& interactive plot. If \-\-regional, then several plots \& are made, and the \-\-hardcopy argument is a base name: \& "\-\-hardcopy /a/b/c/d.pdf" will produce plots in \& "/a/b/c/d.XXX.pdf" where XXX is the type of plot being \& made \& \-\-terminal TERMINAL gnuplotlib terminal. The default is good almost \& always, so most people don\*(Aqt need this option \& \-\-set SET Extra \*(Aqset\*(Aq directives to gnuplotlib. Can be given \& multiple times \& \-\-unset UNSET Extra \*(Aqunset\*(Aq directives to gnuplotlib. Can be given \& multiple times .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\-2021 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