|
template<typename InputRange1 , typename InputRange2 , template< typename > class Sampler> |
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) |
|
template<typename InputRange1 , typename InputRange2 , template< typename > class Sampler> |
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 realizes it. The input sets may or may not contain normal information for any point. More...
|
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | CongruentSetExplorationBase (const OptionsType &options, const Utils::Logger &logger) |
|
virtual bool | initBase (CongruentBaseType &base)=0 |
| Tries to compute an inital base from P. More...
|
|
virtual | ~CongruentSetExplorationBase () |
|
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 realizes it. The input sets may or may not contain normal information for any point. More...
|
|
const std::vector< PosMutablePoint > & | getFirstSampled () const |
| Read access to the sampled clouds used for the registration. More...
|
|
const std::vector< PosMutablePoint > & | getSecondSampled () const |
| Read access to the sampled clouds used for the registration. More...
|
|
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | MatchBase (const OptionsType &options, const Utils::Logger &logger) |
|
virtual | ~MatchBase () |
|
|
const CongruentBaseType & | base3D () const |
|
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 base or a 4 point base. More...
|
|
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 verification. Returns true if the process can be terminated (the target LCP was obtained or the maximum number of trials has been reached), false otherwise. More...
|
|
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. More...
|
|
bool | TryOneBase (TransformVisitor &v) |
| Tries one base and finds the best transformation for this base. Returns true if the achieved LCP is greater than terminate_threshold_, else otherwise. More...
|
|
Scalar | Verify (const Eigen::Ref< const MatrixType > &mat) const |
| For each randomly picked base, verifies the computed transformation by computing the number of points that this transformation brings near points in Q. Returns the current LCP. R is the rotation matrix, (tx,ty,tz) is the translation vector and (cx,cy,cz) is the center of transformation.template <class matrixderived>=""> More...
|
|
bool | ComputeRigidTransformation (const Coordinates &ref, const Coordinates &candidate, const Eigen::Matrix< Scalar, 3, 1 > ¢roid1, Eigen::Matrix< Scalar, 3, 1 > centroid2, Eigen::Ref< MatrixType > transform, Scalar &rms_, bool computeScale) const |
| Computes the best rigid transformation between three corresponding pairs. The transformation is characterized by rotation matrix, translation vector and a center about which we rotate. The set of pairs is potentially being updated by the best permutation of the second set. Returns the RMS of the fit. The method is being called with n points but it applies the fit for only 3 after the best permutation is selected in the second set (see bellow). This is done because the solution for planar points is much simpler. The method is the closed-form solution by Horn: people.csail.mit.edu/bkph/papers/Absolute_Orientation.pdf. More...
|
|
void | init (const InputRange1 &P, const InputRange2 &Q, const Sampler< _PointType > &sampler) |
| Initializes the internal state of the Base class. More...
|
|
virtual void | Initialize () |
| Initializes the data structures and needed values before the match computation. This method is called once the internal state of the Base class as been set. More...
|
|
void | Log (Args...args) const |
|
Scalar | MeanDistance () const |
| Computes the mean distance between points in Q and their nearest neighbor. We need this for normalization of the user delta (See the paper) to the "scale" of the set. More...
|
|
bool | SelectRandomTriangle (Scalar max_base_diameter, int &base1, int &base2, int &base3) |
| Selects a random triangle in the set P (then we add another point to keep the base as planar as possible). We apply a simple heuristic that works in most practical cases. The idea is to accept maximum distance, computed by the estimated overlap, multiplied by the diameter of P, and try to have a triangle with all three edges close to this distance. Wide triangles helps to make the transformation robust while too large triangles makes the probability of having all points in the inliers small so we try to trade-off. More...
|
|
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
class gr::CongruentSetExplorationBase< _Traits, _PointType, _TransformVisitor, _PairFilteringFunctor, OptExts >
Base class for Congruent Sec Exploration algorithms.
- Template Parameters
-
_Traits | Defines properties of the Base used to build the congruent set. |
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
template<typename InputRange1 , typename InputRange2 , template< typename > class Sampler>
Computes an approximation of the best LCP (directional) from Q to P and the rigid transformation that realizes it. The input sets may or may not contain normal information for any point.
- Parameters
-
[in] | P | The first input set. |
[in] | Q | The second input set. |
[out] | transformation | Rigid transformation matrix (4x4) that brings Q to the (approximate) optimal LCP. Initial value is considered as a guess |
- Returns
- the computed LCP measure as a fraction of the size of P ([0..1]).
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
Performs n RANSAC iterations, each one of them containing base selection, finding congruent sets and verification. Returns true if the process can be terminated (the target LCP was obtained or the maximum number of trials has been reached), false otherwise.
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
For each randomly picked base, verifies the computed transformation by computing the number of points that this transformation brings near points in Q. Returns the current LCP. R is the rotation matrix, (tx,ty,tz) is the translation vector and (cx,cy,cz) is the center of transformation.template <class matrixderived>="">
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
The current congruent 4 points from Q. Every RANSAC iteration the algorithm examines a set of such congruent 4-points from Q and retains the best from them (the one that realizes the best LCP).
template<typename _Traits, typename _PointType, typename _TransformVisitor, typename _PairFilteringFunctor, template< class, class > class... OptExts>
Maximum base diameter. It is computed automatically from the diameter of P and the estimated overlap and used to limit the distance between the points in the base in P so that the probability to have all points in the base as inliers is increased.