Chap 4 Image Enhancement in the Frequency Domain.

Slides:



Advertisements
Similar presentations
Image Enhancement in the Frequency Domain (2)
Advertisements

Local Enhancement Histogram processing methods are global processing, in the sense that pixels are modified by a transformation function based on the gray-level.
Basic Properties of signal, Fourier Expansion and it’s Applications in Digital Image processing. Md. Al Mehedi Hasan Assistant Professor Dept. of Computer.
Frequency Domain Filtering (Chapter 4)
1 Image Processing Ch4: Filtering in frequency domain Prepared by: Tahani Khatib AOU.
Digital Image Processing
Image Enhancement in the Frequency Domain Part III
Fourier Transform (Chapter 4)
Chapter Four Image Enhancement in the Frequency Domain.
Image processing (spatial &frequency domain) Image processing (spatial &frequency domain) College of Science Computer Science Department
© by Yu Hen Hu 1 ECE533 Digital Image Processing Image Enhancement in Frequency Domain.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 5 Image Restoration Chapter 5 Image Restoration.
Digital Image Processing
Digtial Image Processing, Spring ECES 682 Digital Image Processing Oleh Tretiak ECE Department Drexel University.
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Chapter 4 Image Enhancement in the Frequency Domain.
CHAPTER 4 Image Enhancement in Frequency Domain
Chap 4-2. Frequency domain processing Jen-Chang Liu, 2006.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Image Enhancement in the Frequency Domain Spring 2005, Jen-Chang Liu.
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
Image Enhancement in the Frequency Domain Part II Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Chapter 4 Image Enhancement in the Frequency Domain.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Filters in the Frequency Domain.  Image Smoothing Using Frequency Domain Filters: ◦ Ideal Lowpass Filters ◦ Butterworth Lowpass Filters ◦ Gaussian Lowpass.
Presentation Image Filters
Introduction to Image Processing
Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain.
Chapter 4: Image Enhancement in the Frequency Domain Chapter 4: Image Enhancement in the Frequency Domain.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Chapter 7: The Fourier Transform 7.1 Introduction
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Background Any function that periodically repeats itself.
Digital Image Processing CSC331 Image Enhancement 1.
Lecture 7: Sampling Review of 2D Fourier Theory We view f(x,y) as a linear combination of complex exponentials that represent plane waves. F(u,v) describes.
ENG4BF3 Medical Image Processing Image Enhancement in Frequency Domain.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain 22 June 2005 Digital Image Processing Chapter 4: Image Enhancement in the.
Image Subtraction Mask mode radiography h(x,y) is the mask.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
Frequency Domain Processing Lecture: 3. In image processing, linear systems are at the heart of many filtering operations, and they provide the basis.
University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Application) Digital Image Processing Christophoros Nikou
Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial  Transformed domain Transformation.
Low Pass Filter High Pass Filter Band pass Filter Blurring Sharpening Image Processing Image Filtering in the Frequency Domain.
Fourier Transform.
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
2D Fourier Transform.
Digital Image Processing Lecture 9: Filtering in Frequency Domain Prof. Charlene Tsai.
BYST Xform-1 DIP - WS2002: Fourier Transform Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Fourier Transform and Image.
Frequency Domain Filtering. Frequency Domain Methods Spatial Domain Frequency Domain.
Fourier transform.
Amity School of Engineering & Technology 1 Amity School of Engineering & Technology DIGITAL IMAGE PROCESSING & PATTERN RECOGNITION Credit Units: 4 Mukesh.
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Digital Image Processing Chapter - 4
Digital Image Processing , 2008
IMAGE ENHANCEMENT IN THE FREQUENCY DOMAIN
The content of lecture This lecture will cover: Fourier Transform
Spatial & Frequency Domain
Image Enhancement in the
Image Enhancement in the Frequency Domain Part I
ENG4BF3 Medical Image Processing
Frequency Domain Analysis
4. Image Enhancement in Frequency Domain
Digital Image Processing
Filtering in the Frequency Domain
Lecture 4 Image Enhancement in Frequency Domain
Presentation transcript:

