Defines landmark detector module based on MapNet, i.e., DNN based landmark detector.
Data Structures | |
| struct | dwLandmarkDetectorParams |
| struct | dwLRNPostProcessingParam |
| Data structure holding post processing parameters. More... | |
| struct | dwRoadMarkingPolygonDetectionParam |
| Data structure for holding road marking polygon detection parameters. More... | |
Typedefs | |
| typedef struct dwLandmarkDetectorObject * | dwLandmarkDetectorHandle_t |
| Handle to a LandmarkDetector. More... | |
| struct dwLandmarkDetectorParams |
| Data Fields | ||
|---|---|---|
| dwRect | detectionROI | sets the region of interest in an image that is actually processed by the network |
| bool | isModelParameterFitting[DW_LANDMARK_TYPE_COUNT] | Toggle image space polyfitting in MapNet. If false, sends out raw network detections. |
| float32_t | landmarkDetectionThreshold[DW_LANDMARK_TYPE_COUNT] | Sets the detection confidence threshold for a given landmark type. |
| uint32_t | landmarkTypesEnabled | Bit mask to identify which landmark types are enabled based on the enum dwLandmarkSelectionMask. |
| struct dwLRNPostProcessingParam |
| Data Fields | ||
|---|---|---|
| float32_t | betaForAnglesInSmoothnessTerm | terms to smooth the curve for regressor net post processing |
| float32_t | betaForDistanceInSmoothnessTerm | |
| float32_t | betaForDistanceTerm | |
| float32_t | differentClassPenalty | class difference term |
| float32_t | diminishingFactorForNearLineZigZag | |
| uint8_t | minimumVotesThreshold | Set a minimum votes for points extractions in post processing. |
| float32_t | minProbAnglesInSmoothnessTerm | |
| float32_t | minProbZigZagInSmoothnessTerm | |
| float32_t | minValidDNNMaskThreshold | threshold value from 0-0.99 on what probability is considered a valid network output |
| uint8_t | nonMaxSuppressionRadius | radius size for non max suppression calculation |
| dwRoadMarkingPolygonDetectionParam | roadMarkingDetectionTerm | struct for roadmarking polygon settings |
| float32_t | unitDist | distance term |
| struct dwRoadMarkingPolygonDetectionParam |
| typedef struct dwLandmarkDetectorObject* dwLandmarkDetectorHandle_t |
Handle to a LandmarkDetector.
Definition at line 91 of file LandmarkDetector.h.
The DLA process stages of the Landmark Detector.
Definition at line 76 of file LandmarkDetector_processPipeline.h.
The GPU process stages of the Landmark Detector.
Definition at line 66 of file LandmarkDetector_processPipeline.h.
Bitmask enum which enables specific landmark types to detect.
| Enumerator | |
|---|---|
| DW_LANDMARK_SELECTION_MASK_LANE_MARKING | |
| DW_LANDMARK_SELECTION_MASK_POLES | |
| DW_LANDMARK_SELECTION_MASK_INTERSECTIONS | |
| DW_LANDMARK_SELECTION_MASK_ROADMARK | |
| DW_LANDMARK_SELECTION_MASK_ALL | |
Definition at line 68 of file LandmarkDetector.h.
| DW_API_PUBLIC dwStatus dwLandmarkDetector_bindInput | ( | const dwImageCUDA *const * | images, |
| uint32_t | imageCount, | ||
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Binds the input to the detector as a list of images.
| [in] | images | Array storing pointers to images where the detector is to be applied. |
| [in] | imageCount | Number of images provided in the array. |
| [in] | obj | Specifies the ObjectDetector handle. |
imageCount must be divisible by the batch size of the network. | DW_API_PUBLIC dwStatus dwLandmarkDetector_bindLandmarksOutput | ( | dwLandmarkDetection * | output, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Binds the poles output of the detector to a structure.
| [out] | output | A user pointer to be filled with information about detected poles. |
| [in] | obj | A landmark detector handle. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_bindLanesOutput | ( | dwLaneDetection * | output, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Binds the lanes output of the detector to a structure.
| [out] | output | A user pointer to be filled with information about detected lanes. |
| [in] | obj | A landmark detector handle. |
| dwStatus dwLandmarkDetector_detectLandmarks | ( | dwLaneDetection * | lanes, |
| dwLandmarkDetection * | landmarks, | ||
| const dwImageCUDA * | frame, | ||
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Very simple API call to do inference on a frame.
| [out] | lanes | output struct for lane detections |
| [out] | landmarks | output struct for landmark detections |
| [in] | frame | CUDA image containing the frame. |
| [in] | obj | Handle to detector. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_getCUDAStream | ( | cudaStream_t * | stream, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Gets CUDA stream used by the landmark detection.
NOTE: At the moment the landmark type field is ignored, this applies to all types.
| [out] | stream | The CUDA stream currently used. |
| [in] | obj | A handle to the landmark detection module. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_getDetectionROI | ( | dwRect * | roi, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Get detection Region of Interest (ROI) for the detector.
NOTE: At the moment the landmark type field is ignored, this applies to all types.
| [out] | roi | ROI of frame to be processed by the detector, default to full frame |
| [in] | obj | A landmark detector handle |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_getLandmarkDetections | ( | dwLandmarkDetection * | landmarkDetection, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Gets the general landmark detection in image coordinates.
This method has to be executed after dwLandmarkDetector_interpretHost() to get the current output of the detector.
| [out] | landmarkDetection | Detections include roadmarking and poles. |
| [in] | obj | A lane detector handle. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_getLaneDetections | ( | dwLaneDetection * | lanes, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Gets the latest computed results in image coordinates.
This method has to be executed after dwLandmarkDetector_interpretHost() to get the current output of the detector.
| [out] | lanes | A user pointer to be filled with information about detected lanes. |
| [in] | obj | A lane detector handle. |
| 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 processing parameters for regressor network.
| [out] | param | A dwLRNPostProcessingParam used in the module |
| [in] | obj | A lane detector handle (must be of type MapRegressorNet) |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_initializeDefaultParams | ( | dwLandmarkDetectorParams * | params, |
| uint32_t | frameWidth, | ||
| uint32_t | frameHeight | ||
| ) |
Sets the default detected landmark types for the LandmarkDetector.
| [out] | params | A pointer to the struct to populate with default values. |
| [in] | frameWidth | image width |
| [in] | frameHeight | image height |
| 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 default regressor post processing parameters for the LandmarkDetector.
| [out] | params | A pointer to the struct to populate with default values. |
| 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.
| [out] | obj | A pointer to the landmark detector handle for the created module. |
| [in] | mapnet | Specifies the handle to the MapNet module. |
| [in] | params | Specifies which landmark types to detect |
| [in] | frameWidth | Width of camera frames to apply landmark detector later. |
| [in] | frameHeight | Height of camera frames to apply landmark detector later. |
| [in] | ctx | Specifies the handler to the context to create MapNet. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_process | ( | dwLandmarkDetectorStage | stage, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Performs a single processing stage in the GPU pipeline.
| [in] | stage | The stage to process. |
| [in] | obj | A landmark detector handle. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_processDLA | ( | dwLandmarkDetectorDLAStage | stage, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Performs a single processing stage in the DLA pipeline.
| [in] | stage | The stage to process. |
| [in] | obj | A landmark detector handle. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_release | ( | dwLandmarkDetectorHandle_t | obj | ) |
Releases the detector module.
| [in] | obj | The object handle to release. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_reset | ( | dwLandmarkDetectorHandle_t | obj | ) |
Resets the landmark detector module.
| [in] | obj | Specifies the detector to reset. |
| 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.
| [in] | camera | The calibrated camera. |
| [in] | cameraToRig | The camera to rig transformation matrix. |
| [in] | obj | A handle to the landmark detector module for which to set camera. |
| DW_API_PUBLIC dwStatus dwLandmarkDetector_setCUDAStream | ( | cudaStream_t | stream, |
| dwLandmarkDetectorHandle_t | obj | ||
| ) |
Sets the CUDA stream for CUDA related operations.
NOTE: At the moment the landmark type field is ignored, this applies to all types.
| [in] | stream | The CUDA stream to be used. Default is the one passed during initialization. |
| [in] | obj | A handle to the landmark detector module for which to set CUDA stream. |
| 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.
Set post processing parameters
| [out] | param | A dwLRNPostProcessingParam used in the module |
| [in] | obj | A lane detector handle (must be of type MapRegressorNet) |