Signal Processing COS 323

Similar documents
Filtering and Edge Detection

Signals, Instruments, and Systems W5. Introduction to Signal Processing Sampling, Reconstruction, and Filters

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

ECG782: Multidimensional Digital Signal Processing

!Sketch f(t) over one period. Show that the Fourier Series for f(t) is as given below. What is θ 1?

Edge Detection. Image Processing - Computer Vision

Lecture 3: Linear Filters

Lecture 3: Linear Filters

EE16B - Spring 17 - Lecture 11B Notes 1

Lecture 5. The Digital Fourier Transform. (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith)

Topic 3: Fourier Series (FS)

E : Lecture 1 Introduction

Images have structure at various scales

Edge Detection. CS 650: Computer Vision

Sampling اهمتسیس و اهلانگیس یرهطم لضفلاوبا دیس فیرش یتعنص هاگشناد رتویپماک هدکشناد

8/19/16. Fourier Analysis. Fourier analysis: the dial tone phone. Fourier analysis: the dial tone phone

From Fourier Series to Analysis of Non-stationary Signals - II

Topic 7. Convolution, Filters, Correlation, Representation. Bryan Pardo, 2008, Northwestern University EECS 352: Machine Perception of Music and Audio

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING EXAMINATIONS 2010

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis

Review: Continuous Fourier Transform

Image Acquisition and Sampling Theory

BIOSIGNAL PROCESSING. Hee Chan Kim, Ph.D. Department of Biomedical Engineering College of Medicine Seoul National University

QUESTION BANK SIGNALS AND SYSTEMS (4 th SEM ECE)

EE123 Digital Signal Processing

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

ENT 315 Medical Signal Processing CHAPTER 2 DISCRETE FOURIER TRANSFORM. Dr. Lim Chee Chin

Spatial Enhancement Region operations: k'(x,y) = F( k(x-m, y-n), k(x,y), k(x+m,y+n) ]

V(t) = Total Power = Calculating the Power Spectral Density (PSD) in IDL. Thomas Ferree, Ph.D. August 23, 1999

Computer Vision. Filtering in the Frequency Domain

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

Chapter 16. Local Operations

Time-Frequency Analysis

In this Lecture. Frequency domain analysis

ESE 250: Digital Audio Basics. Week 4 February 5, The Frequency Domain. ESE Spring'13 DeHon, Kod, Kadric, Wilson-Shah

Chapter 5 Frequency Domain Analysis of Systems

BEE604 Digital Signal Processing


BME 50500: Image and Signal Processing in Biomedicine. Lecture 2: Discrete Fourier Transform CCNY

Fourier Analysis Overview (0A)

Summary of lecture 1. E x = E x =T. X T (e i!t ) which motivates us to define the energy spectrum Φ xx (!) = jx (i!)j 2 Z 1 Z =T. 2 d!

Math 56 Homework 5 Michael Downs

arxiv:math/ v1 [math.na] 12 Feb 2005

Correlation, discrete Fourier transforms and the power spectral density

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

Representation of Signals & Systems

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news

Signal Modeling Techniques in Speech Recognition. Hassan A. Kingravi

12.1 Fourier Transform of Discretely Sampled Data

Chapter 5 Frequency Domain Analysis of Systems

3. Lecture. Fourier Transformation Sampling

Fourier Analysis of Signals Using the DFT

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

Biomedical Engineering Image Formation II

Elec4621 Advanced Digital Signal Processing Chapter 11: Time-Frequency Analysis

ANALOG AND DIGITAL SIGNAL PROCESSING ADSP - Chapter 8

Gaussian Processes for Audio Feature Extraction

Topic 6. Timbre Representations

EE123 Digital Signal Processing

where =0,, 1, () is the sample at time index and is the imaginary number 1. Then, () is a vector of values at frequency index corresponding to the mag

CMPT 889: Lecture 3 Fundamentals of Digital Audio, Discrete-Time Signals

