ECG782: Multidimensional Digital Signal Processing

Similar documents
Convolution Spatial Aliasing Frequency domain filtering fundamentals Applications Image smoothing Image sharpening

ECG782: Multidimensional Digital Signal Processing

Filtering in the Frequency Domain

Lecture 4 Filtering in the Frequency Domain. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016

Fourier transform. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year

Lecture # 06. Image Processing in Frequency Domain

Chapter 5 Frequency Domain Analysis of Systems

Computer Vision. Filtering in the Frequency Domain

Bridge between continuous time and discrete time signals

EE482: Digital Signal Processing Applications

G52IVG, School of Computer Science, University of Nottingham

Homework: 4.50 & 4.51 of the attachment Tutorial Problems: 7.41, 7.44, 7.47, Signals & Systems Sampling P1

Chapter 5 Frequency Domain Analysis of Systems

Chapter 4: Filtering in the Frequency Domain. Fourier Analysis R. C. Gonzalez & R. E. Woods

COMP344 Digital Image Processing Fall 2007 Final Examination

Digital Image Processing. Chapter 4: Image Enhancement in the Frequency Domain

Digital Image Processing COSC 6380/4393

Homework 4. May An LTI system has an input, x(t) and output y(t) related through the equation y(t) = t e (t t ) x(t 2)dt

Introduction to Computer Vision. 2D Linear Systems

Digital Image Processing. Filtering in the Frequency Domain

IMAGE ENHANCEMENT: FILTERING IN THE FREQUENCY DOMAIN. Francesca Pizzorni Ferrarese

Digital Image Processing. Image Enhancement: Filtering in the Frequency Domain

Machine vision, spring 2018 Summary 4

Chap 4. Sampling of Continuous-Time Signals

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis

Machine vision. Summary # 4. The mask for Laplacian is given

IB Paper 6: Signal and Data Analysis

3. Lecture. Fourier Transformation Sampling

Review: Continuous Fourier Transform

Chapter 4 Image Enhancement in the Frequency Domain

EE 3054: Signals, Systems, and Transforms Summer It is observed of some continuous-time LTI system that the input signal.

Continuous Fourier transform of a Gaussian Function

Today s lecture. The Fourier transform. Sampling, aliasing, interpolation The Fast Fourier Transform (FFT) algorithm

ESE 531: Digital Signal Processing

Filtering in the Frequency Domain

Discrete-time Signals and Systems in

CITS 4402 Computer Vision

Fourier series: Any periodic signals can be viewed as weighted sum. different frequencies. view frequency as an

Images have structure at various scales

The Discrete Fourier Transform

Fourier Analysis of Signals Using the DFT

EE482: Digital Signal Processing Applications

Correlator I. Basics. Chapter Introduction. 8.2 Digitization Sampling. D. Anish Roshi

CS 4495 Computer Vision. Frequency and Fourier Transforms. Aaron Bobick School of Interactive Computing. Frequency and Fourier Transform

ECE Digital Image Processing and Introduction to Computer Vision. Outline

FROM ANALOGUE TO DIGITAL

Filtering in Frequency Domain

Signals and Systems. Lecture 14 DR TANIA STATHAKI READER (ASSOCIATE PROFESSOR) IN SIGNAL PROCESSING IMPERIAL COLLEGE LONDON

ESS Dirac Comb and Flavors of Fourier Transforms

Signal Processing COS 323

Vibration Testing. Typically either instrumented hammers or shakers are used.

Introduction to Biomedical Engineering

LECTURE 12 Sections Introduction to the Fourier series of periodic signals

E2.5 Signals & Linear Systems. Tutorial Sheet 1 Introduction to Signals & Systems (Lectures 1 & 2)

Signals & Systems. Chapter 7: Sampling. Adapted from: Lecture notes from MIT, Binghamton University, and Purdue. Dr. Hamid R.

Empirical Mean and Variance!

Fundamentals of the Discrete Fourier Transform


Information and Communications Security: Encryption and Information Hiding

