SlideShare a Scribd company logo
1 of 13
Download to read offline
Remove Salt and Pepper Noise from Images
Amin Ur Rehman
Waqas Adnan
Waqar Alam
CECOS UNIVERSITY OF IT & EMERGING SCIENCES PESHAWAR
INTRODUCTION
We have use Median filtering Technique for removal of Salt and
Pepper Noise from Images.
Because it can remove salt and pepper noise without significantly
reducing the sharpness of an image.
In this project we have used the Median Filter block to remove salt
and pepper noise from an intensity image.
PROCEDURE
STEP 01:
 Define an intensity image in the MATLABworkspace and add
noise to it.
 Typing the code we get the image.
 Coding for image display
Codding
>> i=imread('chm.jpg');
>> imshow(i)
Now for image size we have the code
>> size(i)
ans =
302 218 2
>> whos i
Name Size Bytes Class Attributes
i 302x218x2 197508 uint8
For Pixcel Infomation
>> imtool(i)
 Now we add noisy to the above original image by typing the
following code and got the noisy image as shown below.
Coding for getting salt & pepper image:
>> noisy_img = imnoise(i,'salt & pepper',0.02);
>> imshow(noisy_img)
Now for removing the noisy we use direct filtering command
“Med filter command” with ‘2’ for two dimensional vector image.
Coding for removing:
k = medfilt2(noisy_img);
close all;
subplot(211);imshow(noisy_img); subplot(212); imshow(k);
Contact: aminhera@gmail.com

More Related Content

Viewers also liked

Pieter Brinkman - My first mobile experience From mobile no no, to mobile go ...
Pieter Brinkman - My first mobile experienceFrom mobile no no, to mobile go ...Pieter Brinkman - My first mobile experienceFrom mobile no no, to mobile go ...
Pieter Brinkman - My first mobile experience From mobile no no, to mobile go ...SUGCON
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled PresentationNealie Munn
 
Ena lab presentation (Pspice software)
Ena lab presentation (Pspice software)Ena lab presentation (Pspice software)
Ena lab presentation (Pspice software)Amin Ur Rehman
 
Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...
Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...
Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...SUGCON
 
John Ours - Sitecore in the Digital Front Office –Turning Data into Action -...
John Ours - Sitecore in the Digital Front Office  –Turning Data into Action -...John Ours - Sitecore in the Digital Front Office  –Turning Data into Action -...
John Ours - Sitecore in the Digital Front Office –Turning Data into Action -...SUGCON
 
Pavel Veller - JavaScript overload - SUGCON
Pavel Veller - JavaScript overload - SUGCONPavel Veller - JavaScript overload - SUGCON
Pavel Veller - JavaScript overload - SUGCONSUGCON
 
image processing in matlab
image processing in matlab image processing in matlab
image processing in matlab Amin Ur Rehman
 
Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...
Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...
Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...SUGCON
 
Darren Guarnaccia - The experience economy and customer outcomes - SUGCON
Darren Guarnaccia - The experience economy and customer outcomes - SUGCONDarren Guarnaccia - The experience economy and customer outcomes - SUGCON
Darren Guarnaccia - The experience economy and customer outcomes - SUGCONSUGCON
 
Os fundamentos da fisica ramalho, nicolau e toledo, vol. 3
Os fundamentos da fisica   ramalho, nicolau e toledo, vol. 3Os fundamentos da fisica   ramalho, nicolau e toledo, vol. 3
Os fundamentos da fisica ramalho, nicolau e toledo, vol. 3cassionogueira
 

Viewers also liked (10)

Pieter Brinkman - My first mobile experience From mobile no no, to mobile go ...
Pieter Brinkman - My first mobile experienceFrom mobile no no, to mobile go ...Pieter Brinkman - My first mobile experienceFrom mobile no no, to mobile go ...
Pieter Brinkman - My first mobile experience From mobile no no, to mobile go ...
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Ena lab presentation (Pspice software)
Ena lab presentation (Pspice software)Ena lab presentation (Pspice software)
Ena lab presentation (Pspice software)
 
Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...
Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...
Brian Beckham - Atomic Design - Modularity Matters: Bringing Atomic Design to...
 
John Ours - Sitecore in the Digital Front Office –Turning Data into Action -...
John Ours - Sitecore in the Digital Front Office  –Turning Data into Action -...John Ours - Sitecore in the Digital Front Office  –Turning Data into Action -...
John Ours - Sitecore in the Digital Front Office –Turning Data into Action -...
 
Pavel Veller - JavaScript overload - SUGCON
Pavel Veller - JavaScript overload - SUGCONPavel Veller - JavaScript overload - SUGCON
Pavel Veller - JavaScript overload - SUGCON
 
image processing in matlab
image processing in matlab image processing in matlab
image processing in matlab
 
Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...
Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...
Dean Thrasher - Beyond CRM Integration: Salesforce As Content Gatekeeper on S...
 
Darren Guarnaccia - The experience economy and customer outcomes - SUGCON
Darren Guarnaccia - The experience economy and customer outcomes - SUGCONDarren Guarnaccia - The experience economy and customer outcomes - SUGCON
Darren Guarnaccia - The experience economy and customer outcomes - SUGCON
 
Os fundamentos da fisica ramalho, nicolau e toledo, vol. 3
Os fundamentos da fisica   ramalho, nicolau e toledo, vol. 3Os fundamentos da fisica   ramalho, nicolau e toledo, vol. 3
Os fundamentos da fisica ramalho, nicolau e toledo, vol. 3
 

Recently uploaded

Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 

Recently uploaded (20)

🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 

Signal lab (matlab)

  • 1. Remove Salt and Pepper Noise from Images Amin Ur Rehman Waqas Adnan Waqar Alam CECOS UNIVERSITY OF IT & EMERGING SCIENCES PESHAWAR
  • 2. INTRODUCTION We have use Median filtering Technique for removal of Salt and Pepper Noise from Images. Because it can remove salt and pepper noise without significantly reducing the sharpness of an image. In this project we have used the Median Filter block to remove salt and pepper noise from an intensity image.
  • 3. PROCEDURE STEP 01:  Define an intensity image in the MATLABworkspace and add noise to it.  Typing the code we get the image.  Coding for image display
  • 5.
  • 6. Now for image size we have the code >> size(i) ans = 302 218 2 >> whos i Name Size Bytes Class Attributes i 302x218x2 197508 uint8
  • 8.  Now we add noisy to the above original image by typing the following code and got the noisy image as shown below. Coding for getting salt & pepper image: >> noisy_img = imnoise(i,'salt & pepper',0.02); >> imshow(noisy_img)
  • 9.
  • 10. Now for removing the noisy we use direct filtering command “Med filter command” with ‘2’ for two dimensional vector image. Coding for removing: k = medfilt2(noisy_img); close all; subplot(211);imshow(noisy_img); subplot(212); imshow(k);
  • 11.
  • 12.