Lecture Notes 5: Multiresolution Analysis

ECG782: Multidimensional Digital Signal Processing

Fourier Transform 2D

The Hilbert 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.

Theory and Problems of Signals and Systems

L29: Fourier analysis

Continuous Fourier transform of a Gaussian Function

Lecture 6: Edge Detection. CAP 5415: Computer Vision Fall 2008

Computational Data Analysis!

Introduction to Linear Systems

Chirp Transform for FFT

6.003 Signal Processing

6.003 Signal Processing

CS Sampling and Aliasing. Analog vs Digital

Fourier Analysis Overview (0A)

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

IB Paper 6: Signal and Data Analysis

LAB 6: FIR Filter Design Summer 2011

Feature extraction 1

AN INVERTIBLE DISCRETE AUDITORY TRANSFORM

ELEG 3124 SYSTEMS AND SIGNALS Ch. 5 Fourier Transform

FILTERING IN THE FREQUENCY DOMAIN

DCSP-2: Fourier Transform

EEO 401 Digital Signal Processing Prof. Mark Fowler

EE482: Digital Signal Processing Applications

1 1.27z z 2. 1 z H 2

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

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

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EC2314- DIGITAL SIGNAL PROCESSING UNIT I INTRODUCTION PART A

Various signal sampling and reconstruction methods

LINEAR SYSTEMS. J. Elder PSYC 6256 Principles of Neural Coding

Review of Linear System Theory

Review of Linear Systems Theory

Jim Lambers ENERGY 281 Spring Quarter Lecture 5 Notes

Key Intuition: invertibility

Wave Phenomena Physics 15c

ESS Finite Impulse Response Filters and the Z-transform

CS 1124Media computation. Oct 6, 2008 Steve Harrison

Transcription:

Signal Processing COS 323

Digital Signals D: functions of space or time e.g., sound 2D: often functions of 2 spatial dimensions e.g. images 3D: functions of 3 spatial dimensions CAT, MRI scans or 2 space, time video

Digital Signal Processing. Understand analogues of filters 2. Understand nature of sampling

Filtering Consider a noisy D signal ft One basic operation: smooth the signal Output = new function ht Filter ft ht

Filtering Consider a noisy D signal ft One basic operation: smooth the signal Output = new function ht Linear Shift-Invariant Filters If you double input, double output If you shift input by t, shift output by t

Simplest smoothing filter Take average of nearby points: Filter

Convolution Output signal at each point = weighted average of local region of input signal Depends on input signal, pattern of weights Filter g = function containing weights for linear combination Basic operation = move filter to some position, add up f times g g: c Filter 0

Convolution f g f g = f t g t dt Try for yourself: http://jhu.edu/~signals/convolve/

Convolution f is called signal and g is filter or kernel, but the operation is symmetric *for real functions But: usually desirable to leave a constant signal unchanged: choose g such that g t dt =

Filter Choices Simple filters: bo, triangle

Gaussian Filter Commonly used filter G 2σ = e σ 2π 2 2

2D Gaussian Filter

Eample: Smoothing Original image Smoothed with 2D Gaussian kernel

Consider magnitude of gradient st derivative Eample: Edge Detection

Smoothed Derivative Derivative of noisy signal = more noisy Solution: smooth with a Gaussian before taking derivative Differentiation and convolution both linear operators: they commute d d f g = df d g = f dg d

Smoothed Derivative Result: good way of finding derivative = convolution with derivative of Gaussian

Results in D: Peak appears at edge

Smoothed Derivative in 2D What is derivative in 2D? Gradient: Gaussian is separable! Combine smoothing, differentiation: = y f f y f,, = =,,,,,, 2 y G G y f y G G y f y G G y f y G G y f y G y f, 2 y G G y G =

Smoothed Derivative in 2D = =,,,,,, 2 y G G y f y G G y f y G G y f y G G y f y G y f

