Pylon_GrabImage_WithTimeout
Captures an image stream from a camera using Pylon library; returns Nil if no frame comes in the specified time.
Syntax
C++
Python
def Pylon_GrabImage_WithTimeout( state: Pylon_State, /, *, inDeviceID: str | None = None, inOutputQueueSize: int = 3, inTimeout: int = 100, inPixelFormat: PylonImageFormat | None = None, inFrameRate: float | None = None, inAoi: Box | None = None, inExposureTime: float | None = None, inGain: float | None = None, inBlackLevel: float | None = None, inTriggerEnabled: bool | None = None, inTriggerSource: PylonTriggerSource | None = None, inTriggerActivation: PylonTriggerActivation | None = None ) -> ( outResult: bool, outImage: Image | None, outFrameID: int | None, outTimestamp: int | None )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
ioState | Pylon_State | |||
![]() |
inDeviceID | str | None | None | Serial number, model name, user defined name or full name of camera device to be opened | |
![]() |
inOutputQueueSize | int | 1 - 200 | 3 | Capacity of output frames queue |
![]() |
inTimeout | int | 100 - ![]() |
100 | Maximum time to wait for frame in milliseconds |
![]() |
inPixelFormat | PylonImageFormat | None | None | Image pixel format | |
![]() |
inFrameRate | float | None | 0.1 - 400.0 | None | Requested camera frame rate in frames per second |
![]() |
inAoi | Box | None | None | Required fragment of image to stream. To reset AOI set Box(0,0,0,0) | |
![]() |
inExposureTime | float | None | 0.0 - ![]() |
None | Camera frame exposition time |
![]() |
inGain | float | None | 0.0 - ![]() |
None | Analog gain of source image in device raw unit |
![]() |
inBlackLevel | float | None | 0.0 - ![]() |
None | Black level of source image |
![]() |
inTriggerEnabled | bool | None | None | Configure trigger enable | |
![]() |
inTriggerSource | PylonTriggerSource | None | None | Source of acquisition trigger | |
![]() |
inTriggerActivation | PylonTriggerActivation | None | None | Circumstances defining when the trigger is activated | |
![]() |
outImage | Image | None | Captured frame | ||
![]() |
outFrameID | int | None | Captured frame ID | ||
![]() |
outTimestamp | int | None | 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.




