RtGVGrabFrame

RtGVGrabFrame retrieves a frame from a camera.

Syntax

BOOL RtGVGrabFrame(
	HANDLE     cameraHandle, 
	PRTGV_FRAME pFrame, 
	UINT32     msWait
);

Parameters

cameraHandle

The handle of the camera from which a frame should be grabbed.

pFrame

A pointer to an RTGV_FRAME object that receives the frame from the camera specified by cameraHandle.

msWait

The timeout, in milliseconds, of the grab command.  If the timeout is reached, and a frame has still not been successfully grabbed, the API fails.  A timeout of INFINITE will cause this to wait infinitely.

Return Values

Returns TRUE if the function succeeds, FALSE if the function fails. Call GetLastError for extended error information.

Remarks

RtGVGrabFrame cannot be called before calling RtGVInitialize and RtGVStartStream or RtGVStartReceiveStream/RtGVStartCameraStream.

To find the camera to query, call RtGVInitialize and then call RtGVEnumerateCameras to get an RTGV_CAMERA_INFO array describing each of the cameras found on the network, along with each of their handles.

If RtGVGrabFrame is called at a faster rate than the rate at which the camera sends images, the function will fail immediately.  In this case, the error code RTGV_ERROR_NO_IMAGE will be set.

Requirements

Minimum Supported Version RTX64 3.7 Vision SDK

Header

RtGVApi.h

Library

RtGigEVision.lib

See Also:

RtGVStartCameraStream

RtGVStartReceiveStream

RtGVStartStream

RtGVEnumerateCameras

RTGV_FRAME

RtGVSendTrigger