Biomedical Engineering Image Formation II

MEDE2500 Tutorial Nov-7

EE482: Digital Signal Processing Applications

Contents. Signals as functions (1D, 2D)

Review of Linear System Theory

Wavelets and Multiresolution Processing

Image Enhancement in the frequency domain. GZ Chapter 4

Fourier Transform and Frequency Domain

Multimedia Signals and Systems - Audio and Video. Signal, Image, Video Processing Review-Introduction, MP3 and MPEG2

Today s lecture. Local neighbourhood processing. The convolution. Removing uncorrelated noise from an image The Fourier transform

PART 1. Review of DSP. f (t)e iωt dt. F(ω) = f (t) = 1 2π. F(ω)e iωt dω. f (t) F (ω) The Fourier Transform. Fourier Transform.

A523 Signal Modeling, Statistical Inference and Data Mining in Astrophysics Spring 2011

Topic 3: Fourier Series (FS)

Convolution and Linear Systems

Linear Operators and Fourier Transform

! Spectral Analysis with DFT. ! Windowing. ! Effect of zero-padding. ! Time-dependent Fourier transform. " Aka short-time Fourier transform

Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum

Frequency2: Sampling and Aliasing

Contents. Signals as functions (1D, 2D)

Image Processing /6.865 Frédo Durand A bunch of slides by Bill Freeman (MIT) & Alyosha Efros (CMU)

Continuous-time Fourier Methods

Filter Analysis and Design

Digital Image Processing COSC 6380/4393

Tutorial Sheet #2 discrete vs. continuous functions, periodicity, sampling

Digital Image Processing

Discrete Fourier Transform

Image Enhancement in the frequency domain. Inel 5046 Prof. Vidya Manian

Analog Digital Sampling & Discrete Time Discrete Values & Noise Digital-to-Analog Conversion Analog-to-Digital Conversion

Contents. Signals as functions (1D, 2D)

ECE 301: Signals and Systems Homework Assignment #7

Computer Vision Lecture 3

Aspects of Continuous- and Discrete-Time Signals and Systems

Chapter 2: The Fourier Transform

Computational Methods for Astrophysics: Fourier Transforms

Review of Discrete-Time System

Math 56 Homework 5 Michael Downs

Ch.11 The Discrete-Time Fourier Transform (DTFT)

Fourier Transform 2D

Sampling in 1D ( ) Continuous time signal f(t) Discrete time signal. f(t) comb

6.003: Signals and Systems. Sampling and Quantization

The Discrete-time Fourier Transform

Transcription:

Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu ECG782: Multidimensional Digital Signal Processing Filtering in the Frequency Domain http://www.ee.unlv.edu/~b1morris/ecg782/

2 Outline Background Concepts Sampling and Fourier Transform Discrete Fourier Transform Extension to Two Variables Properties of 2D DFT Frequency Domain Filtering Basics Smoothing Sharpening Selective Filtering Implementation

3 Motivation Complicated signals (functions) can be constructed as a linear combination of sinusoids Mathematically compact representation with complex exponentials e jωt Introduced as Fourier series by Jean Baptiste Joseph Fourier Initially considered periodic signals Later extended to aperiodic signals Powerful mathematical tool Can go between time and frequency domain processing

4 Preliminary Concepts Complex numbers C = R + ji C = R ji C = C e jθ Using Euler s formula e jθ = cos θ + j sin θ Fourier Series Express a periodic signal as a sum of sines and cosines f t = c n e jω 0nt n c n = 1 f t e jω 0nt T T ω 0 = 2π/T Fourier Transform F μ = F f t = f t e j2πμt dt μ : continuous frequency variable f t = F 1 F μ = F μ e j2πμt dμ Notice for real f t this generally results in a complex transform

5 Rectangle Wave Example F μ = AW sin πμw πμw Rectangle in time gives sinc in frequency See book for derivation Frequency spectrum sin πμw F μ = AW πμw Consider only a real portion Note zeros are inversely proportional to width of box Wider in time, narrow in frequency

