AvSMART_GrabImage_WithTimeout


Captures images from a AvSMART device.

Applications:Use this filter if the trigger may be not coming for some time, while the application should perform other operations in the main loop continuously, or when the timeout situation must be explicitly detected, or when you want to process images from multiple cameras in a single loop and the cameras are sending images asynchronously.

Syntax

C++
Python
 
def AvSMART_GrabImage_WithTimeout(
	state: AvSmart_State,
	/,
	*,
	inTimeout: int = 10,
	inInputQueueSize: int = 3,
	inImageFormat: RoseekImageFormat = RoseekImageFormat.Mono8,
	inResolutionMode: RoseekResolutionMode | None = None,
	inROI: Box | None = None,
	inFrameRate: float | None = None,
	inWorkingMode: RoseekWorkingMode | None = None,
	inSensitivityLevel: int | None = None,
	inExposureMode: RoseekExposureMode | None = None,
	inExposureTime: int | None = None,
	inGain: float | None = None
)
-> (
	outResult: bool,
	outImage: Image | None,
	outFrameID: int | None
)

Parameters

Name Type Range Default Description
Input will be modified ioState AvSmart_State
Input value inTimeout int 10 - 3600000 10 Maximum time to wait for frame in milliseconds
Input value inInputQueueSize int 1 - 1000 3 Number of incoming frames that can be buffered before the application is able to process them
Input value inImageFormat RoseekImageFormat RoseekImageFormat.Mono8 Image pixel format
Input value inResolutionMode RoseekResolutionMode | None None Set resolution of image
Input value inROI Box | None None Set resolution region. Has effect only if resolution mode is ROI.
Input value inFrameRate float | None 0.1 - 400.0 None Requested camera frame rate in frames per second
Input value inWorkingMode RoseekWorkingMode | None None Working mode of image acquisition
Input value inSensitivityLevel int | None 0 - 3 None Sensitivity level of camera sensor
Input value inExposureMode RoseekExposureMode | None None Exposure mode, should be set to Manual if you want to adjust inExposureTime manually
Input value inExposureTime int | None 0 - None Camera frame exposition time
Input value inGain float | None 0.0 - 36.0 None Camera exposure gain
Output value outImage Image | None Captured frame
Output value outFrameID int | None Captured frame ID

Multithreaded environment

This function is not guaranteed to be thread-safe. When used in multithreaded environment, it has to be manually synchronized.