NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
Point Cloud Depth Map Creator

Detailed Description

Defines module to produce depth map via spherical projection of the point cloud.

Data Structures

struct  dwDepthMapCreatorParams
 Defines point cloud depth map creator parameters. More...
 

Typedefs

typedef struct dwDepthMapCreatorObject * dwDepthMapCreatorHandle_t
 
typedef const struct dwDepthMapCreatorObject * dwConstDepthMapCreatorHandle_t
 
typedef enum dwDepthMapCreatorProcessPassType dwDepthMapCreatorProcessPassType
 Defines depth map creation processing pass type. More...
 

Enumerations

enum  dwDepthMapCreatorProcessPassType {
  DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_COMPLETE_SYNC = 0,
  DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_FIRST_GPU_ASYNC,
  DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_SECOND_CPU_SYNC,
  DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_COUNT
}
 Defines depth map creation processing pass type. More...
 
enum  dwDepthMapCreatorPass {
  DW_DEPTHMAP_CREATOR_PASS_PROCESS_GPU_ASYNC,
  DW_DEPTHMAP_CREATOR_PASS_PROCESS_CPU
}
 

Functions

DW_API_PUBLIC dwStatus dwDepthMapCreator_getDefaultParams (dwDepthMapCreatorParams *const params, dwLidarProperties const *const lidarProps)
 Get default depth map creator parameters. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_initialize (dwDepthMapCreatorHandle_t *const depthMapCreatorHandle, dwDepthMapCreatorParams const *const params, dwContextHandle_t ctx)
 Initialize the module. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_reset (dwDepthMapCreatorHandle_t depthMapCreatorHandle)
 Reset depth map creator. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_release (dwDepthMapCreatorHandle_t depthMapCreatorHandle)
 Release depth map creator. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_getCUDAStream (cudaStream_t *stream, dwConstDepthMapCreatorHandle_t depthMapCreatorHandle)
 Get CUDA stream of depth map creator. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_setCUDAStream (cudaStream_t stream, dwDepthMapCreatorHandle_t depthMapCreatorHandle)
 Set CUDA stream of depth map creator. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_bindInput (dwPointCloud const *const pointCloud, dwDepthMapCreatorHandle_t depthMapCreatorHandle)
 Binds input point cloud to depth map creator. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_bindOutputDepthMap (dwDepthMapHandle_t depthMapHandle, dwDepthMapCreatorHandle_t depthMapCreatorHandle)
 Binds output depth map. More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_bindOutputPointCloud (dwPointCloud *const pointCloud, dwDepthMapCreatorHandle_t depthMapCreatorHandle)
 Binds output point cloud (alternative output buffer) More...
 
DW_API_PUBLIC dwStatus dwDepthMapCreator_process (dwDepthMapCreatorProcessPassType const passType, dwDepthMapCreatorHandle_t depthMapCreatorHandle)
 Project the bound input point cloud into the bound output depth map or organized point cloud. More...
 

Typedef Documentation

◆ dwConstDepthMapCreatorHandle_t

typedef const struct dwDepthMapCreatorObject* dwConstDepthMapCreatorHandle_t

Definition at line 41 of file DepthMapCreator.h.

◆ dwDepthMapCreatorHandle_t

typedef struct dwDepthMapCreatorObject* dwDepthMapCreatorHandle_t

Definition at line 40 of file DepthMapCreator.h.

◆ dwDepthMapCreatorProcessPassType

Defines depth map creation processing pass type.

Enumeration Type Documentation

◆ dwDepthMapCreatorPass

Enumerator
DW_DEPTHMAP_CREATOR_PASS_PROCESS_GPU_ASYNC 
DW_DEPTHMAP_CREATOR_PASS_PROCESS_CPU 

Definition at line 203 of file DepthMapCreator.h.

◆ dwDepthMapCreatorProcessPassType

Defines depth map creation processing pass type.

Enumerator
DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_COMPLETE_SYNC 

This processing pass type includes both GPU and CPU passes.

DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_FIRST_GPU_ASYNC 

This processing pass type includes only GPU asynchronous pass This is a first processing step of the depth map creation algorithm.

DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_SECOND_CPU_SYNC 

This processing pass type includes only CPU synchronous pass This is a second processing step of the depth map creation algorithm.

DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_COUNT 

The last possible type value which defines a valid range of types.

Definition at line 46 of file DepthMapCreator.h.

Function Documentation

◆ dwDepthMapCreator_bindInput()

DW_API_PUBLIC dwStatus dwDepthMapCreator_bindInput ( dwPointCloud const *const  pointCloud,
dwDepthMapCreatorHandle_t  depthMapCreatorHandle 
)

Binds input point cloud to depth map creator.

Parameters
[in]pointCloudPointer to input buffer
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_HANDLEwhen neither of given handle is valid
DW_INVALID_ARGUMENTwhen point cloud input is nullptr
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwDepthMapCreator_bindOutputDepthMap()

DW_API_PUBLIC dwStatus dwDepthMapCreator_bindOutputDepthMap ( dwDepthMapHandle_t  depthMapHandle,
dwDepthMapCreatorHandle_t  depthMapCreatorHandle 
)

Binds output depth map.

Parameters
[in]depthMapHandlePointer to output depth map. Note: if the output point cloud is defined earlier it will be discarded
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_HANDLEwhen given handle is not valid
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwDepthMapCreator_bindOutputPointCloud()

DW_API_PUBLIC dwStatus dwDepthMapCreator_bindOutputPointCloud ( dwPointCloud *const  pointCloud,
dwDepthMapCreatorHandle_t  depthMapCreatorHandle 
)

Binds output point cloud (alternative output buffer)

Point-cloud binding is only supported when the creator was configured at initialization with dwDepthMapCreatorParams::depthMapProps.imageFormat equal to DW_DEPTH_IMAGE_FORMAT_XYZI or DW_DEPTH_IMAGE_FORMAT_RTHI. For DW_DEPTH_IMAGE_FORMAT_DISTANCE or DW_DEPTH_IMAGE_FORMAT_INTENSITY, use dwDepthMapCreator_bindOutputDepthMap instead; this API is not supported for those formats and returns DW_NOT_SUPPORTED.

Parameters
[in]pointCloudPointer to output point cloud. If a depth map was bound previously it is discarded.
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_HANDLEwhen the given handle is not valid
DW_INVALID_ARGUMENTwhen pointCloud is nullptr, or when the point cloud does not satisfy size/type/format rules for the configured XYZI/RTHI depth map
DW_NOT_SUPPORTEDwhen the configured depth image format is DW_DEPTH_IMAGE_FORMAT_DISTANCE or DW_DEPTH_IMAGE_FORMAT_INTENSITY
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwDepthMapCreator_getCUDAStream()

DW_API_PUBLIC dwStatus dwDepthMapCreator_getCUDAStream ( cudaStream_t *  stream,
dwConstDepthMapCreatorHandle_t  depthMapCreatorHandle 
)

Get CUDA stream of depth map creator.

Only creators initialized with dwDepthMapCreatorParams::depthMapProps.memoryType equal to DW_MEMORY_TYPE_CUDA support CUDA streams. For CPU creators (DW_MEMORY_TYPE_CPU), this function returns DW_CALL_NOT_ALLOWED.

Parameters
[out]streamPointer to CUDA stream handle
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_ARGUMENTwhen stream is nullptr
DW_INVALID_HANDLEwhen depthMapCreatorHandle is invalid
DW_CALL_NOT_ALLOWEDwhen the creator is not GPU-enabled (CPU depth map creator)
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwDepthMapCreator_getDefaultParams()

DW_API_PUBLIC dwStatus dwDepthMapCreator_getDefaultParams ( dwDepthMapCreatorParams *const  params,
dwLidarProperties const *const  lidarProps 
)

Get default depth map creator parameters.

