Object Recognition3
Object Recognition3
Place it in
Find out the
Image respective
Pattern
pattern-class
Ped
meters
Ped
Car
meters
Lane detection
Michelangelo 1475-1564
Challenges: illumination variation
Magritte, 1957
Challenges: scale
Challenges: deformation
Klimt, 1913
Challenges: intra-class variation
Let’s start simple
skin
Skin classifier
• Given X = (R,G,B): how to determine if it is skin or not?
• Nearest neighbor
– find labeled pixel closest to X
– choose the label for that pixel
• Data modeling
– fit a model (curve, surface, or volume) to each class
• Probabilistic data modeling
– fit a probability model to each class
Probability
• Basic probability
– X is a random variable
– P(X) is the probability that X achieves a certain value
called a PDF
-probability distribution/density function
-a 2D PDF is a surface, 3D PDF is a volume
– or
continuous X discrete X
Skin classifier
• Given X = (R,G,B): how to determine if it is skin or not?
• Choose interpretation of highest probability
– set X to be a skin pixel if and only if
– Goal is to choose the label (skin or ~skin) that maximizes the posterior
• this is called Maximum A Posteriori (MAP) estimation
• Suppose the prior is uniform: P(skin) = P(~skin) = 0.5
– in this case ,
– maximizing the posterior is equivalent to maximizing the likelihood
» if and only if
– this is called Maximum Likelihood (ML) estimation
Skin detection results
General classification
• This same procedure applies in more general circumstances
– More than two classes
– More than one dimension
28
Object Recognition
29
Patterns and Pattern Classes
• Pattern
– An arrangement of descriptors
– Features
• Quantitative: length, area, texture, etc.
• Qualitative: relational descriptors
– Pattern vector with descriptors
ݔଵ
ݔଶ
– ࢞=
⋮
ݔ
• Pattern Class
– Family of patterns sharing some common properties
Discriminant Analysis [Fisher 1936]
Descriptors: 02
Classes: 03
Class Separability!
33
Now the Qualitative Descriptors!
DECISION-THEORETIC METHODS
36
Minimum Distance Classifier
• Suppose that we define the prototype of each pattern class to
be the mean vector of the patterns of that class:
1
mj = ∑x j j=1,2,…,W (1)
Nj x∈w j
Dj ( x) = x − m j j=1,2,…,W (2)
Minimum Distance Classifier
1 T
d j ( x) = x m j − m j m j
T
j=1,2,…,W (3)
2
• The decision boundary between classes and for a minimum
distance classifier is
d ij ( x) = d i ( x) − d j ( x) j=1,2,…,W (4)
1
= xT (mi − m j ) − (mi − m j )T (mi + m j ) = 0
2
Compute with: For n = 2: Line,
m1 = (4.3, 1.3)T For n = 3: plane,
m2 = (1.5, 0.3)T For n > 3: hyperplane
Minimum Distance Classifier
• Advantages:
1. Unusual direct-viewing
2. Can solve the rotated-problem
3. Intensity
4. Chooses the suitable characteristic, then solves the mirror
problem
• Disadvantages:
1. It costs time for counting samples,
we should have a lot of samples for high accuracy, so
more samples more accuracy!
2. Displacement
3. It is only for two features, so the accuracy is lower than
other methods.
4. Scaling
Matching by Correlation
• We consider it as the basis for finding matches of a
sub-image of size J × K within f ( x, y ) an image of
size M × N, where we assume that J ≤ M and K ≤ N
c( x, y ) = ∑∑ w( s, t ) f ( x + s, y + t )
s t
for x=0,1,2,…,M-1, y=0,1,2,…,N-1 (5)
Matching by Correlation
• The correlation function has the disadvantage of being sensitive to
changes in the amplitude of f and w
– For example, doubling all values of f doubles the value of c ( x, y )
s t s t
• The correlation coefficient is scaled in the range -1 to 1, independent of
scale changes in the amplitude of f and w
Matching by Correlation
• Arrangement for obtaining the correlation of f and w at point ( x, y )
Matching by Correlation
• Advantages:
1.Fast
2.Convenient
3.Displacement
• Disadvantages:
1.Scaling
2.Rotation
3.Shape similarity
4.Intensity
5.Mirror problem
6.Color cannot be recognized
Matching by Correlation: Example 1
Matching by Correlation: Example 2
Optimum statistical classifiers
rj ( x) = ∑L kj p ( wk x ) or Loss
k =1
Optimum statistical classifiers
1 W
⇒ rj ( x ) = ∑ Lkj p ( x wk ) P ( wk )
p ( x) k =1
W
⇒ rj ( x) = ∑L kj p ( x wk ) P ( wk )
k =1
1
∵ is positive and common to all
p(x )
Optimum statistical classifiers
= p( x) − p( x w j ) p( w j )
Optimum statistical classifiers
1
1 − ( x − m j )T C −j 1 ( x − m j )
p( x w j ) = 12
e 2
(2π ) n 2 C j
Covariance
matrix
1 1
⇒ d j ( x) = ln P( w j ) − ln C j − ( x − m j )T C j −1 ( x − m j )
2 2
Optimum statistical classifiers
• Advantages:
1. Can be used stand alone classifier
2. Can also be combined with other approaches
• Disadvantages:
1. Costs time to count samples
Consult your book to see how minimum distance classifier can be derived from an
optimum statistical classifier!
Find out the decision surface/boundary between two pattern classes
1. Means
2. Covariances
3. Decision
functions
4. Decision
boundary/surface
Bayes Classification for Multispectral Data
Bayes Classification for Multispectral Data
Bayes Classification for Multispectral Data
Questions