![background image](http://html1.mh-extra.com/html/national-instruments/imaq-vision-for-measurement-studio/imaq-vision-for-measurement-studio_user-manual_3449779016.webp)
Chapter 2
Getting Measurement-Ready Images
©
National Instruments Corporation
2-3
IMAQ Vision for LabWindows/CVI User Manual
If you plan to use filtering or blob analysis functions on the image, set the
appropriate border size for the image. The default border size is 3.
When you create an image, IMAQ Vision creates an internal image
structure to hold properties of the image, such as its name and border size.
However, no memory is allocated to store the image pixels at this time.
IMAQ Vision functions automatically allocate the appropriate amount of
memory when the image size is modified. For example, functions that
acquire or resample an image alter the image size, so they allocate the
appropriate memory space for the image pixels. The return value of
imaqCreateImage()
is a pointer to the image structure. Supply this
pointer as an input to all subsequent IMAQ Vision functions.
Most functions belonging to the IMAQ Vision library require one or more
image pointers. The number of image pointers a function takes depends on
the image processing function and the type of image you want to use. Some
IMAQ Vision functions act directly on the image and require only one
image pointer. Other functions that process the contents of images require
pointers to the source image(s) and to a destination image.
You can create multiple images by executing
imaqCreateImage()
as
many times as you want. Determine the number of required images through
an analysis of your intended application. The decision is based on different
processing phases and your need to keep the original image (after each
processing step).
At the end of your application, dispose of each image that you created using
imaqDispose()
.
Table 2-1.
IMAQ Vision for LabWindows/CVI Image Types
Value
Description
IMAQ_IMAGE_U8
8 bits per pixel—unsigned, standard monochrome
IMAQ_IMAGE_I16
16 bits per pixel—signed, monochrome
IMAQ_IMAGE_SGL
32 bits per pixel—floating point, monochrome
IMAQ_IMAGE_COMPLEX
2
×
32 bits per pixel—floating point, native format after a Fast
Fourier Transform (FFT)
IMAQ_IMAGE_RGB
32 bits per pixel—standard color
IMAQ_IMAGE_HSL
32 bits per pixel—color