chapter 2-part3- enhancement by mask

6
1/21/2009 1 C ha pter 2 : E nh a nc e m e nt P art : E nhance m e nt by Ma sk Dr. Hojeij youssef Di g i ta l i m a g e proce s si ng 1 C onv olution : e a ch pixe l i s re pl a ce d by the w e i g ht va l ue s of i ts ne i gh bor hood pi x els . t hat i s : Whe re u &v a rethew e i g htof theus i ngm a sk(fil te r) F i l te ring b y c on v ol u tion Dr. Hojeij youssef 2 u v ' ' ) v  , u (  filter ) v  j  , u i (  I )  j  , i (  I )  j  , i (  filtre )  j  , i (  I )  j  , i (  I 

Upload: firas-abdel-nour

Post on 14-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

7/29/2019 Chapter 2-Part3- Enhancement by Mask

http://slidepdf.com/reader/full/chapter-2-part3-enhancement-by-mask 1/6

1/21/20

Chapter 2 :Enhancement

Part : Enhancement by Mask

Dr. Hojeij youssef 

Digital image processing

1

Convolution : each pixel is replaced by the weight values of its neighborhoodpixels . that is :

Whereu &v aretheweight of theusing mask(filter)

Filtering by convolution

Dr. Hojeij youssef 2

u v

)v ,u( filter )v j ,ui( I ) j ,i( I 

) j ,i( filtre) j ,i( I ) j ,i( I 

7/29/2019 Chapter 2-Part3- Enhancement by Mask

http://slidepdf.com/reader/full/chapter-2-part3-enhancement-by-mask 2/6

1/21/20

Smoothing filter : Here each pixel is replaced by the weight averaging of its

neighborhood pixels

Only the low frequency range past

 Thereis many size of averaging filter :3×3, 5×5, 7×7, …

Averaging filtering

Dr. Hojeij youssef 3

0 0 0

0 0.11 0

0 0 0

1 1 1

1 1 1

1 1 1

TF1/9×

S.F :3×3 S.F : 5×5OrigineImage

Gaussian filter :

σ Small then limited smoothing σ large then more smoothing

Averaging filtering

Dr. Hojeij youssef 4

222

22 /  y xexp

2

1) y , x( filter   

 

1 2 2 2 1

2 7 11 7 2

3 11 17 1 1 3

2 7 11 7 2

1 2 3 2 1

1 1 1 2 2 2 2 2 1 1 1

1 2 2 3 4 4 4 3 2 2 1

1 2 4 5 6 7 6 5 4 2 1

2 3 5 7 8 9 8 7 5 3 2

2 4 6 8 10 11 10 8 6 4 2

2 4 7 9 11 12 11 9 7 4 2

2 4 6 8 10 11 10 8 6 4 2

2 3 5 7 8 9 8 7 5 3 2

1 1 4 5 6 7 6 5 4 2 1

1 2 2 3 4 4 4 3 2 2 1

1 1 1 2 2 2 2 2 1 1 1

σ=0.625 (5×5) σ=1.6 (11×11)

7/29/2019 Chapter 2-Part3- Enhancement by Mask

http://slidepdf.com/reader/full/chapter-2-part3-enhancement-by-mask 3/6

1/21/20

Exponential filter:

σ Small then limited smoothing σ large then more smoothing

Averaging filtering

Dr. Hojeij youssef 5

) y x(exp4

) y , x( filter 2

  

Directional smoothing : to protect the edges fromblurring while smoothing.A directional filter can be useful. Spatial averagefilter(i,j: ө ) are calculateinserval direction as :

Averaging filtering

Dr. Hojeij youssef 6

)v ,u( W 

)v j ,ui( I  N 

1): j ,i( I ˆ 

  

 u

v

ө

0W 

7/29/2019 Chapter 2-Part3- Enhancement by Mask

http://slidepdf.com/reader/full/chapter-2-part3-enhancement-by-mask 4/6

1/21/20

Median filtering : Here the input pixel is replaced by the median of the pixels

contained in the windows around the pixel that is :

WhereW is thesuitablychosenwindowsthealgorithmformedianfilteringrequiresarrangingthepixel valuesin thewindowsfor increasingordecreasingorder andpickingthemiddlevalue. Generallythewindowssizeischoosingsowthat N w isodd. if N w is eventhenthemedian is takenastheaverageof thetwo values in themiddle

Median Filtering

Dr. Hojeij youssef 7

W )v ,u(),v j ,ui( I median) j ,i( I ̂ 

Low degreeof intensitynoise

3×3 median filtering 5×5 median filtering

Examples :

Dr. Hojeij youssef 8

Noisy Image 3×3 median filter 3×3 averaging filter 

Noisy Image 3×3 Gaussian filter 3×3 median filter 3×3 averaging

7/29/2019 Chapter 2-Part3- Enhancement by Mask

http://slidepdf.com/reader/full/chapter-2-part3-enhancement-by-mask 5/6

1/21/20

Zero interlace→ Convolve

Zoom

Dr. Hojeij youssef 9

6 54

231

000000

06 0504

000000

020301

6 6 5544

6 6 5544

223311

223311

ZeroInterlace

Convolve

Zero interlace→ Rows and columns interpolate

Zoom

Dr. Hojeij youssef 10

54

31

0000

0504

0000

0301

0000

5.255.34

0000

5.1321

ZeroInterlace

Interpolaterows

25.15.275.12

5.255.34

2475.25.2

5.1321

InterpolateColumns

7/29/2019 Chapter 2-Part3- Enhancement by Mask

http://slidepdf.com/reader/full/chapter-2-part3-enhancement-by-mask 6/6

1/21/20

Inadditionto therequirementof monochromeimageenhancement,color

imageenhancement manyrequireimprovement of color balanceor colorcontract in acolor image. Enhancement of color imagesbecomesamoredifficult task not only becauseof added dimensionsof thedatabut alsodueto theaddedcomplexity of color perception. A practical approachtodevelopingcolor imageenhancementalgorithmsisshownbelow

Color image enhancement

Dr. Hojeij youssef 11

An ideal high-pass filter is1in which its frequency response is given by :

• r(u,v) is theradial f requency  thedistancefromtheorigin to thepoint(u,v) 

Gaussian Filtering

Dr. Hojeij youssef 12

else0

 B)v ,u(r 1)v ,u( H 

22 vu)v ,u(r 

tetancons positiveais B

022

022

 Rvu0

 Rvu1)v ,u( H