DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

ParkNetDetector.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 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 
45 #ifndef DW_PARKNET_DETECTOR_H_
46 #define DW_PARKNET_DETECTOR_H_
47 
49 #include <dw/dnn/DNN.h>
50 #include <dw/dnn/DataConditioner.h>
51 #include <dw/image/Image.h>
52 #include <dw/core/Context.h>
54 #include <dw/world/ObjectArray.h>
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
60 #define DW_PARK_DETECTION_MAX_COUNT 5000
61 #define DW_PARK_DETECTION_N_COORDINATES_2D 8
62 #define DW_PARK_DETECTION_N_COORDINATES_3D 12
63 
67 typedef struct dwParkNetDetectorObject* dwParkNetDetectorHandle_t;
68 
69 typedef struct
70 {
71  // Detected parking space object on image coordinates.
73  // Detected parking space object on rig coordinates.
75  // Detected parking space confidence score.
77  // Index of the entry line.
78  uint32_t entryLine;
79 } dwParkObject;
80 
81 typedef struct
82 {
84  // Number of detected park spaces.
85  uint32_t numDetection;
86  // Detected parking spaces array.
88  // Size of the image for the output detections.
89  // Needed when the structure is passed around without access to camera information (like renderer).
90  uint32_t imageWidth;
91  uint32_t imageHeight;
93 
94 typedef struct
95 {
97  uint32_t maxNumImages;
106  // Size of the image for the output detections.
107  // Needed when the structure is passed around without access to camera information (like renderer).
108  uint32_t imageWidth;
109  uint32_t imageHeight;
111 
113 // dwParkNetDetector
114 
124 
136 dwStatus dwParkNetDetector_initializeFromParkNet(dwParkNetDetectorHandle_t* obj,
137  const dwParkNetDetectorParams* detectorParams,
138  dwParkNetHandle_t parknet,
139  dwContextHandle_t ctx);
140 
149 dwStatus dwParkNetDetector_reset(dwParkNetDetectorHandle_t obj);
150 
161 dwStatus dwParkNetDetector_release(dwParkNetDetectorHandle_t obj);
162 
179 dwStatus dwParkNetDetector_inferDeviceAsync(dwParkNetDetectorHandle_t obj);
180 
192 dwStatus dwParkNetDetector_interpret(dwParkNetDetectorHandle_t obj);
193 
204 dwStatus dwParkNetDetector_getParkDetections(dwParkDetection* parkingSpaces, dwParkNetDetectorHandle_t obj);
205 
215 dwStatus dwParkNetDetector_setCUDAStream(const cudaStream_t stream, dwParkNetDetectorHandle_t obj);
216 
226 dwStatus dwParkNetDetector_getCUDAStream(cudaStream_t* stream, dwParkNetDetectorHandle_t obj);
227 
237 dwStatus dwParkNetDetector_setCameraExtrinsics(dwTransformation3f cam2rig, dwParkNetDetectorHandle_t obj);
238 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 #endif // DW_PARKNET_DETECTOR_H_
NVIDIA DriveWorks API: Camera Methods
DW_API_PUBLIC dwStatus dwParkNetDetector_setCameraExtrinsics(dwTransformation3f cam2rig, dwParkNetDetectorHandle_t obj)
Set the transformation from camera to rig.
float float32_t
Specifies POD types.
Definition: Types.h:70
DW_API_PUBLIC dwStatus dwParkNetDetector_release(dwParkNetDetectorHandle_t obj)
Releases the ParkNetDetector module.
Defines a rectangle.
Definition: Types.h:189
struct dwParkNetObject * dwParkNetHandle_t
Handle to a ParkNet object.
Definition: ParkNet.h:59
NVIDIA DriveWorks API: World Module
DW_API_PUBLIC dwStatus dwParkNetDetector_setCUDAStream(const cudaStream_t stream, dwParkNetDetectorHandle_t obj)
Sets the CUDA stream used.
uint32_t numDetection
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
dwCameraModelHandle_t cam
Calibrated camera handle.
uint32_t maxNumImages
Maximum number of images (cannot be larger than DW_DETECTOR_MAX_IMAGES). Default is 1...
Specifies a 3D rigid transformation.
Definition: Types.h:462
float32_t scaleOriginalToInput
Image size ratio.
NVIDIA DriveWorks API: DNN Methods
dwStatus
Status definition.
Definition: Status.h:178
DW_API_PUBLIC dwStatus dwParkNetDetector_interpret(dwParkNetDetectorHandle_t obj)
Output of the inference (dwObjectDetector_inferDeviceAsync) is interpreted to get the list of object ...
NVIDIA DriveWorks API: Data Conditioner Methods
#define DW_PARK_DETECTION_N_COORDINATES_2D
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
struct dwParkNetDetectorObject * dwParkNetDetectorHandle_t
Handle to a ParkNet-based detector object.
DW_API_PUBLIC dwStatus dwParkNetDetector_reset(dwParkNetDetectorHandle_t obj)
Resets ParkNetDetector.
DW_API_PUBLIC dwStatus dwParkNetDetector_inferDeviceAsync(dwParkNetDetectorHandle_t obj)
Runs inference using the provided DNN model.
NVIDIA DriveWorks API: ParkNet Module
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
DW_API_PUBLIC dwStatus dwParkNetDetector_initializeFromParkNet(dwParkNetDetectorHandle_t *obj, const dwParkNetDetectorParams *detectorParams, dwParkNetHandle_t parknet, dwContextHandle_t ctx)
Initializes ParkNetDetector module with a ParkNet module.
#define DW_PARK_DETECTION_MAX_COUNT
float32_t boxConfidence
struct dwCameraModelObject * dwCameraModelHandle_t
A pointer to the handle representing a calibrated camera model.
Definition: CameraModel.h:68
DW_API_PUBLIC dwStatus dwParkNetDetector_getCUDAStream(cudaStream_t *stream, dwParkNetDetectorHandle_t obj)
Gets the CUDA stream used.
#define DW_PARK_DETECTION_N_COORDINATES_3D
DW_API_PUBLIC dwStatus dwParkNetDetector_getParkDetections(dwParkDetection *parkingSpaces, dwParkNetDetectorHandle_t obj)
Return the interpreted output.
uint32_t entryLine
dwRect ROI
to have the right size for DNN. Default ROI is the whole image.
uint32_t imageHeight
dwTransformation3f cam2Rig
Camera to rig transformation matrix.
#define DW_API_PUBLIC
Definition: Exports.h:56
DW_API_PUBLIC dwStatus dwParkNetDetector_initDefaultParams(dwParkNetDetectorParams *detectorParams)
Initializes ParkNetDetector parameters structure with default values.