Справочник Пользователя для National Instruments Image Acqusition Software NI-IMAQdx

Скачать
Страница из 65
Chapter 2
Basic Acquisition with NI-IMAQdx
© National Instruments Corporation
2-5
acquisition. National Instruments recommends one-shot acquisition for 
applications that do not require real-time acquisition or processing.
Use a continuous acquisition to start an acquisition, continuously acquire 
images into the internal buffers, and explicitly stop the acquisition. With 
continuous acquisition, the driver acquires video data continuously from 
the camera and enables you to examine the most current buffer. National 
Instruments recommends continuous acquisition for real-time acquisition 
and processing.
Note
If CPU activity increases during a continuous acquisition, the driver might miss 
subsequent images. Check the buffer number output to determine if you have missed any 
images.
Number of Buffers
Another aspect of configuration is specifying the number of internal buffers 
into which you want to acquire image data. During configuration, buffers 
are allocated from system memory and page-locked. Once the acquisition 
starts, the camera transfers video data over the IEEE 1394 bus to the 
IEEE 1394 interface card FIFO. Then, video data is directly transferred to 
the internal buffer. This transfer requires negligible CPU resources. For the 
GigE Vision bus, CPU resources are used to pass network packets. For 
ethernet, ethernet packets are evaluated by software and copied into an 
internal buffer.
Each internal buffer you allocate is the exact size of the raw data being 
transmitted by the camera. For continuous acquisitions, allocate three or 
more buffers. Allocating a single buffer for a continuous acquisition may 
result in a high number of lost images. For one-shot acquisitions, specify 
the number of buffers that the application requires. For example, if the 
application runs for two seconds, and the camera acquires at 30 frames
per second, allocate 60 buffers to capture each image.
Having more buffers available for the GigE Vision bus can increase the 
reliability of data transfer, especially when there are adverse network 
conditions.
Region of Interest
The region of interest (ROI) specifies a rectangular portion of the image to 
be captured. If the camera supports scalable video modes, the ROI defines 
the portion of the image to transfer from the camera to system memory.
If the camera does not support scalable video modes, the entire image is