84
Chapter4 Image Enhancement Preview 4 1 General introduction and Classification 4.1 General introduction and Classification 4.2 Enhancement by Spatial Transforming(contrast enhancement) 4 3 Enhancement by Spatial Filtering (image smoothing) 4.3 Enhancement by Spatial Filtering (image smoothing) 4.4 Enhancement by Frequency Filtering (image sharpening) 4 5 Color Enhancement 4.5 Color Enhancement Summary Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang 1

Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

Chapter4 Image Enhancement

• Preview• 4 1 General introduction and Classification4.1 General introduction and Classification• 4.2 Enhancement by Spatial Transforming(contrast enhancement)• 4 3 Enhancement by Spatial Filtering (image smoothing)4.3 Enhancement by Spatial Filtering (image smoothing)• 4.4 Enhancement by Frequency Filtering (image sharpening)• 4 5 Color Enhancement• 4.5 Color Enhancement• Summary

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

1

Page 2: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4 1 G l I t d ti d Cl ifi ti4.1 General Introduction and Classification4 1 1 Purposes4.1.1 Purposes

• improve the visual effectsimprove the visual effects• easy to edge extracting

4.1.2 Methods

• spatial domain: point operations, local operationsp p p , p• frequency domain: DFT Filter IDFT

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

2

Page 3: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.1 General Introduction and Classification4.1.3 contents • contrast enhancement: linear transform• contrast enhancement: linear transform

non-linear transform,histogram equalizationg qhistogram matching local enhancement

i hi i k• image smoothing: averaging mask, order-statistics filterlowpass filterlowpass filter.

• image sharpening: derivatives, highpass filterg p

• color image enhancement: pseudo color processing, full color processing

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

3

Page 4: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Histogram

Histogram gives an estimate of the probability ofHistogram gives an estimate of the probability of the occurrence of gray levels

( ) / 0,1, , 1k kp s n n k L= = −

Where s is the the kth gray level and the n is the number ofWhere sk is the the kth gray level and the nk is the number ofPixels in the image having gray level sk

tlapparently1

( ) 1L

kp s−

=∑0

kk=∑

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

4

Page 5: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Histogram

H i t l i l l lHorizontal axis: gray level valuesVertical axis: probability of gray level values

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

5

Page 6: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Histogram

Hi t d i litHistograms and images quality

Dark image

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

6

Page 7: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Histogram

Hi t d i litHistograms and images quality

Bright image

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

7

Page 8: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Histogram

Hi t d i litHistograms and images quality

Low-contrast image

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

8

Page 9: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Histogram

Hi t d i litHistograms and images quality

Double-peaks image

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

9

Page 10: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Histogram

Hi t d i litHistograms and images quality

Equalized image

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

10

Page 11: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.1. Introduction: Classification

• Direct gray level transformationsg y• Histogram processing• Operations among images

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

11

Page 12: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations: Linear transformations

( )s T r ar b= = + [ , ] [ , ]r A B s C D∈ ∈

D C BC AD

Expression:

D C BC ADs rB A B A− −

= +− −

Formulation:

255

Example:C 0C=0 D=255

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

12

Page 13: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement

example: A= 69 B=213 C=0 D=255

4.2.2 Direct gray level transformations : Linear transformations

1 7 122 2s r= −example: A= 69, B=213, C=0, D=255 1.7 122.2s r=

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

13

Page 14: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Piecewise-linear transformations

[0, )c r r aa

⎧ ∈⎪Formulation:

[ , )

ad cs r c r a bb a

⎪⎪

−⎪= + ∈⎨ −⎪255 ( ) [ , 255)255

b ad r b d r bb

⎪−⎪ − + ∈⎪ −⎩

cd

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

14

Page 15: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Piecewise-linear transformations

( , ) (10,50), ( , ) (210,150)a c b d= =

Original image

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

15( , ) (50,10), ( , ) (150,210)a c b d= =

Page 16: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : image negatives

1s L r= − −Formulation:

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

16

Page 17: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Log transformations

l (1 )log(1 )s c r= +Formulation:

i t t d it ic is a constant and it is assumed that 0r ≥

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

17

Page 18: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Log transformations

Example: display of DFT spectrum

Direct display After log operation

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

18

Page 19: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Power transformations

