Chapter 2
Getting Measurement-Ready Images
©
National Instruments Corporation
2-11
IMAQ Vision for LabWindows/CVI User Manual
Nth Order Filter
The
imaqNthOrderFilter()
function allows you to define a lowpass or
highpass filter depending on the value of
N
that you choose. One specific
Nth order filter, the median filter, removes speckle noise, which appears as
small black and white dots. Use
imaqMedianFilter()
to apply a median
filter. For more information about Nth order filters, see Chapter 5,
Image
Processing
, of the
IMAQ Vision Concepts Manual
.
Grayscale Morphology
Perform grayscale morphology when you want to filter grayscale
features of an image. Grayscale morphology helps you remove or
enhance isolated features, such as bright pixels on a dark background.
Use these transformations on a grayscale image to enhance non-distinct
features before thresholding the image in preparation for blob analysis.
Use
imaqGrayMorphology()
to perform one of the following seven
transformations:
•
Erosion—Reduces the brightness of pixels that are surrounded by
neighbors with a lower intensity.
•
Dilation—Increases the brightness of pixels surrounded by neighbors
with a higher intensity. A dilation has the opposite effect as an erosion.
•
Opening—Removes bright pixels isolated in dark regions and smooths
boundaries.
•
Closing—Removes dark pixels isolated in bright regions and smooths
boundaries.
•
Proper-opening—Removes bright pixels isolated in dark regions and
smooths the inner contours of particles.
•
Proper-closing—Removes dark pixels isolated in bright regions and
smooths the inner contours of particles.
•
Auto-median—Generates simpler particles that have fewer details.
For more information about grayscale morphology transformations, see
Chapter 5,
Image Processing
, of the
IMAQ Vision Concepts Manual
.
FFT
Use the Fast Fourier Transform (FFT) to convert an image into its
frequency domain. In an image, details and sharp edges are associated
with mid to high spatial frequencies because they introduce significant
gray-level variations over short distances. Gradually varying patterns are
associated with low spatial frequencies.