SlideShare a Scribd company logo
Restoration of noise-only degradation 
Filters to be considered 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 1
Mean Filters: Arithmetic mean filter 
Causes a certain amount of blurring (proportional to the window size) to 
the image, thereby reducing the effects of noise. 
Can be used to reduce noise of different types, but works best for Gaussian, 
uniform, or Erlang noise. 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 2
Mean Filters: Geometric mean filter 
– A variation of the arithmetic mean filter 
– Primarily used on images with Gaussian noise 
– Retains image detail better than the arithmetic mean 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 3
Mean Filters: Harmonic mean filter 
Harmonic mean filter 
– Another variation of the arithmetic mean filter 
– Useful for images with Gaussian or salt noise 
– Black pixels (pepper noise) are not filtered 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 4
Arithmetic and geometric mean filters (example) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 5
Mean Filters: Harmonic mean filter 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 6
Mean Filters: Harmonic mean filter 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 7
Mean Filters: Contra-harmonic mean filter 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 8
Classification of contra-harmonic filter applications 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 9
Contra-harmonic mean filter (example) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 10
Contra-harmonic mean filter (example) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 11
Rank / Order / Order Statistics Filters 
– Known as Rank filters, Order filters OR Order Statistics filters 
– Operate on a neighborhood around a reference pixel by 
ordering (ranking) the pixel values and then performing an 
operation on those ordered values to obtain the new value for 
the reference pixel 
– They perform very well in the presence of salt and pepper noise 
but are more computationally expensive as compared to mean 
filters 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 12
Rank / Order Statistics Filters: Median filter 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 13
Rank / Order Statistics Filters: Median filter 
– Most popular and useful of the rank filters. 
– It works by selecting the middle pixel value from the ordered set 
of values within the m × n neighborhood (W) around the 
reference pixel. 
‱ If mn is an even number, the arithmetic average of the two 
values closest to the middle of the ordered set is used 
instead. 
– Many variants, extensions, and optimized implementations in 
the literature. 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 14
Median filter (Example) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 15
Rank / Order Statistics Filters: Max and Min filter 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 16
Rank / Order Statistics Filters: Max and Min filter 
– Max filter also known as 100th percentile filter 
– Min filter also known as zeroth percentile filter 
– Max filter helps in removing pepper noise 
– Min filter helps in removing salt noise 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 17
Max and Min filter (Example) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 18
Rank / Order Statistics Filters: Midpoint filter 
– Calculates the average of the highest and lowest pixel values 
within a window 
– What would it do with salt and pepper noise ? 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 19
Midpoint filter (Example) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 20
Rank/Order Statistics Filters: Alpha-Trimmed Mean Filter 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 21
Rank/Order Statistics Filters: Alpha-Trimmed Mean Filter 
– Uses another combination of order statistics and 
averaging 
– Average of the pixel values closest to the median, after 
the D lowest and the D highest values in an ordered 
set have been excluded. 
– Rationale: to allow the user to control its behavior by 
specifying the parameter D 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 22
Alpha-Trimmed Mean Filter (Example) 
Image corrupted 
by additive 
uniform noise 
Additionally 
corrupted by 
additive salt and 
pepper noise 
Filtered with 5x5 
arithmetic mean 
filter 
Filtered with 5x5 
geometric mean 
filter 
Filtered with 5x5 
median filter 
Filtered with 5x5 
alpha-trimmed 
mean filter (d=5) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 23
Filters in MATLAB 
– nlfilter or colfilt 
– Might take long to process results 
– Both provide a progress bar indicator to inform to the user that 
the processing is taking place 
– colfilt is considerably faster than nlfilter 
– For rank filters, the IPT function ordfilt2 to create the min, max, 
and median filters 
– medfilt2 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 24
Adaptive Filters 
 The behavior of adaptive filters changes according to the statistical 
characteristics of the image in the filter region. 
 This will enable the filters to have the desired response even if the 
image has regions with totally different characteristics. 
 Statistical characteristics considered : Local mean, local variance, 
local maximum, local minimum, local median, global mean, global 
variance and noise variance. 
 Performance of Adaptive filters is superior to that of the filters 
discussed till now but the price is increase in filter complexity 
 We will study two adaptive filters: 
