Back to FabImage Library website
You are here: Start » Function Reference » GenTL » GenTL_TryReceiveImage
GenTL_TryReceiveImage
Header: | Genicam.h |
---|---|
Namespace: | fil |
Module: | Genicam |
Receives next frame from video stream.
Syntax
C++
C#
bool fil::GenTL_TryReceiveImage ( GenTLHandle inDeviceHandle, int inTimeout, fil::Image& outImage, ftl::Optional<ftl::uint64&> outFrameId = ftl::NIL, ftl::Optional<ftl::uint64&> outTimestamp = ftl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inDeviceHandle | GenTLHandle | Handle of an opened device that is streaming video. | |
![]() |
inTimeout | int | Maximum time, in milliseconds, that the function is allowed to wait for the next complete frame. This parameter overrides global frame timeout configuration. | |
![]() |
outImage | Image& | Image buffer that will receive a new frame. | |
![]() |
outFrameId | Optional<uint64&> | NIL | Frame block Id set by device (when supported) |
![]() |
outTimestamp | Optional<uint64&> | NIL | Frame capture timestamp set by device (when supported) |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outFrameId, outTimestamp.
Read more about Optional Outputs.
Description
This function is a close equivalent of GenTL_ReceiveImage, that gives additional control over frame timeout situation.
See GenTL_ReceiveImage definition for more information.
Return Value
true
when new frame is successfully received and stored into outImage, false
when timeout occurs or device is not streaming.
Exceptions
This function will throw an exception in the following situations:
- Device handle is invalid.
- Connection with device is lost.
- Device sends image in pixel format that cannot be converted.
- Device streams in a mode that does not transport images or the library is unable to read the image from stream.