Thorlabs_GrabImage_WithTimeout
Captures an image from a Thorlabs device.
Syntax
C++
Python
def Thorlabs_GrabImage_WithTimeout( state: Thorlabs_State, /, *, inDeviceID: str | None = None, inTimeout: int = 0, inInputQueueSize: int | None = None, inExposureTime: int | None = 50000, inGain: int | None = 120 ) -> ( outResult: bool, outImage: Image | None, outFrameID: int )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
ioState | Thorlabs_State | |||
![]() |
inDeviceID | str | None | None | Camera serial number or name, Auto = first camera | |
![]() |
inTimeout | int | 0 | Maximum time to wait for frame in milliseconds | |
![]() |
inInputQueueSize | int | None | 0 - ![]() |
None | Sets size of image queue (on acquisition start, default = 8) |
![]() |
inExposureTime | int | None | 1 - ![]() |
50000 | Sets the target exposure time in microseconds |
![]() |
inGain | int | None | 0 - 1023 | 120 | Sets gain |
![]() |
outImage | Image | None | Captured image | ||
![]() |
outFrameID | int | 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.




