DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

perception/landmarks/camera/docs/usecase_e2e.md
Go to the documentation of this file.
1 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page landmarks_usecase_e2e Landmark Detector End-to-End Init Workflow
4 
5 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.
6 
7 ### Initializing the End-to-End Network
8 
9 ```{.cpp}
10 dwMapNetParams mapNetParams{};
11 dwMapNet_initDefaultParams(&mapNetParams, DW_MAPNET_TYPE_E2E, sdkHandle)
12 dwMapNet_initialize(&mapNetHandle, &mapNetParams, sdkHandle);
13 ```
14 
15 ### Modifying Additional End-to-End Network Initialization Settings and Initialize Detector
16 
17 ```{.cpp}
18 uint32_t frameWidth;
19 uint32_t frameHeight;
20 
21 // initialize parameters
22 dwLandmarkDetectorParams params;
23 dwLandmarkDetector_initializeDefaultParams(&params, frameWidth, frameHeight, sdkHandle));
24 dwLandmarkDetector_initializeFromMapNet(&landmarkDetectorHandle, mapNetHandle, params, frameWidth, frameHeight, sdkHandle);
25 
26 // initialize end-to-end post processing parameters
27 dwLRNPostProcessingParam regressorParam;
28 dwLandmarkDetector_initializeDefaultRegressorParams(&regressorParam);
29 dwLandmarkDetector_setPostProcessingParam(regressorParam, landmarkDetectorHandle);
30 ```
31 
32 ### Detecting Landmark Markings from a Video Sequence
33 
34 ```{.cpp}
35 dwLaneDetection lanes{};
36 dwLandmarkDetection landmarks{};
37 while (true)
38 {
39  dwLandmarkDetector_detectLandmarks(&lanes, &landmarks, frame, landmarkDetectorHandle);
40 }
41 
42 ```
43 
44 ### Releasing the Module Handles when Finished
45 
46 ```{.cpp}
47 dwLandmarkDetector_release(landmarkDetectorHandle);
48 dwMapNet_release(mapNetHandle);
49 ```
50 
51 For a more detailed workflow, please refer to the following samples:
52 - @ref dwx_landmark_detection_by_regressor_net_sample.