SmartRay_GrabImage_WithTimeout
Captures with timeout a live image using SmartRay.
Syntax
C++
Python
def SmartRay_GrabImage_WithTimeout( state: SmartRay_State, inAddress: str, inPort: int, inConnectionTimeout: int, /, *, inInputQueueSize: int = 4, inTimeout: int | None = 100, inDataTrigger: SmartRayDataTrigger = SmartRayDataTrigger(SmartRayDataTriggerMode.FreeRun, None, None, None, None, None), inRegionOfInterest: SmartRayRegionOfInterest | None = None, inExposure: SmartRayExposure | None = None, inLaser: SmartRayLaser | None = None, inStartTrigger: SmartRayStartTrigger | None = None, inReflectionFilter: SmartRayReflectionFilter | None = None, inLaserLineThreshold: list[int] | None = None, inMinLaserLineThicknessLimit: int | None = None, inMaxLaserLineThicknessLimit: int | None = None, inSmartXtract: bool | None = None, inSmartXtractAlgorithm: SmartRaySmartXtractAlgorithm | None = None, inSmartXactMode: SmartRaySmartXactMode | None = None ) -> ( outResult: bool, outImage: Image | None )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
ioState | SmartRay_State | |||
![]() |
inAddress | str | Device identifying address | ||
![]() |
inPort | int | Device identifying network port | ||
![]() |
inConnectionTimeout | int | 1 - 1000 | Timeout in seconds | |
![]() |
inInputQueueSize | int | 1 - 200 | 4 | Capacity of output frames queue |
![]() |
inTimeout | int | None | 100 | Frame timeout in milliseconds | |
![]() |
inDataTrigger | SmartRayDataTrigger | SmartRayDataTrigger(SmartRayDataTriggerMode.FreeRun, None, None, None, None, None) | ||
![]() |
inRegionOfInterest | SmartRayRegionOfInterest | None | None | ||
![]() |
inExposure | SmartRayExposure | None | None | ||
![]() |
inLaser | SmartRayLaser | None | None | ||
![]() |
inStartTrigger | SmartRayStartTrigger | None | None | ||
![]() |
inReflectionFilter | SmartRayReflectionFilter | None | None | ||
![]() |
inLaserLineThreshold | list[int] | None | None | ||
![]() |
inMinLaserLineThicknessLimit | int | None | None | ||
![]() |
inMaxLaserLineThicknessLimit | int | None | None | ||
![]() |
inSmartXtract | bool | None | None | ||
![]() |
inSmartXtractAlgorithm | SmartRaySmartXtractAlgorithm | None | None | ||
![]() |
inSmartXactMode | SmartRaySmartXactMode | None | None | ||
![]() |
outImage | Image | None | Captured live image |
Multithreaded environment
This function is not guaranteed to be thread-safe. When used in multithreaded environment, it has to be manually synchronized.



