1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page landmarks_usecase_segmentation Landmark Detector Segmentation Init Workflow
4 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
6 The following code snippet demonstrates the general structure of a program utilizing @ref landmarks_mainsection to detect landmarks from a single camera. Error handling is left out for clarity.
7 @note Afer the initialization phase this workflow is identical to @ref landmarks_usecase_regressor.
9 ### Initializing MapNet's Default Parameters and MapNet Module using Segmentation Network
12 dwMapNetParams mapNetParams{};
13 dwMapNet_initDefaultParams(&mapNetParams, DW_MAPNET_TYPE_SEGMENTATION, sdkHandle);
14 dwMapNet_initialize(&mapNetHandle, &mapNetParams, sdkHandle);
18 ### Initializing the Landmark Detection Module from the Initialized MapNet Handle
21 // Initialize LandmarkDetector from MapNet
25 // initialize parameters
26 dwLandmarkDetectorParams params;
27 dwLandmarkDetector_initializeDefaultParams(¶ms, frameWidth, frameHeight));
28 params.landmarkDetectionThreshold[DW_LANDMARK_TYPE_LANES] = 0.3;
29 params.landmarkTypesEnabled = DW_LANDMARK_SELECTION_MASK_LANE_MARKING | DW_LANDMARK_SELECTION_MASK_POLES;
30 params.isModelParameterFitting[DW_LANDMARK_TYPE_LANES] = true;
31 params.detectionROI = {0, 0, 960, 480};
33 dwLandmarkDetector_initializeFromMapNet(&landmarkDetectorHandle, mapNetHandle, params, frameWidth, frameHeight, sdkHandle);
36 ### Detecting Landmark Markings from a Video Sequence
39 dwLaneDetection lanes{};
40 dwLandmarkDetection landmarks{};
43 dwLandmarkDetector_detectLandmarks(&lanes, &landmarks, frame, landmarkDetectorHandle);
48 ### Releasing the Module Handles when Finished
51 dwLandmarkDetector_release(landmarkDetectorHandle);
52 dwMapNet_release(mapNetHandle);
55 For a more detailed workflow, please refer to the following samples:
56 - @ref dwx_landmark_perception_sample.