Digital Image Processing, 2nd ed. 닄꒭뎹 뱶릳쇙귬CSIE/ycliaw/DIP/05_Image_Restoration.pdf ·...

Post on 10-Jul-2020

7 views 0 download

Transcript of Digital Image Processing, 2nd ed. 닄꒭뎹 뱶릳쇙귬CSIE/ycliaw/DIP/05_Image_Restoration.pdf ·...

1

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.1 5.1 影像衰減與復原模型影像衰減與復原模型

5.2 5.2 雜訊模型雜訊模型

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法

5.5 5.5 線性位置不變性衰減線性位置不變性衰減

5.6 5.6 衰減函式預測衰減函式預測

第五章第五章 影像還原影像還原

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.7 5.7 反向濾波反向濾波

5.8 5.8 最小均方差最小均方差(Wiener)(Wiener)濾波濾波5.9 5.9 限制最小平方濾波限制最小平方濾波

5.10 5.10 幾何平均濾波器幾何平均濾波器

5.11 5.11 幾何轉換幾何轉換

第五章第五章 影像還原影像還原

2

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.1 5.1 影像衰減與復原模型影像衰減與復原模型

空間域衰減與復原模型空間域衰減與復原模型

( ) ( ) ( ) ( ) ( )1-5.1 ,,*,, yxyxfyxhyxg η+=

( ) ( ) ( ) ( ) ( )2-5.1 ,,,, vuNvuFvuHvuG +=

頻域衰減與復原模型頻域衰減與復原模型

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型

雜訊來源雜訊來源影像擷取過程影像擷取過程

例如:CCD會受亮度(入光量)及溫度影響

影像傳輸過程影像傳輸過程電磁干擾 , 大氣干擾

3

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.1 5.2.1 雜訊的空間及頻率特性雜訊的空間及頻率特性

白雜訊白雜訊((White Noise)White Noise)雜訊的傅利葉雜訊的傅利葉頻譜為固定數頻譜為固定數

僅討論與空間座標無關的雜訊僅討論與空間座標無關的雜訊

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Gaussian Gaussian NoiseNoise機率密度函式機率密度函式

( )( )

( )1-5.2 21 2

2

2σµ

σπ

−−

=z

ezp

4

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

RayleighRayleigh Noise Noise機率密度函式機率密度函式

( ) ( ) ( )( )2-5.2

for 0

for 2 2

<

≥−=−−

az

azeazbzp

baz

( )3-5.2 4/ba πµ +=

( ) ( )4-5.2 4

42 πσ −=

b

5

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

ErlangErlang(Gamma) Noise(Gamma) Noise機率密度函式機率密度函式

( ) ( ) ( )5-5.2 0for 0

0for !1

1

<

≥−=

−−

z

zeb

zazp

azbb

( )6-5.2 ab

( )7-5.2 22

ab

6

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Exponential NoiseExponential Noise機率密度函式機率密度函式

( ) ( )8-5.2 0for 00for

<≥

=−

zzae

zpaz

( )9-5.2 1a

( )10-5.2 12

2

a=σ

7

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Uniform NoiseUniform Noise機率密度函式機率密度函式

( ) ( )11-5.2 otherwise 0

if 1

≤≤

−= bzaabzp

( )12-5.2 2

ba +=µ

( ) ( )13-5.2 12

22 ab −=σ

8

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Impulse (salt-and-pepper) NoiseImpulse (salt-and-pepper) Noise機率密度函式機率密度函式

( ) ( )14-5.2 otherwise 0for for

==

= bzPazP

zp b

a

( )12-5.2 2

ba +=µ

( ) ( )13-5.2 12

22 ab −=σ

9

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.2 5.2.2 幾個重要的雜訊機率密度函式幾個重要的雜訊機率密度函式

10

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

11

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.3 5.2.3 週期性雜訊週期性雜訊

成因成因擷取影像時受電機或電磁干擾擷取影像時受電機或電磁干擾

