Loading...
Searching...
No Matches
pcl::OrganizedNeighborSearch< PointT > Class Template Reference

OrganizedNeighborSearch class More...

`#include </build/pcl-FTI9wM/pcl-1.15.1+dfsg/cuda/nn/organized_neighbor_search.h>`

## Classes

class | radiusSearchLoopkupEntry
| radiusSearchLoopkupEntry entry for radius search lookup vector More...
class | nearestNeighborCandidate
| nearestNeighborCandidate entry for the nearest neighbor candidate queue More...

## Public Types

using | PointCloud = pcl::PointCloud<PointT>
using | PointCloudPtr = typename PointCloud::Ptr
using | PointCloudConstPtr = typename PointCloud::ConstPtr

## Public Member Functions

| OrganizedNeighborSearch ()
| OrganizedNeighborSearch constructor.
virtual | ~OrganizedNeighborSearch ()=default
| Empty deconstructor.
void | setInputCloud (const PointCloudConstPtr &cloud_arg)
| Provide a pointer to the input data set.
int | radiusSearch (const PointCloudConstPtr &cloud_arg, int index_arg, double radius_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg, int max_nn_arg=std::numeric_limits< int >::max())
| Search for all neighbors of query point that are within a given radius.
int | radiusSearch (int index_arg, const double radius_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg, int max_nn_arg=std::numeric_limits< int >::max()) const
| Search for all neighbors of query point that are within a given radius.
int | radiusSearch (const PointT &p_q_arg, const double radius_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg, int max_nn_arg=std::numeric_limits< int >::max()) const
| Search for all neighbors of query point that are within a given radius.
int | nearestKSearch (const PointCloudConstPtr &cloud_arg, int index_arg, int k_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg)
| Search for k-nearest neighbors at the query point.
int | nearestKSearch (int index_arg, int k_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg)
| Search for k-nearest neighbors at query point.
int | nearestKSearch (const PointT &p_q_arg, int k_arg, std::vector< int > &k_indices_arg, std::vector< float > &k_sqr_distances_arg)
| Search for k-nearest neighbors at given query point.
double | getMaxDistance () const
| Get the maximum allowed distance between the query point and its nearest neighbors.
void | setMaxDistance (double max_dist)
| Set the maximum allowed distance between the query point and its nearest neighbors.

## Protected Member Functions

const PointT & | getPointByIndex (const unsigned int index_arg) const
| Get point at index from input pointcloud dataset.
void | generateRadiusLookupTable (unsigned int width, unsigned int height)
| Generate radius lookup table.
void | pointPlaneProjection (const PointT &point, int &xpos, int &ypos) const
void | getProjectedRadiusSearchBox (const PointT &point_arg, double squared_radius_arg, int &minX_arg, int &minY_arg, int &maxX_arg, int &maxY_arg) const
void | estimateFocalLengthFromInputCloud ()
| Estimate focal length parameter that was used during point cloud generation.
virtual std::string | getName () const
| Class getName method.

## Protected Attributes

PointCloudConstPtr | input_
| Pointer to input point cloud dataset.
double | max_distance_
| Maximum allowed distance between the query point and its k-neighbors.
double | focalLength_
| Global focal length parameter.
std::vector< radiusSearchLoopkupEntry > | radiusSearchLookup_
| Precalculated radius search lookup vector.
int | radiusLookupTableWidth_
int | radiusLookupTableHeight_

## Detailed Description

template<typename PointT>
class pcl::OrganizedNeighborSearch< PointT >

OrganizedNeighborSearch class

Note
  This class provides neighbor search routines for organized point clouds.
  typename: PointT: type of point used in pointcloud

Author
  Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 59 of file organized_neighbor_search.h.

## Member Typedef Documentation

## PointCloud

template<typename PointT>

using pcl::OrganizedNeighborSearch< PointT >::PointCloud = pcl::PointCloud<PointT>

Definition at line 80 of file organized_neighbor_search.h.

## PointCloudConstPtr

template<typename PointT>

using pcl::OrganizedNeighborSearch< PointT >::PointCloudConstPtr = typename PointCloud::ConstPtr

