Chapter 2
Getting Measurement-Ready Images
©
National Instruments Corporation
2-9
IMAQ Vision for LabWindows/CVI User Manual
If the image quality meets your needs, use the histogram to determine the
range of pixel values that correspond to objects in the image. You can use
this range in processing functions, such as determining a threshold range
during particle analysis.
If the image quality does not meet your needs, try to improve the imaging
conditions to get the necessary image quality. You may need to re-evaluate
and modify each component of your imaging setup, including lighting
equipment and setup, lens tuning, camera operation mode, and acquisition
device parameters. If you reach the best possible conditions with your setup
but the image quality still does not meet your needs, try to improve the
image quality using the image processing techniques described in the
Use
imaqLineProfile()
to get the pixel distribution along a line in the
image, or use
imaqROIProfile()
to get the pixel distribution along a
one-dimensional path in the image. By looking at the pixel distribution, you
can determine 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
and identify the characteristics of the noise.
If the image quality meets your needs, use the pixel distribution
information to determine some parameters of the inspection functions you
want to use. For example, use the information from the line profile to
determine the strength of the edge at the boundary of an object. You can
input this information into
imaqEdgeTool2()
to find the edges of objects
along the line.
Improve an Image
Using the information you gathered from analyzing your image, you may
want to improve the quality of your image for inspection. You can improve
your image with lookup tables, filters, grayscale morphology, and FFTs.