Chap 4 Image Enhancement in the Frequency Domain

Background Any periodic function can be expressed as the sum of sines and cosines of different frequencies, each multiplied by a different coefficient. –We called this sum a Fourier series. Even function that are not periodic can be expressed as the integral of sines and cosines multiplied by a weighting function. –This formation is the Fourier transform.

Periodic Function A function f is periodic with period P greater than zero if –Af(x + P) = Af(x), where A denotes amplitude. f(x) = sinx, P = 2π, frequency=1/ 2π, A=1. f(x) = Asinnx, P = 2π/n, frequency=n/ 2 π. –n↑, frequency↑.

Fourier Series Suppose f(x) is a function defined on the interval [-π,π]. The Fourier series expansion of f(x) is where an and bn are constants called the Fourier coefficients, and

Coefficients of Any Period T = 2L Replace v by πx/L to obtain the Fourier series of the function ƒ(x) of period 2L

Complex Fourier Series Complex exponentials –According to Euler’s formula and so, Using these two equations we can find the complex exponential form of the trigonometric functions as

Complex Fourier Series

Continuous Spectra Consider the following function: –Only a single pulse remains and the resulting function is no longer periodic. A function which is not periodic can be considered as a function with very large period.

Continuous Spectra These two integrals form the conclusion of Fourier’s integral theorem.

Alternative Forms Note that there are a number of alternative forms for Fourier transform, such as –The third form is popular in the field of signal processing and communications systems.

4.2 Fourier Transform in the Frequency Domain Fourier transform F(u) of f(x) is defined as The inverse Fourier Transform is DFT for Discrete function f(x), x=0,1,..M-1 for u=0,1,..M-1 Inverse DFT

Euler’s formula: Each term of the Fourier transform is composed of the sum of all values of the function f(x). –M 2 summations and multiplications –The values of f(x) are multiplied by sines and cosines of various frequencies. –The domain (values of u) over which the values of F(u) range is appropriately called the frequency domain, because u determines the frequency of the components of the transform. –Each of the M terms of F(u) is called a frequency component of the transform.

Complex Spectra In general, the components of Fourier transform are complex quantities in the following form: F(u) = R(u) + jI(u) and can be written as F(u) = |F(u)|e j  (u) The spectra is usually represented by the amplitude of a specific frequency Amplitude or spectrum of Fourier transform |F(u)| = (R 2 (u)+I 2 (u)) 1/2

Complex Spectra These complex coefficients couples –Amplitude spectrum value Magnitude of each of the harmonic components. –Phase spectrum value The phase of each harmonic relative to the fundamental harmonic frequency ω 0.

The frequency spectrum is centered at 0. To visual easily, we sometimes multiply f(x) by (-1) x before applying the transform.

Why (-1) x ?

4.2.2 The Two-dimensional Discrete Fourier Transform (DFT) 2D-DFT of f(x, y) of size M  N Inverse 2-D DFT

Modulation in the space domain F[(-1) x+y f(x, y)]= F(u-M/2,v-N/2) Shift the origin of F(u,v) to frequency coordinates (M/2, N/2), –the center of (u, v), u=0,…M-1, v=0,…N-1. –frequency rectangle Average of f(x,y) For real f(x,y) F(u, v) = F*(-u, -v) |F(u, v)| = |F(-u, -v)| –The spectrum of the Fourier transform is symmetric.

Implementation

What is the “frequency” of an image? –Since frequency is directly related rate of change, it is not difficult intuitively to associate frequencies with pattern of intensity variations in an image. The low frequencies correspond to the slowly varying components of an image. The higher frequencies begin to correspond to faster and faster gray level changes in the image. –such as edges. –F(0, 0): the average gray level of an image Filtering in the Frequency Domain

1)Multiply the input image by (-1) x+y to center the transform. 2)Compute DFT F(u, v) 3)Multiply F(u,v) by a filter function H(u,v) G(u,v) = F(u,v)H(u,v) 4)Computer the inverse DFT of G(u,v) 5)Obtain the real part of g(x,y) 6)Multiply g(x,y) with (-1) x+y Filtering steps:

