DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

waitcondition/camera/docs/usecase2.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page waitcondition_usecase2 Wait Conditions Classification Workflow for Traffic Signs
4 
5 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
6 
7 The following code snippet shows the general structure of a program that uses waitconditions classifier to classify detected traffic signs from a single camera. Note that error handling is left out for clarity.
8 
9 Initialize SignNet default parameters and then the module:
10 ```{.cpp}
11 dwSignNetParams signNetParams{};
12 dwSignNet_initDefaultParams(&signNetParams);
13 dwSignNet_initialize(&signNetHandle,&signNetParams, sdkHandle);
14 ```
15 
16 Initialize Waitcondition classifier module from initialized SignNet handle:
17 ```{.cpp}
18 dwTrafficLightSignClassifier_initializeFromSignNet(&signClassifierHandle,
19  signNetHandle,
20  sdkHandle);
21 ```
22 
23 Classify detected traffic signs 'trafficSignList' from a frame:
24 ```{.cpp}
25 dwTrafficLightSignClassifier_inferDeviceAsync(frame, &trafficSignList, numTrafficSigns, dwObjectClassTrafficSign, &objectClassifierHandle);
26 dwTrafficLightSignClassifier_interpretHost(numTrafficSigns, dwObjectClassTrafficSign, &objectClassifierHandle);
27 dwTrafficLightSignClassifier_getClassifiedObjects(&trafficSignList, numTrafficSigns, &objectClassifierHandle);
28 
29 ```
30 
31 When finished, release the module handles:
32 ```{.cpp}
33 dwTrafficLightSignClassifier_release(objectClassifierHandle);
34 dwSignNet_release(signNetHandle);
35 ```
36 
37 For more detailed workflow, please refer to the ligthClassifier sample: @ref dwx_sign_classification_sample