DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

ConnectedComponents.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed
3 // under the Mutual Non-Disclosure Agreement.
4 //
5 // Notice
6 // ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
7 // NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
8 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
9 // MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
10 //
11 // NVIDIA Corporation assumes no responsibility for the consequences of use of such
12 // information or for any infringement of patents or other rights of third parties that may
13 // result from its use. No license is granted by implication or otherwise under any patent
14 // or patent rights of NVIDIA Corporation. No third party distribution is allowed unless
15 // expressly authorized by NVIDIA. Details are subject to change without notice.
16 // This code supersedes and replaces all information previously supplied.
17 // NVIDIA Corporation products are not authorized for use as critical
18 // components in life support devices or systems without express written approval of
19 // NVIDIA Corporation.
20 //
21 // Copyright (c) 2019-2020 NVIDIA Corporation. All rights reserved.
22 //
23 // NVIDIA Corporation and its licensors retain all intellectual property and proprietary
24 // rights in and to this software and related documentation and any modifications thereto.
25 // Any use, reproduction, disclosure or distribution of this software and related
26 // documentation without an express license agreement from NVIDIA Corporation is
27 // strictly prohibited.
28 //
30 
46 #ifndef DW_IMAGEPROCESSING_CONNECTED_COMPONENTS_H_
47 #define DW_IMAGEPROCESSING_CONNECTED_COMPONENTS_H_
48 
49 #include <dw/image/Image.h>
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
58 typedef struct dwConnectedComponentsObject* dwConnectedComponentsHandle_t;
62 typedef struct dwConnectedComponentsObject* const dwConstConnectedComponentsHandle_t;
63 
75 dwStatus dwConnectedComponents_initialize(dwConnectedComponentsHandle_t* ccl,
76  const dwImageProperties* inputDesc,
77  dwContextHandle_t context);
78 
87 dwStatus dwConnectedComponents_setCUDAStream(cudaStream_t stream, dwConnectedComponentsHandle_t ccl);
88 
97 dwStatus dwConnectedComponents_getCUDAStream(cudaStream_t* stream, dwConnectedComponentsHandle_t ccl);
98 
110  dwConnectedComponentsHandle_t ccl);
111 
124  dwConnectedComponentsHandle_t ccl);
125 
136 dwStatus dwConnectedComponents_bindOutputLabels(dwImageCUDA* labels, dwConnectedComponentsHandle_t ccl);
137 
150 dwStatus dwConnectedComponents_process(dwConnectedComponentsHandle_t ccl);
151 
159 dwStatus dwConnectedComponents_reset(dwConnectedComponentsHandle_t ccl);
160 
169 dwStatus dwConnectedComponents_release(dwConnectedComponentsHandle_t ccl);
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif // DW_IMAGEPROCESSING_CONNECTED_COMPONENTS_H_
DW_API_PUBLIC dwStatus dwConnectedComponents_release(dwConnectedComponentsHandle_t ccl)
Releases connected components object.
Defines a CUDA image.
Definition: Image.h:268
DW_API_PUBLIC dwStatus dwConnectedComponents_bindInput(const dwImageCUDA *image, dwConnectedComponentsHandle_t ccl)
Specifies input image to be processed.
DW_API_PUBLIC dwStatus dwConnectedComponents_getCUDAStream(cudaStream_t *stream, dwConnectedComponentsHandle_t ccl)
Returns CUDA stream where kernels are executed.
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
DW_API_PUBLIC dwStatus dwConnectedComponents_initialize(dwConnectedComponentsHandle_t *ccl, const dwImageProperties *inputDesc, dwContextHandle_t context)
Initializes connected components.
struct dwConnectedComponentsObject * dwConnectedComponentsHandle_t
A pointer to the opaque handle for Connected Components.
struct dwConnectedComponentsObject *const dwConstConnectedComponentsHandle_t
A constant pointer to the opaque handle for Connected Components.
dwStatus
Status definition.
Definition: Status.h:180
DW_API_PUBLIC dwStatus dwConnectedComponents_reset(dwConnectedComponentsHandle_t ccl)
Performs reset of connected components object.
DW_API_PUBLIC dwStatus dwConnectedComponents_bindOutputLabels(dwImageCUDA *labels, dwConnectedComponentsHandle_t ccl)
Specifies output label image for ccl algorithm.
DW_API_PUBLIC dwStatus dwConnectedComponents_setThreshold(uint8_t threshold, dwConnectedComponentsHandle_t ccl)
Specifies threshold to binarize input image.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
DW_API_PUBLIC dwStatus dwConnectedComponents_setCUDAStream(cudaStream_t stream, dwConnectedComponentsHandle_t ccl)
Specifies CUDA stream where kernels are executed.
DW_API_PUBLIC dwStatus dwConnectedComponents_process(dwConnectedComponentsHandle_t ccl)
Performs image labeling.
#define DW_API_PUBLIC
Definition: Exports.h:54
Defines the properties of the image.
Definition: Image.h:238