Hikvision_GrabImage
Captures an image from a Hikvision device.
Syntax
C++
Python
def Hikvision_GrabImage( state: Hikvision_State, outImage: Image, /, *, inDeviceID: str | None = None, 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, outFrameID: int | None )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
ioState | Hikvision_State | |||
![]() |
inDeviceID | str | None | None | Camera serial number, name or IP address, Auto = first camera | |
![]() |
inInputQueueSize | int | 1 - ![]() |
8 | Sets size of image queue (on acquisition start) |
![]() |
inPixelFormat | HikvisionPixelFormat | HikvisionPixelFormat.Mono8 | Image pixel format (set on acquisition start) | |
![]() |
inRoi | Box | None | None | Region of interest (set on acquisition start) | |
![]() |
inFrameRate | float | None | 0.0 - ![]() |
None | Sets the frame rate limit |
![]() |
inFrameRateAuto | bool | True | True if frame rate is not limited | |
![]() |
inExposureTime | float | None | 0.0 - ![]() |
10000.0 | Sets the target exposure time in microseconds |
![]() |
inExposureTimeAuto | bool | False | True if using automatic exposure time | |
![]() |
inGain | float | None | 0.0 - ![]() |
0.0 | Sets gain in dB |
![]() |
inGainAuto | bool | False | True if using automatic gain | |
![]() |
outImage | Image | Captured frame | ||
![]() |
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.




