1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page waitcondition_usecase1 Wait Conditions Classification Workflow for Traffic Lights
5 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
7 The following code snippet shows the general structure of a program that uses waitconditions classifier to classify detected traffic lights from a single camera. Note that error handling is left out for clarity.
9 Initialize LightNet default parameters and then the module:
11 dwLightNetParams lightNetParams{};
12 dwLightNet_initDefaultParams(&lightNetParams);
13 dwLightNet_initialize(&lightNetHandle,&lightNetParams, sdkHandle);
16 Initialize Waitcondition classifier module from initialized LightNet handle:
18 dwTrafficLightSignClassifier_initializeFromLightNet(&lightClassifierHandle,
23 Classify detected traffic lights 'trafficLightList' from a frame:
25 dwTrafficLightSignClassifier_inferDeviceAsync(frame, &trafficLightList, numTrafficLights, dwObjectClassTrafficLight, &objectClassifierHandle);
26 dwTrafficLightSignClassifier_interpretHost(numTrafficLights, dwObjectClassTrafficLight, &objectClassifierHandle);
27 dwTrafficLightSignClassifier_getClassifiedObjects(&trafficLightList, numTrafficLights, &objectClassifierHandle);
31 When finished, release the module handles:
33 dwTrafficLightSignClassifier_release(objectClassifierHandle);
34 dwLightNet_release(lightNetHandle);
37 For more detailed workflow, please refer to the ligthClassifier sample: @ref dwx_light_classification_sample