High-Level Snap Functions; Figure 3-2. Snap Programming Flowchart - National Instruments Image Acquisition Software User Manual

Image acquisition software
Table of Contents

Advertisement

High-Level Snap Functions

imgInterfaceOpen
imgSessionOpen
imgSnap
User-Specific Functions
imgClose
© National Instruments Corporation
A snap acquires a single image into a memory buffer. Snap functions
include
and
imgSnap
single frame or field to a buffer. To use these functions, you must have a
valid session handle.
When you invoke a snap, it initializes the board and acquires the next
incoming video frame (or field) to a buffer. A snap is appropriate for
low-speed or single-capture applications where ease of programming
is essential. Figure 3-2 illustrates a typical snap programming order.
imgInterfaceOpen
and configures the interface
according to the file setup by the
IMAQ Configuration Utility.
imgSessionOpen
will be used for all acquisition and configuration.
imgSnap
buffer may be passed into
allocated by NI-IMAQ. If no buffer is passed into
imgSnap
and return a pointer to the buffer.
User-specific image processing
imgClose

Figure 3-2. Snap Programming Flowchart

The
example demonstrates how to perform a single snap using
hlsnap.c
. The example opens an interface and a session and then performs
imgSnap
a single snap. The buffer pointer that is passed to
NULL, which instructs
image. The size of the buffer is calculated based on the region of interest
(ROI) and the rowPixel attributes: ROI height multiplied by rowPixel
multiplied by the number of bytes per pixel. When you open a session, the
ROI values are initialized from the acquisition window (ACQWINDOW)
dimensions that are configured in the IMAQ Configuration Utility. The
ACQWINDOW dimensions will vary depending on the type of camera you
are using.
Chapter 3
. Use these functions to acquire a
imgSnapArea
opens
opens a session that
acquires an image into a buffer. The
imgSnap
, it will automatically snap into a new buffer
closes the interface and session.
to automatically allocate a buffer for the
imgSnap
3-7
Programming with NI-IMAQ
or automatically
is initialized to
imgSnap
NI-IMAQ User Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Image Acquisition Software and is the answer not in the manual?

This manual is also suitable for:

Ni-imaq

Table of Contents