XiApi_GrabImage
Captures an image from a XIMEA camera.
Syntax
C++
Python
def XiApi_GrabImage( state: XIAPIState, outImage: Image, /, *, inDeviceID: str | None = None, inImageDataFormat: XiApiImageDataFormat = XiApiImageDataFormat.MONO8, inTriggerSource: XiApiTriggerSource | None = None, inDownsampling: XiApiDownsampling | None = None, inExposureTime: int | None = None, inGain: float | None = None, inAoi: Box | None = None, inBadPixelCorrection: bool | None = None, inAutomaticExposureGain: bool | None = None ) -> ( outResult: bool, outFrameID: int, outTimestamp: int )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
ioState | XIAPIState | |||
![]() |
inDeviceID | str | None | None | Camera chip ID or camera index | |
![]() |
inImageDataFormat | XiApiImageDataFormat | XiApiImageDataFormat.MONO8 | Output data format | |
![]() |
inTriggerSource | XiApiTriggerSource | None | None | Defines source of trigger | |
![]() |
inDownsampling | XiApiDownsampling | None | None | Changes image resolution by binning or skipping | |
![]() |
inExposureTime | int | None | 0 - +![]() |
None | Exposure time in microseconds |
![]() |
inGain | float | None | None | Gain in dB | |
![]() |
inAoi | Box | None | None | Required fragment of image to stream | |
![]() |
inBadPixelCorrection | bool | None | None | Correction of bad pixels | |
![]() |
inAutomaticExposureGain | bool | None | None | Automatic exposure gain | |
![]() |
outImage | Image | Captured frame | ||
![]() |
outFrameID | int | Captured frame ID | ||
![]() |
outTimestamp | int | Captured frame timestamp |
Multithreaded environment
This function is not guaranteed to be thread-safe. When used in multithreaded environment, it has to be manually synchronized.