– Adaptive local noise reduction filter 
– Adaptive median filter 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 25
Adaptive local noise reduction filter 
– Filter operates on local region, Sxy 
– The response of the filter at any point (x,y) is based on four 
quantities 
‱ g(x,y), the value of the noisy image at (x,y) 
‱ , the variance of the noise which corrupts f(x,y) to form g(x,y) (?) 
‱ , the local mean of the pixels in Sxy 
‱ , the local variance of the pixels in Sxy L 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 26
Adaptive local noise reduction filter 
L 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 27
Adaptive local noise reduction filter (Example) 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 28
Adaptive median filter 
Suppose zmin and zmax = min. and max. gray level value in Sxy 
zmed = median of gray levels in Sxy 
zxy = gray level at coordinates (x, y) 
Smax = maximum allowed size of Sxy 
Algorithm Level A: 
A1  zmed  zmin , A2  zmed  zmax 
If A1 > 0 AND A2 <0, Go to level B 
Else increase the window size 
If window size ≀ Smax repeat level A 
Else output zmed 
Level B: 
1 , 2 xy min xy max B  z  z B  z  z 
If B1 > 0 AND B2 <0, output zxy 
Else output zmed 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 29
Adaptive median filter 
 Suitable for higher level of salt and pepper noise 
 Minimum loss of information 
Example 
5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 30

More Related Content

PPSX
Edge Detection and Segmentation
PPTX
Digital Image Processing
PPTX
Chapter 3 image enhancement (spatial domain)
PPT
Sharpening using frequency Domain Filter
PPTX
Image Enhancement using Frequency Domain Filters
PPT
ImageProcessing10-Segmentation(Thresholding) (1).ppt
PPTX
Chapter 9 morphological image processing
Edge Detection and Segmentation
Digital Image Processing
Chapter 3 image enhancement (spatial domain)
Sharpening using frequency Domain Filter
Image Enhancement using Frequency Domain Filters
ImageProcessing10-Segmentation(Thresholding) (1).ppt
Chapter 9 morphological image processing

What's hot (20)

PDF
Noise Models
PPTX
Digital image processing
PPT
08 frequency domain filtering DIP
PPTX
Homomorphic filtering
PPTX
Digital Image restoration
PPSX
Color Image Processing: Basics
PPSX
Image Processing: Spatial filters
PPTX
Image filtering in Digital image processing
PPTX
Image feature extraction
PPTX
Histogram Processing
PPT
Spatial filtering
PPSX
Noise models presented by Nisha Menon K
PPTX
Image Filtering in the Frequency Domain
PPTX
Histogram Specification or Matching Problem
PPT
Discrete cosine transform
PPTX
SPATIAL FILTERING IN IMAGE PROCESSING
PPTX
Color Image Processing
PPTX
Fundamental steps in image processing
PPT
Chapter 5 Image Processing: Fourier Transformation
Noise Models
Digital image processing
08 frequency domain filtering DIP
Homomorphic filtering
Digital Image restoration
Color Image Processing: Basics
Image Processing: Spatial filters
Image filtering in Digital image processing
Image feature extraction
Histogram Processing
Spatial filtering
Noise models presented by Nisha Menon K
Image Filtering in the Frequency Domain
Histogram Specification or Matching Problem
Discrete cosine transform
SPATIAL FILTERING IN IMAGE PROCESSING
Color Image Processing
Fundamental steps in image processing
Chapter 5 Image Processing: Fourier Transformation
Ad

Similar to filters for noise in image processing (20)

PDF
D122733
PDF
IRJET- Salt and Pepper Noise Removal using Decision based Filters
PDF
FPGA Implementation of Decision Based Algorithm for Removal of Impulse Noise
PDF
IRJET- Image Restoration using Adaptive Median Filtering
PDF
IRJET - Change Detection in Satellite Images using Convolutional Neural N...
DOC
Noise reduction by fuzzy image filtering(synopsis)
PDF
I010324954
PDF
IRJET- SEPD Technique for Removal of Salt and Pepper Noise in Digital Images
PDF
Novel adaptive filter (naf) for impulse noise suppression from digital images
PDF
Novel Adaptive Filter (NAF) for Impulse Noise Suppression from Digital Images
PDF
IRJET- Random Valued Impulse Noise Detection Schemes
PPTX
ppt hari
PDF
Mo2521632166
PDF
Analysis PSNR of High Density Salt and Pepper Impulse Noise Using Median Filter
 