本章中唯一一個與空間相關的例子本章中唯一一個與空間相關的例子

通常可經由頻域濾波方法降低通常可經由頻域濾波方法降低

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.3 5.2.3 週期性雜訊週期性雜訊

影像受到正弦波干擾

12

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.3 5.2.3 週期性雜訊週期性雜訊

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.2 5.2 雜訊模型雜訊模型5.2.4 5.2.4 雜訊參數之估算雜訊參數之估算

如何得知影像雜訊參數如何得知影像雜訊參數由感測器規格得知由感測器規格得知

由影像像素分佈情形估算由影像像素分佈情形估算

( ) ( )15-5.2 ∑∈

=Sz

iii

zpzµ

( ) ( ) ( )16-5.2 22 ∑∈

−=Sz

iii

zpz µσ

z是像素值, p(z)是正規化後histogram的值

13

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

例子例子圖圖5.45.4計算後的結果計算後的結果

5.2 5.2 雜訊模型雜訊模型5.2.4 5.2.4 雜訊參數之估算雜訊參數之估算

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

假設造成影像衰減的唯一因素是雜訊假設造成影像衰減的唯一因素是雜訊

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法

( ) ( ) ( ) ( )2-5.3 ,,, vuNvuFvuG +=

且且

不知道雜訊公式不知道雜訊公式, , 無法去除雜訊無法去除雜訊

( ) ( ) ( ) ( )1-5.3 ,,, yxyxfyxg η+=

5.1-25.1-2變成變成

14

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法

一個例外的情形一個例外的情形週期性雜訊的週期性雜訊的 N(u,v)N(u,v)可由可由G(u,v)G(u,v)估算出來估算出來

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

通常無法很容易估算出通常無法很容易估算出 N(u,v)N(u,v)

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法

使用空間濾波器使用空間濾波器

15

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.15.3.1平均濾波器平均濾波器((Mean Filters)Mean Filters)

算術平均濾波器算術平均濾波器((Arithmetic mean filter)Arithmetic mean filter)

( ) ( )( )

( )3-5.3 ,1,ˆ,,

∑∈

=yxSts

tsgmn

yxf

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.15.3.1平均濾波器平均濾波器((Mean Filters)Mean Filters)

幾何平均濾波器幾何平均濾波器((Geometric mean filter)Geometric mean filter)

( ) ( )( )

( )4-5.3 ,,ˆmn1

, ,

= ∏

∈ yxSts

tsgyxf

16

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.15.3.1平均濾波器平均濾波器((Mean Filters)Mean Filters)

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.15.3.1平均濾波器平均濾波器((Mean Filters)Mean Filters)

調和平均濾波器調和平均濾波器((Harmonic mean filter)Harmonic mean filter)

( )

( )( )

( )5-5.3

,1,ˆ

,,∑∈

=

yxSts tsg

mnyxf

17

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.15.3.1平均濾波器平均濾波器((Mean Filters)Mean Filters)

反調和平均濾波器反調和平均濾波器((ContraharmonicContraharmonic mean meanfilter)filter)

( )( )

( )

( )( )

( )6-5.3 ,

,,ˆ

,

,

,

,

1

+

=

yx

yx

Sts

QSts

Q

tsg

tsgyxf

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.15.3.1平均濾波器平均濾波器((Mean Filters)Mean Filters)

18

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.15.3.1平均濾波器平均濾波器((Mean Filters)Mean Filters)

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.2 5.3.2 統計次序統計次序濾波器濾波器((Order-StatisticsOrder-Statistics Filters) Filters)

中間值濾波器中間值濾波器((MedianMedian filter) filter)

( )( )

( ){ } ( )7-5.3 ,,ˆ ,

tsgmedianyxfxySts ∈

=

13 28 3315 76 3217 30 42

={13,15,17,28,30,32,33,42,76}

median{13,15,17,28,30,32,33,42,76}=30

