Chapter2 GettingMeasurement-Ready Images
©NationalInstruments Corporation 2-3 IMAQVision for LabWindows/CVI User Manual
Ifyo u 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,I MAQVision creates an internal image
structureto hold properties of the image, suchas its name and border size.
However,no memory is allocated to store the image pixels at this time.
IMAQVision functions automatically allocate the appropriate amount of
memory when the image size is modified. For example, functions that
acquire orresample an image alter the image size, so they allocate the
appropriate memory space for the image pixels. The return valueof
imaqCreateImage()is a pointer to the image st ructure. Supply this
pointer as an input to all subsequent IMAQVision functions.
Mostfun ctions belonging to the IMAQVision library require one or more
imagepointers. The number of image pointers a functi ontakes depends on
theimage processing function and the type of image you want to use. Some
IMAQVision 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.
Youcan create multiple images by executing imaqCreateImage() as
manytimes as y ou want.Determ ine the number of required images through
ananalysis of your intended application. The decision is based on different
processingphases and your need to keep the original image (after each
processing step).
Atthe end of your application, dispose of each image that you created using
imaqDispose().
Table2-1. IMAQ Vision for LabWindows/CVI Image Types
Valu e Description
IMAQ_IMAGE_U8 8bit s per pixelunsigned,standard m onochrome
IMAQ_IMAGE_I16 16bi ts per pixelsigned, monochrome
IMAQ_IMAGE_SGL 32bi ts per pixelfloating point, monochrome
IMAQ_IMAGE_COMPLEX 2×32bits p er pixelfloating point, nativeformat after a Fast
FourierTransform (FFT)
IMAQ_IMAGE_RGB 32bi ts per pixelstandardcolo r
IMAQ_IMAGE_HSL 32bi ts per pixelcolor