PDF
Noise Models
PDF
Adaptive denoising technique for colour images
PDF
Image Filtering Using all Neighbor Directional Weighted Pixels: Optimization ...
 
PDF
A HYBRID FILTERING TECHNIQUE FOR ELIMINATING UNIFORM NOISE AND IMPULSE NOIS...
 
PDF
50120130406029
PDF
A Hybrid Filtering Technique for Random Valued Impulse Noise Elimination on D...
D122733
IRJET- Salt and Pepper Noise Removal using Decision based Filters
FPGA Implementation of Decision Based Algorithm for Removal of Impulse Noise
IRJET- Image Restoration using Adaptive Median Filtering
IRJET - Change Detection in Satellite Images using Convolutional Neural N...
Noise reduction by fuzzy image filtering(synopsis)
I010324954
IRJET- SEPD Technique for Removal of Salt and Pepper Noise in Digital Images
Novel adaptive filter (naf) for impulse noise suppression from digital images
Novel Adaptive Filter (NAF) for Impulse Noise Suppression from Digital Images
IRJET- Random Valued Impulse Noise Detection Schemes
ppt hari
Mo2521632166
Analysis PSNR of High Density Salt and Pepper Impulse Noise Using Median Filter
 
Noise Models
Adaptive denoising technique for colour images
Image Filtering Using all Neighbor Directional Weighted Pixels: Optimization ...
 
A HYBRID FILTERING TECHNIQUE FOR ELIMINATING UNIFORM NOISE AND IMPULSE NOIS...
 
50120130406029
A Hybrid Filtering Technique for Random Valued Impulse Noise Elimination on D...
Ad

More from Sardar Alam (15)

PPTX
Undoing of mental illness -- seek help
PDF
introduction to python
PPT
Operator Overloading
PPT
skin disease classification
PPT
Introduction to machine learningunsupervised learning
PPTX
Opengl texturing
PPTX
Mathematics fundamentals
PPTX
3 d graphics with opengl part 2
PPTX
3 d graphics with opengl part 1
PPTX
3 d graphics basics
PPTX
2 d transformations
PDF
PDF
Inheritance
PDF
Arrays string handling java packages
PDF
Java basics
Undoing of mental illness -- seek help
introduction to python
Operator Overloading
skin disease classification
Introduction to machine learningunsupervised learning
Opengl texturing
Mathematics fundamentals
3 d graphics with opengl part 2
3 d graphics with opengl part 1
3 d graphics basics
2 d transformations
Inheritance
Arrays string handling java packages
Java basics

Recently uploaded (20)

PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Digital Strategies for Manufacturing Companies
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
history of c programming in notes for students .pptx
PDF
medical staffing services at VALiNTRY
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Nekopoi APK 2025 free lastest update
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
ai tools demonstartion for schools and inter college
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Digital Strategies for Manufacturing Companies
Navsoft: AI-Powered Business Solutions & Custom Software Development
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
history of c programming in notes for students .pptx
medical staffing services at VALiNTRY
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Nekopoi APK 2025 free lastest update
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Design an Analysis of Algorithms II-SECS-1021-03
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
2025 Textile ERP Trends: SAP, Odoo & Oracle
Design an Analysis of Algorithms I-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
CHAPTER 2 - PM Management and IT Context
ai tools demonstartion for schools and inter college