Notch filter: H(u,v) = 0 if (u,v) = (M/2, N/2), H(u,v) = 1 otherwise

Lowpass filter Highpass filter

4.2.4 Filtering in spatial and frequency domains The discrete convolution f(x,y)*h(x,y) f(x,y)*h(x,y)  F(u,v)H(u,v) f(x,y)h(x,y)  F(u,v)*H(u,v)

4.3 Smoothing Frequency-Domain Filters Frequency-Domain Filtering: G(u,v) = H(u,v)F(u,v) Filter H(u,v) –Ideal filter –Butterworth filter –Gaussian Filter

4.3.1 Ideal Low pass filter H(u,v) = 1 if D(u,v)  D 0 = 0 if D(u,v) > D 0 The center is at (u,v)=(M/2, N/2) D(u,v)=[(u-M/2) 2 + (v-N/2) 2 ] 1/2 Cutoff frequency is D 0 Power estimate: The percentage α of power enclosed in the circle is:

The blurring in this image is a clear indication that most of the sharp detail information in the picture is contained in the 8% power removed by the filter. The result of α =99.5 is quite close to the original, indicating little edge information is contained in the upper 0.5% of the spectrum power.

4.3.2 Butterworth Lowpass Filter Butterworth lowpass filter (BLPF) of order n At the frequency as an half of the cutoff frequency D 0, H(u, v)=0.5.

4.3.2 Butterworth Lowpass Filter

4.3.3 Gaussian Lowpass Filter Gaussian filter Let  =D 0 When D(u, v)=D 0, H(u, v)=0.667

4.3.3 Gaussian Lowpass Filter

4.3.4 Other Lowpass filtering examples

4.4 Sharpening Frequency-Domain Filter Highpass filtering: H hp (u,v)=1-H lp (u,v) Given a lowpass filter H lp (u,v), find the spatial representation of the highpass filter (1)Compute the inverse DFT of H lp (u,v) (2)Multiply the real part of the result with (-1) x+y

4.4 Sharpening Frequency-Domain Filter

4.4.1 Ideal Highpass Filter H(u,v)=0 if D(u,v)  D 0 =1 if D(u,v)>D 0 The center is at (u,v)=(M/2, N/2) D(u,v)=[(u-M/2) 2 +(v-N/2) 2 ] 1/2 Cutoff frequency is D 0

4.4.1 Ideal Highpass Filter

4.4.2 Butterworth Highpass Filter Butterworth filter has no sharp cutoff At cutoff frequency D 0 : H(u, v)=0.5

4.4.2 Butterworth Highpass Filter

4.4.3 Gaussian Highpass Filter Gaussian highpass filter (GHPF) Let  =D 0

4.4.3 Gaussian Highpass Filter

5.4 Periodic Noise Reduction by Frequency Domain Filtering Periodic noise is due to the electrical or electromechanical interference during image acquisition. Can be estimated through the inspection of the Fourier spectrum of the image.

Periodic Noise Reduction by Frequency Domain Filtering

5.4 Periodic Noise Reduction by Frequency Domain Filtering Bandreject filters –Remove or attenuate a band of frequencies. D 0 is the radius. D(u, v) is the distance from the origin, and W is the width of the frequency band.

Butterworth bandreject filter (order n) Gaussian band reject filter Butterworth and Gaussian Bandreject Filters

Bandreject Filters

Bandpass filter Obtained form bandreject filter H bp (u,v)=1-H br (u,v) The goal of the bandpass filter is to isolate the noise pattern from the original image, which can help simplify the analysis of noise, reasonably independent of image content.

Result of The BandPass Filter

5.4.3 Notch filters Notch filter rejects (passes) frequencies in predefined neighborhoods about a center frequency. where

Butterworth notch filter Gaussian notch filter Note that these notch filters will become highpass when u 0 =v 0 = Notch filters

Notch filters

Example 5.8 Use 1-D Notch pass filter to find the horizontal ripple noise