SlideShare a Scribd company logo
1 of 49
IMPLEMENTATION AND
COMPARISON OF LOW PASS
FILTERS IN FREQUENCY
DOMAIN
PRESENTERS:
ZARA TARIQ 1573119
SAPNA KUMARI 1573131
AGENDA
 Introduction
 Low Pass Filters
 Comparison Between Types of LPF
 Implementation of LPF
 Demonstration of Implementation in MATLAB
INTRODUCTION - FILTERS IN FREQENCY DOMAIN
Image filtering in frequency domain can be grouped in three,
depending on the effects:
2. High pass filters (sharpening filters)
3. Notch Filters (band-stop filters)
1. Low pass filters (smoothing filters)
LOW PASS FILTERS (LPF)
Why Is It Used?:
 Creates a blurred (or smoothed) image
 Reduces the high frequencies and leave the low frequencies of the
Fourier transformation to relatively unchanged
How Does It Works?
 Low frequency components correspond to slow changes in images
 Used to remove high spatial frequency noise from a digital image
 The low-pass filters usually employ moving window operator which
affects one pixel of the image at a time, changing its value by some
function of a local region (window) of pixels.
 The operator moves over the image to affect all the pixels in the
image.
COMPARISON BETWEEN TYPES OF LPF
Ideal LPF:
 Cuts off all components that are greater than distance Do from center
Butterworth LPF:
 The transfer function of a Butterworth low pass filter of order n with cut-off
frequency at distance D0 from the origin
 No clear cut-off between passed & filtered frequencies
Gaussian LPF:
 Does not have sharp discontinuity
 Transfer function is smooth, like Butterworth filter