6 Convolution Properties Very important input-output relationship between a input signal f t and an LTI system h(t) f t h t = f τ h t τ dτ Dual time-frequency relationship f t h t F μ H μ f t h t F μ H μ Convolution-multiplication relationship

7 Sampling Convert continuous signal to a discrete sequence Use impulse train sampling f t = f t s ΔT t = n f t δ(t nδt) δ t nδt - impulse response at time t = nδt Sample value f k = f(kδt)

8 Fourier Transform of Sampled Signal F μ = F f t = F μ S(μ) S μ = 1 δ μ n ΔT n ΔT FT of impulse train is an impulse train See section 4.2.3 in the book for details Note spacing between impulses are inversely related F μ = 1 F μ n ΔT n ΔT Sampling creates copies of the original spectrum Must be careful with sampling period to avoid aliasing (overlap of spectrum)

9 Sampling Theorem Conditions to be able to recover f t completely after sampling Requires bandlimited f(t) F μ = 0 for μ > μ max Can isolate center spectrum copy from its neighbors Sampling theorem 1 > 2μ ΔT max Nyquist rate 2μ max Recovery with lowpass filter H μ = ΔT for μ μ max

10 Aliasing Corruption of recovered signal if not sampled at rate less than Nyquist rate Spectrum copies overlap High frequency components corrupt lower frequencies In reality this is always present Most signals are not bandlimited Bandlimited signals require infinite time duration Windowing to limit size naturally causes distortion Use anti-aliasing filter before sampling Filter reduces high frequency components

11 Discrete Fourier Transform Discussion has considered continuous signals (functions) Need to operate on discrete signals DFT is a sampled version of the sampled signal FT in one period F μ = n f n e j2πμnδt Sample in frequency evenly (M) over a period μ = m MΔT F m = n f n e j2πmn/m m = 0,1,2,, M 1 M samples of f t, f n, results in M DFT values Note: implicitly assumes samples come from one period of periodic signal Inverse DFT F n = 1 M m F m e j2πmn/m

12 Sampling/Frequency Relationship M samples of signal with sample period ΔT Total time T = MΔT Spacing in discrete frequency Δu = 1 MΔT = 1 T Note the switch to u for discrete frequency Total frequency range Ω = MΔu = 1 ΔT Resolution of DFT is dependent on the duration T of the sampled function Generally the number of samples See fft.m in Matlab to test this

13 Extensions to 2D All discussions can be extended to two variables easily Add second integral or summation for extra variable 2D rectangle F μ, ν = ATZ sin πμt πμt sin πνz πνz

14 Image Aliasing Temporal aliasing appears in video Wheel effect looks like it is spinning opposite direction Spatial aliasing is the same as the previous discussion now in two dimensions

15 Image Interpolation and Resampling Used for image resizing Zooming oversample and image Shrinking undersample an image Must be careful of aliasing Generally smooth before downsample

16 Fourier Spectrum and Phase Angle F u, v = F u, v ejφ u,v Magnitude, spectrum F u, v = R 2 u, v + I 2 u, v 1/2 Phase angle jφ u,v e = arctan I u,v R u,v Spectrum Spectrum is component we naturally specify while phase is a bit harder to visualize

17 Spectrum Translation does not affect spectrum Wide in space narrow in frequency Orientation clearly visible in spectrum

18 Phase Difficult to describe phase given image content a) centered rectangle b) translated rectangle c) rotated rectangle

19 Spectrum Phase Manipulation Both spectrum and phase are important for image content

20 Frequency Domain Filtering Basics Generally complicated relationship between image and transform Frequency is associated with patterns of intensity variations in image Filtering modifies the image spectrum based on a specific objective Magnitude (spectrum) most useful for visualization (e.g. match visual characteristics) Phase generally not useful for visualization 45 degree lines Off center line