Definition at line 82 of file organized_neighbor_search.h.

## PointCloudPtr

template<typename PointT>

using pcl::OrganizedNeighborSearch< PointT >::PointCloudPtr = typename PointCloud::Ptr

Definition at line 81 of file organized_neighbor_search.h.

## Constructor & Destructor Documentation

## OrganizedNeighborSearch()

template<typename PointT>

pcl::OrganizedNeighborSearch< PointT >::OrganizedNeighborSearch | ( |  | ) |

inline

OrganizedNeighborSearch constructor.

Definition at line 66 of file organized_neighbor_search.h.

References focalLength_, max_distance_, radiusLookupTableHeight_, and radiusLookupTableWidth_.

## ~OrganizedNeighborSearch()

template<typename PointT>

virtual pcl::OrganizedNeighborSearch< PointT >::~OrganizedNeighborSearch | ( |  | ) |

virtual default

Empty deconstructor.

## Member Function Documentation

## estimateFocalLengthFromInputCloud()

template<typename PointT>

void pcl::OrganizedNeighborSearch< PointT >::estimateFocalLengthFromInputCloud | ( |  | ) |

protected

Estimate focal length parameter that was used during point cloud generation.

Definition at line 337 of file organized_neighbor_search.hpp.

References focalLength_, and input_.

Referenced by setInputCloud().

## generateRadiusLookupTable()

template<typename PointT>

void pcl::OrganizedNeighborSearch< PointT >::generateRadiusLookupTable | ( | unsigned int | width,
|  | unsigned int | height )

protected

Generate radius lookup table.

It is used to subsequentially iterate over points which are close to the search point

Parameters

  width | of organized point cloud
  height | of organized point cloud

Definition at line 366 of file organized_neighbor_search.hpp.

References radiusLookupTableHeight_, radiusLookupTableWidth_, and radiusSearchLookup_.

Referenced by setInputCloud().

## getMaxDistance()

template<typename PointT>

double pcl::OrganizedNeighborSearch< PointT >::getMaxDistance | ( |  | ) | const

inline

Get the maximum allowed distance between the query point and its nearest neighbors.

Definition at line 179 of file organized_neighbor_search.h.

References max_distance_.

## getName()

template<typename PointT>

virtual std::string pcl::OrganizedNeighborSearch< PointT >::getName | ( |  | ) | const

inline protected virtual

Class getName method.

Definition at line 302 of file organized_neighbor_search.h.

Referenced by nearestKSearch(), and radiusSearch().

## getPointByIndex()

template<typename PointT>

const PointT & pcl::OrganizedNeighborSearch< PointT >::getPointByIndex | ( | const unsigned int | index_arg | ) | const

protected

Get point at index from input pointcloud dataset.

Parameters

  index_arg | index representing the point in the dataset given by setInputCloud

Returns
  PointT from input pointcloud dataset

Definition at line 392 of file organized_neighbor_search.hpp.

References input_.

Referenced by nearestKSearch(), and radiusSearch().

## getProjectedRadiusSearchBox()

template<typename PointT>

void pcl::OrganizedNeighborSearch< PointT >::getProjectedRadiusSearchBox | ( | const PointT & | point_arg,
|  | double | squared_radius_arg,
|  | int & | minX_arg,
|  | int & | minY_arg,
|  | int & | maxX_arg,
|  | int & | maxY_arg ) const

protected

Definition at line 91 of file organized_neighbor_search.hpp.

References focalLength_, and input_.

Referenced by nearestKSearch(), and radiusSearch().

## nearestKSearch() [1/3]

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::nearestKSearch | ( | const PointCloudConstPtr & | cloud_arg,
|  | int | index_arg,
|  | int | k_arg,
|  | std::vector< int > & | k_indices_arg,
|  | std::vector< float > & | k_sqr_distances_arg )

Search for k-nearest neighbors at the query point.

Parameters

  cloud_arg | the point cloud data
  index_arg | the index in cloud representing the query point
  k_arg | the number of neighbors to search for
  k_indices_arg | the resultant indices of the neighboring points (must be resized to k a priori!)
  k_sqr_distances_arg | the resultant squared distances to the neighboring points (must be resized to k a priori!)

