Abstract class for registration algorithms.
More...
#include <matchBase.h>
|
class | Options |
|
struct | PosMutablePoint |
| A convenience class used to wrap (any) PointType to allow mutation of position of point samples for internal computations. More...
|
|
|
template<typename Coordinates > |
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...
|
|
template<typename InputRange1 , typename InputRange2 , template< typename > class Sampler> |
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...
|
|
template<Utils::LogLevel level, typename... Args> |
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 PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
class gr::MatchBase< PointType, _TransformVisitor, OptExts >
Abstract class for registration algorithms.
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
using gr::MatchBase< PointType, _TransformVisitor, OptExts >::Scalar = typename PointType::Scalar |
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename Coordinates >
bool gr::MatchBase< PointType, _TransformVisitor, OptExts >::ComputeRigidTransformation |
( |
const Coordinates & |
ref, |
|
|
const Coordinates & |
candidate, |
|
|
const Eigen::Matrix< Scalar, 3, 1 > & |
centroid1, |
|
|
Eigen::Matrix< Scalar, 3, 1 > |
centroid2, |
|
|
Eigen::Ref< MatrixType > |
transform, |
|
|
Scalar & |
rms_, |
|
|
bool |
computeScale |
|
) |
| const |
|
protected |
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.
- Template Parameters
-
Coordinates | Struct with operator[](int i) ->i[0:2] |
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename InputRange1 , typename InputRange2 , template< typename > typename Sampler>
Scalar gr::MatchBase< PointType, _TransformVisitor, OptExts >::ComputeTransformation |
( |
const InputRange1 & |
P, |
|
|
const InputRange2 & |
Q, |
|
|
Eigen::Ref< MatrixType > |
transformation, |
|
|
const Sampler< PointType > & |
sampler, |
|
|
TransformVisitor & |
v |
|
) |
| |
|
inline |
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]). 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 PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
Read access to the sampled clouds used for the registration.
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
Read access to the sampled clouds used for the registration.
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename InputRange1 , typename InputRange2 , template< typename > class Sampler>
void gr::MatchBase< PointType, _TransformVisitor, OptExts >::init |
( |
const InputRange1 & |
P, |
|
|
const InputRange2 & |
Q, |
|
|
const Sampler< PointType > & |
sampler |
|
) |
| |
|
protected |
Initializes the internal state of the Base class.
- Parameters
-
P | The first input set. |
Q | The second input set. |
sampler | The sampler used to sample the input sets. |
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
virtual void gr::MatchBase< PointType, _TransformVisitor, OptExts >::Initialize |
( |
| ) |
|
|
inlineprotectedvirtual |
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<Utils::LogLevel level, typename... Args>
void gr::MatchBase< PointType, _TransformVisitor, OptExts >::Log |
( |
Args... |
args | ) |
const |
|
inlineprotected |
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
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.
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
bool gr::MatchBase< PointType, _TransformVisitor, OptExts >::SelectRandomTriangle |
( |
Scalar |
max_base_diameter, |
|
|
int & |
base1, |
|
|
int & |
base2, |
|
|
int & |
base3 |
|
) |
| |
|
protected |
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.
- Parameters
-
max_base_diameter | Maximum size allowed between two points of the base |
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
KdTree used to compute the LCP.
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
constexpr int gr::MatchBase< PointType, _TransformVisitor, OptExts >::kNumberOfDiameterTrials = 1000 |
|
staticprotected |
- Todo:
- Rationnalize use and name of this variable
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
Mean distance between points and their nearest neighbor in the set P. Used to normalize the "delta" which is given in terms of this distance.
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
std::mt19937 gr::MatchBase< PointType, _TransformVisitor, OptExts >::randomGenerator_ |
|
protected |
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
Sampled P (3D coordinates).
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
Sampled Q (3D coordinates).
template<typename PointType, typename _TransformVisitor = DummyTransformVisitor, template< class, class > class... OptExts>
Eigen::Matrix<Scalar, 4, 4> gr::MatchBase< PointType, _TransformVisitor, OptExts >::transform_ {Eigen::Matrix<Scalar, 4, 4>::Identity()} |
|
protected |
The transformation matrix by wich we transform Q to P.
The documentation for this class was generated from the following file:
- /home/travis/build/STORM-IRIT/OpenGR/src/gr/algorithms/matchBase.h