DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Auto Headlight Controller API usage
Note
SW Release Applicability: This tutorial is applicable to modules in NVIDIA DRIVE Software releases.

The HeadlightController module creates handle of type dwHeadlightControllerHandle_t. This handle is owned by the application and must be released by the application when not needed anymore.

Before you contruct your headlight controller, you need to know your camera type in advance, at this moment, only type DW_CAMERA_GMSL_AR0231 is supported.

Headlight controller has very simple APIs, an exmple below shows how to use it.

// Initialize headlight controller with existed ctx and camera type
dwHeadlightControllerHandle_t headlightControllerHandle;
dwStatus dwHeadlightController_initialize(headlightControllerHandle,
ctx);
// In your pipeline main loop, get control level for each input frame
float32_t headlightControllLevel;
rawImageCPU,
headlightControllerHandle);
// Release handle when main loop finished
dwHeadlightController_release(headlightControllerHandle);

where ctx is an initialized instance of dwContextHandle_t.

Control value is a float number within range [0.0, 1.0], the value was fine tuned to make sure when control signal level >=0.5, car should turn on headlight.

Function dwHeadlightController_computeControlLevel() should be called for each camera frame within in the main loop, a low pass filter was exploited to reduce flickering which requires consective function call to maintain the updates.

For more details see Headlight Controller Sample.