Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS654: Digital Image Analysis

Similar presentations


Presentation on theme: "CS654: Digital Image Analysis"โ€” Presentation transcript:

1 CS654: Digital Image Analysis
Lecture 20: Image Enhancement in Frequency Domain

2 Recap of Lecture 19 Spatial filtering Mean Filter
Non-Local Mean Filter Median Filter Unsharp Masking Adaptive Unsharp Masking

3 Outline of Lecture 20 Image Enhancement in Frequency Domain
Low Pass Filtering High pass Filtering Butterworth Filtering Gaussian Filtering Homomorphic Filtering

4 Introduction Frequency is the rate of repetition of certain periodic events Variation of image brightness with its position in space Fourier transform is reversible Fourier filtering or Frequency domain filtering Convolution in spatial domain = Multiplication in Frequency domain

5 Frequency domain Enhancement Pipeline
Spatial Domain Frequency Domain Mask/ Filter/ Kernel โ„Ž(๐‘ฅ,๐‘ฆ) Mask/ Filter/ Kernel H(๐‘ข,๐‘ฃ) DFT Output Image G(๐‘ข,๐‘ฃ) Multiply Input Image ๐‘“(๐‘ฅ,๐‘ฆ) Input Image F(๐‘ข,๐‘ฃ) DFT Output Image g(๐‘ฅ,๐‘ฆ) IDFT

6 A quick recap of DFT in 2D Forward transformation (DFT) ๐น ๐‘ข,๐‘ฃ = ๐‘ฅ=0 ๐‘€โˆ’1 ๐‘ฆ=0 ๐‘โˆ’1 ๐‘“ ๐‘ฅ,๐‘ฆ expโก[โˆ’๐‘—2๐œ‹ ๐‘ข๐‘ฅ ๐‘€ + ๐‘ฃ๐‘ฆ ๐‘ ] ๐‘“(๐‘ฅ,๐‘ฆ) is an image of dimension ๐‘€ร—๐‘ 0โ‰ค๐‘ขโ‰ค๐‘€โˆ’1,0โ‰ค๐‘ฃโ‰ค๐‘โˆ’1 Inverse transformation (IDFT) ๐‘“ ๐‘ฅ,๐‘ฆ = 1 ๐‘€๐‘ ๐‘ข=0 ๐‘€โˆ’1 ๐‘ฃ=0 ๐‘โˆ’1 ๐น ๐‘ข,๐‘ฃ expโก[๐‘—2๐œ‹ ๐‘ข๐‘ฅ ๐‘€ + ๐‘ฃ๐‘ฆ ๐‘ ] ๐น(๐‘ข,๐‘ฃ) is the DFT image 0โ‰ค๐‘ฅโ‰ค๐‘€โˆ’1,0โ‰ค๐‘ฆโ‰ค๐‘โˆ’1

7 2-D DFT Forward transformation ๐‘ฃ ๐‘˜,๐‘™ = ๐‘š=0 ๐‘โˆ’1 ๐‘›=0 ๐‘โˆ’1 ๐‘ข ๐‘š,๐‘› ๐‘Š ๐‘ ๐‘˜๐‘š+๐‘™๐‘›
๐‘ฃ ๐‘˜,๐‘™ = ๐‘š=0 ๐‘โˆ’1 ๐‘›=0 ๐‘โˆ’1 ๐‘ข ๐‘š,๐‘› ๐‘Š ๐‘ ๐‘˜๐‘š+๐‘™๐‘› where, 0โ‰ค๐‘˜,๐‘™โ‰ค๐‘โˆ’1 Forward transformation ๐‘ข ๐‘š,๐‘› = ๐‘˜=0 ๐‘โˆ’1 ๐‘™=0 ๐‘โˆ’1 ๐‘ฃ ๐‘˜,๐‘™ ๐‘Š ๐‘ โˆ’ ๐‘˜๐‘š+๐‘™๐‘› where, 0โ‰ค๐‘š,๐‘›โ‰ค๐‘โˆ’1 Reverse transformation where, ๐‘’๐‘ฅ๐‘ โˆ’๐‘—2๐œ‹ ๐‘ = ๐‘Š ๐‘

8 Frequency domain filtering
Filtering in spatial domain is convolution of ๐‘“(๐‘ฅ,๐‘ฆ) by the filter kernel โ„Ž(๐‘ฅ,๐‘ฆ) Filtering in spatial domain = ๐‘“(๐‘ฅ,๐‘ฆ)โˆ—โ„Ž(๐‘ฅ,๐‘ฆ) Filtering in frequency domain is the multiplication of the Fourier transform of the image and the filter kernel Filtering in spatial domain = ๐น ๐‘˜,๐‘™ ร—๐ป(๐‘˜,๐‘™) Take a inverse Fourier transform of the resultant image

