37 #ifndef POINTCLOUD_DEPTH_NEIGHBOR_SEARCH_H 38 #define POINTCLOUD_DEPTH_NEIGHBOR_SEARCH_H 40 #include <pcl/point_cloud.h> 41 #include <pcl/point_types.h> 58 template<
typename Po
intT>
113 radiusSearch (
const PointCloudConstPtr &cloud_arg,
int index_arg,
double radius_arg,
114 std::vector<int> &k_indices_arg, std::vector<float> &k_sqr_distances_arg,
115 int max_nn_arg = INT_MAX);
127 radiusSearch (
int index_arg,
const double radius_arg, std::vector<int> &k_indices_arg,
128 std::vector<float> &k_sqr_distances_arg,
int max_nn_arg = INT_MAX)
const;
139 radiusSearch (
const PointT &p_q_arg,
const double radius_arg, std::vector<int> &k_indices_arg,
140 std::vector<float> &k_sqr_distances_arg,
int max_nn_arg = INT_MAX)
const;
152 nearestKSearch (
const PointCloudConstPtr &cloud_arg,
int index_arg,
int k_arg, std::vector<int> &k_indices_arg,
153 std::vector<float> &k_sqr_distances_arg);
165 nearestKSearch (
int index_arg,
int k_arg, std::vector<int> &k_indices_arg,
166 std::vector<float> &k_sqr_distances_arg);
177 std::vector<float> &k_sqr_distances_arg);
298 xpos = (int) pcl_round(point.x / (point.z *
focalLength_));
299 ypos = (int) pcl_round(point.y / (point.z *
focalLength_));
316 return (
"Organized_Neighbor_Search");
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.
void getProjectedRadiusSearchBox(const PointT &point_arg, double squared_radius_arg, int &minX_arg, int &minY_arg, int &maxX_arg, int &maxY_arg) const
void setInputCloud(const PointCloudConstPtr &cloud_arg)
Provide a pointer to the input data set.
boost::shared_ptr< PointCloud > PointCloudPtr
void setMaxDistance(double max_dist)
Set the maximum allowed distance between the query point and its nearest neighbors.
pcl::PointCloud< PointT > PointCloud
virtual std::string getName() const
Class getName method.
radiusSearchLoopkupEntry entry for radius search lookup vector
bool operator<(const radiusSearchLoopkupEntry &rhs_arg) const
Operator< for comparing radiusSearchLoopkupEntry instances with each other.
~radiusSearchLoopkupEntry()
Empty deconstructor.
void defineShiftedSearchPoint(int x_shift, int y_shift)
Define search point and calculate squared distance.
OrganizedNeighborSearch class
PointCloudConstPtr input_
Pointer to input point cloud dataset.
virtual ~OrganizedNeighborSearch()
Empty deconstructor.
std::vector< radiusSearchLoopkupEntry > radiusSearchLookup_
Precalculated radius search lookup vector.
double max_distance_
Maximum allowed distance between the query point and its k-neighbors.
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=INT_MAX)
Search for all neighbors of query point that are within a given radius.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
nearestNeighborCandidate()
Empty constructor.
boost::shared_ptr< const PointCloud > PointCloudConstPtr
double focalLength_
Global focal length parameter.
void pointPlaneProjection(const PointT &point, int &xpos, int &ypos) const
const PointT & getPointByIndex(const unsigned int index_arg) const
Get point at index from input pointcloud dataset.
OrganizedNeighborSearch()
OrganizedNeighborSearch constructor.
void generateRadiusLookupTable(unsigned int width, unsigned int height)
Generate radius lookup table.
A point structure representing Euclidean xyz coordinates, and the RGB color.
nearestNeighborCandidate entry for the nearest neighbor candidate queue
void estimateFocalLengthFromInputCloud()
Estimate focal length parameter that was used during point cloud generation.
double getMaxDistance() const
Get the maximum allowed distance between the query point and its nearest neighbors.
~nearestNeighborCandidate()
Empty deconstructor.
radiusSearchLoopkupEntry()
Empty constructor.
int radiusLookupTableWidth_
int radiusLookupTableHeight_