gtsam 4.2
gtsam
Loading...
Searching...
No Matches
triangulation.h File Reference

Functions for triangulation. More...

Go to the source code of this file.

Classes

class  gtsam::TriangulationUnderconstrainedException
 Exception thrown by triangulateDLT when SVD returns rank < 3. More...
class  gtsam::TriangulationCheiralityException
 Exception thrown by triangulateDLT when landmark is behind one or more of the cameras. More...
struct  gtsam::TriangulationParameters
class  gtsam::TriangulationResult
 TriangulationResult is an optional point, along with the reasons why it is invalid. More...

Namespaces

namespace  gtsam
 Global functions in a separate testing namespace.

Typedefs

using gtsam::CameraSetCal3Bundler = CameraSet<PinholeCamera<Cal3Bundler>>
using gtsam::CameraSetCal3_S2 = CameraSet<PinholeCamera<Cal3_S2>>
using gtsam::CameraSetCal3DS2 = CameraSet<PinholeCamera<Cal3DS2>>
using gtsam::CameraSetCal3Fisheye = CameraSet<PinholeCamera<Cal3Fisheye>>
using gtsam::CameraSetCal3Unified = CameraSet<PinholeCamera<Cal3Unified>>
using gtsam::CameraSetSpherical = CameraSet<SphericalCamera>

Functions

Vector4 gtsam::triangulateHomogeneousDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol=1e-9)
 DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
Vector4 gtsam::triangulateHomogeneousDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const std::vector< Unit3 > &measurements, double rank_tol=1e-9)
 Same math as Hartley and Zisserman, 2nd Ed., page 312, but with unit-norm bearing vectors (contrarily to pinhole projection, the z entry is not assumed to be 1 as in Hartley and Zisserman).
Point3 gtsam::triangulateDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const Point2Vector &measurements, double rank_tol=1e-9)
 DLT triangulation: See Hartley and Zisserman, 2nd Ed., page 312.
Point3 gtsam::triangulateDLT (const std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > &projection_matrices, const std::vector< Unit3 > &measurements, double rank_tol=1e-9)
 overload of previous function to work with Unit3 (projected to canonical camera)
Point3 gtsam::triangulateLOST (const std::vector< Pose3 > &poses, const Point3Vector &calibratedMeasurements, const SharedIsotropic &measurementNoise)
 Triangulation using the LOST (Linear Optimal Sine Triangulation) algorithm proposed in https://arxiv.org/pdf/2205.12197.pdf by Sebastien Henry and John Christian.
template<class CALIBRATION>
std::pair< NonlinearFactorGraph, Valuesgtsam::triangulationGraph (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=noiseModel::Unit::Create(2))
 Create a factor graph with projection factors from poses and one calibration.
template<class CAMERA>
std::pair< NonlinearFactorGraph, Valuesgtsam::triangulationGraph (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, Key landmarkKey, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
 Create a factor graph with projection factors from pinhole cameras (each camera has a pose and calibration).
Point3 gtsam::optimize (const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
 Optimize for triangulation.
template<class CALIBRATION>
Point3 gtsam::triangulateNonlinear (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
 Given an initial estimate , refine a point using measurements in several cameras.
template<class CAMERA>
Point3 gtsam::triangulateNonlinear (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, const Point3 &initialEstimate, const SharedNoiseModel &model=nullptr)
 Given an initial estimate , refine a point using measurements in several cameras.
template<class CAMERA>
std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > gtsam::projectionMatricesFromCameras (const CameraSet< CAMERA > &cameras)
template<class CALIBRATION>
std::vector< Matrix34, Eigen::aligned_allocator< Matrix34 > > gtsam::projectionMatricesFromPoses (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal)
template<class CALIBRATION>
Cal3_S2 gtsam::createPinholeCalibration (const CALIBRATION &cal)
 Create a pinhole calibration from a different Cal3 object, removing distortion.
template<class CALIBRATION, class MEASUREMENT>
MEASUREMENT gtsam::undistortMeasurementInternal (const CALIBRATION &cal, const MEASUREMENT &measurement, boost::optional< Cal3_S2 > pinholeCal=boost::none)
 Internal undistortMeasurement to be used by undistortMeasurement and undistortMeasurements.
template<class CALIBRATION>
Point2Vector gtsam::undistortMeasurements (const CALIBRATION &cal, const Point2Vector &measurements)
 Remove distortion for measurements so as if the measurements came from a pinhole camera.
template<>
Point2Vector gtsam::undistortMeasurements (const Cal3_S2 &cal, const Point2Vector &measurements)
 Specialization for Cal3_S2 as it doesn't need to be undistorted.
template<class CAMERA>
CAMERA::MeasurementVector gtsam::undistortMeasurements (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
 Remove distortion for measurements so as if the measurements came from a pinhole camera.
template<class CAMERA = PinholeCamera<Cal3_S2>>
PinholeCamera< Cal3_S2 >::MeasurementVector gtsam::undistortMeasurements (const CameraSet< PinholeCamera< Cal3_S2 > > &cameras, const PinholeCamera< Cal3_S2 >::MeasurementVector &measurements)
 Specialize for Cal3_S2 to do nothing.
template<class CAMERA = SphericalCamera>
SphericalCamera::MeasurementVector gtsam::undistortMeasurements (const CameraSet< SphericalCamera > &cameras, const SphericalCamera::MeasurementVector &measurements)
 Specialize for SphericalCamera to do nothing.
template<class CALIBRATION>
Point3Vector gtsam::calibrateMeasurementsShared (const CALIBRATION &cal, const Point2Vector &measurements)
 Convert pixel measurements in image to homogeneous measurements in the image plane using shared camera intrinsics.
template<class CAMERA>
Point3Vector gtsam::calibrateMeasurements (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements)
 Convert pixel measurements in image to homogeneous measurements in the image plane using camera intrinsics of each measurement.
template<class CAMERA = SphericalCamera>
Point3Vector gtsam::calibrateMeasurements (const CameraSet< SphericalCamera > &cameras, const SphericalCamera::MeasurementVector &measurements)
 Specialize for SphericalCamera to do nothing.
template<class CALIBRATION>
Point3 gtsam::triangulatePoint3 (const std::vector< Pose3 > &poses, boost::shared_ptr< CALIBRATION > sharedCal, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
 Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DLT.
template<class CAMERA>
Point3 gtsam::triangulatePoint3 (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
 Function to triangulate 3D landmark point from an arbitrary number of poses (at least 2) using the DLT.
template<class CALIBRATION>
Point3 gtsam::triangulatePoint3 (const CameraSet< PinholeCamera< CALIBRATION > > &cameras, const Point2Vector &measurements, double rank_tol=1e-9, bool optimize=false, const SharedNoiseModel &model=nullptr, const bool useLOST=false)
 Pinhole-specific version.
template<class CAMERA>
TriangulationResult gtsam::triangulateSafe (const CameraSet< CAMERA > &cameras, const typename CAMERA::MeasurementVector &measured, const TriangulationParameters &params)
 triangulateSafe: extensive checking of the outcome

Detailed Description

Functions for triangulation.

Date
July 31, 2013
Author
Chris Beall
Akshay Krishnan
Date
July 31, 2013
Author
Chris Beall
Luca Carlone
Akshay Krishnan