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)
Signal lab (matlab)
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)
Signal lab (matlab)
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);
Signal lab (matlab)
Signal lab (matlab)
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

Gender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 ProjectGender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 Projectreemakb03
 
Basic Principle of Electrochemical Sensor
Basic Principle of  Electrochemical SensorBasic Principle of  Electrochemical Sensor
Basic Principle of Electrochemical SensorTanvir Moin
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxjasonsedano2
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Sean Meyn
 
EPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptxEPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptxJoseeMusabyimana
 
How to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdfHow to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdfRedhwan Qasem Shaddad
 
A Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationA Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationMohsinKhanA
 
Engineering Mechanics Chapter 5 Equilibrium of a Rigid Body
Engineering Mechanics  Chapter 5  Equilibrium of a Rigid BodyEngineering Mechanics  Chapter 5  Equilibrium of a Rigid Body
Engineering Mechanics Chapter 5 Equilibrium of a Rigid BodyAhmadHajasad2
 
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...soginsider
 
Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...
Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...
Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...Amil baba
 
Nodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptxNodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptxwendy cai
 
solar wireless electric vechicle charging system
solar wireless electric vechicle charging systemsolar wireless electric vechicle charging system
solar wireless electric vechicle charging systemgokuldongala
 
Phase noise transfer functions.pptx
Phase noise transfer      functions.pptxPhase noise transfer      functions.pptx
Phase noise transfer functions.pptxSaiGouthamSunkara
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchrohitcse52
 
Modelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsModelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsYusuf Yıldız
 
ASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entenderASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entenderjuancarlos286641
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesDIPIKA83
 
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....santhyamuthu1
 
me3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part Ame3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part Akarthi keyan
 

Recently uploaded (20)

Gender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 ProjectGender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 Project
 
Basic Principle of Electrochemical Sensor
Basic Principle of  Electrochemical SensorBasic Principle of  Electrochemical Sensor
Basic Principle of Electrochemical Sensor
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptx
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
 
EPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptxEPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptx
 
How to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdfHow to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdf
 
A Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationA Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software Simulation
 
Engineering Mechanics Chapter 5 Equilibrium of a Rigid Body
Engineering Mechanics  Chapter 5  Equilibrium of a Rigid BodyEngineering Mechanics  Chapter 5  Equilibrium of a Rigid Body
Engineering Mechanics Chapter 5 Equilibrium of a Rigid Body
 
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
 
Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...
Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...
Popular-NO1 Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialis...
 
Nodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptxNodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptx
 
solar wireless electric vechicle charging system
solar wireless electric vechicle charging systemsolar wireless electric vechicle charging system
solar wireless electric vechicle charging system
 
Phase noise transfer functions.pptx
Phase noise transfer      functions.pptxPhase noise transfer      functions.pptx
Phase noise transfer functions.pptx
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
 
Modelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsModelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovations
 
ASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entenderASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entender
 
Présentation IIRB 2024 Chloe Dufrane.pdf
Présentation IIRB 2024 Chloe Dufrane.pdfPrésentation IIRB 2024 Chloe Dufrane.pdf
Présentation IIRB 2024 Chloe Dufrane.pdf
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display Devices
 
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
 
me3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part Ame3493 manufacturing technology unit 1 Part A
me3493 manufacturing technology unit 1 Part A
 

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
  • 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)
  • 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);