Returns
  number of neighbors found

Definition at line 149 of file organized_neighbor_search.hpp.

References nearestKSearch(), and setInputCloud().

Referenced by nearestKSearch(), and nearestKSearch().

## nearestKSearch() [2/3]

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::nearestKSearch | ( | const PointT & | p_q_arg,
|  | int | k_arg,
|  | std::vector< int > & | k_indices_arg,
|  | std::vector< float > & | k_sqr_distances_arg )

Search for k-nearest neighbors at given query point.

Parameters

  p_q_arg | the given query point
  k_arg | the number of neighbors to search for
  k_indices_arg | the resultant indices of the neighboring points (must be resized to k a priori!)
  k_sqr_distances_arg | the resultant squared distances to the neighboring points (must be resized to k a priori!)

Returns
  number of neighbors found

Definition at line 161 of file organized_neighbor_search.hpp.

References getName(), getProjectedRadiusSearchBox(), pcl::OrganizedNeighborSearch< PointT >::nearestNeighborCandidate::index_, input_, max_distance_, pointPlaneProjection(), radiusSearchLookup_, and pcl::OrganizedNeighborSearch< PointT >::nearestNeighborCandidate::squared_distance_.

## nearestKSearch() [3/3]

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::nearestKSearch | ( | int | index_arg,
|  | int | k_arg,
|  | std::vector< int > & | k_indices_arg,
|  | std::vector< float > & | k_sqr_distances_arg )

Search for k-nearest neighbors at query point.

Parameters

  index_arg | index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector.
  k_arg | the number of neighbors to search for
  k_indices_arg | the resultant indices of the neighboring points (must be resized to k a priori!)
  k_sqr_distances_arg | the resultant squared distances to the neighboring points (must be resized to k a priori!)

Returns
  number of neighbors found

Definition at line 137 of file organized_neighbor_search.hpp.

References getPointByIndex(), and nearestKSearch().

## pointPlaneProjection()

template<typename PointT>

void pcl::OrganizedNeighborSearch< PointT >::pointPlaneProjection | ( | const PointT & | point,
|  | int & | xpos,
|  | int & | ypos ) const

inline protected

Definition at line 284 of file organized_neighbor_search.h.

References focalLength_, and pcl_round().

Referenced by nearestKSearch().

## radiusSearch() [1/3]

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::radiusSearch | ( | const PointCloudConstPtr & | cloud_arg,
|  | int | index_arg,
|  | double | radius_arg,
|  | std::vector< int > & | k_indices_arg,
|  | std::vector< float > & | k_sqr_distances_arg,
|  | int | max_nn_arg = std::numeric_limits<int>::max() )

Search for all neighbors of query point that are within a given radius.

Parameters

  cloud_arg | the point cloud data
  index_arg | the index in cloud representing the query point
  radius_arg | the radius of the sphere bounding all of p_q's neighbors
  k_indices_arg | the resultant indices of the neighboring points
  k_sqr_distances_arg | the resultant squared distances to the neighboring points
  max_nn_arg | if given, bounds the maximum returned neighbors to this value

Returns
  number of neighbors found in radius

Definition at line 14 of file organized_neighbor_search.hpp.

References radiusSearch(), and setInputCloud().

Referenced by radiusSearch(), and radiusSearch().

## radiusSearch() [2/3]

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::radiusSearch | ( | const PointT & | p_q_arg,
|  | const double | radius_arg,
|  | std::vector< int > & | k_indices_arg,
|  | std::vector< float > & | k_sqr_distances_arg,
|  | int | max_nn_arg = std::numeric_limits<int>::max() ) const

Search for all neighbors of query point that are within a given radius.

Parameters

  p_q_arg | the given query point
  radius_arg | the radius of the sphere bounding all of p_q's neighbors
  k_indices_arg | the resultant indices of the neighboring points
  k_sqr_distances_arg | the resultant squared distances to the neighboring points
  max_nn_arg | if given, bounds the maximum returned neighbors to this value

Returns
  number of neighbors found in radius

