NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
PointCloud.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
29 #ifndef DW_POINTCLOUDPROCESSING_POINTCLOUD_POINTCLOUD_H_
30 #define DW_POINTCLOUDPROCESSING_POINTCLOUD_POINTCLOUD_H_
31 
32 #include <dw/core/base/Types.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
42 typedef enum {
46 
50 typedef struct
51 {
52  uint32_t layerIdx;
53  uint32_t size;
54  const void* points;
55 
57 
61 typedef struct
62 {
63  uint32_t elementSize;
64  uint32_t channelIdx;
65  uint32_t size;
66 
70  void* data;
71 
73 
74 #define DW_POINT_CLOUD_MAX_LAYERS 16U
75 #define DW_POINT_CLOUD_MAX_AUX_CHANNELS 16U
76 
80 typedef struct
81 {
84  bool organized;
85 
87 
90 
91  void* points;
92  uint32_t capacity;
93  uint32_t size;
94 
97 
98  uint32_t maxPointsPerLayer;
99  uint32_t numLayers;
101 
102  uint32_t numAuxChannels;
104 
105 } dwPointCloud;
106 
129 
143 
165  dwPointCloudFormat const format,
166  dwMemoryType const memoryType,
167  uint32_t const maxPointsPerLayer,
168  uint32_t const numRequestedLayers,
169  uint32_t const* auxChannelsElemSize,
170  uint32_t const numRequestedAuxChannels);
171 
188 
202 dwStatus dwPointCloud_getPointStride(uint32_t* size);
203 
204 #ifdef __cplusplus
205 }
206 #endif
207 
208 #endif // DW_POINTCLOUDPROCESSING_POINTCLOUD_POINTCLOUD_H_
dwPointCloudLayer::points
const void * points
Pointer to the start of the data for this layer.
Definition: PointCloud.h:54
dwPointCloud::numLayers
uint32_t numLayers
Number of layers in a point cloud.
Definition: PointCloud.h:99
dwPointCloudLayer::size
uint32_t size
Number of points in a layer (.
Definition: PointCloud.h:53
dwPointCloud
Defines point cloud data structure.
Definition: PointCloud.h:80
DW_POINTCLOUD_FORMAT_RTHI
@ DW_POINTCLOUD_FORMAT_RTHI
Polar 3D coordinate + intensity.
Definition: PointCloud.h:44
DW_POINT_CLOUD_MAX_AUX_CHANNELS
#define DW_POINT_CLOUD_MAX_AUX_CHANNELS
Definition: PointCloud.h:75
dwPointCloud::numAuxChannels
uint32_t numAuxChannels
Number of aux channels in a point cloud.
Definition: PointCloud.h:102
dwPointCloud::capacity
uint32_t capacity
numLayers * maxPointsPerLayer
Definition: PointCloud.h:92
dwPointCloud_createBuffer
DW_API_PUBLIC dwStatus dwPointCloud_createBuffer(dwPointCloud *buffer)
Allocates memory for point cloud data structure.
dwPointCloud::size
uint32_t size
Number of points in the cloud including all layers.
Definition: PointCloud.h:93
dwPointCloud::timestamp
dwTime_t timestamp
Time when the point cloud capturing is finished on sensor (deprecated)
Definition: PointCloud.h:86
dwPointCloud::type
dwMemoryType type
Defines type of a memory GPU or CPU.
Definition: PointCloud.h:82
dwPointCloud_destroy
DW_API_PUBLIC dwStatus dwPointCloud_destroy(dwPointCloud *pointCloud)
Destroy point cloud buffers.
dwTime_t
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:54
dwPointCloudLayer
Struct holding information about a single point cloud layer.
Definition: PointCloud.h:50
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.
dwPointCloudAuxChannel::channelIdx
uint32_t channelIdx
Channel index the aux data refers to.
Definition: PointCloud.h:64
dwPointCloud::points
void * points
Pointer to memory buffer of all points.
Definition: PointCloud.h:91
dwPointCloudAuxChannel
Struct holding information about aux channel.
Definition: PointCloud.h:61
dwPointCloudAuxChannel::size
uint32_t size
Number of elements in a channel.
Definition: PointCloud.h:65
dwPointCloud_getPointStride
DW_API_PUBLIC dwStatus dwPointCloud_getPointStride(uint32_t *size)
Get the size of the point cloud data type.
dwPointCloud::maxPointsPerLayer
uint32_t maxPointsPerLayer
Maximum number of points in layer (use even number of points to benefit from aligned memory access pe...
Definition: PointCloud.h:98
dwPointCloudAuxChannel::elementSize
uint32_t elementSize
Size in bytes of an element in the aux buffer.
Definition: PointCloud.h:63
dwPointCloudFormat
dwPointCloudFormat
Defines point format.
Definition: PointCloud.h:42
dwMemoryType
dwMemoryType
Memory type definitions.
Definition: TypesExtra.h:142
dwPointCloud::sensorStartTimestamp
dwTime_t sensorStartTimestamp
Point cloud start sensor timestamp.
Definition: PointCloud.h:88
DW_POINTCLOUD_FORMAT_XYZI
@ DW_POINTCLOUD_FORMAT_XYZI
Cartesian 3D coordinate + intensity.
Definition: PointCloud.h:43
dwPointCloud::hostEndTimestamp
dwTime_t hostEndTimestamp
Point cloud end host timestamp.
Definition: PointCloud.h:96
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwPointCloudAuxChannel::data
void * data
Pointer to the start of the data for this channel.
Definition: PointCloud.h:70
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38
DW_POINT_CLOUD_MAX_LAYERS
#define DW_POINT_CLOUD_MAX_LAYERS
Definition: PointCloud.h:74
dwPointCloud::sensorEndTimestamp
dwTime_t sensorEndTimestamp
Point cloud end sensor timestamp.
Definition: PointCloud.h:89
dwPointCloudLayer::layerIdx
uint32_t layerIdx
Index of a layer within a point cloud.
Definition: PointCloud.h:52
dwPointCloud::organized
bool organized
Flag indicating the data is ordered on the 3D grid.
Definition: PointCloud.h:84
dwPointCloud::hostStartTimestamp
dwTime_t hostStartTimestamp
Point cloud start host timestamp.
Definition: PointCloud.h:95
dwPointCloud::format
dwPointCloudFormat format
Format of a buffer.
Definition: PointCloud.h:83
dwPointCloud_destroyBuffer
DW_API_PUBLIC dwStatus dwPointCloud_destroyBuffer(dwPointCloud *buffer)
Destroys allocated memory for point cloud data structure.