410 likes | 735 Views
Image Processing. Image Filtering in the Frequency Domain. Low Pass Filter High Pass Filter Band pass Filter Blurring Sharpening . Frequency Bands. Image. Fourier Spectrum. Percentage of image power enclosed in circles (small to large) : 90, 95, 98, 99, 99.5, 99.9.
E N D
Image Processing Image Filtering in the Frequency Domain • Low Pass Filter • High Pass Filter • Band pass Filter • Blurring • Sharpening
Frequency Bands Image Fourier Spectrum Percentage of image power enclosed in circles (small to large) : 90, 95, 98, 99, 99.5, 99.9
Blurring - Ideal Low pass Filter 90% 95% 98% 99% 99.5% 99.9%
The Power Law of Natural Images • The power in a disk of radii r=sqrt(u2+v2 ) follows: P(r)=Ar- where 2 Images from: Millane, Alzaidi & Hsiao - 2003
Image Filtering • Low pass • High pass • Band pass • Local pass • Usages
Low pass Filter spatial domain frequency domain f(x,y) F(u,v) filter G(u,v) = F(u,v) • H(u,v) g(x,y) G(u,v) f(x,y) F(u,v) • g(x,y) H(u,v)
H(u,v) v u 1 D(u,v) D0 H(u,v) = 0 D(u,v) > D0 H(u,v) D(u,v) = u2 + v2 1 0 D0 D(u,v) H(u,v) - Ideal Low Pass Filter D0 = cut off frequency
Blurring - Ideal Low pass Filter 99.7% 99.37% 98.65%
Blurring - Ideal Low pass Filter 98.0% 96.6% 99.0% 99.4% 99.7% 99.6%
The Ringing Problem G(u,v) = F(u,v) • H(u,v) Convolution Theorem g(x,y) = f(x,y) * h(x,y) IFFT sinc(x) H(u,v) h(x,y) D0 Ringing radius + blur
The Ringing Problem Freq. domain Spatial domain
H(u,v) H(u,v) 1 D(u,v) v u 0 D0 D(u,v) = u2 + v2 H(u,v) - Gaussian Filter -D2(u,v)/(2D20) H(u,v) = e Softer Blurring + no Ringing
Blurring - Gaussain Lowpass Filter 99.11% 98.74% 96.44%
The Gaussian Lowpass Filter Freq. domain Spatial domain
1 2 1 2 4 2 1 2 1 0.15 0.1 0.05 0 0 50 100 Blurring in the Spatial Domain: 1 1 1 1 Averaging = convolution with = point multiplication of the transform with sinc: Gaussian Averaging = convolution with = point multiplication of the transform with a gaussian. 1 0.8 0.6 0.4 0.2 0 -50 0 50 Image Domain Frequency Domain
H(u,v) H(u,v) 1 v 0 D(u,v) D0 H(u,v) = u 1 D(u,v) > D0 0 D0 D(u,v) D(u,v) = u2 + v2 Image Sharpening - High Pass Filter H(u,v) - Ideal Filter D0 = cut off frequency
H(u,v) H(u,v) 1 v u 0 D0 D(u,v) D(u,v) = u2 + v2 -D2(u,v)/(2D20) H(u,v) = 1 - e High Pass Gaussian Filter
High Pass Filtering Original High Pass Filtered
High Frequency Emphasis Original High Pass Filtered +
H'(u,v) = K0 + H(u,v) High Frequency Emphasis Emphasize High Frequency. Maintain Low frequencies and Mean. (Typically K0 =1) H'(u,v) 1 0 D0 D(u,v)
High Frequency Emphasis - Example Original High Frequency Emphasis Original High Frequency Emphasis
High Pass Filtering - Examples Original High pass Emphasis High Frequency Emphasis + Histogram Equalization
H(u,v) H(u,v) 1 v D(u,v) 0 D0- D0 D0+ u w w w w w w 2 2 2 2 2 2 D(u,v) = u2 + v2 Band Pass Filtering 0 D(u,v) D0 - 1 D0- D(u,v) D0 + H(u,v) = 0 D(u,v) > D0 + D0 = cut off frequency w = band width
H(u,v) v u H(u,v) 1 0 D(u,v) D0 -u0,-v0 u0,v0 D1(u,v) = (u-u0)2 + (v-v0)2 D2(u,v) = (u+u0)2 + (v+v0)2 Local Frequency Filtering 1 D1(u,v) D0 or D2(u,v) D0 H(u,v) = 0 otherwise D0 = local frequency radius u0,v0 = local frequency coordinates
H(u,v) v u D2(u,v) = (u+u0)2 + (v+v0)2 D1(u,v) = (u-u0)2 + (v-v0)2 Band Rejection Filtering H(u,v) 1 0 D(u,v) D0 -u0,-v0 u0,v0 0 D1(u,v) D0 or D2(u,v) D0 H(u,v) = 1 otherwise D0 = local frequency radius u0,v0 = local frequency coordinates