Smoothing In image processing literature, the weighting averaging - - PowerPoint PPT Presentation

smoothing
SMART_READER_LITE
LIVE PREVIEW

Smoothing In image processing literature, the weighting averaging - - PowerPoint PPT Presentation

IIT Bombay Slide 25 Smoothing In image processing literature, the weighting averaging operation is referred to as image smoothing By smoothing, it is implied that local


slide-1
SLIDE 1

Smoothing

  • In image processing literature, the weighting averaging
  • peration is referred to as image smoothing
  • By smoothing, it is implied that local differences between

pixels are reduced

  • For simplicity, images are often filtered using the same
  • perator throughout, implying shift-invariance
  • Most image display adaptors, have hardware convolvers

built in to perform 3x3 convolutions in real-time.

  • Shift-variant filtering is chosen when local information is

to be preserved. IIT Bombay Slide 25 GNR607 Lecture 13-16 B. Krishna Mohan

slide-2
SLIDE 2

Original Image

IIT Bombay Slide 26 GNR607 Lecture 13-16 B. Krishna Mohan

slide-3
SLIDE 3

3x3 averaging

IIT Bombay Slide 27 GNR607 Lecture 13-16 B. Krishna Mohan

slide-4
SLIDE 4

Gaussian smoothing

  • Gaussian filter: linear smoothing
  • weight matrix

for all where W: one or two σ from center

) ( 2 1

2 2 2

) , (

σ c r

ke c r w

+ −

=

, ) , ( W c r ∈

∈ + −

=

W c r c r

e k

) , ( ) ( 2 1

2 2 2

1

σ

IIT Bombay Slide 28 GNR607 Lecture 13-16 B. Krishna Mohan

slide-5
SLIDE 5

Gaussian smoothing

  • Use of Gaussian filter: Specify size of neighborhood

size, and given value of σ, determine filter coefficients by varying r,c in the range [–W/2 +W/2]

  • Alternatively, given value of σ, find the size of the

neighbourhood from 3 σ limits

  • About 99% of the Gaussian distribution is covered within

the range mean±3 3 σ

  • r,c vary in the range = [-3 σ +3 σ]
  • For example, if σ = 1, then the range is [-3 3], i.e., the

size of neighbourhood is 7x7 IIT Bombay Slide 28a GNR607 Lecture 13-16 B. Krishna Mohan

slide-6
SLIDE 6

IIT Bombay Slide 28b GNR607 Lecture 13-16 B. Krishna Mohan x p(x) µ−2σ µ−σ µ µ+σ µ+2σ

Gaussian curve

slide-7
SLIDE 7

Shift-Variant Filtering

  • When the filtering operation is required to

adapt to the local intensity variations then the filter coefficients should vary according to the position in the image.

  • Shift-variant filters can preserve the
  • bject boundaries better, while smoothing

the image

  • One example is the sigma filter

IIT Bombay Slide 29 GNR607 Lecture 13-16 B. Krishna Mohan

slide-8
SLIDE 8

Sigma filter

  • The underlying principle here is to take the subset of pixels

in the neighborhood whose gray levels lie within c.σ of the central pixel

  • hi,j,k,l = 0 if |fi-j,k=l – fij | > c.σij ; hi,j,k,l = 1 otherwise

σij is the local standard deviation of the gray levels within the neighborhood centred at pixel (i,j)

  • To save time, one can also use global std. dev.
  • c = 1 or 2 depending on the size of neighborhood

, , , , , l j w k i w i j i j k l i k j l k i w l j w

g h f

= + = + − − = − = −

= ∑ ∑

IIT Bombay Slide 30 GNR607 Lecture 13-16 B. Krishna Mohan

slide-9
SLIDE 9

Sigma Filter Algorithm

  • Consider neighborhood size, and value of c
  • Find the mean and standard deviation of the pixels within

the neighborhood

  • Find the neighbors of the central pixel whose gray levels

are within c.σ of the central pixel’s gray level

  • Compute the average of the pixels meeting the above

criterion

  • Replace the central pixel’s value by the average
  • This cannot be replaced by a convolution since the

filter response varies for each position in the image IIT Bombay Slide 31 GNR607 Lecture 13-16 B. Krishna Mohan

slide-10
SLIDE 10

Comments on Sigma Filter

  • Degradation of a smoothed image is due to blurring of
  • bject boundaries
  • Here boundaries are better preserved by limiting the

smoothing only to a homogeneous subset of pixels in the neighborhood

  • The selected subset comprises those pixels that have

similar intensities

  • Pixels with very different intensities are excluded by

making corresponding weights equal to 0 IIT Bombay Slide 31a GNR607 Lecture 13-16 B. Krishna Mohan

slide-11
SLIDE 11

Lee filter

Simple Lee filter

  • gij = fmean + k.(fij – fmean)
  • k varies between 0 and 2

k = 0, gij = fmean  simple averaging k = 1, gij = fij  no smoothing at all k = 2, gij = fij + (fij – fmean) Interpretation of (fij – fmean) ???

IIT Bombay Slide 32 GNR607 Lecture 13-16 B. Krishna Mohan

slide-12
SLIDE 12

Lee filter

IIT Bombay Slide 33 GNR607 Lecture 13-16 B. Krishna Mohan

  • a. Original

image

  • b. Wallis filter
  • c. K=2
  • d. K=3
  • e. K=0.5

f. K=0

slide-13
SLIDE 13

General form of Lee filter

  • The general form of Lee filter is given by
  • kij is given by
  • Greater noise, smaller kij, hence more smoothing

( )

ij mean ij ij mean

g f k f f = + −

2 2 2 2 ij ij mean v ij

k f σ σ σ = +

IIT Bombay Slide 34 GNR607 Lecture 13-16 B. Krishna Mohan