Acquire Or Read An Image; Acquiring An Image; One-Shot Acquisition - National Instruments IMAQTM User Manual

Vision for visual basic
Table of Contents

Advertisement

Chapter 2
Getting Measurement-Ready Images

Acquire or Read an Image

Acquiring an Image

IMAQ Vision for Visual Basic User Manual
After you create an image, you can acquire an image into the imaging
system in one of the following three ways:
Acquire an image with a camera through the image acquisition device.
Load an image from a file stored on the computer.
Convert the data stored in a 2D array to an image.
Methods that acquire images, load images from file, or convert data
from a 2D array automatically allocate the memory space required to
accommodate the image data.
Use the CWIMAQ control to acquire images with a National Instruments
IMAQ device. You can use IMAQ Vision for Visual Basic to perform
one-shot and continuous acquisitions. You can choose the acquisition type
during design time by setting the value of the Acquisition Type combo box
to One-Shot or Continuous. The Acquisition Type combo box is located
on the Acquisition property page of the CWIMAQ control. You can set the
value at run-time by setting the
cwimaqAcquisitionOneShot

One-Shot Acquisition

Use a one-shot acquisition to start an acquisition, perform the acquisition,
and stop the acquisition using a single method. The number of frames
acquired is equal to the number of images in the images collection. Use the
CWIMAQ.AcquireImage
Use the
CWIMAQ.Start
For information about synchronous and asynchronous acquisitions, refer to
the NI-IMAQ User Manual.
If you want to acquire a single field or frame into a buffer, set the image
count to 1. This operation is also referred to as a snap. Use a snap for
low-speed or single capture applications. The following code illustrates a
synchronous snap:
Private Sub Start_Click()
CWIMAQ1.AcquisitionType = cwimaqAcquisitionOneShot
CWIMAQ1.AcquireImage
End Sub
CWIMAQ.AcquisitionType
or
cwimaqAcquisitionContinuous
method to perform this operation synchronously.
method to perform this operation asynchronously.
2-4
property to
.
ni.com

Advertisement

Table of Contents
loading

This manual is also suitable for:

Imaq

Table of Contents