DriveWorks SDK Reference

| 0.6.67 Release

FreeSpaceDetector.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 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_FREESPACEDETECTOR_H__
46 #define DW_FREESPACEDETECTOR_H__
47 
48 #include <dw/core/Context.h>
49 #include <dw/core/Types.h>
50 #include <dw/image/Image.h>
51 #include <dw/dnn/DNN.h>
54 
55 
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 #pragma pack(push,1) // Make sure we have consistent structure packings
62 
64 typedef enum
65 {
72 
74 typedef struct {
76 
79 
82 
85 
87 
91 typedef struct dwFreeSpaceDetectorObject *dwFreeSpaceDetectorHandle_t;
92 
105 dwStatus dwFreeSpaceDetector_initializeFreeSpaceNet(dwFreeSpaceDetectorHandle_t *obj,
106  uint32_t frameWidth,
107  uint32_t frameHeight,
108  cudaStream_t stream,
109  dwContextHandle_t ctx);
110 
129 dwStatus dwFreeSpaceDetector_initializeCalibratedFreeSpaceNet(dwFreeSpaceDetectorHandle_t *obj,
130  uint32_t frameWidth,
131  uint32_t frameHeight,
132  cudaStream_t stream,
133  dwTransformation cam2rig,
134  float32_t maxDistance,
136  dwContextHandle_t ctx);
137 
146 dwStatus dwFreeSpaceDetector_reset(dwFreeSpaceDetectorHandle_t obj);
147 
158 dwStatus dwFreeSpaceDetector_release(dwFreeSpaceDetectorHandle_t *obj);
159 
170 dwStatus dwFreeSpaceDetector_processDeviceAsync(const dwImageCUDA* frame, dwFreeSpaceDetectorHandle_t obj);
171 
182 dwStatus dwFreeSpaceDetector_interpretHost(dwFreeSpaceDetectorHandle_t obj);
183 
197 dwStatus dwFreeSpaceDetector_getBoundaryDetection(dwFreeSpaceDetection *boundary, dwFreeSpaceDetectorHandle_t obj);
198 
211 dwStatus dwFreeSpaceDetector_setCUDAStream(cudaStream_t stream, dwFreeSpaceDetectorHandle_t obj);
212 
223 dwStatus dwFreeSpaceDetector_getCUDAStream(cudaStream_t *stream, dwFreeSpaceDetectorHandle_t obj);
224 
235  dwFreeSpaceDetectorHandle_t obj);
236 
246 dwStatus dwFreeSpaceDetector_getDetectionROI(dwRect* roi, dwFreeSpaceDetectorHandle_t obj);
247 
259 dwStatus dwFreeSpaceDetector_setTemporalSmoothFactor(float32_t factor, dwFreeSpaceDetectorHandle_t obj);
260 
274 dwStatus dwFreeSpaceDetector_setSpatialSmoothFilterWidth(uint32_t width, dwFreeSpaceDetectorHandle_t obj);
275 
285 dwStatus dwFreeSpaceDetector_getDNNMetaData(dwDNNMetaData* metaData, dwFreeSpaceDetectorHandle_t obj);
286 
287 #pragma pack(pop)
288 
289 #ifdef __cplusplus
290 }
291 #endif
292 
293 #endif // DW_FREESPACEDETECTOR_H__
NVIDIA DriveWorks API: Rig Configuration
NVIDIA DriveWorks API: Camera Methods
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
Definition: Types.h:77
Defines a rectangle.
Definition: Types.h:151
const dwVector2f * boundaryImagePoint
Boundary point location in image space (pixels).
boundary with curb
Defines a two-element floating-point vector.
Definition: Types.h:207
boundary with other objects
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_getDNNMetaData(dwDNNMetaData *metaData, dwFreeSpaceDetectorHandle_t obj)
Returns the DNN metadata.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_setSpatialSmoothFilterWidth(uint32_t width, dwFreeSpaceDetectorHandle_t obj)
Sets the spatial smoothing filter width.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_getCUDAStream(cudaStream_t *stream, dwFreeSpaceDetectorHandle_t obj)
Gets CUDA stream used by the free space detection.
Defines a CUDA image.
Definition: Image.h:263
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_reset(dwFreeSpaceDetectorHandle_t obj)
Resets the free space detector module.
struct dwFreeSpaceDetectorObject * dwFreeSpaceDetectorHandle_t
Handle to a DataConditioner.
NVIDIA DriveWorks API: Core Methods
boundary with person
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_getBoundaryDetection(dwFreeSpaceDetection *boundary, dwFreeSpaceDetectorHandle_t obj)
Gets the latest computed results.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_interpretHost(dwFreeSpaceDetectorHandle_t obj)
Runs the interpretation of the processed results on the CPU.
dwFreeSpaceBoundaryType
Category of free space boundary.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_release(dwFreeSpaceDetectorHandle_t *obj)
Releases the detector module.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_initializeFreeSpaceNet(dwFreeSpaceDetectorHandle_t *obj, uint32_t frameWidth, uint32_t frameHeight, cudaStream_t stream, dwContextHandle_t ctx)
Initializes a free space detector module based on FreeSpaceNet.
NVIDIA DriveWorks API: DNN Methods
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
dwStatus
Status definition.
Definition: Status.h:167
Holds the defintion of a boundary in one image.
struct dwCalibratedCameraObject * dwCalibratedCameraHandle_t
A pointer to the handle representing a calibrated camera.
Definition: Camera.h:66
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_getDetectionROI(dwRect *roi, dwFreeSpaceDetectorHandle_t obj)
Gets the detection Region of Interest (ROI) for the detector.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_initializeCalibratedFreeSpaceNet(dwFreeSpaceDetectorHandle_t *obj, uint32_t frameWidth, uint32_t frameHeight, cudaStream_t stream, dwTransformation cam2rig, float32_t maxDistance, dwCalibratedCameraHandle_t cam, dwContextHandle_t ctx)
Initializes a free space detector module based on FreeSpaceNet with a calibrated camera.
boundary with vehicle
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_processDeviceAsync(const dwImageCUDA *frame, dwFreeSpaceDetectorHandle_t obj)
Processes the given frame on the GPU asynchronously.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:78
Specifies TensorRT model header.
Definition: DNN.h:68
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_setCUDAStream(cudaStream_t stream, dwFreeSpaceDetectorHandle_t obj)
Sets the CUDA stream for CUDA related operations.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_setTemporalSmoothFactor(float32_t factor, dwFreeSpaceDetectorHandle_t obj)
Sets the temporal smoothing factor.
DW_API_PUBLIC dwStatus dwFreeSpaceDetector_setDetectionROI(const dwRect *roi, dwFreeSpaceDetectorHandle_t obj)
Sets the detection Region of Interest (ROI) for the detector.
#define DW_API_PUBLIC
Definition: Exports.h:76
const dwFreeSpaceBoundaryType * boundaryType
Category of the boundary.
const dwVector2f * boundaryWorldPoint
Boundary point location in car domain (meter).