National Instruments IEEE 1394 Automobile Accessories User Manual


 
Chapter 2 Basic Acquisition with NI-IMAQ for IEEE 1394 Cameras
NI-IMAQ for IEEE 1394 Cameras User Manual 2-6 ni.com
Note Although you can specify an ROI of any size, the NI-IMAQ for IEEE 1394 Cameras
software coerces the ROI into one that is more compatible for the given camera. Refer to
Chapter 3, Advanced Programming with NI-IMAQ for IEEE 1394 Cameras, for more
information about defining an ROI for Format 7 images.
Acquisition
After configuring and starting your acquisition, the camera sends data to
the internal buffers. To process the acquired image data, you must copy the
data from the internal buffer into your user buffer.
User Buffer
Before starting the acquisition, you must allocate a user buffer in addition
to configuring internal buffers. The driver copies or decodes image data
from the internal buffer into the user buffer during acquisition. Then,
process and analyze the image in the user buffer.
When acquiring data into an IMAQ Vision image, the driver resizes and
casts the image as needed. However, if you acquire data into a user buffer,
you must allocate enough space for one decoded image.
Note Unlike internal buffers, you are responsible for destroying user buffers.
Buffer Number
A buffer number is a zero-based index that represents the cumulated
transferred image count. For example, during a continuous acquisition with
three internal buffers, the buffer number is updated as follows: 0, 1, 2, 3, 4,
5, and so on. Buffer numbers 0 and 3 refer to the same internal buffer in the
buffer ring.
For a one-shot acquisition, you can request only one of the available buffer
numbers. For a continuous acquisition, you can request any present or
future buffer number. You can also request the next logical buffer or the
buffer containing the most recently acquired data. With high-level grab
acquisitions, the buffer number defaults to the next transferred buffer.
When you complete the buffer acquisition step, the driver returns the actual
buffer number with the image.