MRCAL(1)
π MRCAL(1) β mrcal-triangulate π
okay bestie, welcome to the mrcal manual β camera projection and calibration toolkit energy, but make it a group chat. this page is mrcal-triangulate, and it's giving "triangulate a feature in a pair of images to report a range". π
β¨ NAME β¨
mrcal-triangulate β triangulate a feature in a pair of images to report a range π¦
πΈ SYNOPSIS πΈ
$ mrcal-triangulate
--range-estimate 870
left.cameramodel right.cameramodel
left.jpg right.jpg
1234 2234
## Feature [1234., 2234.] in the left image corresponds to [2917.9 1772.6] at 870.0m
## Feature match found at [2916.51891391 1771.86593517]
## q1 - q1_perfect_at_range = [-1.43873946 -0.76196924]
## Range: 677.699 m (error: -192.301 m)
## Reprojection error between triangulated point and q0: [5.62522473e-10 3.59364094e-09]pixels
## Observed-pixel range sensitivity: 103.641m/pixel (q1). Worst direction: [1. 0.]. Linearized correction: 1.855 pixels
## Calibration yaw sensitivity: -3760.702m/deg. Linearized correction: -0.051 degrees of yaw
## Calibration pitch sensitivity: 0.059m/deg.
## Calibration translation sensitivity: 319.484m/m. Worst direction: [1 0 0].
## Linearized correction: 0.602 meters of translation
## Optimized yaw correction = -0.03983 degrees
## Optimized pitch correction = 0.03255 degrees
## Optimized relative yaw (1 <- 0): -1.40137 degrees
no cap, that's the whole vibe right there. π
π DESCRIPTION π
So here's the tea: you hand this thing a pair of images, a pair of camera models, and a feature coordinate in the first image. It goes and finds the matching feature in the second image, then reports the range. It's basically stereo processing but for a single pixel β except it spills so much more diagnostic info than your average stereo tool does. it's giving "overachiever" and we love that for it. π
It's useful when you wanna evaluate ranging results. periodt. π«Ά
π OPTIONS π
π POSITIONAL ARGUMENTS
modelsβ the camera models for the images. Both intrinsics and extrinsics get used here, bestie, so bring your whole self β¨images_and_featuresβ the images and/or feature pixel coordinates used for the triangulation. This is eitherIMAGE0 IMAGE1 FEATURE0X FEATURE0YorFEATURE0X FEATURE0Y FEATURE1X FEATURE1Y. If you give images, then the given pixel is treated as a feature inimage0, and we go searching for the corresponding feature inimage1. π΅οΈββοΈ
π§ OPTIONAL ARGUMENTS
-h,--helpβ show this help message and exit. classic. iconic. π--make-corrected-model1β if you give this, we assume--range-estimateis correct, and we output to standard output a rotatedcamera1that produces this range. slay π₯--template-size TEMPLATE_SIZE TEMPLATE_SIZEβ the size of the template used for feature matching, in pixel coordinates of the second image. Two arguments required: width height. This gets passed straight tomrcal.match_feature(). Default is 13x13. π--search-radius SEARCH_RADIUSβ how far the feature-matching routine should search, in pixel coordinates of the second image. Make it bigger if your range estimate is bad β especially at near ranges. Passed directly tomrcal.match_feature(). We default to 20 pixels. π--range-estimate RANGE_ESTIMATEβ initial estimate of the range of the observed feature. Used as the initial guess in the feature matching. If you omit it, I pick 50m, completely arbitrarily. (yes, really, it's a whole vibe. π)--plane-n PLANE_N PLANE_N PLANE_Nβ if given, we assume we're looking at a plane in space, and take that into account when matching the template. The normal vector to this plane goes here, in camera-0 coordinates. The normal does not need to be normalized; any scaling is compensated inplaned. The plane is all pointspsuch thatinner(p,planen) = planed. π--plane-d PLANE_Dβ if given, we assume we're looking at a plane in space, and take that into account when matching the template. This is the distance-along-the-normal to the plane, in from-camera coordinates. The plane is all pointspsuch thatinner(p,planen) = planed. πΈ--q-calibration-stdev Q_CALIBRATION_STDEVβ the uncertainty of the point observations at calibration time. If given, we report the analytically-computed effects of this noise. If a value<0is passed in, we infer the calibration-time noise from the optimal calibration-time residuals. π--q-observation-stdev Q_OBSERVATION_STDEVβ the uncertainty of the point observations at observation time. If given, we report the analytically-computed effects of this noise. β¨--q-observation-stdev-correlation Q_OBSERVATION_STDEV_CORRELATIONβ by default, the noise in the observation-time pixel observations is assumed independent. Which is not entirely realistic, ngl: observations of the same feature in multiple cameras come from an imager correlation operation, so they'll have some amount of correlation. If given, this argument says how much correlation. It's a value in[0,1]scaling the stdev.0means "independent" (the default).1.0means "100% correlated". π«Ά--stabilize-coords,--stabilizeβ if we're propagating calibration-time noise (--q-calibration-stdev != 0), we report the uncertainty ellipse in a stabilized coordinate system, compensating for the camera-0 coord system motion. π--method {geometric,lindstrom,leecivera-l1,leecivera-linf,leecivera-mid2,leecivera-wmid2}β the triangulation method. By default we use the"Mid2"method from Lee-Civera's paper. π--corr-floor CORR_FLOORβ used to rejectmrcal.match_feature()results. Default is0.9: accept only very good matches. A lower threshold may still give you usable matches, but do interactively check the feature-matcher results by passing"--viz match". > bestie please actually check them, don't just trust it π--viz {match,uncertainty}β if given, we visualize either the feature-matcher results ("--viz match") or the uncertainty ellipse(s) ("--viz uncertainty"). By default this produces an interactive gnuplot window. The feature-match visualization shows 2 overlaid images: the larger image being searched, and the transformed template placed at its best-fitting location. Each individual image can be hidden/shown by clicking on its legend in the top-right of the plot. It's generally most useful to show/hide the template to visually verify the resulting alignment. π--title TITLEβ title string for the--vizplot. Overrides the default title. Exclusive with--extratitle. π--extratitle EXTRATITLEβ additional string for the--vizplot to append to the default title. Exclusive with--title. π--hardcopy HARDCOPYβ write the--vizoutput to disk, instead of an interactive plot. πΈ--terminal TERMINALβ the gnuplotlib terminal used in--viz. The default is good almost always, so most people don't need this option. π--set SETβ extrasetdirectives to gnuplotlib for--viz. Can be given multiple times. π--unset UNSETβ extraunsetdirectives to gnuplotlib--viz. Can be given multiple times. π--claheβ if given, apply CLAHE equalization to the images prior to the matching. π
π¦ 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
and that's the whole page, bestie!! this is mrcal version 2.5.2-4build1, dated 2026-03-20, and it's MRCAL(1) energy all the way through. go triangulate something iconic. πβ¨ππ¦
π¦ 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