NDEVR
API Documentation
NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >

CorrespondenceEstimationBackprojection computes correspondences as points in the target cloud which have minimum More...

Public Member Functions

 NDEVRCorrespondenceEstimation ()
 Empty constructor.
virtual ~NDEVRCorrespondenceEstimation ()=default
 Empty destructor.
fltp04 calcDistance (uint04 a, uint04 b) const
 Calculate the weighted distance between two points, factoring in normal alignment.
void determineCorrespondencesBackProjection (uint04 offset, pcl::Correspondences &correspondences, fltp04 max_distance)
 Determine correspondences using back-projection along normals.
void determineCorrespondencesMinDistance (uint04 offset, pcl::Correspondences &correspondences, fltp04 max_distance)
 Determine correspondences using minimum distance search.
unsigned int getKSearch () const
 Get the number of nearest neighbours considered in the target point cloud for computing correspondences.
NormalsConstPtr getSourceNormals () const
 Get the normals of the source point cloud.
NormalsConstPtr getTargetNormals () const
 Get the normals of the target point cloud.
LineSegment< 3, fltp04lineSegment (uint04 index) const
 Returns a line segment along the normal at the given index, expanded by m_normal_expansion_factor.
MaxHeap< fltp04, uint04radiusKSearch (uint04 tgt_idx, fltp04 max_distance_squared, uint04 k=0) const
 Find k closest points within a maximum distance.
MaxHeap< fltp04, uint04radiusNormalKSearch (uint04 tgt_idx, fltp04 max_distance_squared, uint04 k=0) const
 Find k closest points using normal-expanded line segment search within a max distance.
bool radiusNormalSearch (uint04 tgt_idx, uint04 &index, fltp04 &k_sqr_distances) const
 Find the closest point in the tree using normal-expanded line segment search.
bool radiusSearch (uint04 tgt_idx, uint04 &index, fltp04 &k_sqr_distances) const
 Find the closest point in the tree to the target point.
bool requiresSourceNormals () const
 See if this rejector requires source normals.
bool requiresTargetNormals () const
 See if this rejector requires target normals.
void setInputTarget (PointCloudSourcePtr input)
 Set the input target point cloud.
void setKSearch (unsigned int k)
 Set the number of nearest neighbours to be considered in the target point cloud.
void setSourceNormals (const NormalsConstPtr &normals)
 Set the normals computed on the source point cloud.
void setSourceNormals (pcl::PCLPointCloud2::ConstPtr cloud2)
 Blob method for setting the source normals.
void setTargetNormals (const NormalsConstPtr &normals)
 Set the normals computed on the target point cloud.
void setTargetNormals (pcl::PCLPointCloud2::ConstPtr cloud2)
 Method for setting the target normals.
void setTree (const RTree< 3, fltp04 > *tree, const Buffer< Vertex< 3, fltp04 > > *params, const Buffer< Vertex< 3, fltp04 > > *tree_sorted_params)
 Set the spatial search tree and associated point data.
Vertex< 3, fltp04vertex (uint04 index) const
 Determine the correspondences between input and target cloud.

Detailed Description

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
class NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >

CorrespondenceEstimationBackprojection computes correspondences as points in the target cloud which have minimum

Author
Suat Gedikli

Definition at line 20 of file NDEVRCorrespondenceEstimation.h.

Constructor & Destructor Documentation

◆ NDEVRCorrespondenceEstimation()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::NDEVRCorrespondenceEstimation ( )
inline

Empty constructor.

Note
Sets the number of neighbors to be considered in the target point cloud (k_) to 10.

Definition at line 49 of file NDEVRCorrespondenceEstimation.h.

Member Function Documentation

◆ calcDistance()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
fltp04 NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::calcDistance ( uint04 a,
uint04 b ) const
inline

Calculate the weighted distance between two points, factoring in normal alignment.

Parameters
[in]aindex of the first point
[in]bindex of the second point
Returns
the weighted distance value

Definition at line 236 of file NDEVRCorrespondenceEstimation.h.

References vertex().

Referenced by determineCorrespondencesBackProjection().

◆ determineCorrespondencesBackProjection()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
void NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::determineCorrespondencesBackProjection ( uint04 offset,
pcl::Correspondences & correspondences,
fltp04 max_distance )
inline

Determine correspondences using back-projection along normals.

Parameters
[in]offsetthe starting index offset into the input cloud
[out]correspondencesthe found correspondences
[in]max_distancethe maximum allowed distance for a correspondence

Definition at line 280 of file NDEVRCorrespondenceEstimation.h.

References calcDistance(), radiusNormalKSearch(), and radiusNormalSearch().

◆ determineCorrespondencesMinDistance()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
void NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::determineCorrespondencesMinDistance ( uint04 offset,
pcl::Correspondences & correspondences,
fltp04 max_distance )
inline

Determine correspondences using minimum distance search.

Parameters
[in]offsetthe starting index offset into the input cloud
[out]correspondencesthe found correspondences
[in]max_distancethe maximum allowed distance for a correspondence

Definition at line 252 of file NDEVRCorrespondenceEstimation.h.

References radiusSearch().

◆ getKSearch()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
unsigned int NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::getKSearch ( ) const
inline

Get the number of nearest neighbours considered in the target point cloud for computing correspondences.

By default we use k = 10 nearest neighbors.

