Hikvision_GrabImage_WithTimeout


Captures an image from a Hikvision device.

Syntax

C++
Python
 
def Hikvision_GrabImage_WithTimeout(
	state: Hikvision_State,
	/,
	*,
	inDeviceID: str | None = None,
	inTimeout: int = 0,
	inInputQueueSize: int = 8,
	inPixelFormat: HikvisionPixelFormat = HikvisionPixelFormat.Mono8,
	inRoi: Box | None = None,
	inFrameRate: float | None = None,
	inFrameRateAuto: bool = True,
	inExposureTime: float | None = 10000.0,
	inExposureTimeAuto: bool = False,
	inGain: float | None = 0.0,
	inGainAuto: bool = False
)
-> (
	outResult: bool,
	outImage: Image | None,
	outFrameID: int | None
)

Parameters

Name Type Range Default Description
Input will be modified ioState Hikvision_State
Input value inDeviceID str | None None Camera serial number, name or IP address, Auto = first camera
Input value inTimeout int 0 Maximum time to wait for frame in milliseconds
Input value inInputQueueSize int 1 - 8 Sets size of image queue (on acquisition start)
Input value inPixelFormat HikvisionPixelFormat HikvisionPixelFormat.Mono8 Image pixel format (set on acquisition start)
Input value inRoi Box | None None Region of interest (set on acquisition start)
Input value inFrameRate float | None 0.0 - None Sets the frame rate limit
Input value inFrameRateAuto bool True True if frame rate is not limited
Input value inExposureTime float | None 0.0 - 10000.0 Sets the target exposure time in microseconds
Input value inExposureTimeAuto bool False True if using automatic exposure time
Input value inGain float | None 0.0 - 0.0 Sets gain in dB
Input value inGainAuto bool False True if using automatic gain
Output value outImage Image | None Captured image
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.