![]() |
PVCAM
3.10.x
Programmable Virtual Camera Access Method library
|
SMART Streaming allows the user to assign individual exposure settings to each frame of a continuous sequence; the camera will apply the settings just before the frame is captured. This feature is camera-dependent, please check PARAM_SMART_STREAM_MODE_ENABLED parameter and ATTR_AVAIL to discover the availability.
The maximum number of SMART Streaming entries varies from camera to camera. This parameter can be requested via the ATTR_MAX attribute of particular SMART Streaming parameter (PARAM_SMART_STREAM_EXP_PARAMS or PARAM_SMART_STREAM_DLY_PARAMS).
The diagram below illustrates SMART Streaming for a sequence of 3 frames with exposures of 10ms, 20ms, 30ms, and no delay between frames.
An example of SMART Streaming acquisition setup:
A SMART Streaming acquisition is programmed by sending the camera a list of the individual exposures or delays along with the frame count. To facilitate this process, the smart_stream_type structure encapsulates the required parameters. This data type consists of an uns16 variable called entries and an array of uns32 values called params. The params variable points to a list of exposures or delays. The entries variable contains the number of entries in the list.
A variable of type smart_stream_type can be filled in two ways:
The parameters PARAM_SMART_STREAM_EXP_PARAMS and PARAM_SMART_STREAM_DLY_PARAMS work with values of smart_stream_type structure. The same type is returned also for other attributes. For backward compatibility with inconsistent historical implementation, all other attributes except for ATTR_CURRENT return only the first two bytes of smart_stream_type structure, i.e. the number of entries, which in case of ATTR_MAX represents the maximum number of entries the camera accepts. This size can be used to pre-allocate the structure dynamically for its maximum possible size. The value of ATTR_COUNT reports the current number of valid exposure entries returned by ATTR_CURRENT.