congruentSetExplorationBase.h
Go to the documentation of this file.
96 class CongruentSetExplorationBase : public MatchBase<_PointType, _TransformVisitor, OptExts ..., CongruentSetExplorationOptions> {
106 using MatchBaseType = MatchBase<_PointType, _TransformVisitor, OptExts ..., CongruentSetExplorationOptions>;
211 bool TryCongruentSet(CongruentBaseType& base, Set& set, TransformVisitor &v,size_t &nbCongruent);
224 /// the translation vector and (cx,cy,cz) is the center of transformation.template <class MatrixDerived>
virtual bool generateCongruents(CongruentBaseType &base, Set &congruent_set)=0
Find all the congruent set similar to the base in the second 3D model (Q). It could be with a 3 point...
Scalar ComputeTransformation(const InputRange1 &P, const InputRange2 &Q, Eigen::Ref< MatrixType > transformation, const Sampler< _PointType > &sampler, TransformVisitor &v)
Computes an approximation of the best LCP (directional) from Q to P and the rigid transformation that...
int number_of_trials_
Number of trials. Every trial picks random base from P.
Definition: congruentSetExplorationBase.h:165
int current_trial_
Current trial.
Definition: congruentSetExplorationBase.h:178
Scalar best_LCP_
The best LCP (Largest Common Point) fraction so far.
Definition: congruentSetExplorationBase.h:176
Scalar Verify(const Eigen::Ref< const MatrixType > &mat) const
For each randomly picked base, verifies the computed transformation by computing the number of points...
Definition: congruentSetExplorationBase.hpp:378
bool configureOverlap(Scalar overlap_, Scalar terminate_threshold_=Scalar(1))
Definition: congruentSetExplorationBase.h:70
Definition: congruentSetExplorationBase.h:65
Scalar getOverlapEstimation() const
Definition: congruentSetExplorationBase.h:77
bool Perform_N_steps(int n, Eigen::Ref< MatrixType > transformation, TransformVisitor &v)
Performs n RANSAC iterations, each one of them containing base selection, finding congruent sets and ...
Definition: congruentSetExplorationBase.hpp:130
virtual bool initBase(CongruentBaseType &base)=0
Tries to compute an inital base from P.
CongruentSetExplorationBase< Traits, PointType, TransformVisitor, PairFilteringFunctor, OptExts... >::Scalar ComputeTransformation(const InputRange1 &P, const InputRange2 &Q, Eigen::Ref< typename CongruentSetExplorationBase< Traits, PointType, TransformVisitor, PairFilteringFunctor, OptExts... >::MatrixType > transformation, const Sampler< PointType > &sampler, TransformVisitor &v)
Definition: congruentSetExplorationBase.hpp:61
CongruentBaseType base_
The points in the base (indices to P). It is being updated in every RANSAC iteration.
Definition: congruentSetExplorationBase.h:168
bool TryOneBase(TransformVisitor &v)
Tries one base and finds the best transformation for this base. Returns true if the achieved LCP is g...
Definition: congruentSetExplorationBase.hpp:195
virtual ~CongruentSetExplorationBase()
Definition: congruentSetExplorationBase.hpp:51
Scalar getTerminateThreshold() const
Definition: congruentSetExplorationBase.h:76
void get(int queryId, int nElPerDim, int, typename NeighborhoodType< 3 >::ptr first, typename NeighborhoodType< 3 >::ptr)
Definition: utils.h:279
const CongruentBaseType & base3D() const
Definition: congruentSetExplorationBase.h:213
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CongruentSetExplorationBase(const OptionsType &options, const Utils::Logger &logger)
Definition: congruentSetExplorationBase.hpp:36
bool TryCongruentSet(CongruentBaseType &base, Set &set, TransformVisitor &v, size_t &nbCongruent)
Loop over the set of congruent 4-points and test the compatibility with the input base...
Definition: congruentSetExplorationBase.hpp:215
Definition: logger.h:62
CongruentBaseType current_congruent_
The current congruent 4 points from Q. Every RANSAC iteration the algorithm examines a set of such co...
Definition: congruentSetExplorationBase.h:172
Scalar max_base_diameter_
Maximum base diameter. It is computed automatically from the diameter of P and the estimated overlap ...
Definition: congruentSetExplorationBase.h:163
Coordinates base_3D_
The 3D points of the base.
Definition: congruentSetExplorationBase.h:174