You are on page 1of 10

Feature Extraction

Feature extraction is assuredly one of the important


cornerstones of any pattern classification system.
Indeed, no matter how sophisticated is the classifier
and learning algorithm, poor feature extraction and
selection will always lead to poor system
performance.
Of course, one could envision a classifier that inputs
raw data and automatically learns to extract
discriminant features from this data, but such an
approach underlies huge difficulties that are usually
overwhelming in practice

Representation & Description


In feature extraction step data representation is an important step.
The representation schemes of input pattern are of particular importance
since the classification method depends largely on them.
Selecting the data representation is one of the most fundamental decisions
to make.
Resenting a region/segment involves two choices.
We can present the region in terms of its external characteristics (its boundary)
We can represent it in terms of its internal characteristics( the pixels
comprising the region)

Next step is to describe the region based on chosen representation.e.g. a


region may be represented by its boundary, and the boundary described by
features such as its length, the orientation of the straight line joining its
extreme ponts, and the number of concavities in the boundary.

Representation & Description


An external representation is chosen when the
primary focus is on shape characteristics.
An internal representation is selected when the
primary focus is on regional properties, such as color
and texture.
Some times it is necessary to use both types of
representations.
In either case, the features selected as descriptors
should be as insensitive to variations in size,
translations, and rotation.

Chain Codes
Chain codes are used to represent a boundary by a connected
sequence of straight lines segments. Of specified length and
direction.
Typically this representation is based on 4- or 8-connectivity
of the segments.
The direction of each segment is coded by using numbering
scheme such as show on next slides.
One advantage of this representation is that it is more concise
due to their encoded nature.
One problem is that this representation , depending on the
granularity it works on, should be extremely robust to be
effective since one mistake may make a big hole in the overall
picture because of its regional representation nature.

Representation & Description

Representation & Description

The chain code of a boundary depends on the starting point.


However, the code can be normalised with respect to the
starting point by a straight forward procedure.
Simply treat the code as a circular sequence of direction
numbers and redefine the starting point so that the resulting
sequence of numbers forms an integer of minimum value.
We can normalise also for rotation by using the first difference
of the chain code instead of code itself. This difference is
obtained by counting the number of direction changes ( in a
counter clock wise direction) that separate the two adjacent
elements of code. e.g., 10103322 -> 3133030 (counting ccw)
To treat code as a circular sequence, the first element of the
difference is computed by using the transition b/w the last and
the 1st elements of the chain. Here the result is 331330303

Boundary descriptors
Simple descriptors
length (e.g., for chain code:
hor+vert+21/2*diagonal)
diameter (length of the major axis). The
diameter of boundary B is defined as
Diam (B) = max [D(pi,pj)]
basic rectangle (formed by the major and the
minor axis; encloses the boundary) and
eccentricity (major/minor axis).
Curvature : the rate of change of slope

Shape Numbers
shape no. of first
difference of chain
code is the is the
integer of smallest
magnitude (treating the
chain code as a circular
sequence)

the order, n, of the


shape no. is the
number of , digits in
the chain code.
the order limits the
number of possible
different shapes

The difference code is indep.


of rotation but depends on
orientation of the grid.
*Align chain code grid with
basic rectangle grid. (also
used when chosing scale used
for comparing objects)
How? Choose order n.
Find rectangle of order n,
whose eccentricity best
matches basic rectangle of
object. This rectangle (of
order n) ) establishes grid
size.
Check that the order of the
object in the new grid equals
equals n.

You might also like