Defines 2D Connected Components Labeling algorithm.
- Note
- SW Release Applicability: These APIs are available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.
◆ dwConnectedComponentsHandle_t
◆ dwConstConnectedComponentsHandle_t
A constant pointer to the opaque handle for Connected Components.
Definition at line 64 of file ConnectedComponents.h.
◆ dwConnectedComponents_bindInput()
Specifies input image to be processed.
- Parameters
-
[in] | image | A pointer to input image |
[in] | ccl | Specifies the opaque connected components handle. |
- Returns
- DW_INVALID_ARGUMENT - input image is null or does not match description provided on initialization
DW_INVALID_HANDLE
DW_SUCCESS
◆ dwConnectedComponents_bindOutputLabels()
Specifies output label image for ccl algorithm.
- Parameters
-
[in] | labels | A pointer to output image containing labels |
[in] | ccl | Specifies the opaque connected components handle. |
- Returns
- DW_INVALID_ARGUMENT - output image does not match description provided on initialization
DW_INVALID_HANDLE
DW_SUCCESS
◆ dwConnectedComponents_getCUDAStream()
Returns CUDA stream where kernels are executed.
- Parameters
-
[in] | stream | Specifies pointer where cuda stream will be returned. Should not be NULL |
[in] | ccl | Specifies the opaque connected components handle. |
- Returns
- DW_INVALID_HANDLE - if provided ccl handle is null
DW_SUCCESS
◆ dwConnectedComponents_initialize()
Initializes connected components.
Must be initialized in a thread with valid CUDA context.
- Parameters
-
[out] | ccl | A pointer to the opaque connected components handle. |
[in] | inputDesc | Description of input image. |
[in] | context | Specifies the opaque handle of a dwContext . |
- Returns
- DW_INVALID_ARGUMENT - if any of provided arguments is NULL or input image description contain invalid image size
DW_NOT_SUPPORTED - if input description contains attributes which are not supported
DW_CUDA_ERROR - if module could not create some of internal CUDA resources
DW_SUCCESS
◆ dwConnectedComponents_process()
Performs image labeling.
- Parameters
-
[in] | ccl | Specifies the opaque connected components handle. |
- Returns
- DW_CALL_NOT_ALLOWED - if input or output is not bound
DW_CUDA_ERROR - CUDA kernels failed to execute
DW_FAILURE - on generic failure
DW_INVALID_HANDLE
DW_SUCCESS
- Note
- The call is asynchronous. The user suppose to sync the stream to make sure all necessary work is done.
◆ dwConnectedComponents_release()
Releases connected components object.
- Parameters
-
[in] | ccl | A pointer to the opaque connected components handle. |
- Returns
- DW_INVALID_HANDLE - if provided handle is NULL
DW_FAILURE
DW_SUCCESS
◆ dwConnectedComponents_reset()
Performs reset of connected components object.
- Parameters
-
[in] | ccl | Specifies the opaque connected components handle. |
- Returns
- DW_INVALID_HANDLE
DW_SUCCESS
◆ dwConnectedComponents_setCUDAStream()
Specifies CUDA stream where kernels are executed.
- Parameters
-
[in] | stream | Specifies cuda stream. |
[in] | ccl | Specifies the opaque connected components handle. |
- Returns
- DW_INVALID_ARGUMENT - if provided pointer to ccl handle is null
DW_SUCCESS
◆ dwConnectedComponents_setThreshold()
Specifies threshold to binarize input image.
- Parameters
-
[in] | threshold | - 8-bit unsigned integer threshold value |
[in] | ccl | Specifies the opaque connected components handle |
- Returns
- DW_INVALID_HANDLE
DW_SUCCESS
- Note
- By default threshold is 127