filters for noise in image processing

  • 1. Restoration of noise-only degradation Filters to be considered 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 1
  • 2. Mean Filters: Arithmetic mean filter Causes a certain amount of blurring (proportional to the window size) to the image, thereby reducing the effects of noise. Can be used to reduce noise of different types, but works best for Gaussian, uniform, or Erlang noise. 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 2
  • 3. Mean Filters: Geometric mean filter – A variation of the arithmetic mean filter – Primarily used on images with Gaussian noise – Retains image detail better than the arithmetic mean 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 3
  • 4. Mean Filters: Harmonic mean filter Harmonic mean filter – Another variation of the arithmetic mean filter – Useful for images with Gaussian or salt noise – Black pixels (pepper noise) are not filtered 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 4
  • 5. Arithmetic and geometric mean filters (example) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 5
  • 6. Mean Filters: Harmonic mean filter 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 6
  • 7. Mean Filters: Harmonic mean filter 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 7
  • 8. Mean Filters: Contra-harmonic mean filter 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 8
  • 9. Classification of contra-harmonic filter applications 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 9
  • 10. Contra-harmonic mean filter (example) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 10
  • 11. Contra-harmonic mean filter (example) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 11
  • 12. Rank / Order / Order Statistics Filters – Known as Rank filters, Order filters OR Order Statistics filters – Operate on a neighborhood around a reference pixel by ordering (ranking) the pixel values and then performing an operation on those ordered values to obtain the new value for the reference pixel – They perform very well in the presence of salt and pepper noise but are more computationally expensive as compared to mean filters 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 12
  • 13. Rank / Order Statistics Filters: Median filter 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 13
  • 14. Rank / Order Statistics Filters: Median filter – Most popular and useful of the rank filters. – It works by selecting the middle pixel value from the ordered set of values within the m × n neighborhood (W) around the reference pixel. ‱ If mn is an even number, the arithmetic average of the two values closest to the middle of the ordered set is used instead. – Many variants, extensions, and optimized implementations in the literature. 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 14
  • 15. Median filter (Example) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 15
  • 16. Rank / Order Statistics Filters: Max and Min filter 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 16
  • 17. Rank / Order Statistics Filters: Max and Min filter – Max filter also known as 100th percentile filter – Min filter also known as zeroth percentile filter – Max filter helps in removing pepper noise – Min filter helps in removing salt noise 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 17
  • 18. Max and Min filter (Example) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 18
  • 19. Rank / Order Statistics Filters: Midpoint filter – Calculates the average of the highest and lowest pixel values within a window – What would it do with salt and pepper noise ? 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 19
  • 20. Midpoint filter (Example) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 20
  • 21. Rank/Order Statistics Filters: Alpha-Trimmed Mean Filter 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 21
  • 22. Rank/Order Statistics Filters: Alpha-Trimmed Mean Filter – Uses another combination of order statistics and averaging – Average of the pixel values closest to the median, after the D lowest and the D highest values in an ordered set have been excluded. – Rationale: to allow the user to control its behavior by specifying the parameter D 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 22
  • 23. Alpha-Trimmed Mean Filter (Example) Image corrupted by additive uniform noise Additionally corrupted by additive salt and pepper noise Filtered with 5x5 arithmetic mean filter Filtered with 5x5 geometric mean filter Filtered with 5x5 median filter Filtered with 5x5 alpha-trimmed mean filter (d=5) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 23
  • 24. Filters in MATLAB – nlfilter or colfilt – Might take long to process results – Both provide a progress bar indicator to inform to the user that the processing is taking place – colfilt is considerably faster than nlfilter – For rank filters, the IPT function ordfilt2 to create the min, max, and median filters – medfilt2 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 24
  • 25. Adaptive Filters  The behavior of adaptive filters changes according to the statistical characteristics of the image in the filter region.  This will enable the filters to have the desired response even if the image has regions with totally different characteristics.  Statistical characteristics considered : Local mean, local variance, local maximum, local minimum, local median, global mean, global variance and noise variance.  Performance of Adaptive filters is superior to that of the filters discussed till now but the price is increase in filter complexity  We will study two adaptive filters: – Adaptive local noise reduction filter – Adaptive median filter 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 25
  • 26. Adaptive local noise reduction filter – Filter operates on local region, Sxy – The response of the filter at any point (x,y) is based on four quantities ‱ g(x,y), the value of the noisy image at (x,y) ‱ , the variance of the noise which corrupts f(x,y) to form g(x,y) (?) ‱ , the local mean of the pixels in Sxy ‱ , the local variance of the pixels in Sxy L 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 26
  • 27. Adaptive local noise reduction filter L 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 27
  • 28. Adaptive local noise reduction filter (Example) 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 28
  • 29. Adaptive median filter Suppose zmin and zmax = min. and max. gray level value in Sxy zmed = median of gray levels in Sxy zxy = gray level at coordinates (x, y) Smax = maximum allowed size of Sxy Algorithm Level A: A1  zmed  zmin , A2  zmed  zmax If A1 > 0 AND A2 <0, Go to level B Else increase the window size If window size ≀ Smax repeat level A Else output zmed Level B: 1 , 2 xy min xy max B  z  z B  z  z If B1 > 0 AND B2 <0, output zxy Else output zmed 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 29
  • 30. Adaptive median filter  Suitable for higher level of salt and pepper noise  Minimum loss of information Example 5/16/2013 COMSATS Institute of Information Technology, Abbottabad Digital Image Processing CSC330 30