mrcal 2.3 release notes
New in mrcal 2.3
This is once again a mostly-maintenance release. Many medium-important but significant improvements and fixes are present here. The big update in this release is extended documentation, especially practical notes in the how-to-calibrate page and the recipes. Exciting new features are coming.
Improved discrete point support
Calibrations are still implemented primarily off chessboard observations, but support for discrete points is being added bit by bit:
- Added
mrcal.residuals_point(), an analogue tomrcal.residuals_chessboard() - The
mrcal.show_residuals_...()functions now display residuals from chessboard and point observations mrcal.show_geometry()andmrcal-show-geometryandmrcal-show-... --observationscan display calibration-time points- Projection uncertainty can be computed with calibrations from point observations if the points were fixed
Full CAHVORE support
CAHVORE models now have gradients implemented, so all the normal functionality now works with these models. We can solve for a CAHVORE model.
This model is noncentral, so unprojection only works if \(E = 0\): when this model behaves centrally
C API
mrcal_image_..._crop()is nowstatic inline. This fixes linker errors on some compilersmrcal_cameramodel_tnow hasdouble intrinsics[0]instead ofdouble intrinsics[]. This allows#include <mrcal.h>to work inside C++ codemrcal_cameramodel_thas a size unknown at compile time, so it cannot be allocated on the stack. To resolve this we now havemrcal_cameramodel_LENSMODEL_XXXX_tstructures for models that have known-at-compile-time size. These can be allocated on the stack, so they are easier to use- Dense stereo processing in C is now possible.
stereo.hcontains:mrcal_rectified_resolution()mrcal_rectified_system()mrcal_rectification_maps()
mrcal-stereo
mrcal-stereowrites out a binary disparity image as a 16-bpp.pngfile. This allows lossless post-processing of the stereo resultmrcal-stereo --viz stereodisplays both the rectified and input coordinates under the mouse cursormrcal-stereocan process multiple images in parallel- bug fix:
mrcal-stereorespects--axis-scale - bug fix:
mrcal-stereocan once again process multiple files with a single invocation
Generic visualization updates
mrcal.show_projection_diff()andmrcal-show-projection-diffhandlenanvalues better: no confused plots or ugly warnings on the consolemrcal.show_projection_diff()andmrcal-show-projection-diffcan plot vectorfields with multiple distancesmrcal.show_projection_uncertainty_vs_distance()now hasdistance_min,distance_max,observed_pixel_uncertaintyarguments to better control the plot. The defaults autodetect the values, so the default behavior does not changemrcal.show_residuals_board_observation()andmrcal-show-residuals-board-observationreportsiobservation_from_worstin its title. This makes it simple to regenerate specific plots, even if they were displayed out of ordermrcal-show-residuals-board-observationhas--from-glob
Image I/O
mrcal.save_image()can write 16-bit-per-pixel grayscale images properly. This requires a more recentlibfreeimagethan is available on some OSs. The tests make sure it works.
Calibration seed bug fix
mrcal.estimate_monocular_calobject_poses_Rt_tocam() ignores invalid input
points. This makes calibrating with incomplete chessboard observations work
properly
Generic API updates
- Commandline tools now print errors to standard error instead of throwing exceptions
mrcal.rectified_resolution()has been split frommrcal.rectified_system()mrcal.optimize()andmrcal.optimizer_callback(): all arguments are keyword-only, most arguments are optionalmrcal.measurement_index_...()all return <0 if those particular measurements aren't present- Added
mrcal.make_perfect_observations()to produce perfect observations with perfect noise. Very useful for error analysis mrcal.ref_calibration_object()can return the position of any point on the chessboard, not just the chessboard cornersmrcal-convert-lensmodelhas--cbmaxmrcal.residuals_chessboard()argument rename:i_cam\(\rightarrow\)icam_intrinsicsfor consistency. The old argument is still accepted for backwards compatibilitymrcal.residuals_chessboard()() has a newreturn_observationsargument The defaultreturn_observations=Falseproduces the original behavior.if return_observations:we returnresiduals,observationsmrcal.residuals_chessboard()returns size-0 arrays if no observations are presentmrcal.show_geometry()has smarter logic when given > 2 cameras: theaxis_scalehas a reasonable default size
Migration notes 2.2 -> 2.3
The mrcal_measurement_index_regularization() C function has an extended prototype. To migrate, pass the extra requested arguments.