39 #include <pcl/point_cloud.h>
40 #include <pcl/point_types.h>
58 template<
typename Po
intT>
111 radiusSearch (
const PointCloudConstPtr &cloud_arg,
int index_arg,
double radius_arg,
112 std::vector<int> &k_indices_arg, std::vector<float> &k_sqr_distances_arg,
113 int max_nn_arg = std::numeric_limits<int>::max());
125 radiusSearch (
int index_arg,
const double radius_arg, std::vector<int> &k_indices_arg,
126 std::vector<float> &k_sqr_distances_arg,
int max_nn_arg = std::numeric_limits<int>::max())
const;
137 radiusSearch (
const PointT &p_q_arg,
const double radius_arg, std::vector<int> &k_indices_arg,
138 std::vector<float> &k_sqr_distances_arg,
int max_nn_arg = std::numeric_limits<int>::max())
const;
150 nearestKSearch (
const PointCloudConstPtr &cloud_arg,
int index_arg,
int k_arg, std::vector<int> &k_indices_arg,
151 std::vector<float> &k_sqr_distances_arg);
163 nearestKSearch (
int index_arg,
int k_arg, std::vector<int> &k_indices_arg,
164 std::vector<float> &k_sqr_distances_arg);
175 std::vector<float> &k_sqr_distances_arg);
286 xpos = (int) pcl_round(point.x / (point.z *
focalLength_));
287 ypos = (int) pcl_round(point.y / (point.z *
focalLength_));
304 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.
shared_ptr< PointCloud< PointT > > Ptr
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.
void setMaxDistance(double max_dist)
Set the maximum allowed distance between the query point and its nearest neighbors.
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.
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.
std::vector< radiusSearchLoopkupEntry > radiusSearchLookup_
Precalculated radius search lookup vector.
virtual ~OrganizedNeighborSearch()=default
Empty deconstructor.
double max_distance_
Maximum allowed distance between the query point and its k-neighbors.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
nearestNeighborCandidate()
Empty constructor.
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.
typename PointCloud::Ptr PointCloudPtr
shared_ptr< const PointCloud< PointT > > ConstPtr
bool operator<(const nearestNeighborCandidate &rhs_arg) const
Operator< for comparing nearestNeighborCandidate instances with each other.
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.
typename PointCloud::ConstPtr PointCloudConstPtr
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.
radiusSearchLoopkupEntry()
Empty constructor.
int radiusLookupTableWidth_
int radiusLookupTableHeight_