Point Cloud Library (PCL)  1.8.1-dev
Classes | Functions
Module kdtree

Detailed Description

Overview

The pcl_kdtree library provides the kd-tree data-structure, using <a href="http://www.cs.ubc.ca/research/flann/</a>, that allows for fast <a href="http://en.wikipedia.org/wiki/Nearest_neighbor_search">nearest neighbor searches.

A Kd-tree (k-dimensional tree) is a space-partitioning data structure that stores a set of k-dimensional points in a tree structure that enables efficient range searches and nearest neighbor searches. Nearest neighbor searches are a core operation when working with point cloud data and can be used to find correspondences between groups of points or feature descriptors or to define the local neighborhood around a point or points.

kdtree_mug.png

Requirements

Classes

class  pcl::KdTree< PointT >
 KdTree represents the base spatial locator class for kd-tree implementations. More...
 
class  pcl::KdTreeFLANN< PointT, Dist >
 KdTreeFLANN is a generic type of 3D spatial locator using kD-tree structures. More...
 

Functions

template<typename PointT >
void pcl::getApproximateIndices (const typename pcl::PointCloud< PointT >::ConstPtr &cloud_in, const typename pcl::PointCloud< PointT >::ConstPtr &cloud_ref, std::vector< int > &indices)
 Get a set of approximate indices for a given point cloud into a reference point cloud. More...
 
template<typename Point1T , typename Point2T >
void pcl::getApproximateIndices (const typename pcl::PointCloud< Point1T >::ConstPtr &cloud_in, const typename pcl::PointCloud< Point2T >::ConstPtr &cloud_ref, std::vector< int > &indices)
 Get a set of approximate indices for a given point cloud into a reference point cloud. More...
 

Function Documentation

template<typename PointT >
void pcl::getApproximateIndices ( const typename pcl::PointCloud< PointT >::ConstPtr &  cloud_in,
const typename pcl::PointCloud< PointT >::ConstPtr &  cloud_ref,
std::vector< int > &  indices 
)

Get a set of approximate indices for a given point cloud into a reference point cloud.

The coordinates of the two point clouds can differ. The method uses an internal KdTree for finding the closest neighbors from cloud_in in cloud_ref.

Parameters
[in]cloud_inthe input point cloud dataset
[in]cloud_refthe reference point cloud dataset
[out]indicesthe resultant set of nearest neighbor indices of cloud_in in cloud_ref

Definition at line 68 of file io.hpp.

References pcl::KdTreeFLANN< PointT, Dist >::nearestKSearch(), pcl::PointCloud< T >::points, and pcl::KdTreeFLANN< PointT, Dist >::setInputCloud().

template<typename Point1T , typename Point2T >
void pcl::getApproximateIndices ( const typename pcl::PointCloud< Point1T >::ConstPtr &  cloud_in,
const typename pcl::PointCloud< Point2T >::ConstPtr &  cloud_ref,
std::vector< int > &  indices 
)

Get a set of approximate indices for a given point cloud into a reference point cloud.

The coordinates of the two point clouds can differ. The method uses an internal KdTree for finding the closest neighbors from cloud_in in cloud_ref.

Parameters
[in]cloud_inthe input point cloud dataset
[in]cloud_refthe reference point cloud dataset
[out]indicesthe resultant set of nearest neighbor indices of cloud_in in cloud_ref

Definition at line 48 of file io.hpp.

References pcl::KdTree< PointT >::nearestKSearchT(), pcl::PointCloud< T >::points, and pcl::KdTreeFLANN< PointT, Dist >::setInputCloud().