Download presentation
Presentation is loading. Please wait.
1
Digital Image Processing 0909.452.01/0909.552.01 Fall 2001
Lecture 4 October 1, 2001 Shreekanth Mandayam ECE Department Rowan University
2
Plan Image Enhancement Spatial Filtering Detection of Discontinuities
Edge detection (Sobel, Prewitt and Laplacian masks) Image Spectrum 2-D Fourier Transform (DFT & FFT) Spectral Filtering Low-pass High-pass Low-pass High-pass
3
DIP: Details
4
Image Preprocessing Enhancement Restoration Inverse filtering
Wiener filtering Spatial Domain Spectral Domain Filtering >>fft2/ifft2 >>fftshift Point Processing >>imadjust >>histeq Spatial filtering >>filter2
5
Spatial Filtering (Masking)
Portion of a digital image Mask z1 z2 z3 z4 z5 z6 z7 z8 z9 w1 w2 w3 w4 w5 w6 w7 w8 w9 Replace with R = w1z1 + w2z2 + ….. +w9z9
6
Low-pass Filters Moving Average Filter 1 (1/9)* Median Filter z1 z2 z3
Replace with R = median(z1, z2 , ….. , z9)
7
High-pass Filters Basic HP Filter -1 8 (1/9)* Gradient Filter z1 z2 z3
-1 1 -1 demos/demo2spatial_filtering/highpassdemo.m
8
Detection of Discontinuities
-1 8 Point Detection Line Detection (Prewitt’s Gradient) -1 1 -1 1 demos/demo2spatial_filtering/prewitt.m
9
Edge Detection Sobel Masks -1 -2 1 2 -1 1 -2 2 >>edgedemo
1 2 -1 1 -2 2 >>edgedemo >>edge demos/demo2spatial_filtering/edgegradientdemo.m
10
Recall: 1-D CFT Continuous Fourier Transform (CFT)
Frequency, [Hz] Amplitude Spectrum Phase Inverse Fourier Transform (IFT)
11
Recall: 1-D DFT Discrete Domains Discrete Fourier Transform
Equal time intervals Discrete Domains Discrete Time: k = 0, 1, 2, 3, …………, N-1 Discrete Frequency: n = 0, 1, 2, 3, …………, N-1 Discrete Fourier Transform Inverse DFT Equal frequency intervals n = 0, 1, 2,….., N-1 k = 0, 1, 2,….., N-1
12
How to get the frequency axis in the DFT
The DFT operation just converts one set of number, x[k] into another set of numbers X[n] - there is no explicit definition of time or frequency How can we relate the DFT to the CFT and obtain spectral amplitudes for discrete frequencies? (N-point FFT) Need to know fs n= n=N f= f = fs
13
DFT Properties DFT is periodic X[n] = X[n+N] = X[n+2N] = ………
I-DFT is also periodic! x[k] = x[k+N] = x[k+2N] = ………. Where are the “low” and “high” frequencies on the DFT spectrum? n= N/ n=N f= fs/ f = fs
14
1-D FFT Demo >>fft
15
2-D Continuous Fourier Transform
y x v u Spatial Frequency Domain Spatial Domain
16
2-D Discrete Fourier Transform
u= u=N/ u=N v=N v=N/ v=0 >>fft2 >>ifft2
17
2-D DFT Properties Conjugate symmetry Rotation Separability
demos/demo3dft_properties/con_symm_and_trans.m Rotation demos/demo3dft_properties/rotation.m Separability demos/demo3dft_properties/separability.m >>fftshift
18
Spectral Filtering: Radially Symmetric Filter
u=-N/ u= u=N/2 D(u,v) D0 v=N/ v= v=-N/2 Low-pass Filter demos/demo4freq_filtering/lowpass.m
19
Lab 2: Spatial & Spectral Filtering
20
Summary
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.