n
DvuD
vuH 2
0 ]/),([1
1
),(


Ideal LPF
Butterworth LPF
Gaussian LPF
IMPLEMENTATION OF
ALL TYPES OF LPF
EXAMPLE 1 - NOISY BIRD IMAGE
Original Image of noisy miner bathing image
Result of Ideal Low Pass Filter
Result of Butterworth Low Pass Filter
Result of Gaussian Low Pass Filter
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Fourier Spectrum of Bird Image
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Spectrum of Bird Image
IMPLEMENTATION OF
ALL TYPES OF LPF
EXAMPLE 2 - SIBERIAN HUSKY FOX IMAGE
Original Image of Siberian Husky Fox image
Result of Ideal Low Pass Filter
Result of Butterworth Low Pass Filter
Result of Gaussian Low Pass Filter
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Fourier Spectrum of Siberian Husky Fox Image
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Spectrum of Siberian Husky Fox Image
IMPLEMENTATION OF
ALL TYPES OF LPF
EXAMPLE 3 - ROSE FLOWER IMAGE
Original Image of Rose Flower image
Result of Ideal Low Pass Filter
Result of Butterworth Low Pass Filter
Result of Gaussian Low Pass Filter
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Fourier Spectrum of Rose Flower Image
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Spectrum of Rose Flower Image
IMPLEMENTATION OF
ALL TYPES OF LPF
EXAMPLE 4 - CAT IMAGE
Original Image of Wild Cat image
Result of Ideal Low Pass Filter
Result of Butterworth Low Pass Filter
Result of Gaussian Low Pass Filter
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Fourier Spectrum of Wild Cat Image
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Spectrum of Wild Cat Image
IMPLEMENTATION OF
ALL TYPES OF LPF
EXAMPLE 5 - MOVIE POSTER IMAGE
Original Image of Movie Poster image
Result of Ideal Low Pass Filter
Result of Butterworth Low Pass Filter
Result of Gaussian Low Pass Filter
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Fourier Spectrum of Movie Poster Image
Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter
Original Image Result of Ideal Low Pass Filter
Spectrum of Movie Poster Image
DEMONSTRATION OF
IMPLEMENTATION IN
MATLAB
APPENDIX – MATLAB CODE
Low Pass Filter Function
H = lpfilter(type, M, N, D0, n)
[U, V] = dftuv(M, N);
D = sqrt(U.^2 + V.^2);
switch type
case 'ideal'
H = double(D <=D0);
case 'btw'
if nargin == 4
n = 1;
end
H = 1./(1 + (D./D0).^(2*n));
case 'gaussian'
H = exp(-(D.^2)./(2*(D0^2)));
otherwise
error('Unknown filter type.')
end
APPENDIX – MATLAB CODE
Ideal Low Pass Filter
fox=imread('fox.jpg');
fox=rgb2gray(fox);
imshow(fox)
PQ = paddedsize(size(fox));
D0 = 0.05*PQ(1);
H = lpfilter('ideal', PQ(1), PQ(2), D0);
F=fft2(double(fox),size(H,1),size(H,2));
LPFS_fox = H.*F;
LPF_fox=real(ifft2(LPFS_fox));
LPF_fox=LPF_fox(1:size(fox,1), 1:size(fox,2));
figure, imshow(LPF_fox, [])
Fc=fftshift(F);
Fcf=fftshift(LPFS_fox);
S1=log(1+abs(Fc));
S2=log(1+abs(Fcf));
figure, imshow(S1,[])
figure, imshow(S2,[])
APPENDIX – MATLAB
CODE
Butterworth Low Pass Filter
fox=imread('fox.jpg');
fox=rgb2gray(fox);
imshow(fox)
PQ = paddedsize(size(fox));
D0 = 0.05*PQ(1);
H = lpfilter('btw', PQ(1), PQ(2), D0);
F=fft2(double(fox),size(H,1),size(H,2));
LPFS_fox = H.*F;
LPF_fox=real(ifft2(LPFS_fox));
LPF_fox=LPF_fox(1:size(fox,1), 1:size(fox,2));
figure, imshow(LPF_fox, [])
Fc=fftshift(F);
Fcf=fftshift(LPFS_fox);
S1=log(1+abs(Fc));
S2=log(1+abs(Fcf));
figure, imshow(S1,[])
figure, imshow(S2,[])
APPENDIX – MATLAB CODE
Gaussian Low Pass Filter
fox=imread('fox.jpg');
fox=rgb2gray(fox);
imshow(fox)
PQ = paddedsize(size(fox));
D0 = 0.05*PQ(1);
H = lpfilter('gaussian', PQ(1), PQ(2), D0);
F=fft2(double(fox),size(H,1),size(H,2));
LPFS_fox = H.*F;
LPF_fox=real(ifft2(LPFS_fox));
LPF_fox=LPF_fox(1:size(fox,1), 1:size(fox,2));
figure, imshow(LPF_fox, [])
Fc=fftshift(F);
Fcf=fftshift(LPFS_fox);
S1=log(1+abs(Fc));
S2=log(1+abs(Fcf));
figure, imshow(S1,[])
figure, imshow(S2,[])
APPENDIX – MATLAB CODE
Meshgrid Frequency Matrices.
function [U, V] = dftuv(M, N)
u = 0:(M-1);
v = 0:(N-1);
idx = find(u > M/2);
u(idx) = u(idx) - M;
idy = find(v > N/2);
v(idy) = v(idy) - N;
[V, U] = meshgrid(v, u);
APPENDIX – MATLAB CODE
Padding for Fourier Transform
function PQ = paddedsize(AB, CD, PARAM)
if nargin == 1
PQ = 2*AB;
elseif nargin == 2 & ~ischar(CD)
PQ = AB + CD - 1;
PQ = 2 * ceil(PQ / 2);
elseif nargin == 2
m = max(AB);
P = 2^nextpow2(2*m);
PQ = [P, P];
elseif nargin == 3
m = max([AB CD]);
P = 2^nextpow2(2*m);
PQ = [P, P];
else
error('Wrong number of inputs.')
end
THANK YOU!

More Related Content

What's hot

6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
Gichelle Amon
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
John Williams
 

What's hot (20)

Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Unit3 dip
Unit3 dipUnit3 dip
Unit3 dip
 
Chapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationChapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier Transformation
 
Fourier descriptors & moments
Fourier descriptors & momentsFourier descriptors & moments
Fourier descriptors & moments
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
5. gray level transformation
5. gray level transformation5. gray level transformation
5. gray level transformation
 
6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
Lecture 14 Properties of Fourier Transform for 2D Signal
Lecture 14 Properties of Fourier Transform for 2D SignalLecture 14 Properties of Fourier Transform for 2D Signal
Lecture 14 Properties of Fourier Transform for 2D Signal
 
Image trnsformations
Image trnsformationsImage trnsformations
Image trnsformations
 
Image noise reduction
Image noise reductionImage noise reduction
Image noise reduction
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
 
Image Recontruction
Image RecontructionImage Recontruction
Image Recontruction
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Image Restoration And Reconstruction
Image Restoration And ReconstructionImage Restoration And Reconstruction
Image Restoration And Reconstruction
 
Image Restoration (Order Statistics Filters)
Image Restoration (Order Statistics Filters)Image Restoration (Order Statistics Filters)
Image Restoration (Order Statistics Filters)
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 

Similar to Implementation and comparison of Low pass filters in Frequency domain

Filter Implementation And Evaluation Project
Filter Implementation And Evaluation ProjectFilter Implementation And Evaluation Project
Filter Implementation And Evaluation Project
Assignmentpedia
 
DIP -Unit 3 ppt.pptx
DIP -Unit 3 ppt.pptxDIP -Unit 3 ppt.pptx
DIP -Unit 3 ppt.pptx
1DA20CS085Nithyashre
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
Ashish Kumar
 
Filters two design_with_matlab
Filters two design_with_matlabFilters two design_with_matlab
Filters two design_with_matlab
researchwork
 

Similar to Implementation and comparison of Low pass filters in Frequency domain (12)

08 frequency domain filtering DIP
08 frequency domain filtering DIP08 frequency domain filtering DIP
08 frequency domain filtering DIP
 
Filtering an image is to apply a convolution
Filtering an image is to apply a convolutionFiltering an image is to apply a convolution
Filtering an image is to apply a convolution
 
ch-2.5 Image Enhancement in FREQUENCY Domain.pptx
ch-2.5 Image Enhancement in FREQUENCY  Domain.pptxch-2.5 Image Enhancement in FREQUENCY  Domain.pptx
ch-2.5 Image Enhancement in FREQUENCY Domain.pptx
 
Image Enhancement in Frequency Domain (2).ppt
Image Enhancement in Frequency Domain (2).pptImage Enhancement in Frequency Domain (2).ppt
Image Enhancement in Frequency Domain (2).ppt
 
Filter Implementation And Evaluation Project
Filter Implementation And Evaluation ProjectFilter Implementation And Evaluation Project
Filter Implementation And Evaluation Project
 
DIP -Unit 3 ppt.pptx
DIP -Unit 3 ppt.pptxDIP -Unit 3 ppt.pptx
DIP -Unit 3 ppt.pptx
 
Finite Impulse Response Band Pass Filter
Finite Impulse Response Band Pass FilterFinite Impulse Response Band Pass Filter
Finite Impulse Response Band Pass Filter
 
Design of Filters PPT
Design of Filters PPTDesign of Filters PPT
Design of Filters PPT
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
 
Alias-Free GAN(styleGAN3).pptx
Alias-Free GAN(styleGAN3).pptxAlias-Free GAN(styleGAN3).pptx
Alias-Free GAN(styleGAN3).pptx
 
Filters two design_with_matlab
Filters two design_with_matlabFilters two design_with_matlab
Filters two design_with_matlab
 
04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency
 

More from Zara Tariq

Crime Record Management System (CRMS)
Crime Record Management System (CRMS)Crime Record Management System (CRMS)
Crime Record Management System (CRMS)
Zara Tariq
 

More from Zara Tariq (12)

Query optimization techniques in Apache Hive
Query optimization techniques in Apache Hive Query optimization techniques in Apache Hive
Query optimization techniques in Apache Hive
 
Design and evaluation of an io controller for data protection
Design and evaluation of an io controller for data protectionDesign and evaluation of an io controller for data protection
Design and evaluation of an io controller for data protection
 
Stochastic kronecker graphs
Stochastic kronecker graphsStochastic kronecker graphs
Stochastic kronecker graphs
 
Pull Vs. Push Production
Pull Vs. Push ProductionPull Vs. Push Production
Pull Vs. Push Production
 
Crime Record Management System (CRMS)
Crime Record Management System (CRMS)Crime Record Management System (CRMS)
Crime Record Management System (CRMS)
 
Crime Record Management System (CRMS)
Crime Record Management System (CRMS)Crime Record Management System (CRMS)
Crime Record Management System (CRMS)
 
Interrupts
Interrupts Interrupts
Interrupts
 
INTERRUPTS
INTERRUPTS INTERRUPTS
INTERRUPTS
 
Toys Vending Machine
Toys Vending MachineToys Vending Machine
Toys Vending Machine
 
An Integrated Cloud Computing Architectural Stack
An Integrated Cloud Computing Architectural Stack An Integrated Cloud Computing Architectural Stack
An Integrated Cloud Computing Architectural Stack
 
Face Detection and Recognition System
Face Detection and Recognition SystemFace Detection and Recognition System
Face Detection and Recognition System
 
JSON
JSONJSON
JSON
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 

Recently uploaded (20)

Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Implementation and comparison of Low pass filters in Frequency domain

  • 1. IMPLEMENTATION AND COMPARISON OF LOW PASS FILTERS IN FREQUENCY DOMAIN PRESENTERS: ZARA TARIQ 1573119 SAPNA KUMARI 1573131
  • 2. AGENDA  Introduction  Low Pass Filters  Comparison Between Types of LPF  Implementation of LPF  Demonstration of Implementation in MATLAB
  • 3. INTRODUCTION - FILTERS IN FREQENCY DOMAIN Image filtering in frequency domain can be grouped in three, depending on the effects: 2. High pass filters (sharpening filters) 3. Notch Filters (band-stop filters) 1. Low pass filters (smoothing filters)
  • 4. LOW PASS FILTERS (LPF) Why Is It Used?:  Creates a blurred (or smoothed) image  Reduces the high frequencies and leave the low frequencies of the Fourier transformation to relatively unchanged How Does It Works?  Low frequency components correspond to slow changes in images  Used to remove high spatial frequency noise from a digital image  The low-pass filters usually employ moving window operator which affects one pixel of the image at a time, changing its value by some function of a local region (window) of pixels.  The operator moves over the image to affect all the pixels in the image.
  • 5. COMPARISON BETWEEN TYPES OF LPF Ideal LPF:  Cuts off all components that are greater than distance Do from center Butterworth LPF:  The transfer function of a Butterworth low pass filter of order n with cut-off frequency at distance D0 from the origin  No clear cut-off between passed & filtered frequencies Gaussian LPF:  Does not have sharp discontinuity  Transfer function is smooth, like Butterworth filter
  • 6. n DvuD vuH 2 0 ]/),([1 1 ),(   Ideal LPF Butterworth LPF Gaussian LPF
  • 7. IMPLEMENTATION OF ALL TYPES OF LPF EXAMPLE 1 - NOISY BIRD IMAGE
  • 8. Original Image of noisy miner bathing image
  • 9. Result of Ideal Low Pass Filter
  • 10. Result of Butterworth Low Pass Filter
  • 11. Result of Gaussian Low Pass Filter
  • 12. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Fourier Spectrum of Bird Image
  • 13. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Spectrum of Bird Image
  • 14. IMPLEMENTATION OF ALL TYPES OF LPF EXAMPLE 2 - SIBERIAN HUSKY FOX IMAGE
  • 15. Original Image of Siberian Husky Fox image
  • 16. Result of Ideal Low Pass Filter
  • 17. Result of Butterworth Low Pass Filter
  • 18. Result of Gaussian Low Pass Filter
  • 19. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Fourier Spectrum of Siberian Husky Fox Image
  • 20. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Spectrum of Siberian Husky Fox Image
  • 21. IMPLEMENTATION OF ALL TYPES OF LPF EXAMPLE 3 - ROSE FLOWER IMAGE
  • 22. Original Image of Rose Flower image
  • 23. Result of Ideal Low Pass Filter
  • 24. Result of Butterworth Low Pass Filter
  • 25. Result of Gaussian Low Pass Filter
  • 26. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Fourier Spectrum of Rose Flower Image
  • 27. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Spectrum of Rose Flower Image
  • 28. IMPLEMENTATION OF ALL TYPES OF LPF EXAMPLE 4 - CAT IMAGE
  • 29. Original Image of Wild Cat image
  • 30. Result of Ideal Low Pass Filter
  • 31. Result of Butterworth Low Pass Filter
  • 32. Result of Gaussian Low Pass Filter
  • 33. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Fourier Spectrum of Wild Cat Image
  • 34. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Spectrum of Wild Cat Image
  • 35. IMPLEMENTATION OF ALL TYPES OF LPF EXAMPLE 5 - MOVIE POSTER IMAGE
  • 36. Original Image of Movie Poster image
  • 37. Result of Ideal Low Pass Filter
  • 38. Result of Butterworth Low Pass Filter
  • 39. Result of Gaussian Low Pass Filter
  • 40. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Fourier Spectrum of Movie Poster Image
  • 41. Result of Butterworth Low Pass Filter Result of Gaussian Low Pass Filter Original Image Result of Ideal Low Pass Filter Spectrum of Movie Poster Image
  • 43. APPENDIX – MATLAB CODE Low Pass Filter Function H = lpfilter(type, M, N, D0, n) [U, V] = dftuv(M, N); D = sqrt(U.^2 + V.^2); switch type case 'ideal' H = double(D <=D0); case 'btw' if nargin == 4 n = 1; end H = 1./(1 + (D./D0).^(2*n)); case 'gaussian' H = exp(-(D.^2)./(2*(D0^2))); otherwise error('Unknown filter type.') end
  • 44. APPENDIX – MATLAB CODE Ideal Low Pass Filter fox=imread('fox.jpg'); fox=rgb2gray(fox); imshow(fox) PQ = paddedsize(size(fox)); D0 = 0.05*PQ(1); H = lpfilter('ideal', PQ(1), PQ(2), D0); F=fft2(double(fox),size(H,1),size(H,2)); LPFS_fox = H.*F; LPF_fox=real(ifft2(LPFS_fox)); LPF_fox=LPF_fox(1:size(fox,1), 1:size(fox,2)); figure, imshow(LPF_fox, []) Fc=fftshift(F); Fcf=fftshift(LPFS_fox); S1=log(1+abs(Fc)); S2=log(1+abs(Fcf)); figure, imshow(S1,[]) figure, imshow(S2,[])
  • 45. APPENDIX – MATLAB CODE Butterworth Low Pass Filter fox=imread('fox.jpg'); fox=rgb2gray(fox); imshow(fox) PQ = paddedsize(size(fox)); D0 = 0.05*PQ(1); H = lpfilter('btw', PQ(1), PQ(2), D0); F=fft2(double(fox),size(H,1),size(H,2)); LPFS_fox = H.*F; LPF_fox=real(ifft2(LPFS_fox)); LPF_fox=LPF_fox(1:size(fox,1), 1:size(fox,2)); figure, imshow(LPF_fox, []) Fc=fftshift(F); Fcf=fftshift(LPFS_fox); S1=log(1+abs(Fc)); S2=log(1+abs(Fcf)); figure, imshow(S1,[]) figure, imshow(S2,[])
  • 46. APPENDIX – MATLAB CODE Gaussian Low Pass Filter fox=imread('fox.jpg'); fox=rgb2gray(fox); imshow(fox) PQ = paddedsize(size(fox)); D0 = 0.05*PQ(1); H = lpfilter('gaussian', PQ(1), PQ(2), D0); F=fft2(double(fox),size(H,1),size(H,2)); LPFS_fox = H.*F; LPF_fox=real(ifft2(LPFS_fox)); LPF_fox=LPF_fox(1:size(fox,1), 1:size(fox,2)); figure, imshow(LPF_fox, []) Fc=fftshift(F); Fcf=fftshift(LPFS_fox); S1=log(1+abs(Fc)); S2=log(1+abs(Fcf)); figure, imshow(S1,[]) figure, imshow(S2,[])
  • 47. APPENDIX – MATLAB CODE Meshgrid Frequency Matrices. function [U, V] = dftuv(M, N) u = 0:(M-1); v = 0:(N-1); idx = find(u > M/2); u(idx) = u(idx) - M; idy = find(v > N/2); v(idy) = v(idy) - N; [V, U] = meshgrid(v, u);
  • 48. APPENDIX – MATLAB CODE Padding for Fourier Transform function PQ = paddedsize(AB, CD, PARAM) if nargin == 1 PQ = 2*AB; elseif nargin == 2 & ~ischar(CD) PQ = AB + CD - 1; PQ = 2 * ceil(PQ / 2); elseif nargin == 2 m = max(AB); P = 2^nextpow2(2*m); PQ = [P, P]; elseif nargin == 3 m = max([AB CD]); P = 2^nextpow2(2*m); PQ = [P, P]; else error('Wrong number of inputs.') end