21 Fundamentals Modify FT of image and inverse for result g x, y = F 1 [H u, v F u, v ] g(x, y) : output image [M N] F(u, v) : FT of input image f x, y [M N] H(u, v) : filter transfer function [M N] F 1 : inverse FT (ift) Product from element-wise array multiplication Remove DC (0,0) term from F(u, v)

22 Example Filters Addition of small offset to retain DC component after HP

23 DFT Subtleties Multiplication in frequency is convolution in time Must pad image since output is larger Will pad f(x, y) image but not h(x, y) H(u, v) designed and sized for padded F(u, v) DFT implicitly assumes a periodic function

24 Phase Angle Generally, a filter can affect the phase of a signal Zero-phase-shift filters have no effect on phase Focus of this chapter Phase is very important to image Small changes can lead to unexpected results

25 Frequency Domain Filtering Steps 1. Given image f(x, y) of size M N, get padding (P, Q) Typically use P = 2M and Q = 2N 2. Form zero-padded image f p (x, y) of size P Q 3. Multiply f p (x, y) by 1 x+y to center the transform 4. Compute DFT F(u, v) 5. Compute G u, v = H u, v F(u, v) Get real, symmetric filter function H(u, v) of size P P Q with center at coordinates 2, Q 2 6. Obtain (padded) output image from ift g p x, y = {real F 1 G u, v 1 x+y 7. Obtain g(x, y) by extracting M N region from top left quadrant of g p (x, y)

Steps Example 26

27 Relationship to Spatial Filtering Frequency multiplication convolution in spatial domain h(x, y) H(u, v) Use of a finite impulse response Generally use small filter kernels which are more efficient to implement in spatial domain Frequency domain can be better for the design of filters More natural space for definition Use ift to determine the shape of the spatial filter

28 Smoothing High frequency image content comes from edges and noise Smoothing/blurring is a lowpass operation that attenuates (removes) high frequency content Consider three smoothing filters Ideal lowpass sharp filter Butterworth filter order controls shape Gaussian very smooth filter

29 Ideal Lowpass Filter H u, v = 1 D u, v D 0 0 D u, v > D 0 D u, v = u P 2 Q 2 + v 2 2 Pass all frequencies D 0 distance from DC D 0 is the cuttoff frequency

30 Ideal Lowpass Example ringing blurring

LP Spectrum View 31

32 Butterworth LP Filter 1 H u, v = 1+ D u,v /D 2n 0 n order of the filter (controls sharpness of transition) Cutoff generally specified as the 50% of max (D 0 = 0.5)

33 Butterworth LP Example No ringing is visible because of the gradual transition from high to low frequency in filter May be visible in higherorder filters (n > 2) Trade-off frequency narrow main lobe with sidelobe height

34 Gaussian Lowpass Filter H u, v = e D2 u,v /2σ 2 σ measure of spread σ = D 0 is the cutoff frequency ift is also a Gaussian No ringing because of smooth function A favorite filter for smoothing

35 Gaussian LP Example No ringing Not as much smoothing as Butterworth 2 Best for use when ringing is unacceptable Butterworth better when tight control of transition between high and low frequency is required

36 Sharpening Use a highpass filter H HP u, v = 1 H LP (u, v) Ideal H u, v = 0 D u, v D 0 1 D u, v > D 0 Butterworth H u, v = Gaussian 1 1+ D 0 /D u,v 2n H u, v = e D2 u,v /2σ 2

37 Highpass Examples Same ringing artifacts as ideal lowpass

HP Spectrum View 38

39 Selective Filtering Bandpass/reject operate on a ring in the frequency spectrum See Table 4.6 for definitions Notch filters operate on specific regions in the frequency spectrum Move center of HP filter appropriately

Notch Examples 40

Notch Examples II 41

BP Spectrum View 42

43 Implementation Issues DFT is separable Can compute first a 1D DFT over rows followed by the 1D DFT over columns Simplifies computations in 1D Practically use Fast Fourier Transform (FFT) to computer all DFT Computationally efficient algorithm that simplifies problem by halving sequence repeatedly Efficiency requires M and N (size of image) to be multiples of 2