SlideShare a Scribd company logo
4
Most read
5
Most read
6
Most read
Median filter
Implementation using
TMS320C6745
https://www.pantechsolutions.net/products/dsp-
dsc-boards/tms320c6745-tyro
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
• Types of noise:
– Salt and pepper noise
– Impulse noise
– Gaussian noise
• Due to
– transmission errors
– dead CCD pixels
– specks on lens
– can be specific to a sensor
Types of Noise
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Median Filter
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Median Filter
• The median filter is a sliding-window spatial filter.
• It replaces the value of the center pixel with the median of the
intensity values in the neighborhood of that pixel.
• to reduce "salt and pepper" noise.
• For every pixel, a 3x3 neighborhood with the pixel as center is
considered. In median filtering, the value of the pixel is replaced
by the median of the pixel values in the 3x3 neighborhood.
•
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
There are many masks used in Noise Elimination
Median Mask is a typical one
23 65 64
120 187 90
47 209 72
J=1 2 3
I=1
2
3
Rank: 23, 47, 64, 65, 72, 90, 120, 187, 209
median
Masked Original Image
The principle of Median Mask is to mask some sub-image,
use the median of the values of the sub-image as its value in
new image
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
• How can we
remove noise?
• Replace each pixel with
the average of a
kxk window around it
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 100 130 110 120 110 0 0
0 0 0 110 90 100 90 100 0 0
0 0 0 130 100 90 130 110 0 0
0 0 0 120 100 130 110 120 0 0
0 0 0 90 110 80 120 100 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
Neighborhood Processing
Practical Noise Reduction
104
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Median Filter Matlab code
I = imread('eight.tif');
J = imnoise(I,'salt & pepper',0.02);
K = medfilt2(J);
figure, imshow(J), figure, imshow(K)
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
C source code for Median filter
#include<stdio.h>
#include<math.h>
#include "Image1.h"
#define ROW 128
#define COL 128
unsigned int im[ROW][COL];
unsigned int i,j;
unsigned int SR7,SR1,SR2,SR3,SR4,SR5,SR6,SR8,SR9,bbr;
float median(int SR1,int SR2,int SR3,int SR4,int SR5,int SR6,int SR7,int SR8,int SR9);
void main()
{
for(i=0;i<ROW;i++)
{
for(j=0;j<COL;j++)
{
im[i][j]=Inp[i][j];
}
}
for(i=1;i<ROW-1;i++)
{
for(j=1;j<COL-1;j++)
{
SR1 = Inp[i-1][j-1];
SR2 = Inp[i-1][j];
SR3 = Inp[i-1][j+1];
SR4 = Inp[i][j-1];
SR5 = Inp[i][j];
SR6 = Inp[i][j+1];
SR7 = Inp[i+1][j-1];
SR8 = Inp[i+1][j];
SR9 = Inp[i+1][j+1];
bbr=median(SR1,SR2,SR3,SR4,SR5,SR6,SR7,SR8,SR9);
im[i][j]=bbr;
}
}
}
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Image settings-Noisy Image
Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd.
Image settings-Filtered Image

More Related Content

What's hot (20)

PPTX
Digital image processing
Yendapalli lalitha kundana
 
PPTX
Intensity Transformation and Spatial filtering
Shajun Nisha
 
PDF
Computer Vision: Feature matching with RANSAC Algorithm
allyn joy calcaben
 
ODP
Data Analysis in Python
Richard Herrell
 
PDF
Digital Image Fundamentals
Dr. A. B. Shinde
 
PPTX
Image processing ppt
Raviteja Chowdary Adusumalli
 
PPTX
Image noise reduction
Jksuryawanshi
 
PPTX
Face mask detection
Sonesh yadav
 
PPT
Image enhancement ppt nal2
Surabhi Ks
 
PPTX
Moving object detection
Raviraj singh shekhawat
 
PPTX
Filtering and masking
amudhini
 
PPTX
Color Image Processing
kiruthiammu
 
PPTX
Night vision technology
Gyana Ranjan Tripathy
 
PPTX
Pseudo Random Number
Hemant Chetwani
 
PPTX
An overview of gradient descent optimization algorithms
Hakky St
 
DOCX
seminar report on night vision technology
Amit Satyam
 
PPTX
Image compression
Bassam Kanber
 
PPTX
Image Filtering in the Frequency Domain
Amnaakhaan
 
PDF
Underwater Image Enhancement
ijtsrd
 
PPT
Sismulmed 04 b. image processing intro
Nurfitri Anbarsanti
 
Digital image processing
Yendapalli lalitha kundana
 
Intensity Transformation and Spatial filtering
Shajun Nisha
 
Computer Vision: Feature matching with RANSAC Algorithm
allyn joy calcaben
 
Data Analysis in Python
Richard Herrell
 
Digital Image Fundamentals
Dr. A. B. Shinde
 
Image processing ppt
Raviteja Chowdary Adusumalli
 
Image noise reduction
Jksuryawanshi
 
Face mask detection
Sonesh yadav
 
Image enhancement ppt nal2
Surabhi Ks
 
Moving object detection
Raviraj singh shekhawat
 
Filtering and masking
amudhini
 
Color Image Processing
kiruthiammu
 
Night vision technology
Gyana Ranjan Tripathy
 
Pseudo Random Number
Hemant Chetwani
 
An overview of gradient descent optimization algorithms
Hakky St
 
seminar report on night vision technology
Amit Satyam
 
Image compression
Bassam Kanber
 
Image Filtering in the Frequency Domain
Amnaakhaan
 
Underwater Image Enhancement
ijtsrd
 
Sismulmed 04 b. image processing intro
Nurfitri Anbarsanti
 

Viewers also liked (15)

PPT
Waveform Generation Using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
PPT
Interfacing UART with tms320C6745
Pantech ProLabs India Pvt Ltd
 
PPT
Introduction to Code Composer Studio 4
Pantech ProLabs India Pvt Ltd
 
PPTX
Brainsense -Brain computer Interface
Pantech ProLabs India Pvt Ltd
 
PPT
System Generator-Tutorial
Pantech ProLabs India Pvt Ltd
 
DOCX
E E 458 Project 002
Chad Weiss
 
PPT
Switch & LED using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
PDF
Digital image processing using matlab: filters (detail)
thanh nguyen
 
PPTX
Internet of Things
Pantech ProLabs India Pvt Ltd
 
PPT
Introduction to tms320c6745 dsp
Pantech ProLabs India Pvt Ltd
 
PDF
Présentation FPGA
Yann Sionneau
 
PPTX
impulse noise filter
yousef_
 
PPT
Medical Image Processing
Pantech ProLabs India Pvt Ltd
 
PPTX
Digital image processing img smoothning
Vinay Gupta
 
PPT
Introduction to Blackfin BF532 DSP
Pantech ProLabs India Pvt Ltd
 
Waveform Generation Using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
Interfacing UART with tms320C6745
Pantech ProLabs India Pvt Ltd
 
Introduction to Code Composer Studio 4
Pantech ProLabs India Pvt Ltd
 
Brainsense -Brain computer Interface
Pantech ProLabs India Pvt Ltd
 
System Generator-Tutorial
Pantech ProLabs India Pvt Ltd
 
E E 458 Project 002
Chad Weiss
 
Switch & LED using TMS320C6745 DSP
Pantech ProLabs India Pvt Ltd
 
Digital image processing using matlab: filters (detail)
thanh nguyen
 
Internet of Things
Pantech ProLabs India Pvt Ltd
 
Introduction to tms320c6745 dsp
Pantech ProLabs India Pvt Ltd
 
Présentation FPGA
Yann Sionneau
 
impulse noise filter
yousef_
 
Medical Image Processing
Pantech ProLabs India Pvt Ltd
 
Digital image processing img smoothning
Vinay Gupta
 
Introduction to Blackfin BF532 DSP
Pantech ProLabs India Pvt Ltd
 
Ad

Similar to Median filter Implementation using TMS320C6745 (20)

PDF
IRJET- Image Restoration using Adaptive Median Filtering
IRJET Journal
 
PDF
Iaetsd literature review on efficient detection and filtering of high
Iaetsd Iaetsd
 
PPTX
literature.pptx
8885684828
 
PDF
Digital Image Processing: Image Restoration
Mostafa G. M. Mostafa
 
PPT
Image denoising
umarjamil10000
 
PDF
PERFORMANCE ANALYSIS OF UNSYMMETRICAL TRIMMED MEDIAN AS DETECTOR ON IMAGE NOI...
ijistjournal
 
PDF
PERFORMANCE ANALYSIS OF UNSYMMETRICAL TRIMMED MEDIAN AS DETECTOR ON IMAGE NOI...
ijistjournal
 
PDF
D122733
IJRES Journal
 
PPTX
Project presentation
dipti Jain
 
PPTX
Noise filtering
Alaa Ahmed
 
PPTX
Image Restoration ppt unit III for III years.pptx
S.A Engineering College
 
PPT
unit-3.ppt
meenalshanmuganathan
 
PDF
G041015762
IOSR-JEN
 
PDF
noiseestimationfiltering-221217050348-c5d1a246.pdf
AmrilMukmin2
 
PPTX
Noise Estimation & Filtering_.pptx
SudipKG
 
PPSX
Noise models presented by Nisha Menon K
Nisha Menon K
 
PPT
Chapter 5
asodariyabhavesh
 
PDF
L0440285459
IJERA Editor
 
PDF
A Comparative Study to Removal Salt & Pepper Noise from Satellite Image
IJCSIS Research Publications
 
PDF
The International Journal of Engineering and Science (The IJES)
theijes
 
IRJET- Image Restoration using Adaptive Median Filtering
IRJET Journal
 
Iaetsd literature review on efficient detection and filtering of high
Iaetsd Iaetsd
 
literature.pptx
8885684828
 
Digital Image Processing: Image Restoration
Mostafa G. M. Mostafa
 
Image denoising
umarjamil10000
 
PERFORMANCE ANALYSIS OF UNSYMMETRICAL TRIMMED MEDIAN AS DETECTOR ON IMAGE NOI...
ijistjournal
 
PERFORMANCE ANALYSIS OF UNSYMMETRICAL TRIMMED MEDIAN AS DETECTOR ON IMAGE NOI...
ijistjournal
 
D122733
IJRES Journal
 
Project presentation
dipti Jain
 
Noise filtering
Alaa Ahmed
 
Image Restoration ppt unit III for III years.pptx
S.A Engineering College
 
G041015762
IOSR-JEN
 
noiseestimationfiltering-221217050348-c5d1a246.pdf
AmrilMukmin2
 
Noise Estimation & Filtering_.pptx
SudipKG
 
Noise models presented by Nisha Menon K
Nisha Menon K
 
Chapter 5
asodariyabhavesh
 
L0440285459
IJERA Editor
 
A Comparative Study to Removal Salt & Pepper Noise from Satellite Image
IJCSIS Research Publications
 
The International Journal of Engineering and Science (The IJES)
theijes
 
Ad

More from Pantech ProLabs India Pvt Ltd (20)

PDF
Registration process
Pantech ProLabs India Pvt Ltd
 
PPTX
Choosing the right processor for embedded system design
Pantech ProLabs India Pvt Ltd
 
PPT
Brain Computer Interface
Pantech ProLabs India Pvt Ltd
 
PPTX
Electric Vehicle Design using Matlab
Pantech ProLabs India Pvt Ltd
 
PPTX
Image processing application
Pantech ProLabs India Pvt Ltd
 
PPTX
Internet of Things using Raspberry Pi
Pantech ProLabs India Pvt Ltd
 
PPTX
Internet of Things Using Arduino
Pantech ProLabs India Pvt Ltd
 
PPTX
Brain controlled robot
Pantech ProLabs India Pvt Ltd
 
PPTX
Brain Computer Interface-Webinar
Pantech ProLabs India Pvt Ltd
 
PPTX
Development of Deep Learning Architecture
Pantech ProLabs India Pvt Ltd
 
PPTX
Gate driver design and inductance fabrication
Pantech ProLabs India Pvt Ltd
 
PPT
Led blinking using TMS320C6745
Pantech ProLabs India Pvt Ltd
 
PPT
Brainsense -Introduction to brain computer interface
Pantech ProLabs India Pvt Ltd
 
PPTX
Wearable Technology
Pantech ProLabs India Pvt Ltd
 
PPTX
MG3130 gesture recognition kit
Pantech ProLabs India Pvt Ltd
 
PPTX
Introduction to Brain Computer Interface
Pantech ProLabs India Pvt Ltd
 
PPTX
Building Robots Tutorial
Pantech ProLabs India Pvt Ltd
 
PPT
Introduction to robotics
Pantech ProLabs India Pvt Ltd
 
Registration process
Pantech ProLabs India Pvt Ltd
 
Choosing the right processor for embedded system design
Pantech ProLabs India Pvt Ltd
 
Brain Computer Interface
Pantech ProLabs India Pvt Ltd
 
Electric Vehicle Design using Matlab
Pantech ProLabs India Pvt Ltd
 
Image processing application
Pantech ProLabs India Pvt Ltd
 
Internet of Things using Raspberry Pi
Pantech ProLabs India Pvt Ltd
 
Internet of Things Using Arduino
Pantech ProLabs India Pvt Ltd
 
Brain controlled robot
Pantech ProLabs India Pvt Ltd
 
Brain Computer Interface-Webinar
Pantech ProLabs India Pvt Ltd
 
Development of Deep Learning Architecture
Pantech ProLabs India Pvt Ltd
 
Gate driver design and inductance fabrication
Pantech ProLabs India Pvt Ltd
 
Led blinking using TMS320C6745
Pantech ProLabs India Pvt Ltd
 
Brainsense -Introduction to brain computer interface
Pantech ProLabs India Pvt Ltd
 
Wearable Technology
Pantech ProLabs India Pvt Ltd
 
MG3130 gesture recognition kit
Pantech ProLabs India Pvt Ltd
 
Introduction to Brain Computer Interface
Pantech ProLabs India Pvt Ltd
 
Building Robots Tutorial
Pantech ProLabs India Pvt Ltd
 
Introduction to robotics
Pantech ProLabs India Pvt Ltd
 

Recently uploaded (20)

PDF
epi editorial commitee meeting presentation
MIPLM
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PPT
Indian Contract Act 1872, Business Law #MBA #BBA #BCOM
priyasinghy107
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PPTX
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 
epi editorial commitee meeting presentation
MIPLM
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
ENGlish 8 lesson presentation PowerPoint.pptx
marawehsvinetshe
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Horarios de distribución de agua en julio
pegazohn1978
 
infertility, types,causes, impact, and management
Ritu480198
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
Indian Contract Act 1872, Business Law #MBA #BBA #BCOM
priyasinghy107
 
Controller Request and Response in Odoo18
Celine George
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Introduction to Biochemistry & Cellular Foundations.pptx
marvinnbustamante1
 

Median filter Implementation using TMS320C6745

  • 2. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. • Types of noise: – Salt and pepper noise – Impulse noise – Gaussian noise • Due to – transmission errors – dead CCD pixels – specks on lens – can be specific to a sensor Types of Noise
  • 3. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Median Filter
  • 4. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Median Filter • The median filter is a sliding-window spatial filter. • It replaces the value of the center pixel with the median of the intensity values in the neighborhood of that pixel. • to reduce "salt and pepper" noise. • For every pixel, a 3x3 neighborhood with the pixel as center is considered. In median filtering, the value of the pixel is replaced by the median of the pixel values in the 3x3 neighborhood. •
  • 5. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. There are many masks used in Noise Elimination Median Mask is a typical one 23 65 64 120 187 90 47 209 72 J=1 2 3 I=1 2 3 Rank: 23, 47, 64, 65, 72, 90, 120, 187, 209 median Masked Original Image The principle of Median Mask is to mask some sub-image, use the median of the values of the sub-image as its value in new image
  • 6. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. • How can we remove noise? • Replace each pixel with the average of a kxk window around it 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 130 110 120 110 0 0 0 0 0 110 90 100 90 100 0 0 0 0 0 130 100 90 130 110 0 0 0 0 0 120 100 130 110 120 0 0 0 0 0 90 110 80 120 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Neighborhood Processing Practical Noise Reduction 104
  • 7. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Median Filter Matlab code I = imread('eight.tif'); J = imnoise(I,'salt & pepper',0.02); K = medfilt2(J); figure, imshow(J), figure, imshow(K)
  • 8. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. C source code for Median filter #include<stdio.h> #include<math.h> #include "Image1.h" #define ROW 128 #define COL 128 unsigned int im[ROW][COL]; unsigned int i,j; unsigned int SR7,SR1,SR2,SR3,SR4,SR5,SR6,SR8,SR9,bbr; float median(int SR1,int SR2,int SR3,int SR4,int SR5,int SR6,int SR7,int SR8,int SR9); void main() { for(i=0;i<ROW;i++) { for(j=0;j<COL;j++) { im[i][j]=Inp[i][j]; } } for(i=1;i<ROW-1;i++) { for(j=1;j<COL-1;j++) { SR1 = Inp[i-1][j-1]; SR2 = Inp[i-1][j]; SR3 = Inp[i-1][j+1]; SR4 = Inp[i][j-1]; SR5 = Inp[i][j]; SR6 = Inp[i][j+1]; SR7 = Inp[i+1][j-1]; SR8 = Inp[i+1][j]; SR9 = Inp[i+1][j+1]; bbr=median(SR1,SR2,SR3,SR4,SR5,SR6,SR7,SR8,SR9); im[i][j]=bbr; } } }
  • 9. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Image settings-Noisy Image
  • 10. Technology beyond the Dreams™ Copyright © 2014 Pantech Prolabs India Pvt Ltd. Image settings-Filtered Image

Editor's Notes

  • #3: Salt and pepper and impulse noise can be due to transmission errors (e.g., from deep space probe), dead CCD pixels, specks on lens We’re going to focus on Gaussian noise first. If you had a sensor that was a little noisy and measuring the same thing over and over, how would you reduce the noise?