Chapter 2 Getting Measurement-Ready Images
© National Instruments Corporation 2-7 IMAQ Vision for Visual Basic User Manual
the viewer. You can set the CWIMAQPalette.Type property to apply
predefined color palettes. For example, if you need to display a binary
image—an image that contains particle regions with pixel values of 1
and a background region with pixel values of 0—set the
Type property to
cwimaqPaletteBinary. For more information about color palettes, refer
to Chapter 2, Display, of the IMAQ Vision Concepts Manual.
You also can set a default palette during design time using the Menu
property page. Users can change the color palette during run time by using
the right-click menu on the viewer.
Attach Calibration Information
If you want to attach the calibration information of the current setup
to each image you acquire, use
CWIMAQVision.SetCalibrationInformation. This method takes
in a source image that contains the calibration information and a
destination image that you want to calibrate. The output image is the
inspection image with the calibration information attached to it. For
detailed information about calibration, refer to Chapter 6, Calibrating
Images.
Note Because calibration information is part of the image, it is propagated throughout
the processing and analysis of the image. Methods that modify the image size,
such as geometrical transforms, void the calibration information. Use
CWIMAQVision.WriteImageAndVisionInfo to save the image and all of the
attached calibration information to a file.
Analyze an Image
When you acquire and display an image, you may want to analyze the
contents of the image for the following reasons:
• To determine if the image quality is high enough for the inspection
task.
• To obtain the values of parameters that you want to use in processing
methods during the inspection process.
The histogram and line profile tools can help you analyze the quality of the
images.