Definition at line 348 of file NDEVRCorrespondenceEstimation.h.

◆ lineSegment()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
LineSegment< 3, fltp04 > NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::lineSegment ( uint04 index) const
inline

Returns a line segment along the normal at the given index, expanded by m_normal_expansion_factor.

Parameters
[in]indexthe point index
Returns
the line segment along the normal direction

Definition at line 153 of file NDEVRCorrespondenceEstimation.h.

Referenced by radiusNormalKSearch(), and radiusNormalSearch().

◆ radiusKSearch()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
MaxHeap< fltp04, uint04 > NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::radiusKSearch ( uint04 tgt_idx,
fltp04 max_distance_squared,
uint04 k = 0 ) const
inline

Find k closest points within a maximum distance.

Parameters
[in]tgt_idxthe target point index
[in]max_distance_squaredthe maximum squared search distance
[in]kthe number of neighbors to find
Returns
a max-heap of (distance, index) pairs

Definition at line 201 of file NDEVRCorrespondenceEstimation.h.

References cast(), and vertex().

◆ radiusNormalKSearch()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
MaxHeap< fltp04, uint04 > NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::radiusNormalKSearch ( uint04 tgt_idx,
fltp04 max_distance_squared,
uint04 k = 0 ) const
inline

Find k closest points using normal-expanded line segment search within a max distance.

Parameters
[in]tgt_idxthe target point index
[in]max_distance_squaredthe maximum squared search distance
[in]kthe number of neighbors to find
Returns
a max-heap of (distance, index) pairs

Definition at line 219 of file NDEVRCorrespondenceEstimation.h.

References cast(), and lineSegment().

Referenced by determineCorrespondencesBackProjection().

◆ radiusNormalSearch()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
bool NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::radiusNormalSearch ( uint04 tgt_idx,
uint04 & index,
fltp04 & k_sqr_distances ) const
inline

Find the closest point in the tree using normal-expanded line segment search.

Parameters
[in]tgt_idxthe target point index
[out]indexthe found closest point index
[out]k_sqr_distancesthe squared distance to the closest point
Returns
true if a neighbor was found

Definition at line 186 of file NDEVRCorrespondenceEstimation.h.

References IsInvalid(), and lineSegment().

Referenced by determineCorrespondencesBackProjection().

◆ radiusSearch()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
bool NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::radiusSearch ( uint04 tgt_idx,
uint04 & index,
fltp04 & k_sqr_distances ) const
inline

Find the closest point in the tree to the target point.

Parameters
[in]tgt_idxthe target point index
[out]indexthe found closest point index
[out]k_sqr_distancesthe squared distance to the closest point
Returns
true if a neighbor was found

Definition at line 171 of file NDEVRCorrespondenceEstimation.h.

References IsInvalid(), and vertex().

Referenced by determineCorrespondencesMinDistance().

◆ setInputTarget()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
void NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::setInputTarget ( PointCloudSourcePtr input)
inline

Set the input target point cloud.

Parameters
[in]inputthe target point cloud

Definition at line 107 of file NDEVRCorrespondenceEstimation.h.

◆ setKSearch()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
void NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::setKSearch ( unsigned int k)
inline

Set the number of nearest neighbours to be considered in the target point cloud.

By default, we use k = 10 nearest neighbors.

Parameters
[in]kthe number of nearest neighbours to be considered

Definition at line 340 of file NDEVRCorrespondenceEstimation.h.

◆ setSourceNormals()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
void NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::setSourceNormals ( const NormalsConstPtr & normals)
inline

Set the normals computed on the source point cloud.

Parameters
[in]normalsthe normals computed for the source cloud

Definition at line 72 of file NDEVRCorrespondenceEstimation.h.

Referenced by setSourceNormals().

◆ setTargetNormals()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
void NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::setTargetNormals ( const NormalsConstPtr & normals)
inline

Set the normals computed on the target point cloud.

Parameters
[in]normalsthe normals computed for the target cloud

Definition at line 87 of file NDEVRCorrespondenceEstimation.h.

Referenced by setTargetNormals().

◆ setTree()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
void NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::setTree ( const RTree< 3, fltp04 > * tree,
const Buffer< Vertex< 3, fltp04 > > * params,
const Buffer< Vertex< 3, fltp04 > > * tree_sorted_params )
inline

Set the spatial search tree and associated point data.

Parameters
[in]treethe R-tree spatial index
[in]paramsthe point buffer
[in]tree_sorted_paramsthe pre-sorted point buffer for tree queries

Definition at line 63 of file NDEVRCorrespondenceEstimation.h.

◆ vertex()

template<typename PointSource, typename PointTarget, typename NormalT, typename Scalar = float>
Vertex< 3, fltp04 > NDEVRCorrespondenceEstimation< PointSource, PointTarget, NormalT, Scalar >::vertex ( uint04 index) const
inline

Determine the correspondences between input and target cloud.

Parameters
[out]correspondencesthe found correspondences (index of query point, index of target point, distance)
[in]max_distancemaximum distance between the normal on the source point cloud and the corresponding point in the target point cloud

Returns the 3D vertex at the given index in the input cloud.

Parameters
[in]indexthe point index
Returns
the 3D vertex

Definition at line 144 of file NDEVRCorrespondenceEstimation.h.

Referenced by calcDistance(), radiusKSearch(), and radiusSearch().


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