NAME
mrcal-triangulate - Triangulate a feature in a pair of images to report a range
SYNOPSIS
$ mrcal-triangulate--range-estimate 870left.cameramodel right.cameramodelleft.jpg right.jpg1234 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
DESCRIPTION
Given a pair of images, a pair of camera models and a feature coordinate in the first image, finds the corresponding feature in the second image, and reports the range. This is similar to the stereo processing of a single pixel, but reports much more diagnostic information than stereo tools do.
This is useful to evaluate ranging results.
OPTIONS
POSITIONAL ARGUMENTS
models Camera models for the images. Both intrinsics andextrinsics are usedimages_and_features The images and/or feature pixes coordinates to use forthe triangulation. This is either IMAGE0 IMAGE1FEATURE0X FEATURE0Y or FEATURE0X FEATURE0Y FEATURE1XFEATURE1Y. If images are given, the given pixel is afeature in image0, and we search for the correspondingfeature in image1.
OPTIONAL ARGUMENTS
-h, --help show this help message and exit--make-corrected-model1If given, we assume the --range-estimate is correct,and output to standard output a rotated camera1 toproduce this range--template-size TEMPLATE_SIZE TEMPLATE_SIZEThe size of the template used for feature matching, inpixel coordinates of the second image. Two argumentsare required: width height. This is passed directly tomrcal.match_feature(). We default to 13x13--search-radius SEARCH_RADIUSHow far the feature-matching routine should search, inpixel coordinates of the second image. This should belarger if the range estimate is poor, especially, atnear ranges. This is passed directly tomrcal.match_feature(). We default to 20 pixels--range-estimate RANGE_ESTIMATEInitial estimate of the range of the observed feature.This is used for the initial guess in the feature-matching. If omitted, I pick 50m, completelyarbitrarily--plane-n PLANE_N PLANE_N PLANE_NIf given, assume that we're looking at a plane inspace, and take this into account when matching thetemplate. The normal vector to this plane is givenhere, in camera-0 coordinates. The normal does notneed to be normalized; any scaling is compensated inplaned. The plane is all points p such thatinner(p,planen) = planed--plane-d PLANE_D If given, assume that we're looking at a plane inspace, and take this into account when matching thetemplate. The distance-along-the-normal to the plane,in from-camera coordinates is given here. The plane isall points p such that inner(p,planen) = planed--q-calibration-stdev Q_CALIBRATION_STDEVThe uncertainty of the point observations atcalibration time. If given, we report theanalytically-computed effects of this noise. If avalue <0 is passed-in, we infer the calibration-timenoise from the optimal calibration-time residuals--q-observation-stdev Q_OBSERVATION_STDEVThe uncertainty of the point observations atobservation time. If given, we report theanalytically-computed effects of this noise.--q-observation-stdev-correlation Q_OBSERVATION_STDEV_CORRELATIONBy default, the noise in the observation-time pixelobservations is assumed independent. This isn'tentirely realistic: observations of the same featurein multiple cameras originate from an imagercorrelation operation, so they will have some amountof correlation. If given, this argument specifies howmuch correlation. This is a value in [0,1] scaling thestdev. 0 means "independent" (the default). 1.0 means"100% correlated".--stabilize-coords, --stabilizeIf propagating calibration-time noise(--q-calibration-stdev != 0), we report theuncertainty 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_FLOORThis is used to reject mrcal.match_feature() results.The default is 0.9: accept only very good matches. Alower threshold may still result in usable matches,but do interactively check the feature-matcher resultsby passing "--viz match"--viz {match,uncertainty}If given, we visualize either the feature-matcherresults ("--viz match") or the uncertainty ellipse(s)("--viz uncertainty"). By default, this produces aninteractive gnuplot window. The feature-matchvisualization shows 2 overlaid images: the largerimage being searched and the transformed template,placed at its best-fitting location. Each individualimage can be hidden/shown by clicking on its legend inthe top-right of the plot. It's generally most usefulto show/hide the template to visually verify theresulting alignment.--title TITLE Title string for the --viz plot. Overrides the defaulttitle. Exclusive with --extratitle--extratitle EXTRATITLEAdditional string for the --viz plot to append to thedefault title. Exclusive with --title--hardcopy HARDCOPY Write the --viz output to disk, instead of aninteractive plot--terminal TERMINAL The gnuplotlib terminal used in --viz. The default isgood almost always, so most people don't need thisoption--set SET Extra 'set' directives to gnuplotlib for --viz. Can begiven multiple times--unset UNSET Extra 'unset' directives to gnuplotlib --viz. Can begiven multiple times--clahe If given, apply CLAHE equalization to the images priorto the matching
REPOSITORY
<https://www.github.com/dkogan/mrcal>
AUTHOR
Dima Kogan, "<[email protected]>"
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