Point Cloud Library (PCL)
1.3.1
|
OrgfanizedNeighbor is a class for optimized nearest neigbhor search in organized point clouds. More...
#include </builddir/build/BUILD/PCL-1.3.1-Source/search/include/pcl/search/organized.h>
Public Types | |
typedef boost::shared_ptr < pcl::search::Search< PointT > > | Ptr |
typedef boost::shared_ptr < const pcl::search::Search < 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. | |
PointCloudConstPtr | getInputCloud () |
Get a pointer to the input dataset as passed by the user. | |
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 | 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_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_distances) |
Search for the k-nearest neighbors for a given query point. | |
int | radiusSearch (const pcl::PointCloud< PointT > &cloud, int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=INT_MAX) |
Approximate search for neighbors around the given query point within radius. | |
int | radiusSearch (int index, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=INT_MAX) const |
Approximate search for neighbors around the given query point within radius. | |
int | radiusSearch (const PointT &p_q, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=INT_MAX) const |
Approximate search for neighbors around the given query point within radius. | |
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 IndicesConstPtr const | getIndices () |
Get a pointer to the vector of indices used. | |
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. | |
int | radiusSearchT (const PointTDiff &point, double radius, std::vector< int > &k_indices, std::vector< float > &k_distances, int max_nn=-1) |
Search for all the nearest neighbors of the query point in a given radius. |
OrgfanizedNeighbor is a class for optimized nearest neigbhor search in organized point clouds.
typedef boost::shared_ptr<const pcl::search::Search<PointT> > pcl::search::Search::ConstPtr [inherited] |
Reimplemented in pcl::search::Octree, and pcl::search::KdTree.
typedef boost::shared_ptr<std::vector<int> > pcl::search::Search::IndicesPtr [inherited] |
Reimplemented in pcl::search::AutotunedSearch, and pcl::search::Octree.
typedef boost::shared_ptr<pcl::search::Search<PointT> > pcl::search::Search::Ptr [inherited] |
Reimplemented in pcl::search::Octree, and pcl::search::KdTree.
pcl::search::OrganizedNeighbor::OrganizedNeighbor | ( | ) | [inline] |
OrganizedNeighbor constructor.
Definition at line 72 of file organized.h.
pcl::search::OrganizedNeighbor::~OrganizedNeighbor | ( | ) | [inline] |
Empty deconstructor.
Definition at line 80 of file organized.h.
int pcl::search::OrganizedNeighbor::getHorizontalSearchWindow | ( | ) | const [inline] |
Get the horizontal search window in pixels.
Definition at line 134 of file organized.h.
virtual IndicesConstPtr const pcl::search::Search::getIndices | ( | ) | [inline, virtual, inherited] |
Get a pointer to the vector of indices used.
Reimplemented in pcl::search::KdTree, pcl::search::Octree, and pcl::search::AutotunedSearch.
PointCloudConstPtr pcl::search::OrganizedNeighbor::getInputCloud | ( | ) | [inline, virtual] |
Get a pointer to the input dataset as passed by the user.
Implements pcl::search::Search< PointT >.
Definition at line 96 of file organized.h.
double pcl::search::OrganizedNeighbor::getMaxDistance | ( | ) | const [inline] |
Get the maximum allowed distance between the query point and its nearest neighbors.
Definition at line 103 of file organized.h.
int pcl::search::OrganizedNeighbor::getVerticalSearchWindow | ( | ) | const [inline] |
Get the vertical search window in pixels.
Definition at line 141 of file organized.h.
int pcl::search::OrganizedNeighbor::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.
[in] | p_q | the given query point (setInputCloud must be given a-priori!) |
[in] | k | the number of neighbors to search for (used only if horizontal and vertical window not given already!) |
[out] | k_indices | the resultant point indices (must be resized to k beforehand!) |
[out] | k_distances |
Implements pcl::search::Search< PointT >.
Definition at line 155 of file organized.h.
int pcl::search::OrganizedNeighbor::nearestKSearch | ( | int | index, |
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances | ||
) | [virtual] |
Search for the k-nearest neighbors for the given query point (zero-copy).
[in] | index | the index representing the query point in the dataset (setInputCloud must be given a-priori!) |
[in] | k | the number of neighbors to search for (used only if horizontal and vertical window not given already!) |
[out] | k_indices | the resultant point indices (must be resized to k beforehand!) |
[out] | k_distances |
Implements pcl::search::Search< PointT >.
Definition at line 210 of file organized.hpp.
int pcl::search::OrganizedNeighbor::nearestKSearch | ( | const pcl::PointCloud< PointT > & | cloud, |
int | index, | ||
int | k, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances | ||
) | [virtual] |
Search for the k-nearest neighbors for a given query point.
[in] | cloud | the point cloud data |
[in] | index | the index in cloud representing the query point |
[in] | k | the number of neighbors to search for (used only if horizontal and vertical window not given already!) |
[out] | k_indices | the resultant point indices (must be resized to k beforehand!) |
[out] | k_distances |
Implements pcl::search::Search< PointT >.
Definition at line 277 of file organized.hpp.
int pcl::search::Search::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.
[in] | point | the given query point |
[in] | k | the number of neighbors to search for |
[out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
[out] | k_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
int pcl::search::OrganizedNeighbor::radiusSearch | ( | const pcl::PointCloud< PointT > & | cloud, |
int | index, | ||
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = INT_MAX |
||
) | [virtual] |
Approximate search for neighbors around the given query point within radius.
[in] | cloud | the point cloud data. |
[in] | index | the index in cloud representing the query point. |
[in] | radius | the maximum distance to search for neighbors in. |
[out] | k_indices | the resultant point indices |
[out] | k_distances | the resultant !squared! point distances |
[in] | max_nn | maximum number of points to return |
Implements pcl::search::Search< PointT >.
Definition at line 47 of file organized.hpp.
int pcl::search::OrganizedNeighbor::radiusSearch | ( | int | index, |
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = INT_MAX |
||
) | const [virtual] |
Approximate search for neighbors around the given query point within radius.
[in] | index | the index representing the query point in the dataset (setInputCloud must be given a-priori!) |
[in] | radius | the maximum distance to search for neighbors in. |
[out] | k_indices | the resultant point indices |
[out] | k_distances | the resultant !squared! point distances |
[in] | max_nn | maximum number of points to return |
Implements pcl::search::Search< PointT >.
Definition at line 125 of file organized.hpp.
int pcl::search::OrganizedNeighbor::radiusSearch | ( | const PointT & | p_q, |
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = INT_MAX |
||
) | const [inline, virtual] |
Approximate search for neighbors around the given query point within radius.
[in] | point | the given query point |
[in] | radius | the maximum distance to search for neighbors in. |
[out] | k_indices | the resultant point indices |
[out] | k_distances | the resultant !squared! point distances |
[in] | max_nn | maximum number of points to return |
Implements pcl::search::Search< PointT >.
Definition at line 220 of file organized.h.
int pcl::search::Search::radiusSearchT | ( | const PointTDiff & | point, |
double | radius, | ||
std::vector< int > & | k_indices, | ||
std::vector< float > & | k_distances, | ||
int | max_nn = -1 |
||
) | [inline, inherited] |
Search for all the nearest neighbors of the query point in a given radius.
[in] | point | the given query point |
[in] | radius | the radius of the sphere bounding all of p_q's neighbors |
[out] | k_indices | the resultant indices of the neighboring points |
[out] | k_distances | the resultant squared distances to the neighboring points |
[in] | max_nn | if given, bounds the maximum returned neighbors to this value |
virtual void pcl::search::Search::setInputCloud | ( | const PointCloudConstPtr & | cloud, |
const IndicesConstPtr & | indices | ||
) | [inline, virtual, inherited] |
virtual void pcl::search::Search::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [pure virtual, inherited] |
Pass the input dataset that the search will be performed on.
[in] | cloud | a const pointer to the PointCloud data |
void pcl::search::OrganizedNeighbor::setInputCloud | ( | const PointCloudConstPtr & | cloud | ) | [inline] |
Provide a pointer to the input data set.
cloud | the const boost shared pointer to a PointCloud message |
Definition at line 88 of file organized.h.
void pcl::search::OrganizedNeighbor::setMaxDistance | ( | double | max_dist | ) | [inline] |
Set the maximum allowed distance between the query point and its nearest neighbors.
Definition at line 110 of file organized.h.
void pcl::search::OrganizedNeighbor::setSearchWindow | ( | int | horizontal, |
int | vertical | ||
) | [inline] |
set the search window (horizontal, vertical) in pixels.
horizontal | the horizontal window in pixel |
vertical | the vertical window in pixel |
Definition at line 120 of file organized.h.
void pcl::search::OrganizedNeighbor::setSearchWindowAsK | ( | int | k | ) |
Estimate the search window (horizontal, vertical) in pixels in order to get up to k-neighbors.
k | the number of neighbors requested |
Definition at line 339 of file organized.hpp.