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

Скачать
Страница из 119
Chapter 2
Getting Measurement-Ready Images
2-12
ni.com
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.
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.
An image can have extraneous noise, such as periodic stripes, introduced 
during the digitization process. In the frequency domain, the periodic 
pattern is reduced to a limited set of high spatial frequencies. Also, the 
imaging setup may produce non-uniform lighting of the field of view, 
which produces an image with a light drift superimposed on the 
information you want to analyze. In the frequency domain, the light drift 
appears as a limited set of low frequencies around the average intensity of 
the image, the DC component. 
You can use algorithms working in the frequency domain to isolate and 
remove these unwanted frequencies from your image. Complete the 
following steps to obtain an image in which the unwanted pattern has 
disappeared but the overall features remain.
1.
Use 
imaqFFT()
 to convert an image from the spatial domain to the 
frequency domain. This function computes the FFT of the image and 
results in a complex image representing the frequency information of 
your image.
2.
Improve your image in the frequency domain with a lowpass or 
highpass frequency filter. Specify which type of filter to use with 
imaqAttenuate()
 or 
imaqTruncate()
. Lowpass filters smooth 
noise, details, textures, and sharp edges in an image. Highpass filters 
emphasize details, textures, and sharp edges in images, but they also 
emphasize noise.
Lowpass attenuation—The amount of attenuation is directly 
proportional to the frequency information. At low frequencies, 
there is little attenuation. As the frequencies increase, the