19

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.2 5.3.2 順序統計順序統計濾波器濾波器((Order-StatisticsOrder-Statistics Filters) Filters)

最大值濾波器最大值濾波器((MaxMax filter) filter)

( )( )

( ){ } ( )8-5.3 ,max,ˆ ,

tsgyxfxySts ∈

=

13 28 3315 76 3217 30 42

={13,15,17,28,30,32,33,42,76}

max{13,15,17,28,30,32,33,42,76}=76

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.2 5.3.2 順序統計順序統計濾波器濾波器((Order-StatisticsOrder-Statistics Filters) Filters)

最小值濾波器最小值濾波器((MinMin filter) filter)

( )( )

( ){ } ( )9-5.3 ,min,ˆ ,

tsgyxfxySts ∈

=

13 28 3315 76 3217 30 42

={13,15,17,28,30,32,33,42,76}

min{13,15,17,28,30,32,33,42,76}=13

20

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.2 5.3.2 順序統計順序統計濾波器濾波器((Order-StatisticsOrder-Statistics Filters) Filters)

中點濾波器中點濾波器((MidpointMidpoint filter) filter)

( )( )

( ){ }( )

( ){ } ( )10-5.3 ,min,max21,ˆ

, ,

+=

∈∈tsgtsgyxf

xyxy StsSts

13 28 3315 76 3217 30 42

={13,15,17,28,30,32,33,42,76}

min{13,15,17,28,30,32,33,42,76}=(76+13)/2=44.5

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.2 5.3.2 順序統計順序統計濾波器濾波器((Order-StatisticsOrder-Statistics Filters) Filters)

AlphaAlpha刪減平均刪減平均濾波器濾波器((Alpha-trimmed meanAlpha-trimmed mean filter) filter)

( ) ( )( )

( )11-5.3 ,1,ˆ ,∑∈−

=xySts

r tsgdmn

yxf

13 28 3315 76 3217 30 42

={13,15,17,28,30,32,33,42,76}

if d is 2

砍掉最大的d個及最小的d個值,剩下的做平均

{13,15,17,28,30,32,33,42,76}=26

21

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.2 5.3.2 順序統計順序統計濾波器濾波器((Order-StatisticsOrder-Statistics Filters) Filters)

Example for Median FilterExample for Median Filter

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.2 5.3.2 順序統計順序統計濾波器濾波器((Order-StatisticsOrder-Statistics Filters) Filters)

Example for Max and Min FiltersExample for Max and Min Filters

22

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.3 5.3.3 適應性適應性濾波器濾波器((AdaptiveAdaptive Filters) Filters)

適應性區域雜訊削減適應性區域雜訊削減濾波器濾波器((Adaptive, local noise reduction filter)Adaptive, local noise reduction filter)

1.1.假如雜訊變異數為假如雜訊變異數為00則則 f(x,y) f(x,y)等於等於 g(x,y) g(x,y)

2.2.區域變異數遠大於雜訊變異數區域變異數遠大於雜訊變異數,,則傳回接近則傳回接近 g(x,y) g(x,y)的值的值區域變異數很大的影像區塊通常是邊綠區域變異數很大的影像區塊通常是邊綠

3.3.假如假如區域變異數區域變異數與與雜訊變異數雜訊變異數差不多差不多

則傳回算術平均值則傳回算術平均值

23

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

( ) ( ) ( )[ ] ( )12-5.3 ,,,ˆ2

2

LL

myxgyxgyxf −−=σση

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.3 5.3.3 適應性適應性濾波器濾波器((AdaptiveAdaptive Filters) Filters)

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.3 5.3.3 適應性適應性濾波器濾波器((AdaptiveAdaptive Filters) Filters)

24

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.3 5.3.3 適應性適應性濾波器濾波器((AdaptiveAdaptive Filters) Filters)

適應性中間值適應性中間值濾波器濾波器 ((Adaptive median filter)Adaptive median filter)

不是最小及最大值

