DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

LigthSourceDetector Workflow

Initialization

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

An instance of type dwLightSourceDetectorParams encodes parameters (currently only perception ROI) and encapsulates a handle to LightSourceNet (of type dwLightSourceNetHandle_t) that configures the LightSourceDetector module.

To initialize a pointer to a dwLightSourceDetectorHandle_t instance with an initialized LightSourceNet handle and default parameter values:

An example code snippet to initialize required modules with default values:

dwLightSourceNetParams m_lightSourceNetParams{};
// Initialize LightSourceNet
CHECK_DW_ERROR(dwLightSourceNet_initDefaultParams(&m_lightSourceNetParams));
CHECK_DW_ERROR(dwLightSourceNet_initialize(&m_lightSourceNet, &m_lightSourceNetParams, m_sdk));
// dwLightSourceDetector_initialize
CHECK_DW_ERROR(dwLightSourceDetector_initialize(&m_lightSourceDetector, m_lightSourceNet, m_sdk));

where m_sdk is an initialized instance of dwContextHandle_t.

Processing

With initialized handle to the LightSourceDetector module, the following functions can be used to perform inference on an image and retrieve the processed output, which indicate binary ON/OFF high beam signal:

Release

The following functions can be used to reset or release the initialized module handles whenever necessary:

For usage of a sample application, please refer to LightSourcePerception Sample (LightSourceNet).

Additional Information

See LightSourceNet for information on DNN used in this perception module (LightSourceNet).