Frequency2: Sampling and Aliasing

Size: px
Start display at page:

Download "Frequency2: Sampling and Aliasing"

Transcription

1 CS 4495 Computer Vision Frequency2: Sampling and Aliasing Aaron Bobick School of Interactive Computing

2 Administrivia Project 1 is due tonight. Submit what you have at the deadline. Next problem set stereo will be out Thursday Sept. 11 and will be due Tuesday evening, Sept 23 rd, 11:55pm. It is easier Readings for this week: Still FP Chapter 4

3 Salvador Dali Gala Contemplating the Mediterranean Sea, which at 30 meters becomes the portrait of Abraham Lincoln, 1976

4

5 Fourier: A nice set of basis Teases away fast vs. slow changes in the image.

6 Fourier Transform We want to understand the frequency ω of our signal. So, let s reparametrize the signal by ω instead of x: f(x) Fourier Transform F ( ω) = R( ω) + ii( ω) F(ω) Inverse Fourier Transform Asin(ωx +φ) F(ω) For every ω from 0 to inf, (actually inf to inf), F(ω) holds the amplitude A and phase φ of the corresponding sine How can F hold both? Complex number trick! Even And we can go back: Odd A = ± R ω + I( φ = tan ( ) ω I( ω) R( ω) f(x) )

7 Frequency Spectra Even/Odd Frequency actually goes from inf to inf. Sinusoid example: Even (cos) Odd (sin) Magnitude ω ω ω Real Imaginary Power

8 2D Fourier Transforms The two dimensional version:. (, ) (, ) And the 2D Discrete FT: 2 π ( ux+ vy ) F u v = f x y e i dx dy 1 x= N 1 y= N 1 Fk (, k ) = f( x, ye ) x y N x= 0 y= 0 i kx+ ky 2π ( ) x N y Works best when you put the origin of k in the middle.

9 Linearity of Sum =

10 Extension to 2D Complex plane Both a Real and Im version

11 Examples B.K. Gunturk

