DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

LandmarkDetector.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) 2018-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 
47 #ifndef DW_PERCEPTION_LANDMARKS_CAMERA_LANDMARKDETECTOR_H_
48 #define DW_PERCEPTION_LANDMARKS_CAMERA_LANDMARKDETECTOR_H_
49 
50 #include <dw/core/Context.h>
51 #include <dw/core/Types.h>
52 
53 #include <dw/dnn/DNN.h>
55 
59 #include <dw/image/Image.h>
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
65 #pragma pack(push, 1) // Make sure we have consistent structure packings
66 
68 typedef enum {
75 
76 typedef struct
77 {
79  float32_t landmarkDetectionThreshold[DW_LANDMARK_TYPE_COUNT];
83  bool isModelParameterFitting[DW_LANDMARK_TYPE_COUNT];
87 
91 typedef struct dwLandmarkDetectorObject* dwLandmarkDetectorHandle_t;
92 
97 {
107 {
119 
129 
140 dwStatus dwLandmarkDetector_initializeDefaultParams(dwLandmarkDetectorParams* params, uint32_t frameWidth, uint32_t frameHeight);
141 
152 
166 dwStatus dwLandmarkDetector_initializeFromMapNet(dwLandmarkDetectorHandle_t* obj,
167  dwMapNetHandle_t mapnet,
169  uint32_t frameWidth,
170  uint32_t frameHeight,
171  dwContextHandle_t ctx);
172 
186 dwStatus dwLandmarkDetector_initializeFromAutoNet(dwLandmarkDetectorHandle_t* obj,
187  dwAutoNetHandle_t autonet,
189  uint32_t frameWidth,
190  uint32_t frameHeight,
191  dwContextHandle_t ctx);
192 
207  dwLandmarkDetection* landmarks,
208  dwRoadmarkDetection* roadmarks,
209  const dwImageCUDA* frame,
210  dwLandmarkDetectorHandle_t obj);
211 
226  dwLandmarkDetection* landmarks,
227  dwRoadmarkDetection* roadmarks,
228  dwAutoNetOutputHandle_t netOutput,
229  dwLandmarkDetectorHandle_t obj);
230 
241 dwStatus dwLandmarkDetector_reset(dwLandmarkDetectorHandle_t obj);
242 
255 dwStatus dwLandmarkDetector_release(dwLandmarkDetectorHandle_t obj);
256 
267  const dwTransformation3f* cameraToRig,
268  dwLandmarkDetectorHandle_t obj);
269 
284 dwStatus dwLandmarkDetector_setCUDAStream(cudaStream_t stream, dwLandmarkDetectorHandle_t obj);
285 
298 dwStatus dwLandmarkDetector_getCUDAStream(cudaStream_t* stream, dwLandmarkDetectorHandle_t obj);
299 
312 dwStatus dwLandmarkDetector_getDetectionROI(dwRect* roi, dwLandmarkDetectorHandle_t obj);
313 
328 dwStatus dwLandmarkDetector_getLaneDetections(dwLaneDetection* lanes, dwLandmarkDetectorHandle_t obj);
329 
338 dwStatus dwLandmarkDetector_getLandmarkDetections(dwLandmarkDetection* landmarkDetection, dwLandmarkDetectorHandle_t obj);
339 
348 dwStatus dwLandmarkDetector_getRoadmarkDetections(dwRoadmarkDetection* roadmarkDetection, dwLandmarkDetectorHandle_t obj);
349 
360 dwStatus dwLandmarkDetector_getPostProcessingParam(dwLRNPostProcessingParam* param, dwLandmarkDetectorHandle_t obj);
361 
373 dwStatus dwLandmarkDetector_setPostProcessingParam(const dwLRNPostProcessingParam param, dwLandmarkDetectorHandle_t obj);
374 
385 dwStatus dwLandmarkDetector_setROI(dwRect detectionROI, dwLandmarkDetectorHandle_t obj);
386 
387 #pragma pack(pop)
388 
389 #ifdef __cplusplus
390 }
391 #endif
392 
393 #endif // DW_PERCEPTION_LANDMARKS_CAMERA_LANDMARKDETECTOR_H_
NVIDIA DriveWorks API: Camera Methods
DW_API_PUBLIC dwStatus dwLandmarkDetector_getLandmarkDetections(dwLandmarkDetection *landmarkDetection, dwLandmarkDetectorHandle_t obj)
Gets the general landmark detection in image coordinates.
DW_API_PUBLIC dwStatus dwLandmarkDetector_release(dwLandmarkDetectorHandle_t obj)
Releases the detector module.
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwLandmarkDetector_reset(dwLandmarkDetectorHandle_t obj)
Resets the landmark detector module.
float float32_t
Specifies POD types.
Definition: Types.h:70
Data structure for holding road marking polygon detection parameters.
DW_API_PUBLIC dwStatus dwLandmarkDetector_setCUDAStream(cudaStream_t stream, dwLandmarkDetectorHandle_t obj)
Sets the CUDA stream for CUDA related operations.
Defines a rectangle.
Definition: Types.h:189
struct dwMapNetObject * dwMapNetHandle_t
Handle to a MapNet object.
Definition: MapNet.h:62
DW_API_PUBLIC dwStatus dwLandmarkDetector_getRoadmarkDetections(dwRoadmarkDetection *roadmarkDetection, dwLandmarkDetectorHandle_t obj)
Gets the roadmark detection in image coordinates.
DW_API_PUBLIC dwStatus dwLandmarkDetector_getPostProcessingParam(dwLRNPostProcessingParam *param, dwLandmarkDetectorHandle_t obj)
Note: only DW_MAPNET_TYPE_REGRESSOR and DW_MAPNET_TYPE_E2E type networks are supported Get post proce...
dwRect detectionROI
sets the region of interest in an image that is actually processed by the network ...
Defines a CUDA image.
Definition: Image.h:266
DW_API_PUBLIC dwStatus dwLandmarkDetector_getDetectionROI(dwRect *roi, dwLandmarkDetectorHandle_t obj)
Get detection Region of Interest (ROI) for the detector.
float32_t unitDist
distance term
The output format of detected line types.
NVIDIA DriveWorks API: AutoNet Module
NVIDIA DriveWorks API: Core Methods
DW_API_PUBLIC dwStatus dwLandmarkDetector_getLaneDetections(dwLaneDetection *lanes, dwLandmarkDetectorHandle_t obj)
Gets the latest computed results in image coordinates.
NVIDIA DriveWorks API: Image Conversion and Streaming Functionality
uint32_t landmarkTypesEnabled
Bit mask to identify which landmark types are enabled based on the enum dwLandmarkSelectionMask.
dwRoadMarkingPolygonDetectionParam roadMarkingDetectionTerm
struct for roadmarking polygon settings
dwLandmarkSelectionMask
Bitmask enum which enables specific landmark types to detect.
DW_API_PUBLIC dwStatus dwLandmarkDetector_initializeDefaultRegressorParams(dwLRNPostProcessingParam *params)
Note: only DW_MAPNET_TYPE_REGRESSOR and DW_MAPNET_TYPE_E2E type networks are supported Sets the defau...
DW_API_PUBLIC dwStatus dwLandmarkDetector_initializeFromMapNet(dwLandmarkDetectorHandle_t *obj, dwMapNetHandle_t mapnet, dwLandmarkDetectorParams params, uint32_t frameWidth, uint32_t frameHeight, dwContextHandle_t ctx)
Initializes a landmark detector module based on MapNet.
NVIDIA DriveWorks API: MapNet Module
DW_API_PUBLIC dwStatus dwLandmarkDetector_setCamera(dwCameraModelHandle_t camera, const dwTransformation3f *cameraToRig, dwLandmarkDetectorHandle_t obj)
Sets the calibrated camera for projection of lanes and landmarks.
float32_t differentClassPenalty
class difference term
Specifies a 3D rigid transformation.
Definition: Types.h:462
dwStatus dwLandmarkDetector_detectLandmarksAutoNet(dwLaneDetection *lanes, dwLandmarkDetection *landmarks, dwRoadmarkDetection *roadmarks, dwAutoNetOutputHandle_t netOutput, dwLandmarkDetectorHandle_t obj)
Very simple API call to do inference on a frame.
NVIDIA DriveWorks API: DNN Methods
uint8_t nonMaxSuppressionRadius
radius size for non max suppression calculation
dwStatus
Status definition.
Definition: Status.h:178
DW_API_PUBLIC dwStatus dwLandmarkDetector_setROI(dwRect detectionROI, dwLandmarkDetectorHandle_t obj)
Set image ROI for landmark detector.
float32_t betaForDistanceInSmoothnessTerm
The output of road mark detection and classification.
float32_t minValidDNNMaskThreshold
threshold value from 0-0.99 on what probability is considered a valid network output ...
DW_API_PUBLIC dwStatus dwLandmarkDetector_getCUDAStream(cudaStream_t *stream, dwLandmarkDetectorHandle_t obj)
Gets CUDA stream used by the landmark detection.
DW_API_PUBLIC dwStatus dwLandmarkDetector_initializeDefaultParams(dwLandmarkDetectorParams *params, uint32_t frameWidth, uint32_t frameHeight)
Sets the default detected landmark types for the LandmarkDetector.
bool enableDistanceCorrection
flag to enable distance correction for road marking polygons
DW_API_PUBLIC dwStatus dwLandmarkDetector_setPostProcessingParam(const dwLRNPostProcessingParam param, dwLandmarkDetectorHandle_t obj)
Note: only DW_MAPNET_TYPE_REGRESSOR and DW_MAPNET_TYPE_E2E type networks are supported.
struct dwLandmarkDetectorObject * dwLandmarkDetectorHandle_t
Handle to a LandmarkDetector.
The output format of detected lanes.
dwStatus dwLandmarkDetector_detectLandmarks(dwLaneDetection *lanes, dwLandmarkDetection *landmarks, dwRoadmarkDetection *roadmarks, const dwImageCUDA *frame, dwLandmarkDetectorHandle_t obj)
Very simple API call to do inference on a frame.
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:80
float32_t betaForAnglesInSmoothnessTerm
terms to smooth the curve for regressor net post processing
struct dwAutoNetObject * dwAutoNetHandle_t
Handle to a AutoNet object.
Definition: AutoNet.h:65
struct dwAutoNetOutputObject * dwAutoNetOutputHandle_t
Handle to a AutoNet output object.
Definition: AutoNet.h:71
struct dwCameraModelObject * dwCameraModelHandle_t
A pointer to the handle representing a calibrated camera model.
Definition: CameraModel.h:68
NVIDIA DriveWorks API: Landmark Detector Methods
float32_t diminishingFactorForNearLineZigZag
DW_API_PUBLIC dwStatus dwLandmarkDetector_initializeFromAutoNet(dwLandmarkDetectorHandle_t *obj, dwAutoNetHandle_t autonet, dwLandmarkDetectorParams params, uint32_t frameWidth, uint32_t frameHeight, dwContextHandle_t ctx)
Initializes a landmark detector module based on AutoNet.
bool enableRoadMarkingPolygons
flag to enable road marking polygons
#define DW_API_PUBLIC
Definition: Exports.h:56
Data structure holding post processing parameters.
uint8_t minimumVotesThreshold
Set a minimum votes for points extractions in post processing.