0 ratings 0% found this document useful (0 votes) 24 views 9 pages Object Based Classification - Recognition - Template Matching
The document discusses image representation and recognition, focusing on the use of invariant moments as descriptors for image regions and the classification of patterns based on quantitative and qualitative descriptors. It outlines various pattern arrangements, including vectors, strings, and trees, and explains recognition techniques based on matching, including decision-theoretic methods and correlation-based methods. The document also details the minimum distance classifier and correlation matching techniques for pattern recognition.
AI-enhanced title and description
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save Object based Classification- recognition - Templat... For Later 5.30 Image Representation and Recognition
Where, yeh p+q=2,3
(5) In addition to all these moments, a set of seven invariant moments can be derived
from second and third moments. These are invariant to translation, rotation and
scale change.
All the above said moments can be used as descriptors for a region of an image.
5.5 OBJECT RECOGNITION - Introduction
Recognition is the process that assigns a ‘label’ to an object of interest ifi an image,
based on its descriptors. Objects are just the individual image regions.
Classification
The pattern recognition approaches are categorized into two as
(1) Decision-theoretic — This deals with patterns that are described using
quantitative descriptors such as length, area and texture.
(2) Structural — This deals with patterns that are described by qualitative
descriptors such as relational descriptors.
5.6 PATTERNS AND PATTERN CLASSES
- A pattern is an arrangement of descriptors. A descriptor is also known as the
feature.
- A pattern class is a family of patterns that share some com
mon properties. Pattern
classes are denoted as 0,
©, Where, W is the number of classes,
- Pattern recognition is the process of assigning patterns to their respective classes.
This is done by using machines and with a little human intervention.
Pattern Arrangements
Three pattern arrangements that are commonly used in practice are
(1) Vectors ~ for quantitative descriptions,
(2) Strings ~ for structural descriptions
(3) Trees — for structural descriptions
Scanned with CamScannerDigital Image Processing 5.31
5.6.1 Vectors
Patterns vectors are used for the pattern arrangement of quantitative descriptors such
as length, area and structure,
These vectors are represented as columns ic n x 1 matrices as shown in the form
below.
x
1
x,
X= i: Street 9 (5.35)
Xn
Where:
T - Transposition,
n—Total number of descriptors associated with the pattern
Components, x;
- The components of pattern vectors are denoted as x;
- Each component x; represent the ith descriptor
- The nature of these components depends on the approach used to describe the
physical pattern.
Example (1):
For an example of pattern vector generation, a noisy object is shown in fig. 5.16 (a).
The aim is to generate pattern vectors for different types of noisy shapes.
By using different descriptors of this noisy object, pattern vectors can be generated in
many different ways as below.
* Ifeach object is represented by its signature, 1-D signals in the form shown in
fig. 5.16 (b) are obtained.
(0)
°
Ox no 3n mn Sx 3x Jn 2m
42 4 4 4 4
Fig, 5.16 (a) Noisy object Fig, 5.16 (b) Signature of the noisy object
Scanned with CamScanner5.32_lmage Representation and Recongnition
© If each signature has to be represented by its sampled amplitude values, the
signatures should be sampled at specified intervals of @ and denoted as
6, 0,, ....0,. Then, the sampled amplitudes are:
¥1=1(01), x2 =1(02) .
© Other than these, for cach signature, the first ‘n’ statistical moments can be
computed and used as components of cach pattern vector.
Xn= (On)
Here, signatures sampled amplitudes and statistical moments are quantitative
descriptors of the given noisy object. Thus, pattern vectors are generated in different ways.
Example (2):
In some applications, structural descriptors are used to generate pattern vectors. One
such example is the ‘Finger print recognition’.
- The features of the fingerprint are called ‘minutiae’
- The interrelationships between these features are used as the primitive components
or descriptors to generate pattern vectors.
- Some of such descriptors of fingerprint are abrupt endings, branching, merging,
disconnected segments etc.
Thus, in addition to quantitative measures, spatial relationships are used to generate
pattern vectors.
5.6.2 Strings
- Strings are pattems of objects that are generated based on simple connectivity of
primitive components.
- Usually, these primitives are related with the boundary shape.
- These are also known as string descriptions.
5.6.3 Trees
- Tree descriptions are used in many applications as they are more powerful ones.
- Many hierarchical ordering schemes lead to tree structures.
Example:
- Foran example, a tree structure is generated for a satellite image of a heavily built
downtown area and residential areas as shown in fig. 5.17.
Scanned with CamScannerDigital Image Processing 5.33
Image
oo
Downtown Residential
Buildings Highways aI
Housing Shopping Highways
aN IN malls
High Large Multiple Numerous
density structure intersections .
Single
Few
intersections
Low Small Wooded
density structures areas
Fig. 5.17 A tree description
In the above tree structure, the structural, relationship used is ‘composed of
- The’entire image represents the root of the tree
The next level shows that the image is ‘composed of a downtown and
residential area,
- The residential area is ‘com
posed of” housing, shopping malls and
highways and so on.
5.7 RECOGNITION BASED ON MATCHING
Pattern recognition is the process of assi;
igning patterns to their respective classes.
Recognition based on matching is an approach bas
ed on ‘decision - theoretic methods’.
5.7.1 Decision-Theoretic Methods
These methods are based on the use of decision Functions that are also called as «
discriminant functions.
Let, X= (xs,x2, ....¥»)" represent an n-dimensional pattern vector.
1,3, -.--€y be the pattern classes where, W ~ number of pattern classes.
The objective of the process is to find a suitable pattern class @,
for each pattern
based on some decision function.
Scanned with CamScanner5.34 Image Representation and Recongnition
© Decision Functions
The first step is to find W number of decision functions denoted as di(X), d2(X) ...
dw(X). The property of these decision functions is:
~ Ifapattern X belongs to class «,, then
G(X)>d(X), JHN We FA (536)
An unknown pattern X belongs to the i" pattern class if d((X) gives the
largest value when substituting X into all decision functions.
© Decision Boundary
The decision boundary that separates the classes @, and @, is given by the values
of X for which
4,(X) =4,(X)
(5.37)
> . di (X) =4,(X) - di(X) =0
Now, the pattern classification is
d,(X)> 0 + for patterns of class «,
dj(X) <0 > for pattems of class ,
5.7.2. Matching Techniques
Recognition techniques based on matching represent each pattern class by a prototype
pattern vector. Then the pattern that is closest to this prototype is found based on some
predefined criteria.
There are two such predefined criteria defined :
(i) Minimum distance classifier
(ii) Correlation based method
5.7.3 Minimum Distance Classifier
- This is the simplest method of matching.
- It computes the Euclidean distance between each unknown pattern and each
prototype pattern vector. The pattern with smallest distance belongs to the
particular pattern class.
Scanned with CamScannerDigital Image Processing 5,35
© Prototype Pattern Vector
Let, each pattern class is represented by a prototype that is computed by taking
the mean vector of all the patterns in that class, i.e.,
DX Gaba W ae (5.38)
5 xem
Where,
W — number of pattern classes
Nj number of pattern vectors in class w,
« Euclidean Distance
The Euclidean distance between a pattern and a pattern class or prototype is
calculated by
D(X) =(|[X-my|, j=h2..W ee (5.39)
This is based on the Euclidean norm: |jal| = (a".a)!?
© Minimum Distance
Now, the pattern with smallest distance is the best match for the particular
prototype. It is found as
1
40) =XIm;—Smym;, j=1,2,..W (5.40)
Thus, x is assigned to class «, if d,(X) yields the smallest value,
* Decision Boundary
The decision boundary between classes @, and @, for a minimum distance
classifier can be calculated from eqn. (5.37) as
di(X) = di(X) — d\(X)
substituting eqn (5.40),
1
4,(X) -[x'm, - 7™ | - [x?m, - mj m4]
1 1 1
x! (m,-m,)-> (m,-m,)' (m,+m,)=0 ---(6.4)
This eqn. gives a perpendicular bisector of the line segment joining mj and mj.
Scanned with CamScanner5.36 Image Representation and Recongnition
Advantage:
© The minimum distance classifier gives good performance when the distance
between mean values is large when compared to the spread of each class with
respect to its mean.
5.7.4 Matching by Correlation
In this approach, the pattern showing maximum correlation with a pattern class is
decided to be best match for that class.
© Correlation Theorem
The spatial correlation of a mask (x,y) of size m x n with an image f(x,y) is
in the form,
ce Y=PYoGt). fxs yt) ee (5.42)
aaa
This eqn, is evaluated for all values of the displacement variables x and y so
that all elements of the mask ‘ «’ visit every pixel of the image ‘P.
This spatial correlation is related to the Fourier transform via the correlation
theorem,
f(xy) * WX) © F*(u,v). W(u,v) w---= (5.43)
Where
F* - Complex conjugate of F.
This eqn. results in a two-dimensional circular correlation.
© Correlation Matching
The normalized correlation coefficient for correlation matching is given by
Ly[o6-o] Ur[tew+s, Y+t)-F(x+s, y+t)]
“4
{EX[oso-af. LY [ters y+9-Foees, yey] y
~(5.44)
yuy)=
Where, o- average value of the mask
f(x+s, y-+t) - average value of ‘f in the region coincident with o.
Here, the values of y(x,y) is in the normalized range [-1, 1].
Scanned with CamScannerDigital Image Processing 5.37
Now, matching is found as below:
= When the normalized @ and the corresponding normalized region fare
identical, maximum value of y(x,y) occurs. This indicates maximum
correlations and hence the best possible match for a pattern with that
pattern class.
* The minimum correlation occurs when the normalized functions of o
and f have least similarity.
‘As, the mask @ can also be referred to as a template, this correlation is also known as
‘Template Matching’
This template matching procedure explained is illustrated in fig. 5.18.
Here,
Template (@)
Image (f)
"y! @&y
padding
Fig.5.18 Template matching procedure
Padding(adding zeros on the borders) of the image is done in order to place
the mask on the border pixels of the image.
‘The center of the template or mask @ with size mxn is placéd at an
arbitrary location (x,y)
‘Then, the correlation at this point is computed by using eqn. (5.44)
Now, the centre of the template is moved to the next location and the
procedure is repeated.
‘Thus the complete correlation coefficient (x,y) is obtained by moving the
center of the template and placing it on every pixel in f.
Scanned with CamScanner$.38_Image Representation and Recongnition
~ Finally, the best match is found by selecting the maximum value of (x, y).
= It is also possible that there can be more than one matches between @ and
f, if they have the same value of (x,y).
Drawback:
= As normalizing the image involves spatial scaling or image resampling,
normalizing for size and rotation is a more complicated problem.
Scanned with CamScanner