imaq1394GetImageData

NI-IMAQ for IEEE 1394 Cameras Function

imaq1394GetImageData

Format

rval = imaq1394GetImageData (SESSION_ID sessionID, unsigned long bufferNumberDesired, unsigned long *bufferNumberActual, unsigned long onOverwrite, void **buffer);

Purpose

Acquires the raw image data of the specified frame into a previously allocated buffer. Call this function only after calling imaq1394ConfigureAcquisition.

Note  This function allows you to access raw image data. For many uncompressed formats like YUV or RGB, buffer is not compatible with IMAQ Vision functions. To use the IMAQ Vision functions, use imaq1394GetImage2 or imaq1394GetBuffer2 instead of this function.

Parameters

Parameter Type Description
sessionId SESSION_ID A valid Session ID, which you can obtain using imaq1394CameraOpen2.
bufferNumberDesired unsigned long The cumulative buffer number of the image to retrieve. For continuous acquisitions, set this parameter to IMG1394_LASTBUFFER to get the next buffer or set this parameter to IMG1394_IMMEDIATEBUFFER to get the current buffer.
bufferNumberActual unsigned long On return, the actual cumulative buffer number of the image retrieved.
onOverwrite unsigned long The overwrite policy to follow if a buffer is overwritten during acquisition.
  • Specify IMG1394_ONOVERWRITE_GET_OLDEST to get the oldest valid buffer instead of the overwritten buffer.
  • Specify IMG1394_ONOVERWRITE_FAIL to return an error if the requested buffer is overwritten.
  • Specify IMG1394_ONOVERWRITE_GET_NEWEST to get the most recent valid buffer instead of the overwritten buffer.
Note  IMG1394_ONOVERWRITE_GET_NEXT_ITERATION is not implemented by NI-IMAQ for IEEE 1394 Cameras and is only presented to keep the API consistent with NI-IMAQ 3.x.
buffer void ** The buffer that contains the raw data for the image when the function returns.

Return Value

On success, this function returns IMG1394_ERR_GOOD. On failure, this function returns an error code. You can obtain a more detailed error message with imaq1394ShowError.