IMAGE ENHANCEMENT IN THE FREQUENCY DOMAIN Basics of
IMAGE ENHANCEMENT IN THE FREQUENCY DOMAIN
Basics of Filtering in the Frequency Domain
Steps for Filtering in the Frequency Domain ØGiven an input image f(x, y) of size Mx. N, obtain padding parameters P and Q. Typically, P=2 M and Q=2 N. ØForm a padded image fp(x, y) of size Px. Q by appending the necessary number of zeros to f(x, y). ØMultiply fp(x, y) by (-1)x+y to centre its transform. ØCompute the DFT, F(u, v), of the image from step 3. ØGenerate a real, symmetric filter function, H(u, v), of size Px. Q with centre at coordinates (P/2, Q/2). Form the product G(u, v)=H(u, v)F(u, v) using array multiplication. ØObtain the processed image: gp(x, y)=real[IDFT(G(u, v))]* (-1)x+y Ø Obtain the final processed result, g(x, y), by extracting the Mx. N region from the top, left quadrant of gp(x, y)
Smoothing Frequency-Domain Filters • The basic model for filtering in the frequency domain where F(u, v): the Fourier transform of the image to be smoothed H(u, v): a filter transfer function • Smoothing is fundamentally a lowpass operation in the frequency domain. • There are several standard forms of lowpass filters (LPF). ▫ Ideal lowpass filter ▫ Butterworth lowpass filter ▫ Gaussian lowpass filter
IDEAL LOW PASS FILTER • The simplest low pass filter is a filter that “cuts off” all high-frequency components of the Fourier transform that are at a distance greater than a specified distance D 0 from the origin of the transform. • The transfer function of an ideal low pass filter where D(u, v) : the distance from point (u, v) to the center of the frequency rectangle
Contd… Do-cutoff frequency
Contd…
SPATIAL REPRESENTATION
Butterworth Low pass Filters (BLPFs)
Butterworth Low pass Filters (BLPFs) n=2 D 0=5, 15, 30, 80, and 230
SPATIAL REPRESENTATION
GAUSSIAN LOWPASS FILTERS (GLPFS)
Gaussian Low pass Filters (GLPFs) D 0=5, 15, 30, 80, and 230
Unsharp Masking , High boost Filtering & High frequency Emphasis Filtering
Contd… High frequency emphasis filtering is used to enhance the X-Ray images.
Homomorphic Filtering f(x , y)=i(x , y)*r(x , y). i(x, y)-illumination- low frequency r(x, y)-reflectance-high frequency g(x, y)=e. S(u, v) S(u , v)=output of IDFT block
Contd… The transfer function of the filter is given by H(u, v)=(ϫH-ϫL)[1 -exp(-c[D 2(u, v)/Do 2])]+ϫL C-controls the sharpness ϫL, ϫH controls the slope
The parameters are selected like ϫL<1 and ϫH>1 The Homomorphic filter attenuates the contribution of low frequencies and amplifies the contribution made by high frequencies
Selective filtering falls under 3 categories • BPF • BRF • Notch filtering
Band Reject Filer Now the expression for Band pass filter is given by HBP(u, v)=1 -HBR(u, v)
BRF BPF
THANKYOU
- Slides: 24