12 Fourier Transform and Convolution Let g = f h Then ( ) g( x) G u i = e 2 πux dx ( τ ) h( x τ ) i2πux = f e dτdx [ ][ ( ) ( ) ] i2πuτ i2πu x τ f e dτ h x τ e ( τ ) = dx [ ( ) ] i2πuτ f τ e dτ h( x' ) [ ] i2πux' e dx = ' = F ( u) H ( u) Convolution in spatial domain Multiplication in frequency domain

13 Fourier Transform and Convolution Spatial Domain (x) Frequency Domain (u) g = f h G = FH g = fh G = F H So, we can find g(x) by Fourier transform g = f h IFT FT FT G = F H

14 Example use: Smoothing/Blurring We want a smoothed function of f(x) g ( x) = f ( x) h( x) Let us use a Gaussian kernel h x ( x) exp = 2 2πσ Convolution in space is multiplication in freq: ( u) F( u) H ( u) 2 σ Fat Gaussian in space is H ( u) G = skinny Gaussian in πσ frequency. Why? h( x) σ 1 2 x H(u) attenuates high frequencies in F(u) (Low-pass Filter)! u

15 2D convolution theorem example f(x,y) h(x,y) * F(s x,s y ) ( or F(u,v) ) H(s x,s y ) g(x,y) G(s x,s y )

16 Low and High Pass filtering Ringing

17 Fourier Transform smoothing pairs

18 Properties of Fourier Transform Spatial Domain (x) Frequency Domain (u) Linearity c1 f ( x) + c2g( x) F( u) c G( u) Scaling f ( ax) c1 + 2 Shifting f ( x x 0 ) e 2πux F( u) Symmetry F ( x) f ( u) Conjugation f ( x) F ( u) Convolution f ( x) g( x) F( u) G( u) n d f ( x) Differentiation n ( i2πu ) F( u) dx n Shrink Stretch Differentiate Multiply by u 1 a F u a

19 Fourier Pairs (from Szeliski)

20 Fourier Transform Sampling Pairs FT of an impulse train is an impulse train

21 Sampling and Aliasing

22 Sampling and Reconstruction

23 Sampled representations How to store and compute with continuous functions? Common scheme for representation: samples write down the function s values at many points S. Marschner

24 Reconstruction Making samples back into a continuous function for output (need realizable method) for analysis or processing (need mathematical method) amounts to guessing what the function did in between S. Marschner

25 1D Example: Audio low frequencies high

26 Sampling in digital audio Recording: sound to analog to samples to disc Playback: disc to samples to analog to sound again how can we be sure we are filling in the gaps correctly? S. Marschner

27 S. Marschner CS 4495 Computer Vision A. Bobick Sampling and Reconstruction Simple example: a sign wave

28 Undersampling What if we missed things between the samples? Simple example: undersampling a sine wave unsurprising result: information is lost S. Marschner

29 Undersampling What if we missed things between the samples? Simple example: undersampling a sine wave unsurprising result: information is lost surprising result: indistinguishable from lower frequency S. Marschner

30 Undersampling What if we missed things between the samples? Simple example: undersampling a sine wave unsurprising result: information is lost surprising result: indistinguishable from lower frequency also was always indistinguishable from higher frequencies aliasing: signals traveling in disguise as other frequencies S. Marschner

31 S. Seitz CS 4495 Computer Vision A. Bobick Aliasing in video

32 Aliasing in images

33 What s happening? Input signal: Plot as image: x = 0:.05:5; imagesc(sin((2.^x).*x)) Alias! Not enough samples

34 Antialiasing What can we do about aliasing? Sample more often Join the Mega-Pixel craze of the photo industry But this can t go on forever Make the signal less wiggly Get rid of some high frequencies Will loose information But it s better than aliasing

35 Preventing aliasing Introduce lowpass filters: remove high frequencies leaving only safe, low frequencies choose lowest frequency in reconstruction (disambiguate) S. Marschner

36 (Anti)Aliasing in the Frequency Domain

37 Impulse Train Define a comb function (impulse train) in 1D as follows comb [ ] [ ] M x = δ x km k = where M is an integer 1 comb [ x] 2 x B.K. Gunturk

38 Impulse Train in 1D comb ( x) 2 1 ( ) 2 comb u x u 2 Remember: 1 2 Scaling f ( ax) 1 a F u a B.K. Gunturk

39 Impulse Train in 2D (bed of nails) ( ) combm, N( x, y) δ x km, y ln k= l= Fourier Transform of an impulse train is also an impulse train: δ 1 k l x km, y ln δ u, v MN = = M N ( ) k= l= k l comb, ( x, y) M N comb 1 1, M N ( u, v) As the comb samples get further apart, the spectrum samples get closer together! B.K. Gunturk

40 Impulse Train comb [ n] 2 1 ( ) 2 comb u n u Remember: 1 2 Scaling f ( ax) 1 a F u a B.K. Gunturk

41 Sampling low frequency signal f( x) Fu ( ) x u comb ( ) M x comb ( ) 1 u M x u Multiply: M f ( x) comb ( x) M Convolve: 1 M F( u)* comb ( u) 1 M x u B.K. Gunturk

42 Sampling low frequency signal f( x) Fu ( ) x W W u f ( x) comb ( x) M F( u)* comb ( u) 1 M x W u M No problem if 1 M > 2W 1 M B.K. Gunturk

43 Sampling low frequency signal f ( x) comb ( x) M F( u)* comb ( u) 1 M x W u M 1 M 1 2M If there is no overlap, the original signal can be recovered from its samples by low-pass filtering. B.K. Gunturk

44 Sampling high frequency signal f( x) Fu ( ) x W W u f ( x) comb ( x) M Overlap: The high frequency energy is folded over into low frequency. It is aliasing as lower frequency energy. And you cannot fix it once it has happened. F( u)* comb ( u) 1 M 1 M W u

45 Sampling high frequency signal f( x) x W Fu ( ) Anti-aliasing filter u W f( x)* hx ( ) W W 1 2M u [ ] f ( x)* h( x) comb ( x) M u 1 M B.K. Gunturk

46 Sampling high frequency signal Without anti-aliasing filter: f ( x) comb ( x) M W u With anti-aliasing filter: 1 M [ ] f ( x)* h( x) comb ( x) M u 1 M B.K. Gunturk

47 Aliasing in Images

48 S. Seitz CS 4495 Computer Vision A. Bobick Image half-sizing This image is too big to fit on the screen. How can we reduce it? How to generate a halfsized version?

49 Image sub-sampling 1/8 1/4 Throw away every other row and column to create a 1/2 size image - called image sub-sampling S. Seitz

50 Image sub-sampling 1/2 1/4 (2x zoom) 1/8 (4x zoom) Aliasing! What do we do? S. Seitz

51 Gaussian (lowpass) pre-filtering G 1/4 G 1/8 Gaussian 1/2 Solution: filter the image, then subsample Filter size should double for each ½ size reduction. Why? S. Seitz

52 Subsampling with Gaussian pre-filtering Gaussian 1/2 G 1/4 G 1/8 S. Seitz

53 Compare with... 1/2 1/4 (2x zoom) 1/8 (4x zoom) S. Seitz

54 Campbell-Robson contrast sensitivity curve The higher the frequency the less sensitive human visual system is

55 Lossy Image Compression (JPEG) Block-based Discrete Cosine Transform (DCT) on 8x8

56 Using DCT in JPEG The first coefficient B(0,0) is the DC component, the average intensity The top-left coeffs represent low frequencies, the bottom right high frequencies

57 Image compression using DCT DCT enables image compression by concentrating most image information in the low frequencies Lose unimportant image info (high frequencies) by cutting B(u,v) at bottom right The decoder computes the inverse DCT IDCT Quantization Table

58 JPEG compression comparison 89k 12k

59 Maybe the end?

60 Or not!!! A teaser on pyramids

61 Image Pyramids Known as a Gaussian Pyramid [Burt and Adelson, 1983] In computer graphics, a mip map [Williams, 1983] A precursor to wavelet transform S. Seitz

62 Band-pass filtering Gaussian Pyramid (low-pass images) Laplacian Pyramid (subband images) Created from Gaussian pyramid by subtraction These are bandpass images (almost).

63 Why almost bandpass? Why are the subtracted sequential Gaussians ( difference of Gaussians ) almost bandpass?

64 Laplacian Pyramid Need this! Original image How can we reconstruct (collapse) this pyramid into the original image?

65 Computing the Laplacian Pyramid Reduce Expand Need G k to reconstruct Don t worry about these details YET! (PS4?)

66 What can you do with band limited imaged?

67 Apples and Oranges in bandpass Fine L 0 L 2 Coarse L 4 Reconstructed

68 What can you do with band limited imaged?

69 Really the end

70 Fourier Transform: Properties Linearity af ( x, y) + bg( x, y) af( u, v) + bg( u, v) Shifting Modulation Convolution f x x y x e Fuv j 2 π ( ux0 vy0 (, ) + ) (, ) 0 0 (, ) (, ) j2 π ( ux 0 + vy 0 ) e f xy Fu u v v f( xy, )* gxy (, ) FuvGuv (, ) (, ) 0 0 Multiplication f( xygxy, ) (, ) Fuv (, )* Guv (, ) Separable functions f( xy, ) = f( x) f( y) Fuv (, ) = FuFv ( ) ( ) Bahadir K. 71

71 Fourier Transform: Properties Separability j 2 π ( ux+ vy) F u v f x y e dxdy = (, ) (, ) = = j 2πux j 2πvy f ( x, y) e dx e dy F( u, y) e j 2π vy dy 2D Fourier Transform can be implemented as a sequence of 1D Fourier Transform operations. Bahadir K. 72

72 Fourier Transform: Properties Energy conservation 2 2 f ( x, y) dxdy = F( u, v) dudv Bahadir K. 73

73 Fourier Transform: 2D Discrete Signals Fourier Transform of a 2D discrete signal is defined as Fuv (, ) f[ mne, ] = m= n= j 2 π ( um+ vn) where 1 1 uv, < 2 2 Inverse Fourier Transform 1/2 1/2 j 2 π ( um+ vn) f [ m, n] F( u, v) e dudv = 1/2 1/2 Bahadir K. 74

74 Fourier Transform: Properties Periodicity: Fourier Transform of a discrete signal is periodic with period 1. Fu ( + kv, + l) = f[ mne, ] Arbitrary integers m= n= = m= n= = m= n= = Fuv (, ) ( ) j2 π ( u+ k) m+ ( v+ l) n ( ) j 2π um+ vn j 2πkm j 2πln f[ mne, ] e e f[ mne, ] j 2 π ( um+ vn) 1 1 Bahadir K. 75

75 Fourier Transform: Properties Linearity, shifting, modulation, convolution, multiplication, separability, energy conservation properties also exist for the 2D Fourier Transform of discrete signals. Bahadir K. 76

76 Fourier Transform: Properties Linearity Shifting Modulation af [ m, n] + bg[ m, n] af( u, v) + bg( u, v) f m m n n e Fuv 2 ( 0 0 [, ] j π um + vn ) (, ) 0 0 j2 π ( um 0 + vn 0 ) e f mn Fu u v v [, ] (, ) 0 0 Convolution Multiplication f[ mn, ]* gmn [, ] FuvGuv (, ) (, ) f[ mngmn, ] [, ] Fuv (, )* Guv (, ) Separable functions Energy conservation f[ m, n] = f[ m] f[ n] F( u, v) = F( u) F( v) 2 2 f [ m, n] = F( u, v) dudv m= n= Bahadir K. 77

77 Fourier Transform: Properties Define Kronecker delta function δ[ mn, ] 1, for m= 0 and n= 0 = 0, otherwise Fourier Transform of the Kronecker delta function ( ) π( ) j2π um+ vn j2 u0+ v0 Fuv (, ) = δ[ mne, ] = e = 1 m= n= Bahadir K. 78

78 Fourier Transform: Properties Fourier Transform of 1 j 2π + ( um vn) f( mn, ) = 1 Fuv (, ) = 1 e = δ( u kv, l) m= n= k= l= To prove: Take the inverse Fourier Transform of the Dirac delta function and use the fact that the Fourier Transform has to be periodic with period 1. Bahadir K. 79

79 Sampling Theorem Continuous signal: f ( x) Shah function (Impulse train): s( x) x ( x) = δ ( x nx ) s 0 n= Sampled function: x 0 ( x) = f ( x) s( x) = f ( x) δ ( x nx ) f s 0 n= x

80 Sampling Theorem Sampled function: F S ( x) = f ( x) s( x) = f ( x) δ ( x nx ) f s 0 n= ( u)= F( u) S( u)= F u F A ( u) ( ) 1 x δ u n x 0 n= 0 F S ( u) A x 0 Sampling frequency 1 x 0 u max u Only if u max 1 2x 0 u max 1 x u 0

81 Nyquist Theorem If u > max 1 2x 0 F S A x 0 ( u) Aliasing u max u 1 x F ( ) ( ) When can we recover u from u? Only if We can use 0 0 F S 1 umax (Nyquist Frequency) 2x C ( u) x < 1 0 u = 2x0 0 otherwise Then F( u) = F ( u) C( u) and f ( x) = IFT[ F( u) ] S Sampling frequency must be greater than 2umax

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

CS 4495 Computer Vision. Frequency and Fourier Transforms. Aaron Bobick School of Interactive Computing. Frequency and Fourier Transform CS 4495 Computer Vision Frequency and Fourier Transforms Aaron Bobick School of Interactive Computing Administrivia Project 1 is (still) on line get started now! Readings for this week: FP Chapter 4 (which

More information

The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall Many slides borrowed from Steve Seitz

The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall Many slides borrowed from Steve Seitz The Frequency Domain 15-463: Computational Photography Alexei Efros, CMU, Fall 2008 Somewhere in Cinque Terre, May 2005 Many slides borrowed from Steve Seitz Salvador Dali Gala Contemplating the Mediterranean

More information

The Frequency Domain. Many slides borrowed from Steve Seitz

The Frequency Domain. Many slides borrowed from Steve Seitz The Frequency Domain Many slides borrowed from Steve Seitz Somewhere in Cinque Terre, May 2005 15-463: Computational Photography Alexei Efros, CMU, Spring 2010 Salvador Dali Gala Contemplating the Mediterranean

More information

Image Filtering, Edges and Image Representation

Image Filtering, Edges and Image Representation Image Filtering, Edges and Image Representation Capturing what s important Req reading: Chapter 7, 9 F&P Adelson, Simoncelli and Freeman (handout online) Opt reading: Horn 7 & 8 FP 8 February 19, 8 A nice

More information

The Frequency Domain, without tears. Many slides borrowed from Steve Seitz

The Frequency Domain, without tears. Many slides borrowed from Steve Seitz The Frequency Domain, without tears Many slides borrowed from Steve Seitz Somewhere in Cinque Terre, May 2005 CS194: Image Manipulation & Computational Photography Alexei Efros, UC Berkeley, Fall 2016

More information

G52IVG, School of Computer Science, University of Nottingham

G52IVG, School of Computer Science, University of Nottingham Image Transforms Fourier Transform Basic idea 1 Image Transforms Fourier transform theory Let f(x) be a continuous function of a real variable x. The Fourier transform of f(x) is F ( u) f ( x)exp[ j2πux]

More information

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

Contents. Signals as functions (1D, 2D) Fourier Transform The idea A signal can be interpreted as en electromagnetic wave. This consists of lights of different color, or frequency, that can be split apart usign an optic prism. Each component

More information

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

Contents. Signals as functions (1D, 2D) Fourier Transform The idea A signal can be interpreted as en electromagnetic wave. This consists of lights of different color, or frequency, that can be split apart usign an optic prism. Each component

More information

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

Contents. Signals as functions (1D, 2D) Fourier Transform The idea A signal can be interpreted as en electromagnetic wave. This consists of lights of different color, or frequency, that can be split apart usign an optic prism. Each component

More information

Subsampling and image pyramids

Subsampling and image pyramids Subsampling and image pyramids http://www.cs.cmu.edu/~16385/ 16-385 Computer Vision Spring 2018, Lecture 3 Course announcements Homework 0 and homework 1 will be posted tonight. - Homework 0 is not required

More information

MIT 2.71/2.710 Optics 10/31/05 wk9-a-1. The spatial frequency domain

MIT 2.71/2.710 Optics 10/31/05 wk9-a-1. The spatial frequency domain 10/31/05 wk9-a-1 The spatial frequency domain Recall: plane wave propagation x path delay increases linearly with x λ z=0 θ E 0 x exp i2π sinθ + λ z i2π cosθ λ z plane of observation 10/31/05 wk9-a-2 Spatial

More information

ECG782: Multidimensional Digital Signal Processing

ECG782: Multidimensional Digital Signal Processing Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu ECG782: Multidimensional Digital Signal Processing Spring 2014 TTh 14:30-15:45 CBC C313 Lecture 05 Image Processing Basics 13/02/04 http://www.ee.unlv.edu/~b1morris/ecg782/

More information

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering

Additional Pointers. Introduction to Computer Vision. Convolution. Area operations: Linear filtering Additional Pointers Introduction to Computer Vision CS / ECE 181B andout #4 : Available this afternoon Midterm: May 6, 2004 W #2 due tomorrow Ack: Prof. Matthew Turk for the lecture slides. See my ECE

More information

Discrete Fourier Transform

Discrete Fourier Transform Discrete Fourier Transform DD2423 Image Analysis and Computer Vision Mårten Björkman Computational Vision and Active Perception School of Computer Science and Communication November 13, 2013 Mårten Björkman

More information

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

Lecture 4 Filtering in the Frequency Domain. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016 Lecture 4 Filtering in the Frequency Domain Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016 Outline Background From Fourier series to Fourier transform Properties of the Fourier

More information

Image pyramids and frequency domain

Image pyramids and frequency domain Image pyramids and frequency domain http://www.cs.cmu.edu/~16385/ 16-385 Computer Vision Spring 2019, Lecture 3 Course announcements Homework 1 will be posted tonight. - Homework 1 is due on February 6

More information

Overview. Signals as functions (1D, 2D) 1D Fourier Transform. 2D Fourier Transforms. Discrete Fourier Transform (DFT) Discrete Cosine Transform (DCT)

Overview. Signals as functions (1D, 2D) 1D Fourier Transform. 2D Fourier Transforms. Discrete Fourier Transform (DFT) Discrete Cosine Transform (DCT) Fourier Transform Overview Signals as functions (1D, 2D) Tools 1D Fourier Transform Summary of definition and properties in the different cases CTFT, CTFS, DTFS, DTFT DFT 2D Fourier Transforms Generalities

More information

DISCRETE FOURIER TRANSFORM

DISCRETE FOURIER TRANSFORM DD2423 Image Processing and Computer Vision DISCRETE FOURIER TRANSFORM Mårten Björkman Computer Vision and Active Perception School of Computer Science and Communication November 1, 2012 1 Terminology:

More information

Image Enhancement in the frequency domain. GZ Chapter 4

Image Enhancement in the frequency domain. GZ Chapter 4 Image Enhancement in the frequency domain GZ Chapter 4 Contents In this lecture we will look at image enhancement in the frequency domain The Fourier series & the Fourier transform Image Processing in

More information

Introduction to the Fourier transform. Computer Vision & Digital Image Processing. The Fourier transform (continued) The Fourier transform (continued)

Introduction to the Fourier transform. Computer Vision & Digital Image Processing. The Fourier transform (continued) The Fourier transform (continued) Introduction to the Fourier transform Computer Vision & Digital Image Processing Fourier Transform Let f(x) be a continuous function of a real variable x The Fourier transform of f(x), denoted by I {f(x)}

More information

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis SEISMIC WAVE PROPAGATION Lecture 2: Fourier Analysis Fourier Series & Fourier Transforms Fourier Series Review of trigonometric identities Analysing the square wave Fourier Transform Transforms of some

More information

ECG782: Multidimensional Digital Signal Processing

ECG782: Multidimensional Digital Signal Processing 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

More information

GBS765 Electron microscopy

GBS765 Electron microscopy GBS765 Electron microscopy Lecture 1 Waves and Fourier transforms 10/14/14 9:05 AM Some fundamental concepts: Periodicity! If there is some a, for a function f(x), such that f(x) = f(x + na) then function

More information

Image Processing 2. Hakan Bilen University of Edinburgh. Computer Graphics Fall 2017

Image Processing 2. Hakan Bilen University of Edinburgh. Computer Graphics Fall 2017 Image Processing 2 Hakan Bilen University of Edinburgh Computer Graphics Fall 2017 This week What is an image? What is image processing? Point processing Linear (Spatial) filters Frequency domain Deep

More information

CSCI 1290: Comp Photo

CSCI 1290: Comp Photo CSCI 1290: Comp Photo Fall 2018 @ Brown University James Tompkin Many slides thanks to James Hays old CS 129 course, along with all of its acknowledgements. Capture Frequency - Rolling `Shutter James

More information

Images have structure at various scales

Images have structure at various scales Images have structure at various scales Frequency Frequency of a signal is how fast it changes Reflects scale of structure A combination of frequencies 0.1 X + 0.3 X + 0.5 X = Fourier transform Can we

More information

Multiscale Image Transforms

Multiscale Image Transforms Multiscale Image Transforms Goal: Develop filter-based representations to decompose images into component parts, to extract features/structures of interest, and to attenuate noise. Motivation: extract

More information

Why does a lower resolution image still make sense to us? What do we lose? Image:

Why does a lower resolution image still make sense to us? What do we lose? Image: 2D FREQUENCY DOMAIN The slides are from several sources through James Hays (Brown); Srinivasa Narasimhan (CMU); Silvio Savarese (U. of Michigan); Bill Freeman and Antonio Torralba (MIT), including their

More information

Recap of Monday. Linear filtering. Be aware of details for filter size, extrapolation, cropping

Recap of Monday. Linear filtering. Be aware of details for filter size, extrapolation, cropping Recap of Monday Linear filtering h[ m, n] k, l f [ k, l] I[ m Not a matrix multiplication Sum over Hadamard product k, n l] Can smooth, sharpen, translate (among many other uses) 1 1 1 1 1 1 1 1 1 Be aware

More information

Frequency Filtering CSC 767

Frequency Filtering CSC 767 Frequency Filtering CSC 767 Outline Fourier transform and frequency domain Frequency view of filtering Hybrid images Sampling Slide: Hoiem Why does the Gaussian give a nice smooth image, but the square

More information

Thinking in Frequency

Thinking in Frequency 09/05/17 Thinking in Frequency Computational Photography University of Illinois Derek Hoiem Administrative Matlab/linear algebra tutorial tomorrow, planned for 6:30pm Probably 1214 DCL (will send confirmation

More information

6.869 Advances in Computer Vision. Bill Freeman, Antonio Torralba and Phillip Isola MIT Oct. 3, 2018

6.869 Advances in Computer Vision. Bill Freeman, Antonio Torralba and Phillip Isola MIT Oct. 3, 2018 6.869 Advances in Computer Vision Bill Freeman, Antonio Torralba and Phillip Isola MIT Oct. 3, 2018 1 Sampling Sampling Pixels Continuous world 3 Sampling 4 Sampling 5 Continuous image f (x, y) Sampling

More information

Introduction to Fourier Analysis Part 2. CS 510 Lecture #7 January 31, 2018

Introduction to Fourier Analysis Part 2. CS 510 Lecture #7 January 31, 2018 Introduction to Fourier Analysis Part 2 CS 510 Lecture #7 January 31, 2018 OpenCV on CS Dept. Machines 2/4/18 CSU CS 510, Ross Beveridge & Bruce Draper 2 In the extreme, a square wave Graphic from http://www.mechatronics.colostate.edu/figures/4-4.jpg

More information

Fourier Matching. CS 510 Lecture #7 February 8 th, 2013

Fourier Matching. CS 510 Lecture #7 February 8 th, 2013 Fourier Matching CS 510 Lecture #7 February 8 th, 2013 Details are on the assignments page you have un4l Monday Programming Assignment #1 Source (Target) Images Templates Le4 Eye Right Eye Le4 Ear Nose

More information

Image Filtering. Slides, adapted from. Steve Seitz and Rick Szeliski, U.Washington

Image Filtering. Slides, adapted from. Steve Seitz and Rick Szeliski, U.Washington Image Filtering Slides, adapted from Steve Seitz and Rick Szeliski, U.Washington The power of blur All is Vanity by Charles Allen Gillbert (1873-1929) Harmon LD & JuleszB (1973) The recognition of faces.

More information

Key Intuition: invertibility

Key Intuition: invertibility Introduction to Fourier Analysis CS 510 Lecture #6 January 30, 2017 In the extreme, a square wave Graphic from http://www.mechatronics.colostate.edu/figures/4-4.jpg 2 Fourier Transform Formally, the Fourier

More information

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

Convolution Spatial Aliasing Frequency domain filtering fundamentals Applications Image smoothing Image sharpening Frequency Domain Filtering Correspondence between Spatial and Frequency Filtering Fourier Transform Brief Introduction Sampling Theory 2 D Discrete Fourier Transform Convolution Spatial Aliasing Frequency

More information

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

Digital Image Processing. Image Enhancement: Filtering in the Frequency Domain Digital Image Processing Image Enhancement: Filtering in the Frequency Domain 2 Contents In this lecture we will look at image enhancement in the frequency domain Jean Baptiste Joseph Fourier The Fourier

More information

Linear Operators and Fourier Transform

Linear Operators and Fourier Transform Linear Operators and Fourier Transform DD2423 Image Analysis and Computer Vision Mårten Björkman Computational Vision and Active Perception School of Computer Science and Communication November 13, 2013

More information

2D Discrete Fourier Transform (DFT)

2D Discrete Fourier Transform (DFT) 2D Discrete Fourier Transform (DFT) Outline Circular and linear convolutions 2D DFT 2D DCT Properties Other formulations Examples 2 2D Discrete Fourier Transform Fourier transform of a 2D signal defined

More information

Fourier Transform. sin(n# x)), where! = 2" / L and

Fourier Transform. sin(n# x)), where! = 2 / L and Fourier Transform Henning Stahlberg Introduction The tools provided by the Fourier transform are helpful for the analysis of 1D signals (time and frequency (or Fourier) domains), as well as 2D/3D signals

More information

encoding without prediction) (Server) Quantization: Initial Data 0, 1, 2, Quantized Data 0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256

encoding without prediction) (Server) Quantization: Initial Data 0, 1, 2, Quantized Data 0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256 General Models for Compression / Decompression -they apply to symbols data, text, and to image but not video 1. Simplest model (Lossless ( encoding without prediction) (server) Signal Encode Transmit (client)

More information

Quality Improves with More Rays

Quality Improves with More Rays Recap Quality Improves with More Rays Area Area 1 shadow ray 16 shadow rays CS348b Lecture 8 Pat Hanrahan / Matt Pharr, Spring 2018 pixelsamples = 1 jaggies pixelsamples = 16 anti-aliased Sampling and

More information

Introduction to Computer Vision. 2D Linear Systems

Introduction to Computer Vision. 2D Linear Systems Introduction to Computer Vision D Linear Systems Review: Linear Systems We define a system as a unit that converts an input function into an output function Independent variable System operator or Transfer

More information

FILTERING IN THE FREQUENCY DOMAIN

FILTERING IN THE FREQUENCY DOMAIN 1 FILTERING IN THE FREQUENCY DOMAIN Lecture 4 Spatial Vs Frequency domain 2 Spatial Domain (I) Normal image space Changes in pixel positions correspond to changes in the scene Distances in I correspond

More information

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

Fourier transform. Stefano Ferrari. Università degli Studi di Milano Methods for Image Processing. academic year Fourier transform Stefano Ferrari Università degli Studi di Milano stefano.ferrari@unimi.it Methods for Image Processing academic year 27 28 Function transforms Sometimes, operating on a class of functions

More information

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt. CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt. Session 8- Linear Filters From Spatial Domain to Frequency Domain Mani Golparvar-Fard Department of Civil and Environmental Engineering 329D,

More information

Review: Continuous Fourier Transform

Review: Continuous Fourier Transform Review: Continuous Fourier Transform Review: convolution x t h t = x τ h(t τ)dτ Convolution in time domain Derivation Convolution Property Interchange the order of integrals Let Convolution Property By

More information

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

Fourier series: Any periodic signals can be viewed as weighted sum. different frequencies. view frequency as an Image Enhancement in the Frequency Domain Fourier series: Any periodic signals can be viewed as weighted sum of sinusoidal signals with different frequencies Frequency Domain: view frequency as an independent

More information

Vectors [and more on masks] Vector space theory applies directly to several image processing/ representation problems

Vectors [and more on masks] Vector space theory applies directly to several image processing/ representation problems Vectors [and more on masks] Vector space theory applies directly to several image processing/ representation problems 1 Image as a sum of basic images What if every person s portrait photo could be expressed

More information

CITS 4402 Computer Vision

CITS 4402 Computer Vision CITS 4402 Computer Vision Prof Ajmal Mian Adj/A/Prof Mehdi Ravanbakhsh, CEO at Mapizy (www.mapizy.com) and InFarm (www.infarm.io) Lecture 04 Greyscale Image Analysis Lecture 03 Summary Images as 2-D signals

More information

Fourier Transform and Frequency Domain

Fourier Transform and Frequency Domain Fourier Transform and Frequency Domain http://www.cs.cmu.edu/~16385/ 16-385 Computer Vision Spring 2018, Lecture 3 (part 2) Overview of today s lecture Some history. Fourier series. Frequency domain. Fourier

More information

Slow mo guys Saccades. https://youtu.be/fmg9zohesgq?t=4s

Slow mo guys Saccades. https://youtu.be/fmg9zohesgq?t=4s Slow mo guys Saccades https://youtu.be/fmg9zohesgq?t=4s Thinking in Frequency Computer Vision James Hays Slides: Hoiem, Efros, and others Recap of Wednesday Linear filtering is dot product at each position

More information

Lecture 3: Linear Filters

Lecture 3: Linear Filters Lecture 3: Linear Filters Professor Fei Fei Li Stanford Vision Lab 1 What we will learn today? Images as functions Linear systems (filters) Convolution and correlation Discrete Fourier Transform (DFT)

More information

ECE 425. Image Science and Engineering

ECE 425. Image Science and Engineering ECE 425 Image Science and Engineering Spring Semester 2000 Course Notes Robert A. Schowengerdt schowengerdt@ece.arizona.edu (520) 62-2706 (voice), (520) 62-8076 (fa) ECE402 DEFINITIONS 2 Image science

More information

Digital Image Processing. Filtering in the Frequency Domain

Digital Image Processing. Filtering in the Frequency Domain 2D Linear Systems 2D Fourier Transform and its Properties The Basics of Filtering in Frequency Domain Image Smoothing Image Sharpening Selective Filtering Implementation Tips 1 General Definition: System

More information

Representation of 1D Function

Representation of 1D Function Bioengineering 280A Principles of Biomedical Imaging Fall Quarter 2005 Linear Systems Lecture 2 Representation of 1D Function From the sifting property, we can write a 1D function as g(x) = g(ξ)δ(x ξ)dξ.

More information

Computer Vision & Digital Image Processing. Periodicity of the Fourier transform

Computer Vision & Digital Image Processing. Periodicity of the Fourier transform Computer Vision & Digital Image Processing Fourier Transform Properties, the Laplacian, Convolution and Correlation Dr. D. J. Jackson Lecture 9- Periodicity of the Fourier transform The discrete Fourier

More information

2. Image Transforms. f (x)exp[ 2 jπ ux]dx (1) F(u)exp[2 jπ ux]du (2)

2. Image Transforms. f (x)exp[ 2 jπ ux]dx (1) F(u)exp[2 jπ ux]du (2) 2. Image Transforms Transform theory plays a key role in image processing and will be applied during image enhancement, restoration etc. as described later in the course. Many image processing algorithms

More information

3. Lecture. Fourier Transformation Sampling

3. Lecture. Fourier Transformation Sampling 3. Lecture Fourier Transformation Sampling Some slides taken from Digital Image Processing: An Algorithmic Introduction using Java, Wilhelm Burger and Mark James Burge Separability ² The 2D DFT can be

More information

Lecture 3: Linear Filters

Lecture 3: Linear Filters Lecture 3: Linear Filters Professor Fei Fei Li Stanford Vision Lab 1 What we will learn today? Images as functions Linear systems (filters) Convolution and correlation Discrete Fourier Transform (DFT)

More information

Fourier Transform and Frequency Domain

Fourier Transform and Frequency Domain Fourier Transform and Frequency Domain http://graphics.cs.cmu.edu/courses/15-463 15-463, 15-663, 15-862 Computational Photography Fall 2017, Lecture 6 Course announcements Last call for responses to Doodle

More information

Discrete Fourier Transform

Discrete Fourier Transform Last lecture I introduced the idea that any function defined on x 0,..., N 1 could be written a sum of sines and cosines. There are two different reasons why this is useful. The first is a general one,

More information

Multimedia Networking ECE 599

Multimedia Networking ECE 599 Multimedia Networking ECE 599 Prof. Thinh Nguyen School of Electrical Engineering and Computer Science Based on lectures from B. Lee, B. Girod, and A. Mukherjee 1 Outline Digital Signal Representation

More information

Filtering in the Frequency Domain

Filtering in the Frequency Domain Filtering in the Frequency Domain Outline Fourier Transform Filtering in Fourier Transform Domain 2/20/2014 2 Fourier Series and Fourier Transform: History Jean Baptiste Joseph Fourier, French mathematician

More information

The Fourier Transform

The Fourier Transform The Fourier Transorm Fourier Series Fourier Transorm The Basic Theorems and Applications Sampling Bracewell, R. The Fourier Transorm and Its Applications, 3rd ed. New York: McGraw-Hill, 2. Eric W. Weisstein.

More information

Fourier Transform Chapter 10 Sampling and Series

Fourier Transform Chapter 10 Sampling and Series Fourier Transform Chapter 0 Sampling and Series Sampling Theorem Sampling Theorem states that, under a certain condition, it is in fact possible to recover with full accuracy the values intervening between

More information

I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University. Computer Vision: 4. Filtering

I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University. Computer Vision: 4. Filtering I Chen Lin, Assistant Professor Dept. of CS, National Chiao Tung University Computer Vision: 4. Filtering Outline Impulse response and convolution. Linear filter and image pyramid. Textbook: David A. Forsyth

More information

6.003: Signals and Systems. Sampling and Quantization

6.003: Signals and Systems. Sampling and Quantization 6.003: Signals and Systems Sampling and Quantization December 1, 2009 Last Time: Sampling and Reconstruction Uniform sampling (sampling interval T ): x[n] = x(nt ) t n Impulse reconstruction: x p (t) =

More information

Fourier Transform in Image Processing. CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012)

Fourier Transform in Image Processing. CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012) Fourier Transform in Image Processing CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012) Basis Decomposition Write a function as a weighted sum of basis functions f ( x) wibi(

More information

Multiresolution schemes

Multiresolution schemes Multiresolution schemes Fondamenti di elaborazione del segnale multi-dimensionale Stefano Ferrari Università degli Studi di Milano stefano.ferrari@unimi.it Elaborazione dei Segnali Multi-dimensionali e

More information

Digital Image Processing

Digital Image Processing Digital Image Processing Image Transforms Unitary Transforms and the 2D Discrete Fourier Transform DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL PROCESSING IMPERIAL COLLEGE LONDON What is this

More information

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

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news Edge Detection Introduction to Computer Vision CS / ECE 8B Thursday, April, 004 Edge detection (HO #5) Edge detection is a local area operator that seeks to find significant, meaningful changes in image

More information

Filter Banks II. Prof. Dr.-Ing. G. Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany

Filter Banks II. Prof. Dr.-Ing. G. Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany Filter Banks II Prof. Dr.-Ing. G. Schuller Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany Page Modulated Filter Banks Extending the DCT The DCT IV transform can be seen as modulated

More information

Fourier analysis of discrete-time signals. (Lathi Chapt. 10 and these slides)

Fourier analysis of discrete-time signals. (Lathi Chapt. 10 and these slides) Fourier analysis of discrete-time signals (Lathi Chapt. 10 and these slides) Towards the discrete-time Fourier transform How we will get there? Periodic discrete-time signal representation by Discrete-time

More information

Compressing a 1D Discrete Signal

Compressing a 1D Discrete Signal Compressing a D Discrete Signal Divide the signal into 8blocks. Subtract the sample mean from each value. Compute the 8 8covariancematrixforthe blocks. Compute the eigenvectors of the covariance matrix.

More information

Empirical Mean and Variance!

Empirical Mean and Variance! Global Image Properties! Global image properties refer to an image as a whole rather than components. Computation of global image properties is often required for image enhancement, preceding image analysis.!

More information

Notes 07 largely plagiarized by %khc

Notes 07 largely plagiarized by %khc Notes 07 largely plagiarized by %khc Warning This set of notes covers the Fourier transform. However, i probably won t talk about everything here in section; instead i will highlight important properties

More information

Sampling. Alejandro Ribeiro. February 8, 2018

Sampling. Alejandro Ribeiro. February 8, 2018 Sampling Alejandro Ribeiro February 8, 2018 Signals exist in continuous time but it is not unusual for us to process them in discrete time. When we work in discrete time we say that we are doing discrete

More information

Fourier Series Example

Fourier Series Example Fourier Series Example Let us compute the Fourier series for the function on the interval [ π,π]. f(x) = x f is an odd function, so the a n are zero, and thus the Fourier series will be of the form f(x)

More information

ECE Digital Image Processing and Introduction to Computer Vision. Outline

ECE Digital Image Processing and Introduction to Computer Vision. Outline ECE592-064 Digital mage Processing and ntroduction to Computer Vision Depart. of ECE, NC State University nstructor: Tianfu (Matt) Wu Spring 2017 1. Recap Outline 2. Thinking in the frequency domain Convolution

More information

Intelligent Visual Prosthesis

Intelligent Visual Prosthesis Orientation sensor (IMU) Intelligent Visual Prosthesis Depth image-based obstacle detection Depth camera Wideangle RGB camera Simultaneous object recognition, localization, and hand tracking New projects:

More information

Wavelets and Multiresolution Processing

Wavelets and Multiresolution Processing Wavelets and Multiresolution Processing Wavelets Fourier transform has it basis functions in sinusoids Wavelets based on small waves of varying frequency and limited duration In addition to frequency,

More information

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

E2.5 Signals & Linear Systems. Tutorial Sheet 1 Introduction to Signals & Systems (Lectures 1 & 2) E.5 Signals & Linear Systems Tutorial Sheet 1 Introduction to Signals & Systems (Lectures 1 & ) 1. Sketch each of the following continuous-time signals, specify if the signal is periodic/non-periodic,

More information

Fourier Transform 2D

Fourier Transform 2D Image Processing - Lesson 8 Fourier Transform 2D Discrete Fourier Transform - 2D Continues Fourier Transform - 2D Fourier Properties Convolution Theorem Eamples = + + + The 2D Discrete Fourier Transform

More information

Fourier Series & The Fourier Transform

Fourier Series & The Fourier Transform Fourier Series & The Fourier Transform What is the Fourier Transform? Anharmonic Waves Fourier Cosine Series for even functions Fourier Sine Series for odd functions The continuous limit: the Fourier transform

More information

Reference Text: The evolution of Applied harmonics analysis by Elena Prestini

Reference Text: The evolution of Applied harmonics analysis by Elena Prestini Notes for July 14. Filtering in Frequency domain. Reference Text: The evolution of Applied harmonics analysis by Elena Prestini It all started with: Jean Baptist Joseph Fourier (1768-1830) Mathematician,

More information

Multiresolution schemes

Multiresolution schemes Multiresolution schemes Fondamenti di elaborazione del segnale multi-dimensionale Multi-dimensional signal processing Stefano Ferrari Università degli Studi di Milano stefano.ferrari@unimi.it Elaborazione

More information

Multidimensional Signal Processing

Multidimensional Signal Processing Multidimensional Signal Processing Mark Eisen, Alec Koppel, and Alejandro Ribeiro Dept. of Electrical and Systems Engineering University of Pennsylvania aribeiro@seas.upenn.edu http://www.seas.upenn.edu/users/~aribeiro/

More information

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise Edges and Scale Image Features From Sandlot Science Slides revised from S. Seitz, R. Szeliski, S. Lazebnik, etc. Origin of Edges surface normal discontinuity depth discontinuity surface color discontinuity

More information

IB Paper 6: Signal and Data Analysis

IB Paper 6: Signal and Data Analysis IB Paper 6: Signal and Data Analysis Handout 5: Sampling Theory S Godsill Signal Processing and Communications Group, Engineering Department, Cambridge, UK Lent 2015 1 / 85 Sampling and Aliasing All of

More information

f (t) K(t, u) d t. f (t) K 1 (t, u) d u. Integral Transform Inverse Fourier Transform

f (t) K(t, u) d t. f (t) K 1 (t, u) d u. Integral Transform Inverse Fourier Transform Integral Transforms Massoud Malek An integral transform maps an equation from its original domain into another domain, where it might be manipulated and solved much more easily than in the original domain.

More information

Theory of signals and images I. Dr. Victor Castaneda

Theory of signals and images I. Dr. Victor Castaneda Theory of signals and images I Dr. Victor Castaneda Image as a function Think of an image as a function, f, f: R 2 R I=f(x, y) gives the intensity at position (x, y) The image only is defined over a rectangle,

More information

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

Today s lecture. Local neighbourhood processing. The convolution. Removing uncorrelated noise from an image The Fourier transform Cris Luengo TD396 fall 4 cris@cbuuse Today s lecture Local neighbourhood processing smoothing an image sharpening an image The convolution What is it? What is it useful for? How can I compute it? Removing

More information

1-D MATH REVIEW CONTINUOUS 1-D FUNCTIONS. Kronecker delta function and its relatives. x 0 = 0

1-D MATH REVIEW CONTINUOUS 1-D FUNCTIONS. Kronecker delta function and its relatives. x 0 = 0 -D MATH REVIEW CONTINUOUS -D FUNCTIONS Kronecker delta function and its relatives delta function δ ( 0 ) 0 = 0 NOTE: The delta function s amplitude is infinite and its area is. The amplitude is shown as

More information

Image Acquisition and Sampling Theory

Image Acquisition and Sampling Theory Image Acquisition and Sampling Theory Electromagnetic Spectrum The wavelength required to see an object must be the same size of smaller than the object 2 Image Sensors 3 Sensor Strips 4 Digital Image

More information

sinc function T=1 sec T=2 sec angle(f(w)) angle(f(w))

sinc function T=1 sec T=2 sec angle(f(w)) angle(f(w)) T=1 sec sinc function 3 angle(f(w)) T=2 sec angle(f(w)) 1 A quick script to plot mag & phase in MATLAB w=0:0.2:50; Real exponential func b=5; Fourier transform (filter) F=1.0./(b+j*w); subplot(211), plot(w,

More information

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization

ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals. 1. Sampling and Reconstruction 2. Quantization ELEN E4810: Digital Signal Processing Topic 11: Continuous Signals 1. Sampling and Reconstruction 2. Quantization 1 1. Sampling & Reconstruction DSP must interact with an analog world: A to D D to A x(t)

More information

1 otherwise. Note that the area of the pulse is one. The Dirac delta function (a.k.a. the impulse) can be defined using the pulse as follows:

1 otherwise. Note that the area of the pulse is one. The Dirac delta function (a.k.a. the impulse) can be defined using the pulse as follows: The Dirac delta function There is a function called the pulse: { if t > Π(t) = 2 otherwise. Note that the area of the pulse is one. The Dirac delta function (a.k.a. the impulse) can be defined using the

More information

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

Tutorial Sheet #2 discrete vs. continuous functions, periodicity, sampling 2.39 utorial Sheet #2 discrete vs. continuous functions, periodicity, sampling We will encounter two classes of signals in this class, continuous-signals and discrete-signals. he distinct mathematical

More information