Point Cloud Library (PCL)  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Types | Public Member Functions
pcl::search::OrganizedNeighbor< PointT > Class Template Reference

OrganizedNeighbor is a class for optimized nearest neigbhor search in organized point clouds. More...

#include <pcl/search/organized.h>

Inheritance diagram for pcl::search::OrganizedNeighbor< PointT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::search::OrganizedNeighbor< PointT >:
Collaboration graph
[legend]

List of all members.

Classes

class  NearestNeighborCandidate
 NearestNeighborCandidate entry for the nearest neighbor candidate queue.
class  RadiusSearchLoopkupEntry
 RadiusSearchLoopkupEntry entry for radius search lookup vector.

Public Types

typedef pcl::PointCloud< PointT > PointCloud
typedef boost::shared_ptr
< PointCloud
PointCloudPtr
typedef boost::shared_ptr
< const PointCloud
PointCloudConstPtr
typedef boost::shared_ptr
< const std::vector< int > > 
IndicesConstPtr
typedef boost::shared_ptr
< pcl::search::OrganizedNeighbor
< PointT > > 
Ptr
typedef boost::shared_ptr
< const
pcl::search::OrganizedNeighbor
< PointT > > 
ConstPtr
typedef boost::shared_ptr
< std::vector< int > > 
IndicesPtr

Public Member Functions

 OrganizedNeighbor ()
 OrganizedNeighbor constructor.
 ~OrganizedNeighbor ()
 Empty deconstructor.
void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input data set, if user has focal length he must set it before calling this.
void setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices)
 Provide a pointer to the input data set, if user has focal length he must set it before calling this.
PointCloudConstPtr getInputCloud ()
 Get a pointer to the input dataset as passed by the user.
IndicesConstPtr const getIndices ()
 Get a pointer to the Indices.
void setPrecision (int precision)
 Set which of the two available nearest neighbor estimation methods should be used (approximate = 0 or exact = 1).
int getPrecision ()
 Obtain which of the nearest neighbor method is being used.
void setOneOverFocalLength (double oneOverFocalLength)
 Set the focal length, this should be done before calling set InputCloud.
double getOneOverFocalLength ()
 Get the 1/focallength, can be the set or calculated one.
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.
void setSearchWindow (int horizontal, int vertical)
 set the search window (horizontal, vertical) in pixels.
void setSearchWindowAsK (int k)
 Estimate the search window (horizontal, vertical) in pixels in order to get up to k-neighbors.
int getHorizontalSearchWindow () const
 Get the horizontal search window in pixels.
int getVerticalSearchWindow () const
 Get the vertical search window in pixels.
int radiusSearch (const PointCloud &cloud, int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=std::numeric_limits< int >::max())
 Search for all the nearest neighbors of the query point in a given radius.
int radiusSearch (const PointCloudConstPtr &cloud, int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=std::numeric_limits< int >::max())
 Search for all neighbors of query point that are within a given radius.
int radiusSearch (int index, const double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=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, const double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=std::numeric_limits< int >::max()) const
 Search for all neighbors of query point that are within a given radius.
double estimateFocalLengthFromInputCloud (const pcl::PointCloud< PointT > &cloud)
 Estimate the focal length parameter that was used during point cloud generation.
