Handout 04 Filtering in the Frequency Domain
Total Page:16
File Type:pdf, Size:1020Kb
Digital Image Processing (420137), SSE, Tongji University, Spring 2013, given by Lin ZHANG Handout 04 Filtering in the Frequency Domain 1. Basic Concepts (1) Any periodic functions, no matter how complex it is, can be represented as the sum of a series of sine and cosine functions with different frequencies. (2) The signal’s frequency components can be clearly observed in the frequency domain. (3) Fourier transform is invertible. That means after the Fourier transform and the inverse Fourier transform, no information will be lost. (4) Usually, the Fourier transform F(u) is a complex number, from which we can define its magnitude, power spectrum, and the phase angle. (5) The impulse function, or Dirac function, is widely used in theoretical analysis of linear systems. It can be considered as an infinitely high, infinitely thin spike at the origin, with total area one under the spike. (6) Dirac function has a sift property, defined as f ()tttdtft (00 ) ( ). (7) The basic theorem linking the spatial domain to the frequency domain is the convolution theorem, ft()*() ht F ( ) H ( ). (8) The Fourier transform of a Gaussian function is also of a Gaussian shape in the frequency domain. (9) For visualization purpose, we often use fftshift to shift the origin of an image’s Fourier transform to its center position. (10) The basic steps for frequency filtering comprise the following, (11) Edges and other sharp intensity transitions, such as noise, in an image contribute significantly to the high frequency content of its Fourier transform. (12) The drawback of the ideal low-pass filter is that the filtering result has obvious ringing artifacts. Thus, ideal low-pass filter is rarely used in practice. (13) By varying the order of the Butterworth filter, it can approach a Gaussian filter or an ideal low-pass filter. (14) Low-pass filtering can be used to connect broken texts in the context of a machine perception Digital Image Processing (420137), SSE, Tongji University, Spring 2013, given by Lin ZHANG application; it can also be used to remove blemishes in a photo for printing. (15) FFT (fast Fourier transform) is an algorithm to rapidly compute discrete Fourier transforms. 2. Matlab Programming You may use the following Matlab functions in this section, fft2, ifft2, fftshift, ifftshift, angle, abs, real, and imag. (1) Run the demo “Filtering in Fourier Domain”. (2) Run the demo “Convolution via Fourier Transform”. (3) Run the demo “Butterworth Low-pass Filtering”. (4) Run the demo “Butterworth High-pass Filtering”. (5) Get an image. Perform 2D DFT to it. Display its magnitude map, phase angle map, and power spectrum map. (6) Get an image f. Perform 2D Fourier transform to f to get F. Then perform 2D inverse Fourier transform to F to get f’. Compare f and f’ to see whether they are identical. .