Defines LightSourceDetector module for light source detection.
- Note
- SW Release Applicability: These APIs are available in NVIDIA DRIVE Software releases.
|
dwStatus | dwLightSourceDetector_detectAutoNet (dwLightSourceDetectorAutoBeamStatus *beamStatus, dwLightSourceDetectorMask *mask, const dwImageCUDA *imgBayer, dwAutoNetOutputHandle_t netOutput, dwLightSourceDetectorHandle_t obj) |
| Very simple API call to do inference on a frame. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_getCUDAStream (cudaStream_t *stream, dwLightSourceDetectorHandle_t obj) |
| Gets the CUDA stream used. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_initDefaultParams (dwLightSourceDetectorParams *detectorParams) |
| Initializes LightSourceDetector parameters with default values. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_initialize (dwLightSourceDetectorHandle_t *obj, dwLightSourceNetHandle_t lspnet, const dwLightSourceDetectorParams *detectorParams, dwContextHandle_t ctx) |
| Initializes LightSourceDetector module with a LightSourceNet module. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_initializeFromAutoNet (dwLightSourceDetectorHandle_t *obj, dwAutoNetHandle_t autonet, const dwLightSourceDetectorParams *detectorParams, dwContextHandle_t ctx) |
| Initializes LightSourceDetector module with a LightSourceNet module. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_processLightSourcePipeline (dwLightSourceDetectorAutoBeamStatus *output, const dwImageCUDA *imgRGB, const dwImageCUDA *imgBayer, dwLightSourceDetectorHandle_t obj) |
| Provided input images, execute Light Source Perception pipeline, returning output immediately. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_release (dwLightSourceDetectorHandle_t obj) |
| Releases the LightSourceDetector module. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_reset (dwLightSourceDetectorHandle_t obj) |
| Resets the LightSourceDetector module. More...
|
|
DW_API_PUBLIC dwStatus | dwLightSourceDetector_setCUDAStream (cudaStream_t stream, dwLightSourceDetectorHandle_t obj) |
| Sets the CUDA stream used. More...
|
|
◆ dwLightSourceDetectorAutoBeamStatus
struct dwLightSourceDetectorAutoBeamStatus |
Data Fields |
bool |
flag |
High beam ON/OFF binary flag. |
◆ dwLightSourceDetectorMask
struct dwLightSourceDetectorMask |
◆ dwLightSourceDetectorParams
struct dwLightSourceDetectorParams |
Data Fields |
float32_t |
classThreshold[DW_LIGHTSOURCE_CLASS_COUNT] |
Class detection thresholds. |
uint32_t |
glareThreshold |
Glare detection threshold (in bayer pixel value) |
dwRect |
ROI |
Region of interest for each image at the corresponding index. The image is cropped at the given ROI. The cropped region is then be scaled while keeping the aspect ratio and is padded to have the right size for DNN. Default ROI is the whole image.
|
◆ dwLightSourceDetectorHandle_t
◆ dwLightSourceDetectorClass
Enumerator |
---|
DW_LIGHTSOURCE_CLASS_CAR | Car (or other road user with active light)
|
DW_LIGHTSOURCE_CLASS_STREET_LIGHT | Street light.
|
DW_LIGHTSOURCE_CLASS_OTHER_LIGHT | Other light.
|
DW_LIGHTSOURCE_CLASS_COUNT | Total class count.
|
Definition at line 68 of file LspDetector.h.
◆ dwLightSourceDetector_detectAutoNet()
Very simple API call to do inference on a frame.
- Parameters
-
[out] | beamStatus | Struct encoding results of LSP detection (currently the high beam control flag) |
[out] | mask | output segmentation masks for each class |
[in] | imgBayer | Storing pointer to RAW Bayer image (used to detect road sign glare), can be null |
[in] | netOutput | autonet output tensor which gives inference output for lsp |
[in] | obj | Specifies the LightSourceDetector module handle. |
- Returns
- DW_INVALID_HANDLE - If the given context handle is invalid.
DW_BAD_CAST - If cannot cast the given handle to the expected type.
DW_SUCCESS DW_API_PUBLIC
◆ dwLightSourceDetector_getCUDAStream()
Gets the CUDA stream used.
- Parameters
-
[out] | stream | The CUDA stream used. |
[in] | obj | A pointer to the LightSourceDetector handle. |
- Returns
- DW_SUCCESS operation completed successfully DW_INVALID_ARGUMENT null handle passed
◆ dwLightSourceDetector_initDefaultParams()
Initializes LightSourceDetector parameters with default values.
- Parameters
-
[out] | detectorParams | LightSourceDetector parameters. |
- Returns
- DW_SUCCESS parameters initialized DW_INVALID_ARGUMENT if nullptr passed
◆ dwLightSourceDetector_initialize()
Initializes LightSourceDetector module with a LightSourceNet module.
- Parameters
-
[out] | obj | A pointer to LightSourceDetector handle that is initialized from parameters. |
[in] | ctx | Specifies the handle to the context. |
[in] | lspnet | Specifies the handle to the LightSourceNet module. |
[in] | detectorParams | A pointer to LightSourceDetector parameters. |
- Returns
- DW_SUCCESS initialization succeeded DW_INVALID_ARGUMENT one of the parameters invalid (nullptr or null handle)
◆ dwLightSourceDetector_initializeFromAutoNet()
Initializes LightSourceDetector module with a LightSourceNet module.
- Parameters
-
[out] | obj | A pointer to LightSourceDetector handle that is initialized from parameters. |
[in] | autonet | Specifies the handle to the AutoNet module. |
[in] | detectorParams | A pointer to LightSourceDetector parameters. |
[in] | ctx | Specifies the handle to the context. |
- Returns
- DW_SUCCESS initialization succeeded DW_INVALID_ARGUMENT one of the parameters invalid (nullptr or null handle)
◆ dwLightSourceDetector_processLightSourcePipeline()
Provided input images, execute Light Source Perception pipeline, returning output immediately.
NOTE: This call combines all processing steps that may execute atomically: bind input bind output pre-process inference post-process copy result This call will overwrite the previous input/output bindings.
- Parameters
-
[out] | output | Struct encoding results of LSP detection (currently the high beam control flag) |
[in] | imgRGB | Storing pointer to post-ISP RGB or RCB image where the detector is to be applied. |
[in] | imgBayer | Storing pointer to RAW Bayer image (used to detect road sign glare), can be null |
[in] | obj | Specifies the LightSourceDetector module handle. |
- Returns
- DW_SUCCESS operation completed successfully DW_INVALID_ARGUMENT one of the parameters are invalid (nullptr or null handle)
◆ dwLightSourceDetector_release()
Releases the LightSourceDetector module.
- Parameters
-
[in] | obj | Object handle to release. |
- Returns
- DW_SUCCESS successfully released DW_INVALID_ARGUMENT null pointer passed
- Note
- This method renders the handle unusable.
◆ dwLightSourceDetector_reset()
Resets the LightSourceDetector module.
- Parameters
-
[in] | obj | Object handle to release. |
- Returns
- DW_SUCCESS the module was successfully reset DW_INVALID_ARGUMENT null pointer passed
◆ dwLightSourceDetector_setCUDAStream()
Sets the CUDA stream used.
- Parameters
-
[in] | stream | The CUDA stream used. |
[in] | obj | A pointer to the LightSourceDetector handle that is updated. |
- Returns
- DW_SUCCESS operation completed successfully DW_INVALID_ARGUMENT null handle passed