NI-IMAQdx Function Reference



rval = IMAQdxGetImageData (IMAQdxSession id, void *buffer, unsigned int bufferSize, IMAQdxBufferNumberMode mode, unsigned int desiredBufferNumber, unsigned int *actualBufferNumber);


Copies the raw data of the specified frame into buffer. Call this function only after calling IMAQdxConfigureAcquisition.

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


Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain using IMAQdxOpenCamera.
buffer void * The buffer that contains the raw data for the image when the function returns.
bufferSize unsigned int The maximum size of the buffer.
mode IMAQdxBufferNumberMode The buffer number mode of the image to retrieve. Set this parameter to IMAQdxBufferNumberModeNext to get the next buffer, or set this parameter to IMAQdxBufferNumberLast to get the last acquired buffer, or set this parameter IMAQdxBufferNumberModeBufferNumber to acquire a specific cumulative buffer number.
desiredBufferNumber unsigned int The cumulative buffer number of the image to retrieve. This parameter is only needed if mode is set to IMAQdxBufferNumberModeBufferNumber.
actualBufferNumber unsigned int (passed by reference) On return, the actual cumulative buffer number of the image retrieved.

Return Value

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