Edge Detection using Derivative of Gaussian Original Image Smoothed Gradient Magnitude

Canny Edge Detector Smooth Find derivative Find maima Threshold

Canny Edge Detector Original Image Edges

Sampling

Sampled Signals Analog domain: Continuous signals Digital domain: Can t store continuous signal: instead store samples Usually evenly sampled: f 0 =f 0, f =f 0 +, f 2 =f 0 +2, f 3 =f 0 +3,

3 Hz sine wave

3Hz sine sampled at 5Hz

3Hz sine sampled at 5Hz

5Hz sine sampled at 27 Hz

5Hz sine sampled at 5Hz

5Hz sine sampled at 6Hz

5Hz sine sampled at 6Hz Aliasing!

Aliasing Need to sample at least twice per period to capture the signal unambiguously Nyquist s theorem: Highest allowed signal frequency is half the sampling frequency = Nyquist frequency E.g., CD quality audio is 44,00 Hz Highest frequency representable is 22,050 Hz Limit of human hearing: ~7kHz to 20kHz

Aliasing in D Frequencies above Nyquist get reflected back below Nyquist 0 f N

Aliasing strikes!

Preventing aliasing Use a sample rate high enough to capture frequencies of interest i.e., > twice the highest frequency of interest Apply a low-pass filter to remove frequencies above the Nyquist frequency, before sampling.

Discrete Convolution Integral becomes sum over samples f g = fi g i i Normalization condition is i g i =

Computing Discrete Convolutions f g = fi g for = to n for i = to m out = out + fi * g-i i i Does not handle boundaries! If f has n samples and g has m nonzero samples, straightforward computation takes time Onm OK for small filter kernels, bad for large ones

Fourier Analysis

Frequency Domain Any signal can be represented as a sum of sinusoids at discrete frequencies, each with a given magnitude and phase

Frequency content in audio Frequency related to pitch: A 440 : 440 Hz 880Hz: one octave above Frequency also related to timbre: Real sounds contain many frequencies Higher frequency content can make sounds brighter In speech, higher frequencies are related to vowels, consonants independent of spoken/sung pitch

Fourier Transform Transform applied to function to analyze a signal s frequency content Several versions: Continuous Time Discrete Time Aperiodic / unbounded time, continuous frequency Fourier Transform Discrete-time Fourier Transform DTFT Periodic or bounded time, discrete frequency Fourier Series Discrete Fourier Transform DFT FFT used here

Fourier Series f Periodic function f defined over [ π.. π ] = 2 a0 + a + n cos n bn sin n n= n= where a n = π π π f cos n d b n = π π π f sin n d

Applying Euler s Formula Euler s formula: e i = cos + isin Apply: f = 2 a0 + a + n cos n bn sin n n= n= becomes where f = c n = 2π n= π π c n e in f e in d

Fourier Transform [Continuous] Fourier transform: Fk = F f 2πik = f e d Discrete Fourier transform: F k = n = 0 2πi F is a function of frequency describes how much of each frequency f contains Fourier transform is invertible f e k n

The Convolution Theorem Fourier transform turns convolution into multiplication: F f * g = F f F g and vice versa: F f g = F f * F g

Fourier Transform and Convolution Useful application #: Use frequency space to understand effects of filters Eample: Fourier transform of a Gaussian is a Gaussian Thus: attenuates high frequencies Amplitude Amplitude = Amplitude Frequency Frequency Frequency

Fourier Transform and Convolution Bo function? In frequency space: sinc function sinc = sin / Not as good at attenuating high frequencies

Fourier Transform and Convolution Fourier transform of derivative: d d Blows up for high frequencies! f = 2 k f F πi F After Gaussian smoothing, doesn t blow up

Fourier Transform and Convolution Useful application #2: Efficient computation Fast Fourier Transform FFT takes time On log n Thus, convolution can be performed in time On log n + m log m Greatest efficiency gains for large filters