不是最小及最大值

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.3 5.3 雜訊影像復原雜訊影像復原 - - 使用空間域濾波方法使用空間域濾波方法5.3.3 5.3.3 適應性適應性濾波器濾波器((AdaptiveAdaptive Filters) Filters)

25

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

An ideal bandreject filterAn ideal bandreject filter

( )

( )

( )

( )

( )1-5.4

2

, if 12

,2

if 0

2

, if 1

,

0

00

0

+>

+<≤−

−<

=

WDvuD

WDvuDWD

WDvuD

vuH

D0代表Band圓心, w代表Band寬度

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

26

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

ButterworthButterworth

( )( )( )

( )2-5.4

,,1

1, 2

20

2

n

DvuDWvuD

vuH

+

=

with Order 1

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

GaussianGaussian

( )( )( ) ( )3-5.4 1,

220

2

,,

21

−−

−= WvuDDvuD

evuH

27

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

Image with sinusoidal noise

••An ExampleAn Example

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

Spectrum

28

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

Filter

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

Filtered Image

29

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Image with sinusoidal noise Filtered Image

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.1 Bandreject Filters5.4.1 Bandreject Filters

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.2 Bandpass Filters5.4.2 Bandpass Filters

( ) ( ) ( )4-5.4 ,1, vuHvuH brbp −=

30

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

An ideal notch filterAn ideal notch filter

( ) ( ) ( ) ( )5-5.4 otherwise 1

,or , if 0, 0201

≤≤

=DvuDDvuD

vuH

( ) ( ) ( )[ ] ( )6-5.4 22, 20

201 vBvuMuvuD −−+−−=

( ) ( ) ( )[ ] ( )7-5.4 22, 20

202 vBvuMuvuD −−+−−=

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

31

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

Butterworth filterButterworth filter

( )

( ) ( )

( )8-5.4

,,1

1,

21

20

n

vuDvuDD

vuH

+

=

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

GaussianGaussian

( )( ) ( )

( )9-5.4 1,20

21 ,,21

−= DvuDvuD

evuH

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

32

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

( ) ( ) ( )10-5.4 ,1, vuHvuH nrnp −=

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

反向過濾器反向過濾器

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

Image with noise

••An ExampleAn Example

33

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

Spectrum

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

Filter

34

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

Filtered Image

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Filtered ImageImage with noise

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

35

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Noise Image

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.3 Notch Filters5.4.3 Notch Filters

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

雜訊通常含多個干擾成分雜訊通常含多個干擾成分

Mariner 6 太空梭拍攝 Spectrum

36

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

雜訊公式雜訊公式

( ) ( ) ( ) ( )11-5.4 , u,vGu,vHvuN =Frequency Domain

( ) ( ) ( ){ } ( )12-5.4 , 1 u,vGu,vHyx −ℑ=η

Spacial Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

去除雜訊去除雜訊

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

雜訊未知?

( ) ( ) ( ) ( ) ( )13-5.4 ,ˆ x,yηx,ywx,ygyxf −=

加入Weighting function w(x,y) 雜訊處w(x,y)大否則w(x,y)小

( ) ( ) ( )x,yηx,ygyxf −=,ˆ

雜訊

37

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

使用區域統計資訊決定w(x,y)值

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

( ) ( )( ) ( ) ( ) ( )14-5.4 ,ˆ,ˆ1212

1,2

2 yxftysxfba

yxa

as

b

bt∑∑−= −=

−++

++=σ

變異數

( ) ( )( ) ( ) ( )∑∑−= −=

++++

=a

as

b

bttysxf

bayxf 15-5.4 ,ˆ

12121,ˆ

去除雜訊目的在將變異數最小化

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

( ) ( ) ( ) ( ) ( )13-5.4 ,ˆ x,yηx,ywx,ygyxf −=

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

( ) ( )( ) ( ) ( ) ( )14-5.4 ,ˆ,ˆ1212

1,2

2 yxftysxfba

yxa

as

b

bt∑∑−= −=

−++

++=σ

