Chapter3 Programmingwith NI-IMAQ for 1394
©NationalInstruments Corporation 3-5 NI-IMAQfor IEEE-1394 Cameras User Manual
Introductory Programming Examples
This section introduces some examples for performing the different types
ofimage acquisition.
Note The error codes returned by NI-IMAQare not included in the examples. Always
check the return code for errors in your program.
IfyouhaveIMAQVisioninstalledonyourcomputer,youcantake
advantageof the additional Image functions installed with NI-IMAQfor
1394.These functions use the IMAQ Vision memory management feature,
in which you must firstcreate an image using imaqCreate and then pass
that image to an acquisition function.
Ify ou do not haveIMAQ Vision installed on your computer, you must
manuallyallocate the memory for your image. Use the attributes
ImageWidth,ImageHeight,andBytesPerPixelto determine howmuch
memory you should allocate.
Note Youcan find the code examples discussed in this section in the NI-IMAQ for
IEEE-1394\samplesdirectory. The LabWindows/CVI examples emphasize the Image
functions, and the C examples forVisual C++ and Borland C++ emphasize the standard
functions.

High-Level Snap Functions

Asnap acquires a single image into a memory buffer. Snap functions
includeimaq1394Snap and imaq1394SnapImage. Use these functions to
acquirea single frame toa buffer. To use these functions, you must hav e a
valid session handle.