Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Types | Public Member Functions | Public Attributes
pcl::gpu::Octree Class Reference

Octree implementation on GPU. More...

#include </__w/1/s/gpu/octree/include/pcl/gpu/octree/octree.hpp>

+ Collaboration diagram for pcl::gpu::Octree:

Public Types

using Ptr = shared_ptr< Octree >
 Types. More...
 
using ConstPtr = shared_ptr< const Octree >
 
using PointType = pcl::PointXYZ
 Point typwe supported. More...
 
using PointCloud = DeviceArray< PointType >
 Point cloud supported. More...
 
using Queries = DeviceArray< PointType >
 Point Batch query cloud type. More...
 
using Radiuses = DeviceArray< float >
 Point Radiuses for batch query
More...
 
using Indices = DeviceArray< int >
 Point Indices for batch query
More...
 
using ResultSqrDists = DeviceArray< float >
 Point Sqrt distances array type. More...
 

Public Member Functions

 Octree ()
 Default constructor. More...
 
virtual ~Octree ()
 Denstructor. More...
 
void setCloud (const PointCloud &cloud_arg)
 Sets cloud for which octree is built. More...
 
void build ()
 Performs parallel octree building. More...
 
bool isBuilt () const
 Returns true if tree has been built. More...
 
void internalDownload ()
 Downloads Octree from GPU to search using CPU function. More...
 
void radiusSearchHost (const PointType &center, float radius, std::vector< int > &out, int max_nn=std::numeric_limits< int >::max())
 Performs search of all points within given radius on CPU. More...
 
void approxNearestSearchHost (const PointType &query, int &out_index, float &sqr_dist)
 Performs approximate nearest neighbor search on CPU. More...
 
void radiusSearch (const Queries &centers, float radius, int max_results, NeighborIndices &result) const
 Performs batch radius search on GPU. More...
 
void radiusSearch (const Queries &centers, const Radiuses &radiuses, int max_results, NeighborIndices &result) const
 Performs batch radius search on GPU. More...
 
void radiusSearch (const Queries &centers, const Indices &indices, float radius, int max_results, NeighborIndices &result) const
 Performs batch radius search on GPU. More...
 
void approxNearestSearch (const Queries &queries, NeighborIndices &result, ResultSqrDists &sqr_distance) const
 Batch approximate nearest search on GPU. More...
 
void nearestKSearchBatch (const Queries &queries, int k, NeighborIndices &results) const
 Batch exact k-nearest search on GPU for k == 1 only! More...
 
void nearestKSearchBatch (const Queries &queries, int k, NeighborIndices &results, ResultSqrDists &sqr_distances) const
 Batch exact k-nearest search on GPU for k == 1 only! More...
 
void clear ()
 Destroys octree and release all resources. More...
 

Public Attributes

const PointCloudcloud_
 

Detailed Description

Octree implementation on GPU.

It supports parallel building and parallel batch search as well .

Author
Anaoly Baksheev, Itseez, mynam.nosp@m.e.my.nosp@m.surna.nosp@m.me@m.nosp@m.ycomp.nosp@m.any..nosp@m.com

Definition at line 58 of file octree.hpp.

Member Typedef Documentation

◆ ConstPtr

using pcl::gpu::Octree::ConstPtr = shared_ptr<const Octree>

Definition at line 70 of file octree.hpp.

◆ Indices

Point Indices for batch query

Definition at line 85 of file octree.hpp.

◆ PointCloud

Point cloud supported.

Definition at line 76 of file octree.hpp.

◆ PointType

Point typwe supported.

Definition at line 73 of file octree.hpp.

◆ Ptr

using pcl::gpu::Octree::Ptr = shared_ptr<Octree>

Types.

Definition at line 69 of file octree.hpp.

◆ Queries

Point Batch query cloud type.

Definition at line 79 of file octree.hpp.

◆ Radiuses

Point Radiuses for batch query

Definition at line 82 of file octree.hpp.

◆ ResultSqrDists

Point Sqrt distances array type.

Definition at line 88 of file octree.hpp.

Constructor & Destructor Documentation

◆ Octree()

pcl::gpu::Octree::Octree ( )

Default constructor.