( ) ( )( ) ( )[{

( ) ( )] ( )( ) ( ) ( )[ ]}2

2

,,,

16-5.4 ,,

,1212

1,

yxyxwyxg

tysxtysxw

tysxgba

yxa

as

b

bt

η

η

σ

−−

++++−

++++

= ∑∑−= −=

38

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

( ) ( ) ( ) ( ) ( )18-5.4 ,,,, yxyxwyxyxw ηη =

假設w(x,y)在區域內的值都一樣

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

( ) ( ) ( )17-5.4 , x,ywtysxw =++

( ) ( )( ) ( )[{

( ) ( )] ( )( ) ( ) ( )[ ]}2

2

,,,

19-5.4 ,,

,1212

1,

yxyxwyxg

tysxyxw

tysxgba

yxa

as

b

bt

η

η

σ

−−

++−

++++

= ∑∑−= −=

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

最小化變異數

( )( ) ( )20-5.4

yx,w 2

∂∂ x,yσ

( ) ( ) ( ) ( ) ( )( ) ( )

( )21-5.4 ,,

,,,yx,g, 22 yxyx

yxyxgyxyxwηη

ηη

−=

39

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

Spectrum

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

N(u,v) ( )yx,η

40

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.4 5.4 週期性雜訊削減週期性雜訊削減 - - 使用頻域濾波方法使用頻域濾波方法5.4.4 Optimum Notch Filters5.4.4 Optimum Notch Filters

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.5 5.5 線性位置不變性衰減線性位置不變性衰減

( ) ( )[ ] ( ) ( )1-5.5 yx,yx, η+= x,yfHg

輸入影像衰減公式

( ) ( )[ ] ( )[ ] ( )[ ] ( )2-5.5 a 2121 x,yfbHx,yfHx,ybfx,yafH +=+

線性(Linear)

假設雜訊為0

( ) ( )[ ] ( )[ ] ( )[ ] ( )3-5.5 2121 x,yfHx,yfHx,yfx,yfH +=+

相加性(Additivity)

( )[ ] ( )[ ] ( )4-5.5 11 x,yfaHx,yafH =

齊次性(Homogeneity)

41

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

( )[ ] ( ) ( )5-5.5 1 βαβα −−=−− ,yxg,yxfH

位置/空間不變性(Position/Space invariant)

5.5 5.5 線性位置不變性衰減線性位置不變性衰減

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.5 5.5 線性位置不變性衰減線性位置不變性衰減

連續函數之衰減模型

( ) ( ) ( ) ( )6-5.5 ,, ββαδβα ddα,yxfyxf −−= ∫ ∫∞

∞−

∞−

以脈衝函式表示f(x,y)

假設雜訊為0,則f(x,y)的衰減模型為

( ) ( ) ( ) ( )7-5.5 ,,

−−= ∫ ∫

∞−

∞−ββαδβα ddα,yxfHyxg

假設H是線性函式

( ) ( ) ( )[ ] ( )8-5.5 ,, ββαδβα ddα,yxfHyxg −−= ∫ ∫∞

∞−

∞−

42

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

因為f(α,β)與x,y無關

( ) ( ) ( )[ ] ( )9-5.5 ,, ββαδβα ddα,yxHfyxg −−= ∫ ∫∞

∞−

∞−

5.5 5.5 線性位置不變性衰減線性位置不變性衰減

( ) ( )[ ] ( )10-5.5 ,,, βαδβα −−= ,yxHyxh

將5.5-10代入5.5-9

( ) ( ) ( ) ( )11-5.5 ,, ββα ddαy,βx,α,hfyxg ∫ ∫∞

∞−

∞−=

h(x,α,y,β)稱為脈衝響應,代表H函示對單位1之脈衝的響應,通常也稱為點分佈函數(Point SpreadFunction;PSF)

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

若H具位置不變性

( )[ ] ( ) ( )12-5.5 ,, βαβαδ −−=−− yxhyxH