int exactNearestKSearch (const PointT &p_q, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for a given query point.
int exactNearestKSearch (int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for the given query point (zero-copy).
int exactNearestKSearch (const pcl::PointCloud< PointT > &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for a given query point.
int nearestKSearch (const PointT &p_q, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for a given query point.
int nearestKSearch (int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for the given query point (zero-copy).
int nearestKSearch (const pcl::PointCloud< PointT > &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for a given query point.
virtual void setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices)
 Pass the input dataset that the search will be performed on.
virtual void setInputCloud (const PointCloudConstPtr &cloud)=0
 Pass the input dataset that the search will be performed on.
virtual int nearestKSearch (const PointCloud &cloud, int index, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)=0
 Search for the k-nearest neighbors for the given query point.
virtual void nearestKSearch (const PointCloud &cloud, const std::vector< int > &indices, int k, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances)
 Search for the k-nearest neighbors for the given query point.
template<typename PointTDiff >
int nearestKSearchT (const PointTDiff &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances)
 Search for the k-nearest neighbors for the given query point.
template<typename PointTDiff >
void nearestKSearchT (const pcl::PointCloud< PointTDiff > &cloud, const std::vector< int > &indices, int k, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances)
 Search for the k-nearest neighbors for the given query point.
virtual void radiusSearch (const PointCloud &cloud, const std::vector< int > &indices, double radius, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances, int max_nn=-1)
 Search for all the nearest neighbors of the query point in a given radius.
template<typename PointTDiff >
int radiusSearchT (const PointTDiff &point, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, int max_nn=-1)
 Search for all the nearest neighbors of the query point in a given radius.
template<typename PointTDiff >
void radiusSearchT (const pcl::PointCloud< PointTDiff > &cloud, const std::vector< int > &indices, double radius, std::vector< std::vector< int > > &k_indices, std::vector< std::vector< float > > &k_sqr_distances, int max_nn=-1)
 Search for all the nearest neighbors of the query points in a given radius.

Detailed Description

template<typename PointT>
class pcl::search::OrganizedNeighbor< PointT >

OrganizedNeighbor is a class for optimized nearest neigbhor search in organized point clouds.

The current API implements two different methods in the same corpus:

You can switch between the two methods using setPrecision (true/false). By default the class uses the faster approximate method.

Author:
Radu B. Rusu, Julius Kammerl, Suat Gedikli, Koen Buys

Definition at line 68 of file organized.h.


Member Typedef Documentation

template<typename PointT >
typedef boost::shared_ptr<const pcl::search::OrganizedNeighbor<PointT> > pcl::search::OrganizedNeighbor< PointT >::ConstPtr

Reimplemented from pcl::search::Search< PointT >.

Definition at line 80 of file organized.h.

template<typename PointT >
typedef boost::shared_ptr<const std::vector<int> > pcl::search::OrganizedNeighbor< PointT >::IndicesConstPtr

Reimplemented from pcl::search::Search< PointT >.

Definition at line 77 of file organized.h.

template<typename PointT>
typedef boost::shared_ptr<std::vector<int> > pcl::search::Search< PointT >::IndicesPtr [inherited]
template<typename PointT >
typedef pcl::PointCloud<PointT> pcl::search::OrganizedNeighbor< PointT >::PointCloud

Reimplemented from pcl::search::Search< PointT >.

Definition at line 73 of file organized.h.

template<typename PointT >
typedef boost::shared_ptr<const PointCloud> pcl::search::OrganizedNeighbor< PointT >::PointCloudConstPtr

Reimplemented from pcl::search::Search< PointT >.

Definition at line 76 of file organized.h.

template<typename PointT >
typedef boost::shared_ptr<PointCloud> pcl::search::OrganizedNeighbor< PointT >::PointCloudPtr

Reimplemented from pcl::search::Search< PointT >.

Definition at line 74 of file organized.h.

template<typename PointT >
typedef boost::shared_ptr<pcl::search::OrganizedNeighbor<PointT> > pcl::search::OrganizedNeighbor< PointT >::Ptr

Reimplemented from pcl::search::Search< PointT >.

Definition at line 79 of file organized.h.


Constructor & Destructor Documentation

template<typename PointT >
pcl::search::OrganizedNeighbor< PointT >::OrganizedNeighbor ( ) [inline]

OrganizedNeighbor constructor.

Definition at line 83 of file organized.h.

template<typename PointT >
pcl::search::OrganizedNeighbor< PointT >::~OrganizedNeighbor ( ) [inline]

Empty deconstructor.

Definition at line 96 of file organized.h.


Member Function Documentation

template<typename PointT >
double pcl::search::OrganizedNeighbor< PointT >::estimateFocalLengthFromInputCloud ( const pcl::PointCloud< PointT > &  cloud)

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

Parameters:
[in]cloudthe input point cloud dataset
Returns:
oneOverFocalLength

Definition at line 312 of file organized.hpp.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::exactNearestKSearch ( const PointT &  p_q,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
)

Search for the k-nearest neighbors for a given query point.

Parameters:
[in]p_qthe given query point
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_sqr_distances
Note:
this function does not return distances
Returns:
number of neighbors found

Definition at line 159 of file organized.hpp.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::exactNearestKSearch ( int  index,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
) [inline]

Search for the k-nearest neighbors for the given query point (zero-copy).

Parameters:
[in]indexthe index representing the query point in the dataset given by setInputCloud
[in]kthe number of neighbors to search for
[out]k_indicesthe resultant point indices
[out]k_sqr_distancesthe resultant point neighbor distances
Returns:
number of neighbors found

Definition at line 131 of file organized.hpp.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::exactNearestKSearch ( const pcl::PointCloud< PointT > &  cloud,
int  index,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
) [inline]

Search for the k-nearest neighbors for a given query point.

Parameters:
[in]cloudthe point cloud data
[in]indexthe index in cloud representing the query point
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_sqr_distances
Note:
this function does not return distances
Returns:
number of neighbors found
template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::getHorizontalSearchWindow ( ) const [inline]

Get the horizontal search window in pixels.

Definition at line 213 of file organized.h.

template<typename PointT >
IndicesConstPtr const pcl::search::OrganizedNeighbor< PointT >::getIndices ( ) [inline, virtual]

Get a pointer to the Indices.

Returns:
the boost shared pointer to the indices list

Reimplemented from pcl::search::Search< PointT >.

Definition at line 157 of file organized.h.

template<typename PointT >
PointCloudConstPtr pcl::search::OrganizedNeighbor< PointT >::getInputCloud ( ) [inline, virtual]

Get a pointer to the input dataset as passed by the user.

Returns:
the const boost shared pointer to a pointcloud

Implements pcl::search::Search< PointT >.

Definition at line 151 of file organized.h.

template<typename PointT >
double pcl::search::OrganizedNeighbor< PointT >::getMaxDistance ( ) const [inline]

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

Definition at line 186 of file organized.h.

template<typename PointT >
double pcl::search::OrganizedNeighbor< PointT >::getOneOverFocalLength ( ) [inline]

Get the 1/focallength, can be the set or calculated one.

Definition at line 182 of file organized.h.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::getPrecision ( ) [inline]

Obtain which of the nearest neighbor method is being used.

Definition at line 168 of file organized.h.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::getVerticalSearchWindow ( ) const [inline]

Get the vertical search window in pixels.

Definition at line 217 of file organized.h.

template<typename PointT>
virtual int pcl::search::Search< PointT >::nearestKSearch ( const PointCloud cloud,
int  index,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
) [pure virtual, inherited]

Search for the k-nearest neighbors for the given query point.

Parameters:
[in]cloudthe point cloud data
[in]indexthe index in cloud representing the query point
[in]kthe number of neighbors to search for
[out]k_indicesthe resultant indices of the neighboring points (must be resized to k a priori!)
[out]k_sqr_distancesthe resultant squared distances to the neighboring points (must be resized to k a priori!)
Returns:
number of neighbors found

Implemented in pcl::search::KdTree< PointT >, pcl::search::AutotunedSearch< PointT >, pcl::search::Octree< PointT, LeafTWrap, OctreeT >, and pcl::search::BruteForce< PointT >.

template<typename PointT>
virtual void pcl::search::Search< PointT >::nearestKSearch ( const PointCloud cloud,
const std::vector< int > &  indices,
int  k,
std::vector< std::vector< int > > &  k_indices,
std::vector< std::vector< float > > &  k_sqr_distances 
) [inline, virtual, inherited]

Search for the k-nearest neighbors for the given query point.

Parameters:
[in]cloudthe point cloud data
[in]indicesa vector of point cloud indices to query for nearest neighbors
[in]kthe number of neighbors to search for
[out]k_indicesthe resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i
[out]k_sqr_distancesthe resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i

Definition at line 184 of file search.h.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::nearestKSearch ( const PointT &  p_q,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
) [inline, virtual]

Search for the k-nearest neighbors for a given query point.

Note:
limiting the maximum search radius (with setMaxDistance) can lead to a significant improvement in search speed
Parameters:
[in]p_qthe given query point (setInputCloud must be given a-priori!)
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_sqr_distances
Note:
this function does not return distances
Returns:
number of neighbors found

Implements pcl::search::Search< PointT >.

Definition at line 346 of file organized.h.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::nearestKSearch ( int  index,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
) [virtual]

Search for the k-nearest neighbors for the given query point (zero-copy).

Note:
limiting the maximum search radius (with setMaxDistance) can lead to a significant improvement in search speed
Parameters:
[in]indexthe index representing the query point in the dataset (setInputCloud must be given a-priori!)
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_sqr_distances
Note:
this function does not return distances
Returns:
number of neighbors found

Implements pcl::search::Search< PointT >.

Definition at line 170 of file organized.hpp.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::nearestKSearch ( const pcl::PointCloud< PointT > &  cloud,
int  index,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
)

Search for the k-nearest neighbors for a given query point.

Note:
limiting the maximum search radius (with setMaxDistance) can lead to a significant improvement in search speed
Parameters:
[in]cloudthe point cloud data
[in]indexthe index in cloud representing the query point
[in]kthe number of neighbors to search for (used only if horizontal and vertical window not given already!)
[out]k_indicesthe resultant point indices (must be resized to k beforehand!)
[out]k_sqr_distances
Note:
this function does not return distances
Returns:
number of neighbors found

Definition at line 142 of file organized.hpp.

template<typename PointT>
template<typename PointTDiff >
int pcl::search::Search< PointT >::nearestKSearchT ( const PointTDiff &  point,
int  k,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances 
) [inline, inherited]

Search for the k-nearest neighbors for the given query point.

Use this method if the query points are of a different type than the points in the data set (e.g. PointXYZRGB instead of PointXYZ).

Parameters:
[in]pointthe given query point
[in]kthe number of neighbors to search for
[out]k_indicesthe resultant indices of the neighboring points (must be resized to k a priori!)
[out]k_sqr_distancesthe resultant squared distances to the neighboring points (must be resized to k a priori!)
Returns:
number of neighbors found

Definition at line 138 of file search.h.

template<typename PointT>
template<typename PointTDiff >
void pcl::search::Search< PointT >::nearestKSearchT ( const pcl::PointCloud< PointTDiff > &  cloud,
const std::vector< int > &  indices,
int  k,
std::vector< std::vector< int > > &  k_indices,
std::vector< std::vector< float > > &  k_sqr_distances 
) [inline, inherited]

Search for the k-nearest neighbors for the given query point.

Use this method if the query points are of a different type than the points in the data set (e.g. PointXYZRGB instead of PointXYZ).

Parameters:
[in]cloudthe point cloud data
[in]indicesa vector of point cloud indices to query for nearest neighbors
[in]kthe number of neighbors to search for
[out]k_indicesthe resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i
[out]k_sqr_distancesthe resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i
Note:
This method copies the input point cloud of type PointTDiff to a temporary cloud of type PointT and performs the batch search on the new cloud. You should prefer the single-point search if you don't use a search algorithm that accelerates batch NN search.

Definition at line 212 of file search.h.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::radiusSearch ( const PointCloud cloud,
int  index,
double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances,
int  max_nn = std::numeric_limits<int>::max () 
) [inline, virtual]

Search for all the nearest neighbors of the query point in a given radius.

Parameters:
[in]cloudthe point cloud data
[in]indexthe index in cloud representing the query point
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points
[out]k_sqr_distancesthe resultant squared distances to the neighboring points
[in]max_nnif given, bounds the maximum returned neighbors to this value
Returns:
number of neighbors found in radius

Implements pcl::search::Search< PointT >.

Definition at line 229 of file organized.h.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::radiusSearch ( const PointCloudConstPtr cloud,
int  index,
double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances,
int  max_nn = std::numeric_limits<int>::max () 
)

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

Parameters:
[in]cloudthe point cloud data
[in]indexthe index in cloud representing the query point
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points
[out]k_sqr_distancesthe resultant squared distances to the neighboring points
[in]max_nnif given, bounds the maximum returned neighbors to this value
Returns:
number of neighbors found in radius

Definition at line 47 of file organized.hpp.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::radiusSearch ( int  index,
const double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances,
int  max_nn = std::numeric_limits<int>::max () 
) const [virtual]

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

Parameters:
[in]indexindex 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
[in]radiusradius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points
[out]k_sqr_distancesthe resultant squared distances to the neighboring points
[in]max_nnif given, bounds the maximum returned neighbors to this value
Returns:
number of neighbors found in radius

Implements pcl::search::Search< PointT >.

Definition at line 60 of file organized.hpp.

template<typename PointT >
int pcl::search::OrganizedNeighbor< PointT >::radiusSearch ( const PointT &  p_q,
const double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances,
int  max_nn = std::numeric_limits<int>::max () 
) const [virtual]

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

Parameters:
[in]p_qthe given query point
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points
[out]k_sqr_distancesthe resultant squared distances to the neighboring points
[in]max_nnif given, bounds the maximum returned neighbors to this value
Returns:
number of neighbors found in radius

Implements pcl::search::Search< PointT >.

Definition at line 72 of file organized.hpp.

template<typename PointT>
virtual void pcl::search::Search< PointT >::radiusSearch ( const PointCloud cloud,
const std::vector< int > &  indices,
double  radius,
std::vector< std::vector< int > > &  k_indices,
std::vector< std::vector< float > > &  k_sqr_distances,
int  max_nn = -1 
) [inline, virtual, inherited]

Search for all the nearest neighbors of the query point in a given radius.

Parameters:
[in]cloudthe point cloud data
[in]indicesthe indices in cloud. If indices is empty, neighbors will be searched for all points.
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i
[out]k_sqr_distancesthe resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i
[in]max_nnif given, bounds the maximum returned neighbors to this value

Definition at line 312 of file search.h.

template<typename PointT>
template<typename PointTDiff >
int pcl::search::Search< PointT >::radiusSearchT ( const PointTDiff &  point,
double  radius,
std::vector< int > &  k_indices,
std::vector< float > &  k_sqr_distances,
int  max_nn = -1 
) [inline, inherited]

Search for all the nearest neighbors of the query point in a given radius.

Use this method if the query points are of a different type than the points in the data set (e.g. PointXYZRGB instead of PointXYZ).

Parameters:
[in]pointthe given query point
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points
[out]k_sqr_distancesthe resultant squared distances to the neighboring points
[in]max_nnif given, bounds the maximum returned neighbors to this value
Returns:
number of neighbors found in radius

Definition at line 264 of file search.h.

template<typename PointT>
template<typename PointTDiff >
void pcl::search::Search< PointT >::radiusSearchT ( const pcl::PointCloud< PointTDiff > &  cloud,
const std::vector< int > &  indices,
double  radius,
std::vector< std::vector< int > > &  k_indices,
std::vector< std::vector< float > > &  k_sqr_distances,
int  max_nn = -1 
) [inline, inherited]

Search for all the nearest neighbors of the query points in a given radius.

Parameters:
[in]cloudthe point cloud data
[in]indicesa vector of point cloud indices to query for nearest neighbors
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points, k_indices[i] corresponds to the neighbors of the query point i
[out]k_sqr_distancesthe resultant squared distances to the neighboring points, k_sqr_distances[i] corresponds to the neighbors of the query point i
[in]max_nnif given, bounds the maximum returned neighbors per query point to this value
Note:
This method copies the input point cloud of type PointTDiff to a temporary cloud of type PointT and performs the batch search on the new cloud. You should prefer the single-point search if you don't use a search algorithm that accelerates batch NN search.

Definition at line 342 of file search.h.

template<typename PointT>
virtual void pcl::search::Search< PointT >::setInputCloud ( const PointCloudConstPtr cloud,
const IndicesConstPtr indices 
) [inline, virtual, inherited]

Pass the input dataset that the search will be performed on.

Parameters:
[in]clouda const pointer to the PointCloud data
[in]indicesthe point indices subset that is to be used from the cloud

Reimplemented in pcl::search::KdTree< PointT >, and pcl::search::BruteForce< PointT >.

Definition at line 101 of file search.h.

template<typename PointT >
void pcl::search::OrganizedNeighbor< PointT >::setInputCloud ( const PointCloudConstPtr cloud) [inline]

Provide a pointer to the input data set, if user has focal length he must set it before calling this.

Parameters:
[in]cloudthe const boost shared pointer to a PointCloud message

Definition at line 102 of file organized.h.

template<typename PointT>
virtual void pcl::search::Search< PointT >::setInputCloud ( const PointCloudConstPtr cloud) [pure virtual, inherited]

Pass the input dataset that the search will be performed on.

Parameters:
[in]clouda const pointer to the PointCloud data

Implemented in pcl::search::KdTree< PointT >, and pcl::search::BruteForce< PointT >.

template<typename PointT >
void pcl::search::OrganizedNeighbor< PointT >::setInputCloud ( const PointCloudConstPtr cloud,
const IndicesConstPtr indices 
) [inline]

Provide a pointer to the input data set, if user has focal length he must set it before calling this.

Parameters:
[in]cloudthe const boost shared pointer to a PointCloud message
[in]indicesthe const boost shared pointer to PointIndices

Definition at line 127 of file organized.h.

template<typename PointT >
void pcl::search::OrganizedNeighbor< PointT >::setMaxDistance ( double  max_dist) [inline]

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

Parameters:
[in]max_distthe maximul allowed distance between the query point and its nearest neighbors

Definition at line 192 of file organized.h.

template<typename PointT >
void pcl::search::OrganizedNeighbor< PointT >::setOneOverFocalLength ( double  oneOverFocalLength) [inline]

Set the focal length, this should be done before calling set InputCloud.

Parameters:
[in]oneOverFocalLengththe focal length

Definition at line 174 of file organized.h.

template<typename PointT >
void pcl::search::OrganizedNeighbor< PointT >::setPrecision ( int  precision) [inline]

Set which of the two available nearest neighbor estimation methods should be used (approximate = 0 or exact = 1).

Parameters:
[in]precisionset to 0 for the faster, approximate nearest neighbor search method, 1 otherwise

Definition at line 164 of file organized.h.

template<typename PointT >
void pcl::search::OrganizedNeighbor< PointT >::setSearchWindow ( int  horizontal,
int  vertical 
) [inline]

set the search window (horizontal, vertical) in pixels.

Parameters:
[in]horizontalthe horizontal window in pixel
[in]verticalthe vertical window in pixel

Definition at line 199 of file organized.h.

template<typename PointT >
void pcl::search::OrganizedNeighbor< PointT >::setSearchWindowAsK ( int  k)

Estimate the search window (horizontal, vertical) in pixels in order to get up to k-neighbors.

Parameters:
[in]kthe number of neighbors requested

Definition at line 389 of file organized.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines