DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

BlindnessDetector.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) 2017-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 
38 #ifndef DW_BLINDNESSDETECTOR_H_
39 #define DW_BLINDNESSDETECTOR_H_
40 
41 #include <dw/core/Context.h>
42 #include <dw/core/Types.h>
43 #include <dw/image/Image.h>
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
62 #define DW_CLEARSIGHTNET_DETECTOR_MAX_IMAGES 16
64 
66 #define DW_CLEARSIGHTNET_NUM_OUTPUT_CHANNELS 3
67 
69 #define DW_CLEARSIGHTNET_NUM_MAX_REGIONS 8
70 
72 #define DW_CLEARSIGHTNET_MASK_TYPE DW_IMAGE_CUDA
73 
75 #define DW_CLEARSIGHTNET_MASK_HEIGHT 76
76 
78 #define DW_CLEARSIGHTNET_MASK_WIDTH 120
79 
81 #define DW_CLEARSIGHTNET_MASK_FORMAT DW_IMAGE_FORMAT_RGBA_UINT8
82 
86 typedef struct
87 {
94 
100 
102  uint8_t numRegionsX;
104  uint8_t numRegionsY;
116 
120 typedef struct dwBlindnessDetectorObject* dwBlindnessDetectorHandle_t;
121 
125 typedef struct
126 {
132  uint8_t numRegionsX;
134  uint8_t numRegionsY;
140 
151 
162 dwStatus dwBlindnessDetector_initialize(dwBlindnessDetectorHandle_t* handle,
163  const dwBlindnessDetectorParams* params,
164  dwContextHandle_t ctx);
165 
176 dwStatus dwBlindnessDetector_reset(dwBlindnessDetectorHandle_t handle);
177 
190 dwStatus dwBlindnessDetector_release(dwBlindnessDetectorHandle_t handle);
191 
204 dwStatus dwBlindnessDetector_setCUDAStream(cudaStream_t stream, dwBlindnessDetectorHandle_t handle);
205 
216 dwStatus dwBlindnessDetector_getCUDAStream(cudaStream_t* stream, dwBlindnessDetectorHandle_t handle);
217 
232 DW_DEPRECATED("WARNING: dwBlindnessDetector_getOutput() will be deprecated from future releases "
233  "Use BlindnessDetector_processPipeline apis instead.")
235  dwBlindnessDetectorHandle_t handle);
236 
263 DW_DEPRECATED("WARNING: dwBlindnessDetector_detect() will be deprecated from future releases "
264  "Use BlindnessDetector_processPipeline apis instead.")
266  dwBlindnessDetectorHandle_t handle);
267 
270 #ifdef __cplusplus
271 }
272 #endif
273 
274 #endif // DW_BLINDNESSDETECTOR_H_
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:70
struct dwImageObject * dwImageHandle_t
Definition: Image.h:99
uint8_t numRegionsY
number of region dividers in Y
DW_API_PUBLIC dwStatus dwBlindnessDetector_reset(dwBlindnessDetectorHandle_t handle)
Resets the Blindness detector module.
float32_t partBlindRatio
Partial blindness ratio value (between 0 and 1).
dwClearSightNetHandle_t clearSightNetHandle
handle to ClearSightNet DNN module
uint32_t temporalFilterWindow
num frames over which to temporally filter blindness ratio
Defines a CUDA image.
Definition: Image.h:266
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
DW_API_PUBLIC dwStatus dwBlindnessDetector_setCUDAStream(cudaStream_t stream, dwBlindnessDetectorHandle_t handle)
Sets the CUDA stream for CUDA related operations.
struct dwClearSightNetObject * dwClearSightNetHandle_t
Handle to a ClearSightNet object.
Definition: ClearSightNet.h:62
float32_t fullBlindRatio
Full blindness ratio value (between 0 and 1).
dwStatus
Status definition.
Definition: Status.h:178
dwImageHandle_t mask
RGBA mask (of same size as output blob) with multiple class information encoded into different channe...
DW_API_PUBLIC dwStatus dwBlindnessDetector_getOutput(dwBlindnessDetectionOutput *output, dwBlindnessDetectorHandle_t handle)
Return a blindness detection output.
#define DW_DEPRECATED(msg)
Definition: Exports.h:68
DW_API_PUBLIC dwStatus dwBlindnessDetector_getCUDAStream(cudaStream_t *stream, dwBlindnessDetectorHandle_t handle)
Gets CUDA stream used by the Blindness detection.
DW_API_PUBLIC dwStatus dwBlindnessDetector_detect(const dwImageCUDA *inputImage, dwBlindnessDetectorHandle_t handle)
Runs asynchronous inference using the provided DNN model.
Holds init params for Blindness Detector.
uint8_t numRegionsY
number of region dividers in Y
uint8_t numRegionsX
number of region dividers in X
struct dwBlindnessDetectorObject * dwBlindnessDetectorHandle_t
Handle to a BlindnessDetector.
#define DW_CLEARSIGHTNET_NUM_MAX_REGIONS
Number of sub-regions in each direction.
uint8_t numRegionsX
number of region dividers in X
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
DW_API_PUBLIC dwStatus dwBlindnessDetector_initDefaultParams(dwBlindnessDetectorParams *params)
Initializes default parameters for Blindness detector module.
NVIDIA DriveWorks API: Feature Array and Feature History Array
#define DW_API_PUBLIC
Definition: Exports.h:56
NVIDIA DriveWorks API: ClearSightNet Module
DW_API_PUBLIC dwStatus dwBlindnessDetector_initialize(dwBlindnessDetectorHandle_t *handle, const dwBlindnessDetectorParams *params, dwContextHandle_t ctx)
Initializes a Blindness detector module.
DW_API_PUBLIC dwStatus dwBlindnessDetector_release(dwBlindnessDetectorHandle_t handle)
Releases the Blindness detector module.
Holds the outputs for ClearSightNet.
float32_t blindnessRatio
Overall blindness ratio value (between 0 and 1)