( ) ( ) ( ) ( )13-5.5 ,, ββα ddαβα,yxhfyxg −−= ∫ ∫∞

∞−

∞−

( ) ( ) ( ) ( )11-5.5 ,, ββα ddαy,βx,α,hfyxg ∫ ∫∞

∞−

∞−=

5.5 5.5 線性位置不變性衰減線性位置不變性衰減

43

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.5 5.5 線性位置不變性衰減線性位置不變性衰減

加入雜訊

( ) ( ) ( ) ( ) ( )15-5.5 , ,, yxddαβα,yxhfyxg ηββα +−−= ∫ ∫∞

∞−

∞−

( ) ( ) ( ) ( ) ( )14-5.5 , ,, yxddαβy,α,x,hfyxg ηββα += ∫ ∫∞

∞−

∞−

捲積表示法

( ) ( ) ( ) ( ) ( )16-5.5 ,,*,, yxyxfyxhyxg η+=

( ) ( ) ( ) ( ) ( )17-5.5 ,,,, vuNvuFvuHvuG +=

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.6 5.6 衰減函數之估算衰減函數之估算5.6.1 5.6.1 藉由觀察影像估算藉由觀察影像估算

( ) ( )( )

( )1-5.6 ,ˆ,,vuFvuGvuH

s

ss =

取得一張任意影像要如何估其衰減函數H

1.尋找影像中訊號較強的子影像

2.找出重建方法

3.假設雜訊很小,則

( )yxfs ,ˆ

( )yxgs ,

44

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.6 5.6 衰減函數之估算衰減函數之估算5.6.2 5.6.2 藉由實驗估算藉由實驗估算

1.建構與所要修正之影像相同的環境

2.取得衰減影像的脈衝響應

3.取得正確影像的脈衝響應

4.計算衰減函數

( )yxg ,

( )yxa ,

( ) ( ) ( )2-5.6 ,,A

vuGvuH =

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.6 5.6 衰減函數之估算衰減函數之估算5.6.2 5.6.2 藉由實驗估算藉由實驗估算

45

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.6 5.6 衰減函數之估算衰減函數之估算5.6.3 5.6.3 藉由模型化估算藉由模型化估算

大氣干擾模型 ( ) ( ) ( )3-5.6 ,6522 vukevuH +−=

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.6 5.6 衰減函數之估算衰減函數之估算5.6.3 5.6.3 藉由模型化估算藉由模型化估算

隨時間均勻移動之取像模型

( ) ( ) ( )[ ] ( )

( ) ( ) ( )

( ) ( )[ ] ( ) ( )

( ) ( ) ( )[ ] ( ) ( )

( ) ( ) ( ) ( )( )

( ) ( ) ( )( ) ( )

( ) ( ) ( )( ) ( )( ) ( ) ( ) ( )9-5.6 ,,,

8-5.6 ,

7-5.6 ,

,,

6-5.6 ,,

5-5.6 ,

,,

4-5.6 ,,

0

2

0

2

0

2

0

200

2

0 00

2

0 00

00

00

00

vuFvuHvuG

dtevuH

dtevuF

dtevuFvuG

dtdxdyetyytxxfvuG

dxdyedttyytxxf

dxdyeyxgvuG

dttyytxxfyxg

T tvytuxj

T tvytuxj

T tvytuxj

T vyuxj

vyuxjT

vyuxj

T

=

=

=

=

−−=

−−=

=

−−=

∫∫

∫ ∫ ∫

∫ ∫ ∫

∫ ∫∫

+−

+−

+−

+−∞

∞−

∞−

∞−

∞−

+−

∞−

∞−

+−

π

π

π

π

π

π

46

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.6 5.6 衰減函數之估算衰減函數之估算5.6.3 5.6.3 藉由模型化估算藉由模型化估算

假設只有x移動,x0(t)=at/T,且t=T時x位移量為a,則

( ) ( )

( ) ( )10-5.6 uasinuaT

,

0

