Fourier Transforms Fourier transform for 1 D images

  • Slides: 34
Download presentation
Fourier Transforms

Fourier Transforms

Fourier transform for 1 D images •

Fourier transform for 1 D images •

Fourier transform for 1 D images •

Fourier transform for 1 D images •

Fourier transform •

Fourier transform •

Visualizing the Fourier basis for 1 D images

Visualizing the Fourier basis for 1 D images

Signal cos impulse Fourier transform impulse cos

Signal cos impulse Fourier transform impulse cos

Fourier transform for images •

Fourier transform for images •

Visualizing the Fourier basis for images

Visualizing the Fourier basis for images

Visualizing the Fourier transform • Given Nx. N image, there are Nx. N basis

Visualizing the Fourier transform • Given Nx. N image, there are Nx. N basis elements • Fourier coefficients can be represented as an Nx. N image

Converting to and from the Fourier basis •

Converting to and from the Fourier basis •

Why Fourier transforms? • Think of image in terms of low and high frequency

Why Fourier transforms? • Think of image in terms of low and high frequency information • Low frequency: large scale structure, no details • High frequency: fine structure

Why Fourier transforms?

Why Fourier transforms?

Why Fourier transforms?

Why Fourier transforms?

Why Fourier transforms? Removing high frequency components looks like blurring. Is there more to

Why Fourier transforms? Removing high frequency components looks like blurring. Is there more to this relationship?

Dual domains • Image: Spatial domain • Fourier Transform: Frequency domain • Amplitudes are

Dual domains • Image: Spatial domain • Fourier Transform: Frequency domain • Amplitudes are called spectrum • For any transformations we do in spatial domain, there are corresponding transformations we can do in the frequency domain • And vice-versa Spatial Domain

Dual domains • Convolution in spatial domain = Point-wise multiplication in frequency domain •

Dual domains • Convolution in spatial domain = Point-wise multiplication in frequency domain • Convolution in frequency domain = Point-wise multiplication in spatial domain

Signal cos impulse Fourier transform impulse cos

Signal cos impulse Fourier transform impulse cos

Signal box “sinc” = sin(x)/x Fourier transform “sinc” = sin(x)/x box

Signal box “sinc” = sin(x)/x Fourier transform “sinc” = sin(x)/x box

Signal Gaussian Fourier transform Gaussian

Signal Gaussian Fourier transform Gaussian

Signal Gaussian Fourier transform Gaussian

Signal Gaussian Fourier transform Gaussian

Image Fourier transform

Image Fourier transform

Image Fourier transform

Image Fourier transform

Detour: Time complexity of convolution • Image is w x h • Filter is

Detour: Time complexity of convolution • Image is w x h • Filter is k x k • Every entry takes O(k 2) operations • Number of output entries: • (w+k-1)(h+k-1) for full • wh for same • Total time complexity: • O(whk 2)

Optimization: separable filters • basic alg. is O(r 2): large filters get expensive fast!

Optimization: separable filters • basic alg. is O(r 2): large filters get expensive fast! • definition: w(x, y) is separable if it can be written as: • Write u as a k x 1 filter, and v as a 1 x k filter • Claim:

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 2 u 3 u 1 v 1

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 2 u 3 u 1 v 1 u 1 v 2

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 2 u 3 u 1 v 1 u 1 v 2 u 1 v 3

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 1 v 1 u 2 u 2 v 1 u 3 u 1 v 2 u 1 v 3

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 1 v 1 u 1 v 2 u 2 u 2 v 1 u 2 v 2 u 3 u 1 v 3

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 1 v 1 u 1 v 2 u 1 v 3 u 2 u 2 v 1 u 2 v 2 u 2 v 3 u 1

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 1 v 1 u 1 v 2 u 1 v 3 u 2 u 2 v 1 u 2 v 2 u 2 v 3 u 1 u 3 v 1

Separable filters u 1 u 2 * v 1 v 2 v 3 u

Separable filters u 1 u 2 * v 1 v 2 v 3 u 1 u 3 u 1 v 1 u 1 v 2 u 1 v 3 u 2 u 2 v 1 u 2 v 2 u 2 v 3 u 1 u 3 v 2

Separable filters u 1 u 2 * v 1 v 2 v 3 w

Separable filters u 1 u 2 * v 1 v 2 v 3 w u 3 u 1 v 1 u 1 v 2 u 1 v 3 u 2 u 2 v 1 u 2 v 2 u 2 v 3 u 1 u 3 v 2 u 3 v 3

Separable filters • Time complexity of original : O(whk 2) • Time complexity of

Separable filters • Time complexity of original : O(whk 2) • Time complexity of separable version : O(whk)