DriveWorks SDK Reference
5.6.215 Release
For Test and Development only

Point Cloud Processing Interface

Detailed Description

Defines point cloud processing datatypes and memory handling functions.

Data Structures

struct  dwPointCloud
 Defines point cloud data structure. More...
 
struct  dwPointCloudAuxChannel
 Struct holding information about aux channel. More...
 
struct  dwPointCloudLayer
 Struct holding information about a single point cloud layer. More...
 

Modules

 Point Cloud Accumulator
 Defines datatypes and functions to accumulate cloud of points.
 
 Point Cloud Filter
 Defines module to perform point cloud box filtering.
 
 Point Cloud ICP
 Defines Point Cloud ICP module to align point clouds using iterative closest point algorithms.
 
 Point Cloud Plane Extractor
 Defines module to extract one 3D plane nearby the sensor.
 
 Point Cloud Range Image Creator
 Defines module to produce range image via spherical projection of the point cloud.
 
 Point Cloud Stitcher
 Defines module to register/stitch multiple sets of point clouds.
 

Macros

#define DW_POINT_CLOUD_MAX_AUX_CHANNELS   16U
 
#define DW_POINT_CLOUD_MAX_LAYERS   16U
 

Enumerations

enum  dwPointCloudFormat {
  DW_POINTCLOUD_FORMAT_XYZI = 0 ,
  DW_POINTCLOUD_FORMAT_RTHI = 1
}
 Defines point format. More...
 

Functions

DW_API_PUBLIC dwStatus dwPointCloud_create (dwPointCloud *pointCloud, dwPointCloudFormat const format, dwMemoryType const memoryType, uint32_t const maxPointsPerLayer, uint32_t const numRequestedLayers, uint32_t const *auxChannelsElemSize, uint32_t const numRequestedAuxChannels)
 Create point cloud with layers and aux channel information. More...
 
DW_API_PUBLIC dwStatus dwPointCloud_createBuffer (dwPointCloud *buffer)
 Allocates memory for point cloud data structure. More...
 
DW_API_PUBLIC dwStatus dwPointCloud_destroy (dwPointCloud *pointCloud)
 Destroy point cloud buffers. More...
 
DW_API_PUBLIC dwStatus dwPointCloud_destroyBuffer (dwPointCloud *buffer)
 Destroys allocated memory for point cloud data structure. More...
 

Data Structure Documentation

◆ dwPointCloud

struct dwPointCloud
Data Fields
dwPointCloudAuxChannel auxChannels[DW_POINT_CLOUD_MAX_AUX_CHANNELS]
uint32_t capacity numLayers * maxPointsPerLayer
dwPointCloudFormat format Format of a buffer.
dwTime_t hostEndTimestamp Point cloud end timestamp.
dwTime_t hostStartTimestamp Point cloud start timestamp.
dwPointCloudLayer layers[DW_POINT_CLOUD_MAX_LAYERS]
uint32_t maxPointsPerLayer Maximum number of points in layer (use even number of points to benefit from aligned memory access per layer if each point is 16 bytes long)
uint32_t numAuxChannels Number of aux channels in a point cloud.
uint32_t numLayers Number of layers in a point cloud.
bool organized Flag indicating the data is ordered on the 3D grid.
void * points Pointer to memory buffer of all points. Not compact, but contiguous with invalid points in between layers.
uint32_t size Number of points in the cloud including all layers.
dwTime_t timestamp Time when the point cloud capturing is finished.
dwMemoryType type Defines type of a memory GPU or CPU.

◆ dwPointCloudAuxChannel

struct dwPointCloudAuxChannel
Data Fields
uint32_t channelIdx Channel index the aux data refers to.
void * data Pointer to the start of the data for this channel.

Number of elements is the size of the point cloud. To access channel[C] for point I, one would do pc.auxChannels[C].data[I]

uint32_t elementSize Size in bytes of an element in the aux buffer.
uint32_t size Number of elements in a channel.

◆ dwPointCloudLayer

struct dwPointCloudLayer
Data Fields
uint32_t layerIdx Index of a layer within a point cloud.
const void * points Pointer to the start of the data for this layer.
uint32_t size Number of points in a layer (.
Note
: points are not compactified, that means there are at most maxPointsPerLayer entries whereby some of them are (0,0,0,0) indicating an invalid point)

Macro Definition Documentation

◆ DW_POINT_CLOUD_MAX_AUX_CHANNELS

#define DW_POINT_CLOUD_MAX_AUX_CHANNELS   16U

Definition at line 93 of file PointCloud.h.

◆ DW_POINT_CLOUD_MAX_LAYERS

#define DW_POINT_CLOUD_MAX_LAYERS   16U

Definition at line 92 of file PointCloud.h.

Enumeration Type Documentation

◆ dwPointCloudFormat

Defines point format.

Enumerator
DW_POINTCLOUD_FORMAT_XYZI 

Cartesian 3D coordinate + intensity.

DW_POINTCLOUD_FORMAT_RTHI 

Polar 3D coordinate + intensity.

Definition at line 60 of file PointCloud.h.

Function Documentation

◆ dwPointCloud_create()

DW_API_PUBLIC dwStatus dwPointCloud_create ( dwPointCloud pointCloud,
dwPointCloudFormat const  format,
dwMemoryType const  memoryType,
uint32_t const  maxPointsPerLayer,
uint32_t const  numRequestedLayers,
uint32_t const *  auxChannelsElemSize,
uint32_t const  numRequestedAuxChannels 
)

Create point cloud with layers and aux channel information.

Parameters
[out]pointCloudPoint cloud to be created
[in]formatPoint cloud format XYZI or RTHI
[in]memoryTypePoint cloud memory type, CUDA, CPU or PINNED
[in]maxPointsPerLayerMaximum number of points in single layer
[in]numRequestedLayersNumber of layer in a point cloud
[in]auxChannelsElemSizeAn array of auxiliary channel elements sizes
[in]numRequestedAuxChannelsNumber of requested aux channels
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT If provided pointer to point cloud is null

◆ dwPointCloud_createBuffer()

DW_API_PUBLIC dwStatus dwPointCloud_createBuffer ( dwPointCloud buffer)

Allocates memory for point cloud data structure.

Parameters
[out]bufferPointer to dwPointCloud
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT
Note
User must specify the followings for the argument buffer:
  1. The member variable capacity to indicate the memory allocation size
  2. The member variable type to indicate the memory type, either host memory or device memory
Upon successful return, this API will set size to zero to indicate it contains no element in the memory By default this API will set organized to false
This API does not add any information on point cloud layers and auxiliary channels. Upon successful return numLayers and numAuxChannelsare both set to zero.

◆ dwPointCloud_destroy()

DW_API_PUBLIC dwStatus dwPointCloud_destroy ( dwPointCloud pointCloud)

Destroy point cloud buffers.

Parameters
[in]pointCloudA pointer to point cloud
Note
The call releases all the memory associated with point cloud.
Returns
DW_SUCCESS
DW_INVALID_HANDLE

◆ dwPointCloud_destroyBuffer()

DW_API_PUBLIC dwStatus dwPointCloud_destroyBuffer ( dwPointCloud buffer)

Destroys allocated memory for point cloud data structure.

Parameters
[out]bufferPointer to dwPointCloud
Returns
DW_SUCCESS
DW_INVALID_ARGUMENT