Mean and Median Filters - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Mean and Median Filters

Description:

Mean and Median Filters E9406011 Outline Introduction Mean Filter Median Filter Summary Demo Introduction ... – PowerPoint PPT presentation

Number of Views:220
Avg rating:3.0/5.0
Slides: 30
Provided by: 6649734
Category:

less

Transcript and Presenter's Notes

Title: Mean and Median Filters


1
Mean and Median Filters
  • ???????
  • ???????
  • ??E9406011

2
Outline
  • Introduction
  • Mean Filter
  • Median Filter
  • Summary
  • Demo

3
Introduction
  • ???????
  • ????????
  • ???(frequency domain) ???????? ?? (????,
    ??)

  • ??????????
  • ???(spatial domain) ??????? pixel value ???

?????????
g(x,y) T f(x,y) f(x,y) ?????? g(x,y)
???????? T -gt???????
4
Introduction
  • ???????( ??? g(x,y) T f(x,y) )

Original
Original
y
y



(x,y)
(x,y)
Image f(x,y)
Image g(x,y)
x
x
g(x,y) T f(x,y) f(x,y) ?????? g(x,y)
???????? T -gt???????
5
Outline
  • Introduction
  • Mean Filter
  • Median Filter
  • Summary
  • Demo

6
Mean Filter
  • The Mean Filter is used to
  • soften an image by averaging surrounding pixel
    values.

7
Mean Filter
Grayscale 3x3 pixel window
22 77 48
150 77 158
0 77 219
(x,y)
Center pixel ( 22 77 48 150 77 158
0 77 219 ) / 9 92
8
Mean Filter
(a) ?????????? (b) ??????????? (c)
?????????? (d) ???????????
9
Mean Filter
  • ???


int x , y int a(n-1)/2 int
color(i) , color(x,y) for(int kx-a kltxa
k) for(int my-a mltya
m) color(x,y)color(k,m) color(i)co
lor(x, y)/nn)
10
Mean Filter
  • ITK


Header file included include
itkMeanImageFilter.h Using Typedef
ItkMeanImageFilter lt
InputImageType, OutputImageType gt FilterType
FilterTypePointer filter
FilterTypeNew(() InputImageTypeSizeType
indexRadius indexRadius0 1 // radius
along x 1-gt 2D 2-gt 35 indexRadius1 1
// radius along y Rx 2 1 2 1
1 3 Rx ?? x ?????, 1 ????? Ry 2 1
2 1 1 3 Ry ?? y ?????, 1 ?????
11
Mean Filter
Mean
Source
12
Mean Filter
Source
Mean
13
Outline
  • Introduction
  • Mean Filter
  • Median Filter
  • Summary
  • Demo

14
Median Filter
  • The Median filter is used to
  • remove noise from an image
  • by replacing pixels with the middle pixel
    value selected from a certain window size.

15
Median Filter
Grayscale 3x3 pixel window
22 77 48
150 77 158
0 77 219
(x,y)
0, 22, 48, 77, 77 , 77, 150, 158, 219
16
Median Filter
(a) ?????????? (b) ??????????? (c)
?????????? (d) ???????????
17
Median Filter
  • ???

int x , y int z0 int a(n-1)/2 int color(i)
int array new int nxn-1 for(int kx-a
kltxa k) for(int my-a mltya
m) array zcolor(k,m) z sort(ar
ray) color(i)median(array )
18
Median Filter
  • ITK


Header file included include
itkMedianImageFilter.h Using Typedef
ItkMedianImageFilter lt
InputImageType, OutputImageType gt FilterType
FilterTypePointer filter
FilterTypeNew(() InputImageTypeSizeType
indexRadius indexRadius0 1 // radius
along x 1-gt 2D 2-gt 35 indexRadius1 1
// radius along y
19
Median Filter
33 median filtering
Source
20
Median Filter
Source
33 median filtering
99 median filtering
21
Outline
  • Introduction
  • Mean Filter
  • Median Filter
  • Summary
  • Demo

22
Summary
  • Mean filter and Median filter??? - 1

23
Summary
  • Mean filter and Median filter??? - 2

Mean filter
Median filter
24
Summary
  • Mean filter and Median filter??? - 3

(c) ???????
25
Outline
  • Introduction
  • Mean Filter
  • Median Filter
  • Summary
  • Demo

26
Demo
27
Demo
28
????
  • ItkSoftwareGuide.pdf
  • http//www.cee.hw.ac.uk/hipr/html/mean.html
  • http//www.ntut.edu.tw/s9598008/homework1.htm
  • http//www.cc.ntut.edu.tw/s8410010/hw1.htm
  • ???,??????,??????(SIM 949)?
  • http//140.128.102.71/ ?????????????

29
  • ????
  • ????
Write a Comment
User Comments (0)
About PowerShow.com