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

TsdfVolume class. More...

#include </__w/1/s/gpu/kinfu/include/pcl/gpu/kinfu/tsdf_volume.h>

Public Types

enum  { DEFAULT_CLOUD_BUFFER_SIZE = 10 * 1000 * 1000 }
 Default buffer size for fetching cloud. More...
 
typedef boost::shared_ptr< TsdfVolumePtr
 
typedef PointXYZ PointType
 Supported Point Types. More...
 
typedef Normal NormalType
 

Public Member Functions

 TsdfVolume (const Eigen::Vector3i &resolution)
 Constructor. More...
 
void setSize (const Eigen::Vector3f &size)
 Sets Tsdf volume size for each dimension. More...
 
void setTsdfTruncDist (float distance)
 Sets Tsdf truncation distance. More...
 
DeviceArray2D< int > data () const
 Returns tsdf volume container that point to data in GPU memory. More...
 
const Eigen::Vector3f & getSize () const
 Returns volume size in meters. More...
 
const Eigen::Vector3i & getResolution () const
 Returns volume resolution. More...
 
const Eigen::Vector3f getVoxelSize () const
 Returns volume voxel size in meters. More...
 
float getTsdfTruncDist () const
 Returns tsdf truncation distance in meters. More...
 
void reset ()
 Resets tsdf volume data to uninitialized state. More...
 
void fetchCloudHost (PointCloud< PointType > &cloud, bool connected26=false) const
 Generates cloud using CPU (downloads volumetric representation to CPU memory) More...
 
DeviceArray< PointTypefetchCloud (DeviceArray< PointType > &cloud_buffer) const
 Generates cloud using GPU in connected6 mode only. More...
 
void fetchNormals (const DeviceArray< PointType > &cloud, DeviceArray< PointType > &normals) const
 Computes normals as gradient of tsdf for given points. More...
 
void fetchNormals (const DeviceArray< PointType > &cloud, DeviceArray< NormalType > &normals) const
 Computes normals as gradient of tsdf for given points. More...
 
void downloadTsdf (std::vector< float > &tsdf) const
 Downloads tsdf volume from GPU memory. More...
 
void downloadTsdfAndWeighs (std::vector< float > &tsdf, std::vector< short > &weights) const
 Downloads TSDF volume and according voxel weights from GPU memory. More...
 

Detailed Description

TsdfVolume class.

Author
Anatoly Baskeheev, Itseez Ltd, (mynam.nosp@m.e.my.nosp@m.surna.nosp@m.me@m.nosp@m.ycomp.nosp@m.any..nosp@m.com)

Definition at line 54 of file tsdf_volume.h.

Member Typedef Documentation

Definition at line 61 of file tsdf_volume.h.

Supported Point Types.

Definition at line 60 of file tsdf_volume.h.

typedef boost::shared_ptr<TsdfVolume> pcl::gpu::TsdfVolume::Ptr

Definition at line 57 of file tsdf_volume.h.

Member Enumeration Documentation

anonymous enum

Default buffer size for fetching cloud.

It limits max number of points that can be extracted

Enumerator
DEFAULT_CLOUD_BUFFER_SIZE 

Definition at line 64 of file tsdf_volume.h.

Constructor & Destructor Documentation

pcl::gpu::TsdfVolume::TsdfVolume ( const Eigen::Vector3i &  resolution)

Constructor.

Parameters
[in]resolutionvolume resolution

Member Function Documentation

DeviceArray2D<int> pcl::gpu::TsdfVolume::data ( ) const

Returns tsdf volume container that point to data in GPU memory.

void pcl::gpu::TsdfVolume::downloadTsdf ( std::vector< float > &  tsdf) const

Downloads tsdf volume from GPU memory.

Parameters
[out]tsdfArray with tsdf values. if volume resolution is 512x512x512, so for voxel (x,y,z) tsdf value can be retrieved as volume[512*512*z + 512*y + x];
void pcl::gpu::TsdfVolume::downloadTsdfAndWeighs ( std::vector< float > &  tsdf,
std::vector< short > &  weights 
) const

Downloads TSDF volume and according voxel weights from GPU memory.

Parameters
[out]tsdfArray with tsdf values. if volume resolution is 512x512x512, so for voxel (x,y,z) tsdf value can be retrieved as volume[512*512*z + 512*y + x];
[out]weightsArray with tsdf voxel weights. Same size and access index as for tsdf. A weight of 0 indicates the voxel was never used.
DeviceArray<PointType> pcl::gpu::TsdfVolume::fetchCloud ( DeviceArray< PointType > &  cloud_buffer) const

Generates cloud using GPU in connected6 mode only.

Parameters
[out]cloud_bufferbuffer to store point cloud
Returns
DeviceArray with disabled reference counting that points to filled part of cloud_buffer.
void pcl::gpu::TsdfVolume::fetchCloudHost ( PointCloud< PointType > &  cloud,
bool  connected26 = false 
) const

Generates cloud using CPU (downloads volumetric representation to CPU memory)

Parameters
[out]cloudoutput array for cloud
[in]connected26If false point cloud is extracted using 6 neighbor, otherwise 26.
void pcl::gpu::TsdfVolume::fetchNormals ( const DeviceArray< PointType > &  cloud,
DeviceArray< PointType > &  normals 
) const

Computes normals as gradient of tsdf for given points.

Parameters
[in]cloudPoints where normals are computed.
[out]normalsarray for normals
void pcl::gpu::TsdfVolume::fetchNormals ( const DeviceArray< PointType > &  cloud,
DeviceArray< NormalType > &  normals 
) const

Computes normals as gradient of tsdf for given points.

Parameters
[in]cloudPoints where normals are computed.
[out]normalsarray for normals
const Eigen::Vector3i& pcl::gpu::TsdfVolume::getResolution ( ) const

Returns volume resolution.

const Eigen::Vector3f& pcl::gpu::TsdfVolume::getSize ( ) const

Returns volume size in meters.

float pcl::gpu::TsdfVolume::getTsdfTruncDist ( ) const

Returns tsdf truncation distance in meters.

const Eigen::Vector3f pcl::gpu::TsdfVolume::getVoxelSize ( ) const

Returns volume voxel size in meters.

void pcl::gpu::TsdfVolume::reset ( )

Resets tsdf volume data to uninitialized state.

void pcl::gpu::TsdfVolume::setSize ( const Eigen::Vector3f &  size)

Sets Tsdf volume size for each dimension.

Parameters
[in]sizesize of tsdf volume in meters
void pcl::gpu::TsdfVolume::setTsdfTruncDist ( float  distance)

Sets Tsdf truncation distance.

Must be greater than 2 * volume_voxel_size

Parameters
[in]distanceTSDF truncation distance

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