MRCAL(1)
π MRCAL-SHOW-RESIDUALS β bestie edition π
okay so you're in the mrcal(1) manual, specifically the page for mrcal-show-residuals, and honestly? this one is a whole vibe. it draws pictures of how wrong your calibration is. yes queen, let's look at the mistakes. π₯
β¨ NAME β¨
mrcal-show-residuals β visualize calibration residuals in an imager π
π¦ SYNOPSIS π¦
$ mrcal-show-residuals --vectorfield left.cameramodel
... a plot pops up showing the vector field of residuals for this camera
like literally just that. a plot pops up. she's showing you the residuals. no cap.
πΈ DESCRIPTION πΈ
so this tool has several different modes, and you pick one with commandline arguments. and bestie, listen: exactly one of these mode options must be given. not zero, not two. one. periodt. π
--vectorfieldβ visualize the optimized residuals as a vector field. each vector runs from the observed chessboard corner to its prediction at the optimal solution. it's giving arrows. it's giving direction. πΉ--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. ngl, she's easier on the eyes. π--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. so if your plot looks like a coordinated friend group all wearing the same color? that's a bias, bestie. π©--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). themrcal-calibrate-camerastool 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. quick. dirty. iconic. π--histogramβ visualize the distribution of the optimized residuals. we display a histogram of residuals and overlay it with an idealized gaussian distribution. cute little bell curve moment πβ¨
π OPTIONS π
π POSITIONAL ARGUMENTS π
modelβ camera model that contains theoptimization_inputsthat describe the solve. the displayed observations may come from ANY of the cameras in the solve, not necessarily the one given by this model. so like, she's reading from the whole group chat, not just the one camera you @'d. π
π OPTIONAL ARGUMENTS π
-h,--helpβ show this help message and exit. the classic. the goat. π--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. she said "just me" and honestly, valid. π--valid-intrinsics-regionβ if given, I overlay the valid-intrinsics regions onto the plot. applies to all the modes except--histogram. (yes the manpage says "I". the author is speaking in first person. main character energy, we love to see it. π)--gridn GRIDN GRIDNβ how densely we should bin the imager. by default we use a20x14grid of bins. applies only if--regional. so many little boxes π--binwidth BINWIDTHβ the width of binds used for the histogram. defaults to0.02pixels. 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. zoom zoom π--cbmax CBMAXβ maximum range of the colorbar used in--vectorfield,--magnitudes. if omitted, we autoscale. she'll figure it out herself.--title TITLEβ title string for the plot. overrides the default title. exclusive with--extratitle. pick a lane bestie, you can't have both π«--extratitle EXTRATITLEβ additional string for the plot to append to the default title. exclusive with--title. see above. one or the other. periodt.--hardcopy HARDCOPYβ write the output to disk, instead of making an interactive plot. if--regional, then several plots are made, and the--hardcopyargument is a base name:"--hardcopy /a/b/c/d.pdf"will produce plots in"/a/b/c/d.XXX.pdf"whereXXXis the type of plot being made. so she's saving the pics instead of showing them live πΈ--terminal TERMINALβ gnuplotlib terminal. the default is good almost always, so most people don't need this option. fr fr, you probably don't need this one. leave it alone. π«Ά--set SETβ extra 'set' directives to gnuplotlib. can be given multiple times. stack 'em up β--unset UNSETβ extra 'unset' directives to gnuplotlib. can be given multiple times. the opposite of the above, and equally stackable π
π₯ REPOSITORY π₯
<https://www.github.com/dkogan/mrcal>
π§ AUTHOR π§
Dima Kogan, "<dima@secretsauce.net>"
π LICENSE AND COPYRIGHT π
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 got this, go plot some residuals and slay β¨
and that's a wrap!! this was mrcal 2.5.2-4build1, dated 2026-03-20, from the MRCAL(1) manual. mwah, bye, drink water πππ¦
π¦ where this page comes from
- ubuntu resolute: mrcal 2.5.2-4build1 Β· Apache-2.0
- ubuntu stonking: mrcal 2.5.2-4build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms