KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 1 IMAGE ENHANCEMENT IN THE FREQUENCY DOMAIN (1) KOM3212 Image Processing in Industrial Systems Some of the contents are adopted from R. C. Gonzalez, R. E. Woods, Digital Image Processing, 2nd edition, Prentice Hall, 2008 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Questions In-depth understanding • Why do we need to conduct image processing in the frequency • domain? • What does Fourier series do? Properties • Is FT a linear or nonlinear process? • What would the FT of a rotated image look like? • What is FFT? • What is F(0,0)? • Why is image padding necessary? 2 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 3 Fourier series The Fourier transform can separate the frequencies which contribute to the signal which is emitted from the image slice. Crucially, it also tells us the amplitude of those waves, which will correspond to signal intensity levels in an image. http://www.revisemri.com KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 4 Fourier series vs Fourier Series • Any function that periodically repeats itself can be expressed as the sum of sines and/or cosines of different frequencies, each multiplied by a different coefficient (Fourier series). • Even functions that are not periodic (but whose area under the curve is finite) can be expressed as the integral of sines and/or cosines multiplied by a weighting function (Fourier transform). KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 5 What is the frequency domain • The frequency domain refers to the plane of the two dimensional discrete Fourier transform of an image. • The purpose of the Fourier transform is to represent a signal as a linear combination of sinusoidal signals of various frequencies. 6 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Continuous FT • The one-dimensional Fourier transform and its inverse • Fourier transform (continuous case) F (u ) f ( x)e j 2ux dx where j 1 • Inverse Fourier transform: f ( x) F (u )e j 2uxdu e j cos j sin • The two-dimensional Fourier transform and its inverse • Fourier transform (continuous case) F (u, v) f ( x, y)e j 2 (uxvy ) dxdy • Inverse Fourier transform: f ( x, y) F (u, v)e j 2 (uxvy ) dudv KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Discrete FT (DFT) • The one-dimensional Fourier transform and its inverse • Fourier transform (discrete case) DTC 1 F (u ) M M 1 f ( x )e j 2ux / M for u 0,1,2,..., M 1 x 0 • Inverse Fourier transform: M 1 f ( x) F (u )e j 2ux / M u 0 for x 0,1,2,..., M 1 7 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Discrete FT (DFT) • F(u) can be expressed in polar coordinates: F (u ) F (u ) e j (u ) 2 2 where F (u ) R (u ) I (u ) 1 1 2 (magnitude or spectrum) I (u ) (u ) tan (phase angle or phase spectrum) R(u ) • R(u): the real part of F(u) • I(u): the imaginary part of F(u) 8 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 9 Discrete FT (DFT) e j cos j sin discrete Fourier transform can be redefined 1 F (u ) M M 1 f ( x)[cos 2ux / M j sin 2ux / M ] x 0 • Frequency domain: the domain (values of u) over which the values of F(u) range; because u determines the frequency of the components of the transform. KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Discrete FT (DFT) • The two-dimensional Fourier transform and its inverse • Fourier transform (discrete case) DTC 1 F (u , v) MN M 1N 1 f ( x, y)e j 2 (ux / M vy / N ) x 0 y 0 u 0,1,2,..., M 1, v 0,1,2,..., N 1 • Inverse Fourier transform: f ( x, y ) M 1N 1 F (u, v)e j 2 (ux / M vy / N ) u 0 v 0 x 0,1,2,..., M 1, y 0,1,2,..., N 1 • u, v : the transform or frequency variables • x, y : the spatial or image variables 10 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 11 Discrete FT (DFT) • We define the Fourier spectrum, phase angle, and power spectrum as follows: F (u, v) R (u, v) I (u, v) 2 2 1 2 ( spectrum) I (u, v) (u, v) tan (phase angle) R(u, v) 1 2 P(u,v) F (u, v) R 2 (u, v) I 2 (u, v) (power spectrum) • R(u,v): the real part of F(u,v) • I(u,v): the imaginary part of F(u,v) 12 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Discrete FT (DFT) magnitude phase KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Some properties of Fourier transform ℱ f ( x, y )(1) x y 1 F (0,0) MN M N F (u , v ) (shift) 2 2 M 1N 1 f ( x, y ) (average) x 0 y 0 F (u , v) F * (u ,v) (conjugate symmetric) F (u , v) F (u ,v) (symmetric) 13 14 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Some properties of Fourier transform Spatial Domain (, ) Linearity c1 f x, y c2 g x, y f ax, by Scaling Shifting f x x0 , y y0 Shifting for a period f x, y (1x y ) c1F u, v c2G u, v 1 u v F , ab a b e j 2 (ux0 vy0 ) F u , v F u M / 2, u N / 2 | F u, v || F u,v | Symmetry Convolution Frequency Domain (, ) f x, y g x, y F u, v G u, v 15 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Convolution in Fourier transform Spatial Domain (x) Frequency Domain (u) g f h g fh G FH G F H So, we can find g(x) by Fourier transform g IFT G f FT F h FT H KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek FT examples rect(x) function sinc(x)=sin(x)/x 16 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek FT examples 17 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek FT examples • Typically, we visualize |F(u,v)| Typically, we visualize |F(u,v)| 18 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek FT examples DFT DFT 19 20 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek FT examples Sine wave 2D Gaussian function Its DFT Its DFT KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 21 Image processing in the Frequency domain f x, y (1x y ) g x, y (1x y ) KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 22 Image processing in the Frequency domain • Noise reduction in the frequency domain KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 23 Image processing in the Frequency domain 1. Take the FT of f(x): 2. Remove undesired frequencies: 3. Convert back to a signal 24 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Image processing in the Frequency domain • We want a smoothed function of f(x) g x f x hx • Let us use a Gaussian kernel h x 1 x2 1 h x exp 2 2 2 • Then 1 2 2 H u exp 2u 2 Gu F u H u x H u 1 2 u H(u) attenuates high frequencies in F(u) (Low-pass Filter)! 25 KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek Image vs. its frequency domain representation Magnitude of the FT Does not look anything like what we have seen KOM3212 Image Processing in Industrial Systems | Dr Muharrem Mercimek 26 Image vs. its frequency domain representation

Download
# Image processing in the Frequency domain