SlideShare uma empresa Scribd logo
1 de 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!

Mais conteúdo relacionado

Mais procurados

Comparison of image fusion methods
Comparison of image fusion methodsComparison of image fusion methods
Comparison of image fusion methods
Amr Nasr
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
Ashish Kumar
 

Mais procurados (20)

Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
 
Image Restoration (Order Statistics Filters)
Image Restoration (Order Statistics Filters)Image Restoration (Order Statistics Filters)
Image Restoration (Order Statistics Filters)
 
Comparison of image fusion methods
Comparison of image fusion methodsComparison of image fusion methods
Comparison of image fusion methods
 
Image compression .
Image compression .Image compression .
Image compression .
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Spatial filtering
Spatial filteringSpatial filtering
Spatial filtering
 
Digital image processing
Digital image processing  Digital image processing
Digital image processing
 
SPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSINGSPATIAL FILTERING IN IMAGE PROCESSING
SPATIAL FILTERING IN IMAGE PROCESSING
 
Image noise reduction
Image noise reductionImage noise reduction
Image noise reduction
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
DIP - Image Restoration
DIP - Image RestorationDIP - Image Restoration
DIP - Image Restoration
 
Chap6 image restoration
Chap6 image restorationChap6 image restoration
Chap6 image restoration
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Enhancement in frequency domain
Enhancement in frequency domainEnhancement in frequency domain
Enhancement in frequency domain
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
 
Lecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard TransformLecture 15 DCT, Walsh and Hadamard Transform
Lecture 15 DCT, Walsh and Hadamard Transform
 

Semelhante a 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
 
Filters two design_with_matlab
Filters two design_with_matlabFilters two design_with_matlab
Filters two design_with_matlab
researchwork
 

Semelhante a Implementation and comparison of Low pass filters in Frequency domain (11)

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
 
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
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency04 cie552 image_filtering_frequency
04 cie552 image_filtering_frequency
 

Mais de Zara Tariq

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

Mais de 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
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

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