s cr γFormulation: s cr γ=Formulation:

Where and are positive constants.γc

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

19

Page 20: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Power transformations

G tiGamma correction

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

20

Page 21: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Power transformations

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

21

Page 22: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Gray-lever slicing

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

22

Page 23: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

If a transform has the form:( )s T r= 0 1r≤ ≤

If a transform has the form:

We hope the Probability Density Function (PDF) of s isWe hope the Probability Density Function (PDF) of s is

( ) 1sp s = Inverse transform exist( )sp

satisfies the following conditions:( )T r

ve se s o e sand, 1 2 1 2if then r r s s< <

0 1r≤ ≤(a) is single-valued and monotonically in the interval (b) for 0 1r≤ ≤0 1s≤ ≤

s has the same range as the r

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

23

Page 24: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

24

Page 25: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

C ti diti( ) ( )s r

drp s p rds

=( )s T r=Continuous condition

( )( )

rp rdsdr p s

⎫= ⎪⎬ ( )

rs p x dx= ∫( )

( ) 1s

s

dr p sp s

⎬⎪= ⎭

0( )rs p x dx∫

namely0

( ) ( )r

rT r p x dx= ∫0∫

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

25

Page 26: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement

Di t diti

4.2.3 Histogram processing : Histogram equalization

Discrete condition

k k n

0 0( ) ( ) 0,1, 2,..., 1

k kj

k k r jj j

ns T r p r k L

n= =

= = = = −∑ ∑

I iIn practice

( ) ( 1) ( )k

k ks T r L p r= = − ∑0

( ) ( 1) ( )k k r jj

s T r L p r=∑

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

26

Page 27: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

Example:page 78p e:p ge 78

Suppose that a 64*64, 3bits image has the gray-level distributionas show in the first row the calculate steps are:

7,...,1,0, =ksk

序号

运 算 步骤和结果

1 列出原始图灰度级 0 1 2 3 4 5 6 7

as show in the first row, the calculate steps are:

k

kn2 统计原始直方图各灰度级象素 790 1023 850 656 329 245 122 81