9 Low pass filtering Non-seperable Seperable
๐‘ซ ๐ŸŽ ๐‘ฃ ๐‘ข ๐ป ๐‘ข,๐‘ฃ = 1, ๐‘“๐‘œ๐‘Ÿ ๐‘ข 2 + ๐‘ฃ 2 โ‰ค ๐ท 0 0, ๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’ Seperable ๐‘ฃ ๐‘ข ๐ป ๐‘ข,๐‘ฃ = 1, ๐‘“๐‘œ๐‘Ÿ ๐‘ขโ‰ค ๐ท ๐‘˜ ๐‘Ž๐‘›๐‘‘ ๐‘ฃโ‰ค ๐ท ๐‘™ 0, ๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’

10 Butterworth filter ๐ป ๐‘˜,๐‘™ = 1 1+ ๐‘˜ 2 + ๐‘™ 2 ๐ท 0 2๐‘›
Images: Gonzalez & Woods, 3rd edition Butterworth filter Transfer function for 2D Butterworth filter ๐ป ๐‘˜,๐‘™ = ๐‘˜ 2 + ๐‘™ 2 ๐ท ๐‘› ๐‘›= order of the Butterworth filter ๐ท 0 = Cut-off frequency

11 High-pass Filters Complementary to LP Filters
Butterworth High-Pass filter ๐ป ๐‘ข,๐‘ฃ = 0, ๐ท(๐‘ข,๐‘ฃ)โ‰ค ๐ท 0 1, ๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’ Ideal High Pass Filter (IHPF) ๐ป ๐‘˜,๐‘™ = ๐ท ๐‘˜ 2 + ๐‘™ ๐‘› Butterworth High Pass Filter (BHPF)

12 Gaussian Filters (Low-pass, High-pass)
Popular for removing ringing effect Transfer function for 2-D Gaussian LPF (GLPF) Transfer function for 2-D Gaussian HPF (GHPF) ๐ป ๐‘ข,๐‘ฃ =๐‘’๐‘ฅ๐‘ โˆ’ ๐ท 2 (๐‘ข,๐‘ฃ) 2 ๐œŽ 2 ๐ป ๐‘ข,๐‘ฃ =1โˆ’๐‘’๐‘ฅ๐‘ โˆ’ ๐ท 2 (๐‘ข,๐‘ฃ) 2 ๐œŽ 2

13 Selective filtering Operate on a given range of frequencies
Bandpass, Band reject Band-reject filter

14 Homomorphic Filter ๐‘“ ๐‘ฅ,๐‘ฆ = ๐‘“ ๐‘– ๐‘ฅ,๐‘ฆ โˆ— ๐‘“ ๐‘Ÿ (๐‘ฅ,๐‘ฆ) ๐‘ง ๐‘ฅ,๐‘ฆ = ln ๐‘“(๐‘ฅ,๐‘ฆ)
๐‘“ ๐‘ฅ,๐‘ฆ = ๐‘“ ๐‘– ๐‘ฅ,๐‘ฆ โˆ— ๐‘“ ๐‘Ÿ (๐‘ฅ,๐‘ฆ) ๐‘“ ๐‘– ๐‘ฅ,๐‘ฆ = Illumination component ๐‘“ ๐‘Ÿ ๐‘ฅ,๐‘ฆ = Reflectance component ๐‘ง ๐‘ฅ,๐‘ฆ = ln ๐‘“(๐‘ฅ,๐‘ฆ) = ln ๐‘“ ๐‘– ๐‘ฅ,๐‘ฆ + ln ๐‘“ ๐‘Ÿ (๐‘ฅ,๐‘ฆ) ๐‘ ๐‘ข,๐‘ฃ = ๐น ๐‘– ๐‘ข,๐‘ฃ + ๐น ๐‘Ÿ (๐‘ข,๐‘ฃ) Fourier transformation of input signal Let, ๐ป(๐‘ข,๐‘ฃ)= the filer to be applied on ๐‘ ๐‘ข,๐‘ฃ , then ๐‘† ๐‘ข,๐‘ฃ = ๐ป(๐‘ข,๐‘ฃ)๐น ๐‘– ๐‘ข,๐‘ฃ + ๐ป(๐‘ข,๐‘ฃ)๐น ๐‘Ÿ (๐‘ข,๐‘ฃ) Transformed image After Inverse Fourier Transformation ๐‘  ๐‘ฅ,๐‘ฆ = ๐‘“โ€ฒ ๐‘– ๐‘ฅ,๐‘ฆ + ๐‘“ โ€ฒ ๐‘Ÿ ๐‘ฅ,๐‘ฆ โ‡’๐‘” ๐‘ฅ,๐‘ฆ = exp ๐‘“ ๐‘– โ€ฒ ๐‘ฅ,๐‘ฆ .expโก[ ๐‘“ ๐‘Ÿ โ€ฒ (๐‘ฅ,๐‘ฆ)]

15 Homomorphic Filter Design
Images: Gonzalez & Woods, 3rd edition Homomorphic Filter Design ๐›พ ๐ฟ <1; ๐›พ ๐ป >1

16 Images: Gonzalez & Woods, 3rd edition
Example

17 Thank you Next Lecture: Image Restoration


Download ppt "CS654: Digital Image Analysis"

Similar presentations


Ads by Google