Parameters
[out]paramsPointer to depth map creator parameters
[in]lidarPropslidar sensor properties
Return values
DW_INVALID_ARGUMENTwhen given param pointer is invalid
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwDepthMapCreator_initialize()

DW_API_PUBLIC dwStatus dwDepthMapCreator_initialize ( dwDepthMapCreatorHandle_t *const  depthMapCreatorHandle,
dwDepthMapCreatorParams const *const  params,
dwContextHandle_t  ctx 
)

Initialize the module.

Parameters
[out]depthMapCreatorHandlePointer to depth map creator handle
[in]paramsPointer to depth map creator parameters
[in]ctxDW context handle
Return values
DW_INVALID_ARGUMENTwhen given pointer is invalid
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: No

◆ dwDepthMapCreator_process()

DW_API_PUBLIC dwStatus dwDepthMapCreator_process ( dwDepthMapCreatorProcessPassType const  passType,
dwDepthMapCreatorHandle_t  depthMapCreatorHandle 
)

Project the bound input point cloud into the bound output depth map or organized point cloud.

Parameters
[in]passTypeWhich pipeline step to run; see dwDepthMapCreatorProcessPassType. Pass ordering depends on how the creator was constructed (dwDepthMapCreatorParams::depthMapProps.memoryType):
  • CPU (DW_MEMORY_TYPE_CPU): DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_COMPLETE_SYNC and DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_SECOND_CPU_SYNC run the CPU depth-map pass. DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_FIRST_GPU_ASYNC is accepted but performs no work (successful no-op).
  • CUDA (DW_MEMORY_TYPE_CUDA): either use DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_COMPLETE_SYNC to run the full GPU-then-CPU pipeline in one call, or use the split sequence exactly once in order: DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_FIRST_GPU_ASYNC then DW_DEPTHMAPCREATOR_PROCESS_PASS_TYPE_SECOND_CPU_SYNC. Out-of-order use of the split passes (for example SECOND_CPU_SYNC before FIRST_GPU_ASYNC, or a second FIRST_GPU_ASYNC while a split is already in progress) returns DW_CALL_NOT_ALLOWED.
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_HANDLEwhen depthMapCreatorHandle is invalid
DW_INVALID_ARGUMENTwhen passType is not a supported enumerator, or the input point cloud is empty
DW_CALL_NOT_ALLOWEDwhen input or output is not bound, or when a CUDA split pass is used out of order or repeated as above
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwDepthMapCreator_release()

DW_API_PUBLIC dwStatus dwDepthMapCreator_release ( dwDepthMapCreatorHandle_t  depthMapCreatorHandle)

Release depth map creator.

Parameters
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_HANDLEwhen given handle is valid
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: No
  • De-Init: Yes

◆ dwDepthMapCreator_reset()

DW_API_PUBLIC dwStatus dwDepthMapCreator_reset ( dwDepthMapCreatorHandle_t  depthMapCreatorHandle)

Reset depth map creator.

Parameters
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_HANDLEwhen given handle is invalid
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes

◆ dwDepthMapCreator_setCUDAStream()

DW_API_PUBLIC dwStatus dwDepthMapCreator_setCUDAStream ( cudaStream_t  stream,
dwDepthMapCreatorHandle_t  depthMapCreatorHandle 
)

Set CUDA stream of depth map creator.

Only creators initialized with dwDepthMapCreatorParams::depthMapProps.memoryType equal to DW_MEMORY_TYPE_CUDA support CUDA streams. For CPU creators (DW_MEMORY_TYPE_CPU), this function returns DW_CALL_NOT_ALLOWED.

Parameters
[in]streamCUDA stream to use for GPU work
[in]depthMapCreatorHandleHandle to depth map creator
Return values
DW_INVALID_HANDLEwhen depthMapCreatorHandle is invalid
DW_CALL_NOT_ALLOWEDwhen the creator is not GPU-enabled (CPU depth map creator)
DW_SUCCESSwhen operation succeeded
API Group
  • Init: Yes
  • Runtime: Yes
  • De-Init: Yes