NDEVR
API Documentation
GeometricTools

Utility class for geometric computations between keyframes. More...

Static Public Member Functions

template<int rows, int cols>
static bool CheckMatrices (const cv::Mat &cvMat, const Eigen::Matrix< float, rows, cols > &eigMat)
 Checks whether an OpenCV matrix and Eigen matrix are approximately equal.
template<typename T, int rows, int cols>
static bool CheckMatrices (const Eigen::Matrix< T, rows, cols > &eigMat1, const Eigen::Matrix< T, rows, cols > &eigMat2)
 Checks whether two Eigen matrices are approximately equal.
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Matrix3f ComputeF12 (KeyFrame *&pKF1, KeyFrame *&pKF2)
 Computes the fundamental matrix between two keyframes.
static bool Triangulate (Eigen::Vector3f &x_c1, Eigen::Vector3f &x_c2, Eigen::Matrix< float, 3, 4 > &Tc1w, Eigen::Matrix< float, 3, 4 > &Tc2w, Eigen::Vector3f &x3D)
 Triangulates a 3D point from two camera observations.

Detailed Description

Utility class for geometric computations between keyframes.

Provides static methods for computing fundamental matrices, triangulating 3D points, and comparing matrix representations.

Definition at line 14 of file GeometricTools.h.

Member Function Documentation

◆ CheckMatrices() [1/2]

template<int rows, int cols>
bool GeometricTools::CheckMatrices ( const cv::Mat & cvMat,
const Eigen::Matrix< float, rows, cols > & eigMat )
inlinestatic

Checks whether an OpenCV matrix and Eigen matrix are approximately equal.

Parameters
[in]cvMatThe OpenCV matrix.
[in]eigMatThe Eigen matrix.
Returns
True if all elements are within epsilon tolerance.

Definition at line 41 of file GeometricTools.h.

◆ CheckMatrices() [2/2]

template<typename T, int rows, int cols>
bool GeometricTools::CheckMatrices ( const Eigen::Matrix< T, rows, cols > & eigMat1,
const Eigen::Matrix< T, rows, cols > & eigMat2 )
inlinestatic

Checks whether two Eigen matrices are approximately equal.

Parameters
[in]eigMat1First Eigen matrix.
[in]eigMat2Second Eigen matrix.
Returns
True if all elements are within epsilon tolerance.

Definition at line 66 of file GeometricTools.h.

◆ ComputeF12()

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Eigen::Matrix3f GeometricTools::ComputeF12 ( KeyFrame *& pKF1,
KeyFrame *& pKF2 )
static

Computes the fundamental matrix between two keyframes.

Parameters
[in]pKF1First keyframe.
[in]pKF2Second keyframe.
Returns
The 3x3 fundamental matrix.

◆ Triangulate()

bool GeometricTools::Triangulate ( Eigen::Vector3f & x_c1,
Eigen::Vector3f & x_c2,
Eigen::Matrix< float, 3, 4 > & Tc1w,
Eigen::Matrix< float, 3, 4 > & Tc2w,
Eigen::Vector3f & x3D )
static

Triangulates a 3D point from two camera observations.

Parameters
[in]x_c1Bearing vector in camera 1.
[in]x_c2Bearing vector in camera 2.
[in]Tc1wProjection matrix of camera 1.
[in]Tc2wProjection matrix of camera 2.
[out]x3DThe triangulated 3D point.
Returns
True if triangulation succeeded.

The documentation for this class was generated from the following file: