imaqGrab

NI Vision for LabWindows/CVI Function

imaqGrab

Usage

Image* imaqGrab(SESSION_ID sessionID, Image* image, int immediate);

Purpose

Returns a copy of the current image in the grab buffer. A grab performs an acquisition that loops continually on one buffer. Call this function only after calling imaqSetupGrab().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name

Type

Description

sessionID SESSION_ID A valid session ID.
image Image* A pointer to the acquired image. If image is NULL, imaqGrab() creates the image into which the function copies the grab buffer.
immediate int Determines the acquisition timing method. Set this parameter to FALSE if you want the grab operation to synchronize on the vertical blank. Set the parameter to TRUE if you want an immediate transfer. Refer to the NI Vision Hardware Help for more information about acquisition timing methods.

Return Value

Type

Description

Image* On success, this function returns the acquired image. If you set image to NULL, the function returns a new image. Otherwise, the function returns a pointer to image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError().