Network Card User Manual
Chapter 3 Programming with NI-IMAQ
©
National Instruments Corporation 3-17 NI-IMAQ User Manual
Figure 3-7. Composite StillColor Snap Programming Flowchart
The SCSnap.c example demonstrates how to perform a single, composite
StillColor snap. The example first opens an interface and a session. The
example then uses
imgSetAttribute to enable and configure StillColor
mode to acquire a composite image. The example also configures the
image data representation to 32-bit RGB mode.
imgSnap acquires a
StillColor image and returns the image data in the buffer. After the example
processes the image, it calls
imgClose to close the handles and free all of
the resources associated with the interface.
imgInterfaceOpen
imgInterfaceOpen opens
and configures the interface
according to the file setup by the
IMAQ Configuration Utility
.
imgSessionOpen
opens a session that
will be used for all acquisition and configuration.
User-specific image processing.
imgClose closes the interface and session.
imgSnap acquires an image into a buffer. The
buffer may be passed into imgSnap or automatically
allocated by NI-IMAQ. If no buffer is passed into
imgSnap, then imgSnap will automatically snap into
a new buffer and return a pointer to the buffer.
imgSessionOpen
imgSnap
User-Specific Functions
imgClose
imgSetAttribute configures the StillColor
mode to acquire a StillColor image from
a composite source using the attribute
IMG_ATTR_COLOR_MODE.
imgSetAttribute
imgSetAttribute configures the image
representation for 32-bit RGB mode using the attribute
IMG_ATTR_COLOR_IMAGE_REP.
imgSetAttribute
UM.book Page 17 Monday, July 13, 1998 9:49 AM