CH03 Image+Enhancement+in+the+Spatial+Domain

42
Digital Image Processing, 2nd ed. 1 중중중중중 중중중중중중중 CH 3 Image Enhancement in the Spatial Domain 3.1 Background ) , ( of od neighborho some over defined , on operator an : image processed the : ) , ( image input the : ) , ( , ) , ( y x f T y x g y x f y x f T y x g

Transcript of CH03 Image+Enhancement+in+the+Spatial+Domain

Page 1: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

1 중앙대학교 첨단영상대학원

CH 3 Image Enhancement in the Spatial DomainCH 3 Image Enhancement in the Spatial Domain

3.1 Background3.1 Background

),( of odneighborho someover defined ,on operator an :

image processed the:),(

imageinput the:),(

,),(

yxfT

yxg

yxf

yxfTyxg

Page 2: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

2 중앙대학교 첨단영상대학원

Point ProcessingPoint Processing

)( odneighborho 11 rTs

Page 3: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

3 중앙대학교 첨단영상대학원

3.2 Gray Level Transformations3.2 Gray Level Transformations

Page 4: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

4 중앙대학교 첨단영상대학원

3.2.1 Image Negatives3.2.1 Image Negatives

rLs 1

Page 5: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

5 중앙대학교 첨단영상대학원

3.2.2 Log Transformations3.2.2 Log Transformations

rcs 1log

Page 6: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

6 중앙대학교 첨단영상대학원

3.2.3 Power-Law Transformation3.2.3 Power-Law Transformation

crs

Page 7: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

7 중앙대학교 첨단영상대학원

Gamma CorrectionGamma Correction

Page 8: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

8 중앙대학교 첨단영상대학원

Gamma Correction: Example 3.1Gamma Correction: Example 3.1

Page 9: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

9 중앙대학교 첨단영상대학원

Gamma Correction: Example 3.2Gamma Correction: Example 3.2

Page 10: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

10 중앙대학교 첨단영상대학원

3.2.4 Piecewise-Linear Transformation

Contrast Stretching

3.2.4 Piecewise-Linear Transformation

Contrast Stretching

Page 11: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

11 중앙대학교 첨단영상대학원

Gray-Level SlicingGray-Level Slicing

Page 12: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

12 중앙대학교 첨단영상대학원

Bit-Plane SlicingBit-Plane Slicing

Page 13: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

13 중앙대학교 첨단영상대학원

3.3 Histogram Processing

What is Histogram?

3.3 Histogram Processing

What is Histogram?

1,,1,0for

levelgray having image in the pixels ofnumber :

levelgray th - :

Histogram

Lk

rn

kr

nrh

kk

k

kk

1,,1,0for

levelgray having image in the pixels ofnumber :

levelgray th - :

image in the pixels ofnumber total:

Histogram Normalized

Lk

rn

kr

n

nnrp

kk

k

kk

Page 14: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

14 중앙대학교 첨단영상대학원

3.3.1 Histogram Equalization

Fundamental Assumptions on the Transformation

3.3.1 Histogram Equalization

Fundamental Assumptions on the Transformation

10 ,

:ation transforminverse The

10for ,10 ii

increasinglly monotonica valued,-single i

:on sassumption Two

10 ,

1

ssTr

rrT

rT

rrTs

Page 15: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

15 중앙대학교 첨단영상대학원

Histogram Equalization

The Continuous Case

Histogram Equalization

The Continuous Case

10 ,11

)(

functionation transformaConsider

,

y theory,probabilit elementaryan From

0

0

srp

rpds

drrpsp

rpdwwpdr

d

dr

rdT

dr

ds

dwwprTs

ds

drrpsp

rrrs

r

r

r

r

r

rs

Page 16: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

16 중앙대학교 첨단영상대학원

Histogram Equalization

The Discrete Case

Histogram Equalization

The Discrete Case

1,...,1,0 ,

1,...,1,0 ,

00

Lkn

nrprTs

Lkn

rrp

m

j

jk

jjrkk

kkr

Page 17: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

17 중앙대학교 첨단영상대학원

3.3.2 Histogram Matching (Specification)

Development of Method

3.3.2 Histogram Matching (Specification)

Development of Method

Page 18: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

18 중앙대학교 첨단영상대학원

Histogram Matching (Specification)

Implementation

Histogram Matching (Specification)

Implementation

Page 19: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

19 중앙대학교 첨단영상대학원

Chapter 3Chapter 3

Page 20: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

20 중앙대학교 첨단영상대학원

Chapter 3Chapter 3

Page 21: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

21 중앙대학교 첨단영상대학원

Chapter 3Chapter 3

Page 22: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

22 중앙대학교 첨단영상대학원

3.3.3 Local Enhancement3.3.3 Local Enhancement

Page 23: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

23 중앙대학교 첨단영상대학원

3.3.4 Use of Histogram Statisticsfor Image Enhancement

3.3.4 Use of Histogram Statisticsfor Image Enhancement

tsSts

StsS

StststsS

i

L

ii

L

iiii

nL

iin

jjr

rpmr

rprm

rrpmr

rprmrpmrn

rn

rrirp

Lr

xy

xyxt

xy

xy

,

2

),(,

2

,,,

21

0

22

10

1

0

1

0

varianceandmean Local

of variance

,0 and ,1 Since

where,

ofmoment th The

of occurrence ofy Probabilit of th value theof histogram normalized :

1,0

Page 24: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

24 중앙대학교 첨단영상대학원

otherwise,

and if,, 2100

yxf

DkDkMkmyxfEyxg GSGS xyxy

Page 25: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

25 중앙대학교 첨단영상대학원

3.4 Enhancement UsingArithmetic/Logic Operations

3.4 Enhancement UsingArithmetic/Logic Operations

Page 26: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

26 중앙대학교 첨단영상대학원

3.4.1 Image Subtraction3.4.1 Image Subtraction

Page 27: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

27 중앙대학교 첨단영상대학원

Image Subtraction: Mask Mode RadiographyImage Subtraction: Mask Mode Radiography

Page 28: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

28 중앙대학교 첨단영상대학원

3.4.2 Image Averaging3.4.2 Image Averaging

yxyx

yxyx

K

ii

K

KyxfyxE

yxgK

yx

yxyxfyxg

,,g

,2

,g2

1

1

1 and,,,g

,1

,g

eduncorrelat mean,-zero is where

,,,

Page 29: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

29 중앙대학교 첨단영상대학원

Page 30: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

30 중앙대학교 첨단영상대학원

3.5 Basics of Spatial Filtering3.5 Basics of Spatial Filtering

a

s

b

bt

tysxftswyxg

yxfwyxfwyxfw

yxfwyxfwR

1

,,,

1,11,1,10,1,0,0

,10,11,11,1

mn

iiimnmn zwzwzwR

111

Page 31: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

31 중앙대학교 첨단영상대학원

mn

iiimnmn zwzwzwR

111

Page 32: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

32 중앙대학교 첨단영상대학원

3.6 Smoothing Spatial Filters

3.6.1 Smoothing Linear Filters

3.6 Smoothing Spatial Filters

3.6.1 Smoothing Linear Filters

a

as

b

bt

a

as

b

bt

ii

tsw

tysxftswyxg

zR

,

,,,

9

1 9

1

Page 33: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

33 중앙대학교 첨단영상대학원

Averaging Filter: Hubble ImageAveraging Filter: Hubble Image

Page 34: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

34 중앙대학교 첨단영상대학원

3.6.2 Order Statistics Filters3.6.2 Order Statistics Filters

Page 35: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

35 중앙대학교 첨단영상대학원

3.7 Sharpening Spatial Filters

3.7.1 Foundation

3.7 Sharpening Spatial Filters

3.7.1 Foundation

121

derivativeorder -second 1D, The

1

derivativeorder -first 1D, The

2

2

xfxfxfx

f

xfxfx

f

Page 36: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

36 중앙대학교 첨단영상대학원

3.7.2 Second Derivatives: Laplacian3.7.2 Second Derivatives: Laplacian

),(4

)1,()1,(),1(),1(

)1,(),(2)1,(

),1(),(2),1(

Laplacian :derivativeorder -second 2D, The

2

2

2

2

2

2

2

2

22

yxf

yxfyxfyxfyxff

yxfyxfyxfy

f

yxfyxfyxfx

f

x

f

x

ff

Page 37: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

37 중앙대학교 첨단영상대학원

LaplacianLaplacian

positive iscenter theif),(),(

negative iscenter theif),(),(),(

2

2

yxfyxf

yxfyxfyxg

Page 38: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

38 중앙대학교 첨단영상대학원

Laplacian Enhancement: SimplificationLaplacian Enhancement: Simplification

)]1,()1,(

),1(),1([),(5

),(),(),( 2

yxfyxf

yxfyxfyxf

yxfyxfyxg

Page 39: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

39 중앙대학교 첨단영상대학원

Unsharp Masking and High-Boost FilteringUnsharp Masking and High-Boost Filtering

),(,,

filteringboost -High

),(,,

masking Unsharp

yxfyxAfyxf

yxfyxfyxf

hb

s

Page 40: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

40 중앙대학교 첨단영상대학원

3.7.3 First Derivatives: The Gradient3.7.3 First Derivatives: The Gradient

Page 41: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

41 중앙대학교 첨단영상대학원

3.8 Combining Spatial Enhancement Methods3.8 Combining Spatial Enhancement Methods

Page 42: CH03 Image+Enhancement+in+the+Spatial+Domain

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.

42 중앙대학교 첨단영상대학원

Homework #2• Problems in Chapter 3

– 3.2(a), 3.8, 3.22, 3.27