Initialize the Sensor Abstraction Layer
DW_API_PUBLIC dwStatus dwSAL_initialize(dwSALHandle_t *const sal, dwContextHandle_t const context)
Creates and initializes a SAL (sensor abstraction layer) module.
Create a client
params.
parameters =
"camera-name=SF3324,interface=csi-a,link=0,output-format=processed";
const char8_t * parameters
Array to additional parameters provided to sensor creation.
const char8_t * protocol
Name of the protocol.
DW_API_PUBLIC dwStatus dwSAL_createSensor(dwSensorHandle_t *const sensor, dwSensorParams const params, dwSALHandle_t const sal)
Creates a new sensor managed by the SAL module with the given parameters.
Holds sets of parameters for sensor creation.
after starting the sensor, the camera will start acquiring frames
while(loop) {
DW_API_PUBLIC dwStatus dwSensor_start(dwSensorHandle_t const sensor)
Starts the sensor previously successfully created with 'dwSAL_createSensor()'.
We read a frame, which is stored as a dwCameraFrameHandle_t
and specify a timeout value in microseconds
...
...
DW_API_PUBLIC dwStatus dwSensorCamera_readFrame(dwCameraFrameHandle_t *const frameHandle, dwTime_t const timeoutUs, dwSensorHandle_t const sensor)
Reads a frame handle from the camera sensor.
struct dwCameraFrame * dwCameraFrameHandle_t
Handle to captured frame.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
we get an image with type DW_CAMERA_OUTPUT_NATIVE_PROCESSED
.
...
...
DW_API_PUBLIC dwStatus dwSensorCamera_getImage(dwImageHandle_t *const image, dwCameraOutputType const type, dwCameraFrameHandle_t const frame)
Gets the output image/s image in a format specified by the output type.
struct dwImageObject * dwImageHandle_t
return frames to the fifo
...
}
DW_API_PUBLIC dwStatus dwSensorCamera_returnFrame(dwCameraFrameHandle_t *const frameHandle)
Returns a frame to the camera after it has been consumed.
stop the sensor and release
DW_API_PUBLIC dwStatus dwSensor_stop(dwSensorHandle_t const sensor)
Stops the sensor.
DW_API_PUBLIC dwStatus dwSAL_releaseSensor(dwSensorHandle_t const sensor)
Releases a sensor managed by the SAL module.
For more details see: