SlideShare a Scribd company logo
2
Most read
4
Most read
5
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

PPTX
Simulation in radiotherapy SIMULATION IN RADIOTHERAPY.pptx
PPTX
Radiation therapy
PPTX
Incertezas geométricas, margens e igrt - Radioterapia
PPTX
Technique 1 inroduction
PPTX
Teletherapy dosage data ii
PPTX
SOFT TISSUE RADIOGRAPHY By VIRENDRA KUMAR MAURYA
PPTX
RADIOTHERAPY ROOM LAYOUT.ppt aiims gorakhpur x
PPT
Radiation planning steps
Simulation in radiotherapy SIMULATION IN RADIOTHERAPY.pptx
Radiation therapy
Incertezas geométricas, margens e igrt - Radioterapia
Technique 1 inroduction
Teletherapy dosage data ii
SOFT TISSUE RADIOGRAPHY By VIRENDRA KUMAR MAURYA
RADIOTHERAPY ROOM LAYOUT.ppt aiims gorakhpur x
Radiation planning steps

What's hot (20)

PDF
Shielding Design
PPTX
Knee joint (Radiographic projection's)
PDF
Lec15: Medical Image Registration (Introduction)
PPTX
Immobilization in Radiotherapy-Quality assurance
PPTX
Brachytherapy dosimetry
PPTX
RADIOLOGY PROTECTION.pptx
PPTX
Stereoscopic Imaging
PPTX
Computer Vision - cameras
PPT
9 Things you should know! Contrast Scans - MRI (or) CT
PDF
PPTX
Contrast media in CT
PDF
Career day, Become a Radiation Therapist
PPTX
SPECT SCAN
PPTX
Quality control for structural and functional MRI
PPTX
Immobilisation and stabilisation devices
PPTX
Radiology ppt
PPTX
CT Image reconstruction
PPT
Image quality in nuclear medicine
PPTX
MRI artifacts
PPTX
Icru reports in external beam radiotherapy
Shielding Design
Knee joint (Radiographic projection's)
Lec15: Medical Image Registration (Introduction)
Immobilization in Radiotherapy-Quality assurance
Brachytherapy dosimetry
RADIOLOGY PROTECTION.pptx
Stereoscopic Imaging
Computer Vision - cameras
9 Things you should know! Contrast Scans - MRI (or) CT
Contrast media in CT
Career day, Become a Radiation Therapist
SPECT SCAN
Quality control for structural and functional MRI
Immobilisation and stabilisation devices
Radiology ppt
CT Image reconstruction
Image quality in nuclear medicine
MRI artifacts
Icru reports in external beam radiotherapy
Ad

Viewers also liked (17)

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

Similar to Median filter Implementation using TMS320C6745 (20)

PPT
DIGITAL SIGNAL PROCESSOR OVERVIEW
PDF
iRiS brochure_v0.2_150126
PPTX
An Introduction to Deep Learning with Apache MXNet (November 2017)
PPT
Future Technology Center Project
PDF
Optec Brochure
PPT
Chapter1
PPTX
RTASC Lite - Real Time Audio System Check Lite
PDF
“Designing the Next Ultra-Low-Power Always-On Solution,” a Presentation from ...
PPT
Digital Radiography
PPTX
Digital Signal Processing
PPTX
Becoming a kinect hacker innovator v2
PDF
CantataCS
PPTX
Surveillance
PDF
Mk ind-dental booklet-v01-fn-en
PDF
Scientech trainer kit catalog
PPTX
Gettingstartedwithmatlabimageprocessing
PDF
Prestentation
PDF
Scaner vidar
DIGITAL SIGNAL PROCESSOR OVERVIEW
iRiS brochure_v0.2_150126
An Introduction to Deep Learning with Apache MXNet (November 2017)
Future Technology Center Project
Optec Brochure
Chapter1
RTASC Lite - Real Time Audio System Check Lite
“Designing the Next Ultra-Low-Power Always-On Solution,” a Presentation from ...
Digital Radiography
Digital Signal Processing
Becoming a kinect hacker innovator v2
CantataCS
Surveillance
Mk ind-dental booklet-v01-fn-en
Scientech trainer kit catalog
Gettingstartedwithmatlabimageprocessing
Prestentation
Scaner vidar

More from Pantech ProLabs India Pvt Ltd (20)

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

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Institutional Correction lecture only . . .
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Cell Types and Its function , kingdom of life
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Anesthesia in Laparoscopic Surgery in India
O7-L3 Supply Chain Operations - ICLT Program
Renaissance Architecture: A Journey from Faith to Humanism
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
TR - Agricultural Crops Production NC III.pdf
PPH.pptx obstetrics and gynecology in nursing
VCE English Exam - Section C Student Revision Booklet
STATICS OF THE RIGID BODIES Hibbelers.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Institutional Correction lecture only . . .
Pharmacology of Heart Failure /Pharmacotherapy of CHF
GDM (1) (1).pptx small presentation for students
Microbial diseases, their pathogenesis and prophylaxis
Complications of Minimal Access Surgery at WLH
Cell Types and Its function , kingdom of life
Microbial disease of the cardiovascular and lymphatic systems
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
O5-L3 Freight Transport Ops (International) V1.pdf

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?