DriveWorks SDK Reference
3.0.4260 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 
74 typedef struct
75 {
82 
88 
90  uint8_t numRegionsX;
92  uint8_t numRegionsY;
104 
108 typedef struct dwBlindnessDetectorObject* dwBlindnessDetectorHandle_t;
109 
113 typedef struct
114 {
120  uint8_t numRegionsX;
122  uint8_t numRegionsY;
128 
139 
150 dwStatus dwBlindnessDetector_initialize(dwBlindnessDetectorHandle_t* handle,
151  const dwBlindnessDetectorParams* params,
152  dwContextHandle_t ctx);
153 
164 dwStatus dwBlindnessDetector_reset(dwBlindnessDetectorHandle_t handle);
165 
178 dwStatus dwBlindnessDetector_release(dwBlindnessDetectorHandle_t handle);
179 
192 dwStatus dwBlindnessDetector_setCUDAStream(cudaStream_t stream, dwBlindnessDetectorHandle_t handle);
193 
204 dwStatus dwBlindnessDetector_getCUDAStream(cudaStream_t* stream, dwBlindnessDetectorHandle_t handle);
205 
220 DW_DEPRECATED("WARNING: dwBlindnessDetector_getOutput() will be deprecated from future releases "
221  "Use BlindnessDetector_processPipeline apis instead.")
223  dwBlindnessDetectorHandle_t handle);
224 
251 DW_DEPRECATED("WARNING: dwBlindnessDetector_detect() will be deprecated from future releases "
252  "Use BlindnessDetector_processPipeline apis instead.")
254  dwBlindnessDetectorHandle_t handle);
255 
258 #ifdef __cplusplus
259 }
260 #endif
261 
262 #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:166
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)