Defines point cloud processing datatypes and memory handling functions.
◆ 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
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)
|
◆ DW_POINT_CLOUD_MAX_AUX_CHANNELS
#define DW_POINT_CLOUD_MAX_AUX_CHANNELS 16U |
◆ DW_POINT_CLOUD_MAX_LAYERS
#define DW_POINT_CLOUD_MAX_LAYERS 16U |
◆ 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.
◆ dwPointCloud_create()
Create point cloud with layers and aux channel information.
- Parameters
-
[out] | pointCloud | Point cloud to be created |
[in] | format | Point cloud format XYZI or RTHI |
[in] | memoryType | Point cloud memory type, CUDA, CPU or PINNED |
[in] | maxPointsPerLayer | Maximum number of points in single layer |
[in] | numRequestedLayers | Number of layer in a point cloud |
[in] | auxChannelsElemSize | An array of auxiliary channel elements sizes |
[in] | numRequestedAuxChannels | Number of requested aux channels |
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT If provided pointer to point cloud is null
◆ dwPointCloud_createBuffer()
Allocates memory for point cloud data structure.
- Parameters
-
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT
- Note
- User must specify the followings for the argument
buffer
:
- The member variable
capacity
to indicate the memory allocation size
- 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 numAuxChannels
are both set to zero.
◆ dwPointCloud_destroy()
Destroy point cloud buffers.
- Parameters
-
[in] | pointCloud | A pointer to point cloud |
- Note
- The call releases all the memory associated with point cloud.
- Returns
- DW_SUCCESS
DW_INVALID_HANDLE
◆ dwPointCloud_destroyBuffer()
Destroys allocated memory for point cloud data structure.
- Parameters
-
- Returns
- DW_SUCCESS
DW_INVALID_ARGUMENT