The Headlight Controller sample demonstrates the usage of dwHeadlightController
related APIs. Headlight Controller is an module to provide the feature that automatically turn on/off the headlight(low beam) according to environment ambient intensity change without driver's intervention.
The command line for the sample application is:
./sample_headlight_controller --input-type=[video|camera] --video=[path/to/video] --camera-type=[camera] --camera-group=[a|b|c|d] --camera-index=[0|1|2|3]
where
--input-type=[video|camera] Defines if the input is from live camera or from a recorded video. Live camera is supported only on NVIDIA DRIVE(tm) platforms. It is not supported on Linux (x86 architecture) host systems. Default value: video --video=[path/to/video] Specifies the absolute or relative path of a raw, lraw or h264 recording. Only applicable if --input-type=video Default value: path/to/data/samples/headlight/into-tunnel.lraw --camera-type=[camera] Only applicable if --input-type=camera. Default value: ar0231-rccb-bae-sf3324 --camera-group=[a|b|c|d] Is the group where the camera is connected to. Only applicable if --input-type=camera. Default value: a --camera-index=[0|1|2|3] Indicates the camera index on the given port. Default value: 0
./sample_headlight_controller --input-type=video --video=<video file.raw>
./sample_headlight_controller --input-type=camera --camera-type=<camera type> --camera-group=<camera group> --camera-index=<camera idx on camera group>
The output of the sample code is a video window, on the right side, it will display current control level and headlight control status.
For headlight device without intensity output control, threshold 0.5 should be used for the indicator of on/off, value greater equal with 0.5 should be treated as turn on signal.
For headlight device with intensity output control, you could choose the mapping range from [0.5, 1] to your can message control signal value according to fit you calibration requirement.
For more information, see Camera-based Headlight Controller.