2

0

2 0

uaj

T Tuatj

T tuxj

e

dte

dtevuH

π

π

π

ππ

=

=

=

∫∫

假設y也移動,y0(t)=bt/T,且t=T時y位移量為b,則

( ) ( ) ( )( ) ( ) ( )11-5.6 sinT, vbuajevbuavbua

vuH +−++

= πππ

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.6 5.6 衰減函數之估算衰減函數之估算5.6.3 5.6.3 藉由模型化估算藉由模型化估算

47

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.7 5.7 反向濾波反向濾波

( ) ( )( ) ( )1-5.7

,,,ˆvuHvuGvuF =

取得衰減函數H後,如何重建影像

( ) ( ) ( )( ) ( )2-5.7

,,,,ˆvuHvuNvuFvuF +=

如果H(u,v)的值很小,則N(u,v)會導致影像變差,H(u,v)高頻部位通常很小,所以做反向濾波時,必須適度去除H(u,v)高頻部位,才能有效改善影像品質

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.7 5.7 反向濾波反向濾波

( ) ( ) ( )( ) 6522 22, NvMukevuH −+−−=

大氣干擾的例子

a.使用所有H(u,v)b.半徑40c.半徑70d.半徑85

48

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.8 5.8 最小均方差最小均方差(Wiener)(Wiener)濾波濾波

( ){ } ( )1-5.8 ˆ 22 ffEe −=

( ) ( ) ( )( ) ( ) ( )

( )

( )( ) ( ) ( )

( ) ( )

( )( )

( ) ( ) ( )( )u,v G

u,vSu,vSu,vH

u,vHvuH

u,v Gu,vSu,vSu,vH

u,vH

u,v Gu,vSu,vHu,vS

u,vSu,vH*u,vF

f

f

ηf

f

+=

+=

+=

η

η

2

2

2

2

,1

2-5.8 *

ˆ

( ) ( )( )

( )( ) ( )3-5.8

,1ˆ

2

2

u,v GKu,vH

u,vHvuH

u,vF

+=

針對白雜訊針對白雜訊

必須自行尋找最佳的必須自行尋找最佳的KK值值

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.8 5.8 最小均方差最小均方差(Wiener)(Wiener)濾波濾波

KK值最好的情況值最好的情況

49

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.8 5.8 最小均方差最小均方差(Wiener)(Wiener)濾波濾波

KK值最好的情況值最好的情況

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.9 5.9 限制最小平方濾波限制最小平方濾波

50

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.9 5.9 限制最小平方濾波限制最小平方濾波

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.9 5.9 限制最小平方濾波限制最小平方濾波

51

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.10 5.10 幾何平均濾波器幾何平均濾波器

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.11 5.11 幾何轉換幾何轉換5.11.1 5.11.1 空間轉換空間轉換

幾何失真(Geometric distortion)

( ) ( )( ) ( )( ) ( )2-5.11 ,'

1-5.11 ,'',',

yxsyyxrx

yxgyxf

==

52

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.11 5.11 幾何轉換幾何轉換5.11.1 5.11.1 空間轉換空間轉換

修復方法使用Tiepoints及bilinear equations

( ) ( )( ) ( )

( )( )6-5.11 '

5-5.11 '4-5.11 ,3-5.11 ,

8765

4321

8765

4321

cxycycxcycxycycxcx

cxycycxcyxscxycycxcyxr

+++=+++=

+++=+++=

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.11 5.11 幾何轉換幾何轉換5.11.2 5.11.2 灰階值內插法灰階值內插法

最鄰近點(Nearest neighbor)

Bilinear interpolation

( ) ( )7-5.11 , dyxcybxayxv +′′+′+′=′′

Cubic Convolution

53

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.11 5.11 幾何轉換幾何轉換5.11.2 5.11.2 灰階值內插法灰階值內插法

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

5.11 5.11 幾何轉換幾何轉換5.11.2 5.11.2 灰階值內插法灰階值內插法