Справочник Пользователя для National Instruments IMAQ Vision for LabWindows TM /CVI

Скачать
Страница из 119
Chapter 2
Getting Measurement-Ready Images
© National Instruments Corporation
2-3
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. The decision to keep an image occurs before each 
processing step.
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 in 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.
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
 
× 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
IMAQ_IMAGE_RGB_U64
64 bits per pixel—standard color