CIS 350 – 4 The FREQUENCY Domain Dr. Rolf Lakaemper.

Slides:



Advertisements
Similar presentations
Computer Vision Lecture 7: The Fourier Transform
Advertisements

Review of 1-D Fourier Theory:
CIS 601 Image ENHANCEMENT in the SPATIAL DOMAIN Dr. Rolf Lakaemper.
The arc length spanned, or cut off, by an angle is shown next:
CMPS1371 Introduction to Computing for Engineers PROCESSING SOUNDS.
Copyright © 2009 Pearson Education, Inc. CHAPTER 6: The Trigonometric Functions 6.1The Trigonometric Functions of Acute Angles 6.2Applications of Right.
Techniques in Signal and Data Processing CSC 508 Frequency Domain Analysis.
Fourier Transform (Chapter 4)
1D Fourier Analysis Dr. Rolf Lakaemper. Sound Let’s have a look at SOUND: SOUND: 1 dimensional function of changing (air-)pressure in time Pressure Time.
DFT/FFT and Wavelets ● Additive Synthesis demonstration (wave addition) ● Standard Definitions ● Computing the DFT and FFT ● Sine and cosine wave multiplication.
Fourier Transform – Chapter 13. Image space Cameras (regardless of wave lengths) create images in the spatial domain Pixels represent features (intensity,
Objective Recognize and graph periodic and trigonometric sine and cosine functions.
4.4 Graphs of Sine and Cosine: Sinusoids. By the end of today, you should be able to: Graph the sine and cosine functions Find the amplitude, period,
Chapter Four Image Enhancement in the Frequency Domain.
Digital Image Processing
Computer Graphics Recitation 6. 2 Motivation – Image compression What linear combination of 8x8 basis signals produces an 8x8 block in the image?
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
SWE 423: Multimedia Systems Chapter 7: Data Compression (3)
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
1 Computer Science 631 Lecture 4: Wavelets Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Fourier Analysis D. Gordon E. Robertson, PhD, FCSB School of Human Kinetics University of Ottawa.
SWE 423: Multimedia Systems Chapter 7: Data Compression (5)
SAMPLING & ALIASING. OVERVIEW Periodic sampling, the process of representing a continuous signal with a sequence of discrete data values, pervades the.
The World’s Largest Ferris Wheel
Fourier Series Or How I Spent My Summer Vacation (the 2 weeks after the AP Exam) Kevin Bartkovich Phillips Exeter Academy 1.
Chapter 25 Nonsinusoidal Waveforms. 2 Waveforms Used in electronics except for sinusoidal Any periodic waveform may be expressed as –Sum of a series of.
EGR 1101 Unit 6 Sinusoids in Engineering (Chapter 6 of Rattan/Klingbeil text)
Where we’re going Speed, Storage Issues Frequency Space.
Motivation Music as a combination of sounds at different frequencies
The Wave Function Heart beat Electrical Many wave shapes, whether occurring as sound, light, water or electrical waves, can be described mathematically.
Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples.
Fourier series. The frequency domain It is sometimes preferable to work in the frequency domain rather than time –Some mathematical operations are easier.
Fourier Series & The Fourier Transform What is the Fourier Transform? Fourier Cosine Series for even functions and Sine Series for odd functions The continuous.
Fundamentals of Electric Circuits Chapter 17
Chapter 4: Image Enhancement in the Frequency Domain Chapter 4: Image Enhancement in the Frequency Domain.
Lecture 9 Fourier Transforms Remember homework 1 for submission 31/10/08 Remember Phils Problems and your notes.
Where we’ve been Attenuate, Amplify, Linearize, Filter.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
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.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
Spatial Frequencies Spatial Frequencies. Why are Spatial Frequencies important? Efficient data representation Provides a means for modeling and removing.
Astronomical Data Analysis I
Section 6.6 Graphs of Transformed Sine and Cosine Functions Copyright ©2013, 2009, 2006, 2001 Pearson Education, Inc.
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.
-transformations -period -amplitude
Math Review Towards Fourier Transform
Graphs of Sine and Cosine
Sin & Cos with Amplitude and Phase.. In the equation, 2 is a multiplier and called an amplitude. Amplitude describes the “height” of the trigonometric.
Fourier Transform.
Dr. Abdul Basit Siddiqui FUIEMS. QuizTime 30 min. How the coefficents of Laplacian Filter are generated. Show your complete work. Also discuss different.
4.A Fourier Series & Fourier Transform Many slides are from Taiwen Yu.
Warm up Use the Pythagorean identity to determine if the point (.623,.377) is on the circumference of the unit circle Using Pythagorean identity, solve.
Today’s Concept: Simple Harmonic Motion: Mass on a Spring
The Frequency Domain Digital Image Processing – Chapter 8.
Digital Image Processing Lecture 7: Image Enhancement in Frequency Domain-I Naveed Ejaz.
Math for CS Fourier Transforms
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
CE Coding and Transformations April – June 2011.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Trigonometric Identities
Fourier’s Theorem.
Addition and Subtraction Formulas
SAMPLING & ALIASING.
Trigonometric Identities
CIS 350 – 3 Image ENHANCEMENT SPATIAL DOMAIN
Lecture 35 Wave spectrum Fourier series Fourier analysis
4. Image Enhancement in Frequency Domain
CIS 595 Image ENHANCEMENT SPATIAL DOMAIN
Lab 6: Sound Analysis Fourier Synthesis Fourier Analysis
Presentation transcript:

CIS 350 – 4 The FREQUENCY Domain Dr. Rolf Lakaemper

Some of these slides base on the textbook Digital Image Processing by Gonzales/Woods Chapter 4

Frequency Domain So far we processed the image ‘directly’, i.e. the transformation was a function of the image itself. We called this the SPATIAL domain. So what’s the FREQUENCY domain ?

Sound Let’s first forget about images, and look at SOUND. SOUND: 1 dimensional function of changing (air-)pressure in time Pressure Time t

Sound SOUND: if the function is periodic, we perceive it as sound with a certain frequency (else it’s noise). The frequency defines the pitch. Pressure Time t

Sound The AMPLITUDE of the curve defines the VOLUME

Sound The SHAPE of the curve defines the sound character Flute String Brass

Sound How can the SHAPE of the curve be defined ?

Sound Listening to an orchestra, you can distinguish between different instruments, although the sound is a SINGLE FUNCTION ! Flute String Brass

Sound If the sound produced by an orchestra is the sum of different instruments, could it be possible that there are BASIC SOUNDS, that can be combined to produce every single sound ?

Sound The answer (Charles Fourier, 1822): Any function that periodically repeats itself can be expressed as the sum of sines/cosines of different frequencies, each multiplied by a different coefficient

Sound Or differently: Since a flute produces a sine-curve like sound, a (huge) group of (outstanding) talented flautists could replace a classical orchestra. (Don’t take this remark seriously, please)

1D Functions A look at SINE / COSINE The sine-curve is defined by: Frequency (the number of oscillations between 0 and 2*PI) Amplitude (the height) Phase (the starting angle value) The constant y-offset, or DC (direct current)

1D Functions The general sine-shaped function: f(t) = A * sin(  t +  ) + c Amplitude Frequency Phase Constant offset (usually set to 0)

1D Functions Remember Fourier: …A function…can be expressed as the sum of sines/cosines… What happens if we add sine and cosine ?

1D Functions a * sin(  t) + b * cos(  t) = A * sin(  t +  ) (with A=sqrt(a^2+b^2) and tan  = b/a)  Adding sine and cosine of the same frequency yields just another sine function with different phase and amplitude, but same frequency. Or: adding a cosine simply shifts the sine function left/right and stretches it in y-direction. It does NOT change the sine-character and frequency of the curve.

1D Functions Remember Fourier, part II: Any function that periodically repeats itself… => To change the shape of the function, we must add sine-like functions with different frequencies.

1D Functions This applet shows the result: Applet: Fourier Synthesis

1D Functions What did we do ? Choose a sine curve having a certain frequency, called the base-frequency Choose sine curves having an integer multiple frequency of the base-frequency Shift each single one horizontally using the cosine-factor Choose the amplitude-ratio of each single frequency Sum them up

1D Functions This technique is called the FOURIER SYNTHESIS, the parameters needed are the sine/cosine ratios of each frequency. The parameters are called the FOURIER COEFFICIENTS

1D Functions As a formula: f(x)= a 0 /2 +  k=1..n a k cos(kx) + b k sin(kx) Fourier Coefficients

Note: The set of a k, b k TOTALLY defines the CURVE synthesized ! We can therefore describe the SHAPE of the curve or the CHARACTER of the sound by the (finite ?) set of FOURIER COEFFICIENTS ! 1D Functions

Examples for curves, expressed by the sum of sines/cosines (the FOURIER SERIES): 1D Functions

SAWTOOTH Function 1D Functions f(x) = ½ - 1/pi *  n 1/n *sin (n*pi*x) Freq.sincos /20 31/30 41/40

SQUARE WAVE Function 1D Functions f(x) = 4/pi *  n=1,3,5 1/n *sin (n*pi*x) Freq.sincos /30 51/50 71/70

What does the set of FOURIER COEFFICIENTS tell about the character of the shape ? (MATLAB Demo) 1D Functions

Result: Steep slopes introduce HIGH FREQUENCIES. 1D Functions

Motivation for Image Processing: Steep slopes showed areas of high contrast… …so it would be nice to be able to get the set of FOURIER COEFFICIENTS if an arbitrary (periodically) function is given. (So far we talked about 1D functions, not images, this was just a motivation) 1D Functions

The Problem now: Given an arbitrary but periodically 1D function (e.g. a sound), can you tell the FOURIER COEFFICIENTS to construct it ? 1D Functions

The answer (Charles Fourier): YES. 1D Functions

We don’t want to explain the mathematics behind the answer here, but simply use the MATLAB Fourier Transformation Function. Later we’ll understand what’s going on 1D Functions

MATLAB - function fft: Input: A vector, representing the discrete function Output: The Fourier Coefficients as vector of imaginary numbers, scaled for some reasons 1D Functions

Example: 1D Functions x=0:2*pi/(2047):2*pi; s=sin(x)+cos(x) + sin(2*x) + 0.3*cos(2*x); f=fft(s); i i i Freq. 0Freq. 1Freq. 2Freq. 3 cos sin

1D Functions FrReIm FrReIm 0~00 1~1 2~0.3~ i i i Transformation: t(a) = 2*a / length(result-vector)

1D Functions The fourier coefficients are given by: F=fft(function) L=length(F); %this is always = length(function) Coefficient for cosine, frequency k-times the base frequency: real(F(k+1)) * 2 / L Coefficient for sine, frequency k-times the base frequency: imag(F(k+1)) * 2 / L

1D Functions An application using the Fourier Transform: Create an autofocus system for a digital camera We did this already, but differently ! (MATLAB DEMO)

1D Functions Second application: Describe and compare 2-dimensional shapes using the Fourier Transform !

2D Functions From Sound to Images: 2D Fourier Transform

2D Functions The idea: Extend the base functions to 2 dimensions: f u (x) = sin(ux)  f u,v (x,y) = sin(ux + vy)

2D Functions Some examples: The base function, direction x: u=1, v=0 y x

2D Functions The base function, direction y: u=0, v=1

2D Functions u=2, v=0

2D Functions u=0, v=2

2D Functions u=1, v=1

2D Functions u=1, v=2

2D Functions u=1, v=3

2D Functions As in 1D, the 2D image can be phase-shifted by adding a weighted cosine function: f u,v (x,y) = a k sin(ux + vy) + b k cos(ux + vy) + =

2D Functions As basic functions, we get a pair of sine/cosine functions for every pair of frequency-multiples (u,v): sin cos sin cos sin cos sin cos sin cos sin cos sin cos sin cos sin cos sin cos sin cos sin cos v u

2D Functions Every single sin/cos function gets a weight, which is the Fourier Coefficient: a b a b a b a b v u a b a b a b a b a b a b a b a b

2D Functions Summing all basic functions with their given weight gives a new function. As in 1D: Every 2D function can be synthesized using the basic functions with specific weights. As in 1D: The set of weights defines the 2D function.

2D Functions Example: Summing basic functions of different frequencies:

2D Functions Example: Summing basic functions of different frequencies:

2D Functions MATLAB Demo: Bear Reconstruction