Chapter2 GettingMeasurement-Ready Images
©NationalInstruments Corporation 2-9 IMAQVision for LabWindows/CVI User Manual
this range in processing functions, such as determining a threshold range
during blob analysis.
If the image quality does not meet your needs, try to improve the imaging
conditions to get the desired image quality.You may need to re-evaluate
and modify each component ofyour imaging setup: lighting equipment
and setup, lenstuning, camera operation mode, and acquisition board
parameters.If you reach the best possible conditions with your setup but
the image quality still does not meet your needs, try to improvethe image
quality using the image processing techniques described in the Improve an
Image section.
Use imaqLineProfile()to get the pixel distribution along a line in the
image,or useimaqROIProfile() to get the pixel distribution along a
one-dimensionalpath in the image. By looking at the pixel distribution, you
candetermine if the image quality is high enough to provide you with sharp
edges at object boundaries. Also, you can determine if the image is noisy,
andidentify thecharacteristics of the noise.
Ifthe image quality meets your needs, use the pixel distribution information
todetermine some parameters o f the inspection functions you want to use.
Forexample, use the infor mation from the line profile to determine the
strength of the edge at the boundary of an object. Youcan input this
informationinto imaqEdgeTool() to find the edges of objects along the
line.
Improve an ImageUsingthe information you gathered from analyzing your image, you may
wantto improve the quality of your image for inspection. You can improve
your image with lookup tables, filters, grayscale morphology, and Fast
Fourier transforms.
Lookup Tables
Apply lookup table (LUT) transformations to highlight image details in
areas containing significant information at the expense of other areas.
A LUT transformation converts input grayscale values in the source image
intoother grayscale values in the transformed image. IMAQ Vision
provides four functions that directly or indirectly apply lookup tables to
images:
•imaqMathTransform()—Convertsthe pixel values of an image by
replacing them with valuesfrom a predefined lookup table. IMAQ
Visionhas seven predefined lookup tables based on mathematical