Defines module to produce depth map via spherical projection of the point cloud.
◆ dwConstDepthMapCreatorHandle_t
◆ dwDepthMapCreatorHandle_t
◆ dwDepthMapCreatorProcessPassType
Defines depth map creation processing pass type.
◆ 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.
◆ dwDepthMapCreator_bindInput()
Binds input point cloud to depth map creator.
- Parameters
-
| [in] | pointCloud | Pointer to input buffer |
| [in] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_HANDLE | when neither of given handle is valid
|
| DW_INVALID_ARGUMENT | when point cloud input is nullptr |
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwDepthMapCreator_bindOutputDepthMap()
Binds output depth map.
- Parameters
-
| [in] | depthMapHandle | Pointer to output depth map. Note: if the output point cloud is defined earlier it will be discarded |
| [in] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_HANDLE | when given handle is not valid
|
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwDepthMapCreator_bindOutputPointCloud()
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] | pointCloud | Pointer to output point cloud. If a depth map was bound previously it is discarded. |
| [in] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_HANDLE | when the given handle is not valid
|
| DW_INVALID_ARGUMENT | when pointCloud is nullptr, or when the point cloud does not satisfy size/type/format rules for the configured XYZI/RTHI depth map
|
| DW_NOT_SUPPORTED | when the configured depth image format is DW_DEPTH_IMAGE_FORMAT_DISTANCE or DW_DEPTH_IMAGE_FORMAT_INTENSITY
|
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwDepthMapCreator_getCUDAStream()
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] | stream | Pointer to CUDA stream handle |
| [in] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_ARGUMENT | when stream is nullptr
|
| DW_INVALID_HANDLE | when depthMapCreatorHandle is invalid
|
| DW_CALL_NOT_ALLOWED | when the creator is not GPU-enabled (CPU depth map creator)
|
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwDepthMapCreator_getDefaultParams()
Get default depth map creator parameters.
- Parameters
-
| [out] | params | Pointer to depth map creator parameters |
| [in] | lidarProps | lidar sensor properties |
- Return values
-
| DW_INVALID_ARGUMENT | when given param pointer is invalid |
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwDepthMapCreator_initialize()
Initialize the module.
- Parameters
-
| [out] | depthMapCreatorHandle | Pointer to depth map creator handle |
| [in] | params | Pointer to depth map creator parameters |
| [in] | ctx | DW context handle |
- Return values
-
| DW_INVALID_ARGUMENT | when given pointer is invalid |
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwDepthMapCreator_process()
Project the bound input point cloud into the bound output depth map or organized point cloud.
- Parameters
-
| [in] | passType | Which 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] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_HANDLE | when depthMapCreatorHandle is invalid
|
| DW_INVALID_ARGUMENT | when passType is not a supported enumerator, or the input point cloud is empty
|
| DW_CALL_NOT_ALLOWED | when input or output is not bound, or when a CUDA split pass is used out of order or repeated as above
|
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwDepthMapCreator_release()
Release depth map creator.
- Parameters
-
| [in] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_HANDLE | when given handle is valid
|
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: No
- De-Init: Yes
◆ dwDepthMapCreator_reset()
Reset depth map creator.
- Parameters
-
| [in] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_HANDLE | when given handle is invalid |
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwDepthMapCreator_setCUDAStream()
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] | stream | CUDA stream to use for GPU work |
| [in] | depthMapCreatorHandle | Handle to depth map creator |
- Return values
-
| DW_INVALID_HANDLE | when depthMapCreatorHandle is invalid
|
| DW_CALL_NOT_ALLOWED | when the creator is not GPU-enabled (CPU depth map creator)
|
| DW_SUCCESS | when operation succeeded |
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes