NDEVR
API Documentation
Sim3Solver

Computes a Sim3 transformation between two keyframes using RANSAC. More...

Collaboration diagram for Sim3Solver:
[legend]

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Sim3Solver (KeyFrame *pKF1, KeyFrame *pKF2, const Buffer< MapPoint * > &vpMatched12, const bool bFixScale=true, const Buffer< KeyFrame * > vpKeyFrameMatchedMP=Buffer< KeyFrame * >())
 Constructs the Sim3 solver.
Eigen::Matrix4f find (Buffer< bool > &vbInliers12, uint04 &nInliers)
 Finds the best Sim3 transformation using RANSAC.
Eigen::Matrix3f GetEstimatedRotation ()
 Returns the estimated rotation matrix.
float GetEstimatedScale ()
 Returns the estimated scale factor.
Eigen::Matrix4f GetEstimatedTransformation ()
 Returns the estimated transformation matrix.
Eigen::Vector3f GetEstimatedTranslation ()
 Returns the estimated translation vector.
Eigen::Matrix4f iterate (uint04 nIterations, bool &bNoMore, Buffer< bool > &vbInliers, uint04 &nInliers)
 Runs a fixed number of RANSAC iterations.
Eigen::Matrix4f iterate (uint04 nIterations, bool &bNoMore, Buffer< bool > &vbInliers, uint04 &nInliers, bool &bConverge)
 Runs a fixed number of RANSAC iterations with convergence check.
void setRansacParameters (fltp04 probability=0.99f, uint04 minInliers=6, uint04 maxIterations=300)
 Sets RANSAC parameters.

Detailed Description

Computes a Sim3 transformation between two keyframes using RANSAC.

Used in loop closing to compute the similarity transformation between matched keyframes, handling scale differences in monocular SLAM.

Definition at line 38 of file Sim3Solver.h.

Constructor & Destructor Documentation

◆ Sim3Solver()

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Sim3Solver::Sim3Solver ( KeyFrame * pKF1,
KeyFrame * pKF2,
const Buffer< MapPoint * > & vpMatched12,
const bool bFixScale = true,
const Buffer< KeyFrame * > vpKeyFrameMatchedMP = BufferKeyFrame * >() )

Constructs the Sim3 solver.

Parameters
[in]pKF1First keyframe.
[in]pKF2Second keyframe.
[in]vpMatched12Map point matches from KF1 to KF2.
[in]bFixScaleTrue for stereo/RGB-D (scale is fixed to 1).
[in]vpKeyFrameMatchedMPKeyframes associated with matched map points.

Member Function Documentation

◆ find()

Eigen::Matrix4f Sim3Solver::find ( Buffer< bool > & vbInliers12,
uint04 & nInliers )

Finds the best Sim3 transformation using RANSAC.

Parameters
[out]vbInliers12Inlier flags per match.
[out]nInliersNumber of inliers found.
Returns
The best 4x4 transformation matrix.

◆ GetEstimatedRotation()

Eigen::Matrix3f Sim3Solver::GetEstimatedRotation ( )

Returns the estimated rotation matrix.

Returns
The 3x3 rotation.

◆ GetEstimatedScale()

float Sim3Solver::GetEstimatedScale ( )

Returns the estimated scale factor.

Returns
The scale.

◆ GetEstimatedTransformation()

Eigen::Matrix4f Sim3Solver::GetEstimatedTransformation ( )

Returns the estimated transformation matrix.

Returns
The 4x4 transformation.

◆ GetEstimatedTranslation()

Eigen::Vector3f Sim3Solver::GetEstimatedTranslation ( )

Returns the estimated translation vector.

Returns
The 3D translation.

◆ iterate() [1/2]

Eigen::Matrix4f Sim3Solver::iterate ( uint04 nIterations,
bool & bNoMore,
Buffer< bool > & vbInliers,
uint04 & nInliers )

Runs a fixed number of RANSAC iterations.

Parameters
[in]nIterationsNumber of iterations to run.
[out]bNoMoreTrue if all iterations have been exhausted.
[out]vbInliersInlier flags per match.
[out]nInliersNumber of inliers.
Returns
The best 4x4 transformation matrix found so far.

◆ iterate() [2/2]

Eigen::Matrix4f Sim3Solver::iterate ( uint04 nIterations,
bool & bNoMore,
Buffer< bool > & vbInliers,
uint04 & nInliers,
bool & bConverge )

Runs a fixed number of RANSAC iterations with convergence check.

Parameters
[in]nIterationsNumber of iterations to run.
[out]bNoMoreTrue if all iterations have been exhausted.
[out]vbInliersInlier flags per match.
[out]nInliersNumber of inliers.
[out]bConvergeTrue if the solution has converged.
Returns
The best 4x4 transformation matrix found so far.

◆ setRansacParameters()

void Sim3Solver::setRansacParameters ( fltp04 probability = 0.99f,
uint04 minInliers = 6,
uint04 maxIterations = 300 )

Sets RANSAC parameters.

Parameters
[in]probabilitySuccess probability.
[in]minInliersMinimum inlier count.
[in]maxIterationsMaximum RANSAC iterations.

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