3 计算原始直方图 0.19 0.25 0.21 0.16 0.08 0.06 0.03 0.02

]5.0)1int[( +−= kk tNt

)( kk ts → 10 → 31→ 52 → 64,3 → 77,6,5 →

4 计算累计直方图 0.19 0.44 0.65 0.81 0.89 0.95 0.98 1.00

5 取整 1 3 5 6 6 7 7 7

6 确定映射对应关系10 → 31→

kn7 统计新直方图各灰度级象素 790 1023 850 985 448

8 用计算新直方图 0.19 0.25 0.21 0.24 0.11

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

27

Page 28: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

0.3 0 25 0 40.6

0.8

1

0.44

0.650.81

0.890.95 0.98 1

Histograms

0.1

0.20.19

0.250.21

0.160.08

0.060.03 0 02

0 1 2 3 4 5 6 7

0.20

0.40.19

0 1 2 3 4 5 6 70

0.02

(a)

(b)

0 3 0 25

transformation function(a)

0.1

0.2

0.3

0.19

0.250.21

0.24

0.11original histogram

00 1 2 3 4 5 6 7

(c)

equalized histogramDigital Image Processing

Prof.Zhengkai Liu Dr.Rong Zhang28

equalized histogram

Page 29: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

Experimental resultspe e esu s

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

29

Page 30: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

Experimental results

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

30

Page 31: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

Experimental results

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

31

Page 32: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

Experimental results

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

32

Page 33: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

Experimental results

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

33

Page 34: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram equalization

question: page 99 4 2

Why the discrete histogram

question: page 99, 4.2

y gequalization technique does not yield a flat histogram?

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

34

Page 35: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

35

Page 36: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

Hi t li ti

( ) ( ) 0,1, 2 1k

k k r js T r p r k L= = = −∑

Histogram equalization: r s

0j=

k

Histogram equalization: z v

0

( ) ( ) 0,1, 2 1k

k k z ii

v G z p z k L=

= = = −∑

1 1 1

k kv s=let then r z

1 1 1( ) ( ) ( ( ))k k k kz G v G s G T r− − −= = =

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

36

Page 37: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

PzG(zk)

zv, ,v

z,,Pv T(rk)

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

37

Page 38: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

Example:page 80Suppose that a 64*64, 3bits image has the gray-level distribution as show in the first row, and the 5th row is the

p e:p ge 80

序 运 算 步骤和结果

,specified gray-level distribution. The calculate steps are:

7,...,1,0, =ksk

kn

序号

运 算 步骤和结果

1 列出原始图灰度级 0 1 2 3 4 5 6 7

2 统计原始直方图各灰度级象素 790 1023 850 656 329 245 122 81

3 计算原始直方图 0 19 0 25 0 21 0 16 0 08 0 06 0 03 0 02

4096,/)( == nnnup kku

3 计算原始直方图 0.19 0.25 0.21 0.16 0.08 0.06 0.03 0.02

4 计算原始累计直方图 0.19 0.44 0.65 0.81 0.89 0.95 0.98 1.00

5 规定直方图 0 0 0 0.2 0 0.6 0 0.2

6 计算规定累计直方图 0 0 0 0 2 0 2 0 8 0 8 1 0

31,0 → 54,3,2 → 77,6,5 →

6 计算规定累计直方图 0 0 0 0.2 0.2 0.8 0.8 1.0

7s SML映射 3 3 5 5 5 7 7 7

8s 确定映射对应关系

9s 变换后直方图 0 0 0 0 44 0 0 45 0 0 11

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

38

9s 变换后直方图 0 0 0 0.44 0 0.45 0 0.11

Page 39: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

0.80 6

0.6

0.2

0.40.2

0.6

0.2

0.2

0.3

0.19

0.250.21

0 16

0 1 2 3 4 5 6 7

(b)

0

0 1 2 3 4 5 6 7

0

0.1

0.16

0.080.06

0.030.02

specified histogram

0.6

0.8

0 44 0.450 1 2 3 4 5 6 7

(a)

i i l hi t 0 5

0.2

0

0.4

0.44

0.11

original histogram 0 1 2 3 4 5 6 7

(c)

resulting histogramDigital Image Processing

Prof.Zhengkai Liu Dr.Rong Zhang39

resulting histogram

Page 40: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

40

Page 41: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

41

Page 42: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.3 Histogram processing : Histogram matching (specification)

Example

i i l equalized matchedoriginal equalized matched

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

42

Page 43: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Bit-plane slicing

b b b b b b b b1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 0

eg: 255b7 b6 b5 b4 b3 b2 b1 b0

1 1 1 1 1 1 1 0

1 0 0 0 0 0 0 1

254

129B7

B6

B5

一个8bit的字节位面7

B5B4

B3

B2

.

..

.B2B1

B0....

位面0

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

43

Page 44: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.2 Contrast Enhancement4.2.2 Direct gray level transformations : Bit-plane slicing

b7 b6

b b bb5 b4 b3

b2 b1 b0

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

44

Page 45: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g

• Introduction • Smoothing linear filters• Order- statistic filters• Low-pass filter in frequency domain

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

45

Page 46: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing4.3.1 Introduction

g g

P i iPurposes: removing noiseRequest: keeping edges and details

Noise Edges Details Gray levels change greatl in neighborhoodgreatly in neighborhood

Having the same texture in a regionHaving the same texture in a region

Having the similar grads directions in a segment

Random in gray levels and spatial locationRandom in gray levels and spatial location

Salt-pepper noiseGaussian noise

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

46

Gaussian noise

Page 47: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing4.3.1 Introduction: Noise models

g g

PDF of Gaussian noise:2 2( ) / 21( ) zp z e μ σ− −=PDF of Gaussian noise: ( )

2p z e

πσ=

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

47

Page 48: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing4.3.1 Introduction: Noise models

g g

Gaussian noise ( , ) ( , ) ( , )g x y f x y x yη= +G uss o se ( ) ( ) ( )g y f y yη

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

48

Page 49: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing4.3.1 Introduction: Noise models

g g

PDF of salt-pepper noise: aP z a=⎧⎪PDF of salt-pepper noise:

( )0

bp z P z botherwise

⎪= =⎨⎪⎩⎩

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

49

Page 50: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing4.3.1 Introduction: Noise models

g g

salt-pepper noise:

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

50

Page 51: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing4.3.1 Introduction: Smoothing filters

g g

i hb i(1) S thi li filt neighbor averaging(1) Smoothing linear filters:out range pixel smoothingMaximum homogeneity smoothing

(2)Order- statistic filters: Max filters

Mid i filMin filtersMidpoint filtersMedian filtersAlpha-trimmed mean filter p

(3)Low-pass filters: Idea low-pass filter (ILPF)Butterworth low-pass filter (BLPF)Gaussian low-pass filter (GLPF)

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

51

Page 52: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing Maskg g4.3.2 Smoothing linear filters: neighbor averagingSpatial filter: mask, kernel, template, window

Maskcoefficients

Sp e : s , e e , e p e, w dow

w(-1,-1) w(-1,0) w(-1,1)

w(0,-1) w(0,0) w(0,-1)

w(1,-1) w(1,0) w(1,1)

maskf( 1 1)

f(x,y)f(x-1,y-1) f(z-1,y) f(x-1,y+1)

f(x y-1) f(x y) f(x y+1)f(x,y 1) f(x,y) f(x,y+1)

f(x+1,y-1) f(x+1,y) f(x+1,y+1)

Pixels undermask

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

52

Page 53: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.2 Smoothing linear filters: neighbor averaging

Spatial filter: operating steps: (page 83)(1) Moving the filter mask from point to point in an image

Spatial filter: operating steps: (page 83)

(2) Multiplying the filter coefficient and the corresponding image pixels

(3) Adding all the products(3) Adding all the products (4) The sum is the response of the filter at a given point

( , ) ( , ) ( , )a b

i j bg x y w i j f x i y j= + +∑ ∑

i a j b=− =−

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

53

Page 54: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.2 Smoothing linear filters: neighbor averaging

T i l kTypical mask:

1 1 1

1 1 1

1 2 1

2 4 21×

116

×1 1 1

1 1 1

2 4 2

1 2 1

9 16

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

54

Page 55: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.2 Smoothing linear filters: neighbor averaging

Experimental results: different masks

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

55

Page 56: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.2 Smoothing linear filters: neighbor averaging

Experimental results:different sizes

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

56

Page 57: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.2 Smoothing linear filters: out range pixel smoothing

( , ) ( , ) ( , )a b

i a j bg x y w i j f x i y j

=− =−

= + +∑ ∑formulate

i a j b

( ) ( ) - ( )g x y g x y f x y T⎧ >( , ) ( , ) - ( , )ˆ ( , )( , ) others

g x y g x y f x y Tg x y

f x y⎧ >

= ⎨⎩

Advantage: keep details in the image with salt-pepper noise

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

57

Page 58: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.2 Smoothing linear filters: out range pixel smoothing

Experimental results

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

58

Page 59: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.2 Smoothing linear filters: Maximum homogeneity smoothing

Advantage: keep edgesDigital Image Processing

Prof.Zhengkai Liu Dr.Rong Zhang59

Advantage: keep edges

Page 60: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.3 Order- statistic filters: Max filters

( , ) { ( , )}maxg x y f x i y j= + +formulate( , 0, 1 )maxi j= ±

o u e Advanttage:reem

oves pepperr noise

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

60

Page 61: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing

( , ) { ( , )}ming x y f x i y j= + +

g g4.3.3 Order- statistic filters: Min filters

formulate( , 0, 1 )

( , ) { ( , )}mini j

g y f y j= ±

o u e Advanttage:reem

oves salt nooise

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

61

Page 62: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.3 Order- statistic filters: Midpoint filter

1( , ) [ { ( , )} { ( , )}]max ming x y f x i y j f x i y j= + + + + +formulate( , 0, 1 )( , 0, 1 )

( , ) [ { ( , )} { ( , )}]2 max min

i ji jg y f y j f y j

= ±= ±o u e A

dvanttage:reemoves G

ausiaan noise

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

62

e

Page 63: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.3 Order- statistic filters: Median filter1-D: replace the signal value by the median value of neighborhood

L=5 X=[4 5 9 5 4]

Adv

[4 4 5 5 9]

vantage

[4 5 5 5 4]

e:keep edges

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

63

Page 64: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.3 Order- statistic filters: Median filter

Replaces the value of a pixel by the median of the

( , ) { ( , )}g x y f x i y jmedian= + +gray levels in the neighborhood of that pixel

( , 0, 1 )i j= ±

Shapes of 2-D filter

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

64

Page 65: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.3 Order- statistic filters: Median filter

Experiment resultExperiment result

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

65

Page 66: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.3 Order- statistic filters: alpha-trimmed mean filter

Delete the lowest and highest gray-level valuesα αDelete the lowest and highest gray level values of a sub-image, averaging the remaining pixels as output

α α

0 1 1NA A A −≤ ≤Let the pixels in a sub-image:

1( )N

g x y Aα−

= ∑Then:

( , )2 i

ig x y A

N αα =

=− ∑

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

66

Page 67: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Idea low-pass filter (ILPF)

formulate ( , ) ( , )* ( , )g x y h x y f x y=

D0: cutoff frequency( , ) ( , ) ( , )G u v H u v F u v=

01 ( , )( )

if D u v DH u v

≤⎧= ⎨where

0

( , )0 ( , )

H u vif D u v D

= ⎨ >⎩

2/122 ])2/()2/[(),( NvMuvuD −+−=

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

67

Page 68: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Idea low-pass filter(ILPF)

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

68

Page 69: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Idea low-pass filter (ILPF)

Properties: total image powerope es: o ge powe

2003 Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

69

Page 70: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Idea low-pass filter (ILPF)

Properties: blurring and ringing

h(x,y)

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

70

Page 71: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Idea low-pass filter (ILPF)Experiment result cutoff frequencies set at radii values of 5、30、80Experiment result cutoff frequencies set at radii values of 5、30、80

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

71

Page 72: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Butterworth low-pass filter

12

0

1( , )1 [ ( , ) / ] nH u v

D u v D=

+formulate

h2/122 ])2/()2/[(),( NvMuvuD −+−=

where

])()[()(

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

72

Page 73: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Butterworth low-pass filter

H( ) 0 5 h D( ) DH(u,v)=0.5 when D(u,v)=D0

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

73

Page 74: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Butterworth low-pass filter

Properties: blurring and ringing

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

74

Page 75: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Butterworth low-pass filterExperiment result cutoff frequencies set at radii values of 5、30、80Experiment result cutoff frequencies set at radii values of 5、30、80

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

75

Page 76: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Gaussian low-pass filter

2 20( , ) / 2( ) D u v DH u v e−=

formulate

( , )H u v e=

h2/122 ])2/()2/[(),( NvMuvuD −+−=

where

])()[()(

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

76

Page 77: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Gaussian low-pass filter

Inverse Fourier transform of the Gaussian lowpass filter l i G ialso is Gaussian

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

77

Page 78: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Gaussian low-pass filter

Applications: machine perceptionApplications: machine perception

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

78

Page 79: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing4 3 4 L filt G i l filt4.3.4 Low-pass filters: Gaussian low-pass filter

Applications: printing and publishing industry

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

79

Page 80: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothing

Experiment result cutoff frequencies set at radii values of 5、30、80

g g4.3.4 Low-pass filters: Gaussian low-pass filterExperiment result cutoff frequencies set at radii values of 5、30、80

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

80

Page 81: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Comparisons (cutoff 5)

Ideal filter Butterworth filter Gaussian filterOriginDigital Image Processing

Prof.Zhengkai Liu Dr.Rong Zhang81

Ideal filter Butterworth filter Gaussian filterOrigin

Page 82: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Comparison (cutoff 30)

Ideal filter Butterworth filter Gaussian filterOrigin Digital Image Processing

Prof.Zhengkai Liu Dr.Rong Zhang82

g

Page 83: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

4.3 Image Smoothingg g4.3.4 Low-pass filters: Comparison (cutoff 80)

Ideal filter Butterworth filter Gaussian filterOriginDigital Image Processing

Prof.Zhengkai Liu Dr.Rong Zhang83

Origin

Page 84: Chapter4 Image Enhancement - USTChome.ustc.edu.cn/~xuedixiu/image.ustc/course/dip/DIP14-ch4-1.pdf · • 4.4 Enhancement by Frequency Filtering (image sharpening) • 4 5 Color Enhancement4.5

The End

Digital Image Processing Prof.Zhengkai Liu Dr.Rong Zhang

84