Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns...

47
Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 12 Object Recognition Chapter 12 Object Recognition

Transcript of Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns...

Page 1: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 2: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Patterns and Pattern Classes

• A pattern is an arrangement of descriptors, such as those discussed in Chapter 11.

• The name feature is used often in the pattern recognition literature to denote a descriptor.

• A pattern class is a family of patterns that share some common properties.

Page 3: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 4: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 5: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 6: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 7: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Recognition Based on Decision-Theoretic Methods

• In other words, an unknown pattern x is said to belong to the ith pattern class if, upon substitution of x into all decision functions,

yields the largest numerical value.

( )( ) ( ) ijWjxdxd

xxxx

ji

Tn

≠=>=

;,...,2,1 ,,, classespattern for W ,,,Let W2121 ωωω KK

( )xdi

Page 8: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

MatchingMinimum distance classifier

• Suppose that we define the prototype of each pattern class to be the mean vector of the patterns of that class:

• We then assign x to class ωi if Di(x) is the smallest distance.

WjxN

mjx

jj

j ,,2,1 1K== ∑

∈ω

( ) jj mxxD −=

Page 9: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Minimum distance classifier

• It is not difficult to show (Problem 12.2) that selecting the smallest distance is equivalent to evaluating the functions

• assign x to class ωi if di(x) is the largest numerical value.

• This formulation agrees with the concept of a decision function, as defined in Eq. (12.2-1).

( ) Wjmmmxxd jTjj

Tj ,...,2,1

21

=−=

Page 10: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 11: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 12: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Matching by correlation

• correlation coefficient, which is defined as( ) ( ) ( )∑∑ ++=

s ttysxwtsfyxc ,,,

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

( ) ( )[ ] ( )[ ] 21

22,,,

,,,,

⎭⎬⎫

⎩⎨⎧

−++−

−++−=

∑∑∑∑

∑∑

s ts t

s t

wtysxwtsftsf

wtysxwtsftsfyxγ

Page 13: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 14: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 15: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Optimum Statistical Classifiers

• the equation often called the conditional average risk or loss in decision-theory terminology.

• The classifier that minimizes the total average loss is called the Bayes classifier.

• Thus the Bayes classifier assigns an unknown pattern x to class ωi ifin other words, x is assigned to class ωi if

( ) ( )∑=

=W

kkkjj xpLxr

1/ω

( ) ( ) ijWjforxrxr ji ≠=< ;,...,2,1

( ) ( ) ( ) ( )q

W

qqqjk

W

kkki PxpLPxpL ωωωω ∑∑

==

<11

//

Page 16: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Bayes classifier for Gaussian pattern classes

( ) ( ) ( )( )

( ) 2,1 2

1/2

2

2 ===−

jPePxpxd j

mx

jjjj

j

j

ωσπ

ωω σ

( )( )

( ) ( )jjT

j mxCmx

n

jnj e

Cxp

−−− −

=1

21

222

1/π

ω { }xEm jj =

( )( ){ }Tjjjj mxmxEC −−= ∑

−=jx

Tjj

T

jj mmxx

NC

ω

1

Bayes decision function for class ( ) ( ) ( )jjjj Pxpxd ωωω / is =

( ) ( ) jTjj

Tjj mCmmCxPxd 11

21ln −− −+= ω

Page 17: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 18: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 19: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 20: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 21: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Neural Network

( ) ( ) ( )( )kwww

wJkwkw=

⎥⎦⎤

⎢⎣⎡∂

∂−=+ α1

Page 22: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 23: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 24: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 25: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 26: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 27: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 28: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 29: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 30: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 31: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 32: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Structural Method

Page 33: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 34: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

String Matching

Page 35: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 36: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 37: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 38: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Automatic as string recognizers

Page 39: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 40: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Syntactic Recognition of Trees

Page 41: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 42: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 43: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 44: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 45: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 46: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition

Page 47: Chapter 12 Object Recognition - SJTUbcmi.sjtu.edu.cn/~luhongtao/dip/res/Chapter12.pdf · Patterns and Pattern Classes •A pattern is an arrangement of descriptors, such as those

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

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

Chapter 12Object Recognition

Chapter 12Object Recognition