mrcal-show-splined-model-surface - Visualizes the surface represented in a splined lens model


  $ mrcal-show-splined-model-surface cam.cameramodel
  ... a plot pops up showing the surface


Splined models are described at


Splined models are built with a splined surface that we index to compute the projection. The meaning of what indexes the surface and the values of the surface varies by model, but in all cases, visualizing the surface is useful.

This tool can produce a plot in the imager domain (the default) or in the spline index domain (normalized stereographic coordinates, usually). Both are useful. Pass --spline-index-domain to choose that domain

One use for this tool is to check that the field-of-view we're using for this model is reasonable. We'd like the field of view to be wide-enough to cover the whole imager, but not much wider, since representing invisible areas isn't useful. Ideally the surface domain boundary (that this tool displays) is just wider than the imager edges (which this tool also displays).



  model                 Input camera model. If "-' is given, we read standard
  {x,y}                 Optional 'x' or 'y': which surface we're looking at


  -h, --help            show this help message and exit
  --extratitle EXTRATITLE
                        Extra title string for the plot
  --hardcopy HARDCOPY   Write the output to disk, instead of making an
                        interactive plot
  --terminal TERMINAL   gnuplotlib terminal. The default is good almost
                        always, so most people don't need this option
  --set SET             Extra 'set' directives to gnuplotlib. Can be given
                        multiple times
  --unset UNSET         Extra 'unset' directives to gnuplotlib. Can be given
                        multiple times
  --imager-domain       By default, this produces a visualization in the
                        domain of the spline-index (normalized stereographic
                        coordinates). Sometimes it's more informative to look
                        at the imager domain instead, by passing this option
  --imager-bounds       By default we communicate the usable projection region
                        to the user by displaying the valid-intrinsics region.
                        This isn't available in all models. To fall back on
                        the boundary of the full imager, pass --imager-bounds.
                        In the usual case of incomplete calibration-time
                        coverage at the edges, this results in a very
                        unrealistic representation of reality. Leaving this at
                        the default is recommended
  --observations        If given, I show where the chessboard corners were
                        observed at calibration time. This is useful to
                        evaluate the reported unprojectable regions.



Dima Kogan, <>


Copyright (c) 2017-2020 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