beautypg.com

Introductory programming examples, High-level snap functions, Introductory programming examples -5 – National Instruments NI-IMAQ User Manual

Page 21: High-level snap functions -5

background image

Chapter 3

Programming with NI-IMAQ for 1394

© National Instruments Corporation

3-5

NI-IMAQ for IEEE-1394 Cameras User Manual

Introductory Programming Examples

This section introduces some examples for performing the different types
of image acquisition.

Note

The error codes returned by NI-IMAQ are not included in the examples. Always

check the return code for errors in your program.

If you have IMAQ Vision installed on your computer, you can take
advantage of the additional Image functions installed with NI-IMAQ for
1394. These functions use the IMAQ Vision memory management feature,
in which you must first create an image using

imaqCreate

and then pass

that image to an acquisition function.

If you do not have IMAQ Vision installed on your computer, you must
manually allocate the memory for your image. Use the attributes
ImageWidth, ImageHeight, and BytesPerPixel to determine how much
memory you should allocate.

Note

You can find the code examples discussed in this section in the

NI-IMAQ for

IEEE-1394\samples

directory. The LabWindows/CVI examples emphasize the Image

functions, and the C examples for Visual C++ and Borland C++ emphasize the standard
functions.

High-Level Snap Functions

A snap acquires a single image into a memory buffer. Snap functions
include

imaq1394Snap

and

imaq1394SnapImage

. Use these functions to

acquire a single frame to a buffer. To use these functions, you must have a
valid session handle.