DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

LspDetector.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) 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 
48 #ifndef DW_LIGHTSOURCENET_DETECTOR_H_
49 #define DW_LIGHTSOURCENET_DETECTOR_H_
50 
52 #include <dw/dnn/DNN.h>
53 #include <dw/dnn/DataConditioner.h>
54 #include <dw/image/Image.h>
55 #include <dw/core/Context.h>
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
62 
65 typedef struct dwLightSourceDetectorObject* dwLightSourceDetectorHandle_t;
66 
67 typedef enum {
77 
78 typedef struct
79 {
84 
87 
89  uint32_t glareThreshold;
90 
93 
95 
96 typedef struct
97 {
99  bool flag;
100 
102 
104 // dwLightSourceDetector
105 
116 
129 dwStatus dwLightSourceDetector_initialize(dwLightSourceDetectorHandle_t* obj,
131  const dwLightSourceDetectorParams* detectorParams,
132  dwContextHandle_t ctx);
133 
155  const dwImageCUDA* imgRGB,
156  const dwImageCUDA* imgBayer,
157  dwLightSourceDetectorHandle_t obj);
158 
169 dwStatus dwLightSourceDetector_setCUDAStream(cudaStream_t stream, dwLightSourceDetectorHandle_t obj);
170 
181 dwStatus dwLightSourceDetector_getCUDAStream(cudaStream_t* stream, dwLightSourceDetectorHandle_t obj);
182 
194 dwStatus dwLightSourceDetector_release(dwLightSourceDetectorHandle_t obj);
195 
196 #ifdef __cplusplus
197 }
198 #endif
199 
200 #endif // DW_LIGHTSOURCENET_DETECTOR_H_
float float32_t
Specifies POD types.
Definition: Types.h:70
NVIDIA DriveWorks API: LightSourceNet Module
Defines a rectangle.
Definition: Types.h:189
DW_API_PUBLIC dwStatus dwLightSourceDetector_initDefaultParams(dwLightSourceDetectorParams *detectorParams)
Initializes LightSourceDetector parameters with default values.
struct dwLightSourceNetObject * dwLightSourceNetHandle_t
Handle to a LightSourceNet object.
Car (or other road user with active light)
Definition: LspDetector.h:69
Defines a CUDA image.
Definition: Image.h:266
Total class count.
Definition: LspDetector.h:75
bool enablePostProcCPUTest
Enable CPU post processing code for sanity/unit test or not. Default off.
Definition: LspDetector.h:92
uint32_t glareThreshold
Glare detection threshold (in bayer pixel value)
Definition: LspDetector.h:89
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
bool flag
High beam ON/OFF binary flag.
Definition: LspDetector.h:99
DW_API_PUBLIC dwStatus dwLightSourceDetector_setCUDAStream(cudaStream_t stream, dwLightSourceDetectorHandle_t obj)
Sets the CUDA stream used.
DW_API_PUBLIC dwStatus dwLightSourceDetector_getCUDAStream(cudaStream_t *stream, dwLightSourceDetectorHandle_t obj)
Gets the CUDA stream used.
NVIDIA DriveWorks API: DNN Methods
dwStatus
Status definition.
Definition: Status.h:166
NVIDIA DriveWorks API: Data Conditioner Methods
dwRect ROI
Region of interest for each image at the corresponding index.
Definition: LspDetector.h:83
DW_API_PUBLIC dwStatus dwLightSourceDetector_initialize(dwLightSourceDetectorHandle_t *obj, dwLightSourceNetHandle_t lspnet, const dwLightSourceDetectorParams *detectorParams, dwContextHandle_t ctx)
Initializes LightSourceDetector module with a LightSourceNet module.
DW_API_PUBLIC dwStatus dwLightSourceDetector_release(dwLightSourceDetectorHandle_t obj)
Releases the LightSourceDetector module.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
DW_API_PUBLIC dwStatus dwLightSourceDetector_processLightSourcePipeline(dwLightSourceDetectorOutput *output, const dwImageCUDA *imgRGB, const dwImageCUDA *imgBayer, dwLightSourceDetectorHandle_t obj)
Provided input images, execute Light Source Perception pipeline, returning output immediately...
dwLightSourceDetectorClass
Definition: LspDetector.h:67
struct dwLightSourceDetectorObject * dwLightSourceDetectorHandle_t
Handle to an object detector.
Definition: LspDetector.h:65
#define DW_API_PUBLIC
Definition: Exports.h:56