Definition at line 40 of file organized_neighbor_search.hpp.

References getName(), getProjectedRadiusSearchBox(), and input_.

## radiusSearch() [3/3]

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::radiusSearch | ( | int | index_arg,
|  | const double | radius_arg,
|  | std::vector< int > & | k_indices_arg,
|  | std::vector< float > & | k_sqr_distances_arg,
|  | int | max_nn_arg = std::numeric_limits<int>::max() ) const

Search for all neighbors of query point that are within a given radius.

Parameters

  index_arg | index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector
  radius_arg | radius of the sphere bounding all of p_q's neighbors
  k_indices_arg | the resultant indices of the neighboring points
  k_sqr_distances_arg | the resultant squared distances to the neighboring points
  max_nn_arg | if given, bounds the maximum returned neighbors to this value

Returns
  number of neighbors found in radius

Definition at line 26 of file organized_neighbor_search.hpp.

References getPointByIndex(), and radiusSearch().

## setInputCloud()

template<typename PointT>

void pcl::OrganizedNeighborSearch< PointT >::setInputCloud | ( | const PointCloudConstPtr & | cloud_arg | ) |

inline

Provide a pointer to the input data set.

Parameters

  cloud_arg | the const boost shared pointer to a PointCloud message

Definition at line 89 of file organized_neighbor_search.h.

References estimateFocalLengthFromInputCloud(), generateRadiusLookupTable(), and input_.

Referenced by nearestKSearch(), and radiusSearch().

## setMaxDistance()

template<typename PointT>

void pcl::OrganizedNeighborSearch< PointT >::setMaxDistance | ( | double | max_dist | ) |

inline

Set the maximum allowed distance between the query point and its nearest neighbors.

Definition at line 186 of file organized_neighbor_search.h.

References max_distance_.

## Member Data Documentation

## focalLength_

template<typename PointT>

double pcl::OrganizedNeighborSearch< PointT >::focalLength_

protected

Global focal length parameter.

Definition at line 318 of file organized_neighbor_search.h.

Referenced by estimateFocalLengthFromInputCloud(), getProjectedRadiusSearchBox(), OrganizedNeighborSearch(), and pointPlaneProjection().

## input_

template<typename PointT>

PointCloudConstPtr pcl::OrganizedNeighborSearch< PointT >::input_

protected

Pointer to input point cloud dataset.

Definition at line 312 of file organized_neighbor_search.h.

Referenced by estimateFocalLengthFromInputCloud(), getPointByIndex(), getProjectedRadiusSearchBox(), nearestKSearch(), radiusSearch(), and setInputCloud().

## max_distance_

template<typename PointT>

double pcl::OrganizedNeighborSearch< PointT >::max_distance_

protected

Maximum allowed distance between the query point and its k-neighbors.

Definition at line 315 of file organized_neighbor_search.h.

Referenced by getMaxDistance(), nearestKSearch(), OrganizedNeighborSearch(), and setMaxDistance().

## radiusLookupTableHeight_

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::radiusLookupTableHeight_

protected

Definition at line 323 of file organized_neighbor_search.h.

Referenced by generateRadiusLookupTable(), and OrganizedNeighborSearch().

## radiusLookupTableWidth_

template<typename PointT>

int pcl::OrganizedNeighborSearch< PointT >::radiusLookupTableWidth_

protected

Definition at line 322 of file organized_neighbor_search.h.

Referenced by generateRadiusLookupTable(), and OrganizedNeighborSearch().

## radiusSearchLookup_

template<typename PointT>

std::vector<radiusSearchLoopkupEntry> pcl::OrganizedNeighborSearch< PointT >::radiusSearchLookup_

protected

Precalculated radius search lookup vector.

Definition at line 321 of file organized_neighbor_search.h.

Referenced by generateRadiusLookupTable(), and nearestKSearch().

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

- /build/pcl-FTI9wM/pcl-1.15.1+dfsg/cuda/nn/organized_neighbor_search.h
- /build/pcl-FTI9wM/pcl-1.15.1+dfsg/cuda/nn/organized_neighbor_search.hpp