◆ ~Octree()

virtual pcl::gpu::Octree::~Octree ( )
virtual

Denstructor.

Member Function Documentation

◆ approxNearestSearch()

void pcl::gpu::Octree::approxNearestSearch ( const Queries queries,
NeighborIndices result,
ResultSqrDists sqr_distance 
) const

Batch approximate nearest search on GPU.

Parameters
[in]queriesarray of centers
[out]resultarray of results ( one index for each query )
[out]sqr_distancecorresponding square distances to results from query point

◆ approxNearestSearchHost()

void pcl::gpu::Octree::approxNearestSearchHost ( const PointType query,
int &  out_index,
float &  sqr_dist 
)

Performs approximate nearest neighbor search on CPU.

It call internalDownload if necessary

Parameters
[in]query3D point for which neighbour is be fetched
[out]out_indexneighbour index
[out]sqr_distsquare distance to the neighbour returned

◆ build()

void pcl::gpu::Octree::build ( )

Performs parallel octree building.

◆ clear()

void pcl::gpu::Octree::clear ( )

Destroys octree and release all resources.

◆ internalDownload()

void pcl::gpu::Octree::internalDownload ( )

Downloads Octree from GPU to search using CPU function.

It use useful for single (not-batch) search

◆ isBuilt()

bool pcl::gpu::Octree::isBuilt ( ) const

Returns true if tree has been built.

◆ nearestKSearchBatch() [1/2]

void pcl::gpu::Octree::nearestKSearchBatch ( const Queries queries,
int  k,
NeighborIndices results 
) const

Batch exact k-nearest search on GPU for k == 1 only!

Parameters
[in]queriesarray of centers
[in]knumber of neighbors (only k == 1 is supported)
[out]resultsarray of results

◆ nearestKSearchBatch() [2/2]

void pcl::gpu::Octree::nearestKSearchBatch ( const Queries queries,
int  k,
NeighborIndices results,
ResultSqrDists sqr_distances 
) const

Batch exact k-nearest search on GPU for k == 1 only!

Parameters
[in]queriesarray of centers
[in]knumber of neighbors (only k == 1 is supported)
[out]resultsarray of results
[out]sqr_distancessquare distances to results

◆ radiusSearch() [1/3]

void pcl::gpu::Octree::radiusSearch ( const Queries centers,
const Indices indices,
float  radius,
int  max_results,
NeighborIndices result 
) const

Performs batch radius search on GPU.

Parameters
[in]centersarray of centers
[in]indicesindices for centers array (only for these points search is performed)
[in]radiusradius for all queries
[in]max_resultsmax number of returned points for each querey
[out]resultresults packed to single array

◆ radiusSearch() [2/3]

void pcl::gpu::Octree::radiusSearch ( const Queries centers,
const Radiuses radiuses,
int  max_results,
NeighborIndices result 
) const

Performs batch radius search on GPU.

Parameters
[in]centersarray of centers
[in]radiusesarray of radiuses
[in]max_resultsmax number of returned points for each querey
[out]resultresults packed to single array

◆ radiusSearch() [3/3]

void pcl::gpu::Octree::radiusSearch ( const Queries centers,
float  radius,
int  max_results,
NeighborIndices result 
) const

Performs batch radius search on GPU.

Parameters
[in]centersarray of centers
[in]radiusradius for all queries
[in]max_resultsmax number of returned points for each querey
[out]resultresults packed to single array

◆ radiusSearchHost()

void pcl::gpu::Octree::radiusSearchHost ( const PointType center,
float  radius,
std::vector< int > &  out,
int  max_nn = std::numeric_limits< int >::max() 
)

Performs search of all points within given radius on CPU.

It call internalDownload if necessary

Parameters
[in]centercenter of sphere
[in]radiusradious of sphere
[out]outindeces of points within give sphere
[in]max_nnmaximum numver of results returned

◆ setCloud()

void pcl::gpu::Octree::setCloud ( const PointCloud cloud_arg)

Sets cloud for which octree is built.

Member Data Documentation

◆ cloud_

const PointCloud* pcl::gpu::Octree::cloud_

Definition at line 90 of file octree.hpp.


The documentation for this class was generated from the following file: