DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

SIPL-based Image Sensors (Virtual)
Note
SW Release Applicability: This tutorial is applicable to modules in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Initialize the Sensor Abstraction Layer

dwSAL_initialize(&sal, sdk);

We create a client

dwSensor cameraSensor = DW_NULL_HANDLE;
params.parameters = "video=out.raw,output-format=processed";
params.protocol = "camera.gmsl.sipl";
dwSAL_createSensor(&cameraSensor, params, sal);

after starting the sensor, the video will be read and we start acquiring frames

dwSensor_start(cameraSensor);
while(loop) {

We read a frame, which is stored as a dwCameraFrameHandle_t and specify a timeout value in microseconds

...
dwTime_t timeout = 33000;
dwSensorCamera_readFrame(&frameHandle, timeout, cameraSensor);
...

we get an image with type DW_CAMERA_OUTPUT_NATIVE_PROCESSED.

...
dwImageHandle_t imageNative;
dwSensorCamera_getImage(&imageNative, DW_CAMERA_IMAGE_OUTPUT_NATIVE_PROCESSED,...);
// CODE: use imageNative
...

return frames to the fifo

stop the sensor and release

dwSensor_stop(cameraSensor);
dwSAL_releaseSensor(&cameraSensor);