Anda di halaman 1dari 28

Shape Features

Jamil Ahmad

1
Contents
• Shape Features
• Properties of Shape Features
• Shape Descriptor
• Descriptors Classification
• Simple Shape Features
• One-dimensional function for shape representation
• Some other shape features
• Conclusion
• References
2
Shape Feature
• A prominent attribute or aspect of a shape

3
Properties of Shape Features
Efficient shape features must present some essential
properties such as:
• Identifiability: perceptually similar objects have
similar (or the same) features.
• Translation, rotation and scale invariance: the
location, the rotation and the scaling changing of the
shape must not affect the extracted features.

4
Properties of Shape Features
• Affine invariance: (preserving parallelism and
straightness): shape distortion that preserve shape
characteristics should not alter the descriptor.
 Noise resistance: features must be as robust as possible
against noise, i.e., they must be the same whichever be
the strength of the noise in a give range that affects the
pattern.

5
Properties of Shape Features
• occultation invariance: partial occlusion should
not change the descriptor.
• Statistically independent: compact descriptor.
• Reliability: as long as one deals with the same
pattern, the extracted features must remain the
same.

6
Shape Descriptor
• Shape Descriptor is a set of numbers that are produced to
represent a given shape feature. A descriptor attempts to
quantify the shape in ways that agree with human intuition.
• Usually, the descriptors are in the form of a vector.

7
Descriptors Classification
• Contour-Based Methods:
• Use shape boundary points
• Region-Based Methods:
• Use shape interior points

8
Simple Shape Features
• Some simple geometric features can be used to describe shapes.
Usually, the simple geometric features can only discriminate shapes
with large differences; therefore, they are usually used as filters to
eliminate false hits or combined with other shape descriptors to
discriminate shapes.
• Center of gravity
• Eccentricity
• Circularity ratio
• Rectangularity
• Convexity
• Solidity
• Euler number
• Hole area ratio 9
1. Center of Gravity
• The center of gravity is also called centroid. Its position should
be fixed in relation to the shape.

Implementation (MATLAB) :
L=bwlabel(bwImage,8);
Stats=regionprops(L,’Centroid’); 10
Cent=[stats.Centroid];
2. Circularity ratio
• Circularity ratio represents how a shape is similar to a circle.
• Circularity ratio is the ratio of the area of a shape to the
shape's perimeter square:

Implementation (MATLAB) :
L=bwlabel(bwImage,8);
Stats=regionprops(L,’Area’,’Perimeter’);
ar=[stats.Area];
per=[stats.Perimeter];
11
Cr=ar/(per*per);
3. Rectangularity
• Rectangularity represents how rectangular a shape is, i.e.
how much it fills its minimum bounding rectangle:

• where AS is the area of a shape; AR is the area of the


minimum bounding rectangle.

Implementation (MATLAB) :
L=bwlabel(bwImage,8);
Stats=regionprops(L,’Extent’);
rectngularity=[stats.Extent]; 12
4. Convexity
• Convexity is defined as the ratio of perimeters of the
convex hull over that of the original contour.

Implementation (MATLAB) :
L=bwlabel(bwImage,8);
Stats=regionprops(L,’Perimeter’,’ConvexImage’);
pShape=[stats.Perimeter];
Cimg=stats.ConvexImage;
cImg=double(cImg);
s=regionprops(cImg,'Perimeter');
pHull=s.Perimeter; 13
cvx=pHull/pShape;
5. Solidity
• Solidity describes the extent to which the shape is convex
or concave.

• where, As is the area of the shape region and H is the


convex hull area of the shape. The solidity of a convex
shape is always 1.
Implementation (MATLAB) :
L=bwlabel(bwImage,8);
Stats=regionprops(L,’Solidity’)
solid=[stats.Solidity]; 14
6. Euler number
• Euler number describes the relation between the
number of contiguous parts and the number of holes on
a shape. Let S be the number of contiguous parts and N
be the number of holes on a shape. Then the Euler
number is:

Implementation (MATLAB) :
L=bwlabel(bwImage,8);
Stats=regionprops(L,’Euler’);
EN=[stats.Euler]; 15
9. Hole area ratio
• Hole area ratio HAR is defined as

• where As is the area of a shape and Ah is the total area of all


holes in the shape

16
One-dimensional function
for shape representation
• Also known as Shape Signature
• It is derived from shape boundary coordinates
• The shape signature usually captures the perceptual feature of
the shape
• Centroid distance function
• Area function
• Chord length function

17
1. Centroid distance function
• The centroid distance function is expressed by the
distance of the boundary points from the centroid of a
shape:

• Translation Invariant

18
2. Area Function
• When the boundary
points change along the
shape boundary, the
area of the triangle
formed by two
successive boundary
points and the center of
gravity also changes. This
forms an area function
which can be exploited
as shape representation.
19
3. Chord Length Function
• For each boundary point P, its chord length function is the
distance between P and another boundary point P’.

20
Some other shape features
• Basic Chain Code
• Differential Chain Code
• Chain Code Histogram
• Shape Matrix

21
Chain Codes
(Basic + Differential
• Notation to record a list of boundary bounds along a
contour.
• describes the movement along a digital curve or a
sequence of border pixels by using so-called 8-
connectivity or 4-connectivity.

22
Shape Numbers
• To make the chain code rotational invariant, we consider
all cyclic rotations of the differential chain code and
choose among them the lexicographically smallest such
code. The resulting code is called Shape Number.
• Chain Code:
• 3003011211232
• Differential Chain Code:
• 10311013113
• Shape Number:
• 01311310311
23
Chain Code Histogram
• The CCH reflects the probabilities of different directions
present in a contour.

24
Shape Matrix
• Shape matrix descriptor is an M × N matrix to represent a
shape region.
• Matrix itself is not a feature
• Histograms in x- and y-direction
• Texture of shape matrix
• Frequency analysis

25
Conclusion
• A shape signature represents a shape by a 1-D function
derived from shape contour.
• To obtain the translation invariant property, they are
usually defined by relative values.
• To obtain the scale invariant property, normalization is
necessary.
• Shape signatures are sensitive to noise, and slight
changes in the boundary can cause large errors in
matching procedure.
• A shape signature can be simplified by quantizing the
signature into a signature histogram, which is rotationally 26
invariant.
References
• Yang Mingqiang, Kpalma Kidiyo and Ronsin Joseph, “A Survey of Shape
Feature Extraction Techniques” Pattern Recognition Techniques, Technology
and Applications, Book edited by: Peng-Yeng Yin, ISBN 978-953-7619-24-4,
pp. 626, November 2008, I-Tech, Vienna, Austria

27
Thank you
28

Anda mungkin juga menyukai