You are on page 1of 45

Shape Features

Dr.G.Malathi
Associate Professor Senior,
School of Computer Science and Engineering
VIT Chennai
Shape Features
• Objects can exhibit various shapes.
• Shape region features or geometric features
characterize the appearance of an object.
• Area: The number of pixels in that object. All
pixels inside that object is refered to as area.
• It includes the object boundary and not the
hole
• Example : P, B
Geometrical features of an object
Shape Features
• Perimeter: Number of pixels present in the
boundary of the object. The number of
foreground pixels that touches the
background.
IMAGE REPRESENTATION
• After segmentation, representing a region
involves two choices.
• Representation of a region in terms of external
characteristics – its boundary-shape.
• Representation in terms of its internal
characteristics – the pixels-regional properties-
color and texture.
• It should be invariant in rotation, translation,
scaling.
Polygonal Approximation of the boundary

• This shape must be approximated by the


polygon.

• Represent the boundary


by the polygon
Minimum Perimeter Polygon
• Enclose the original boundary by a set of
connected cell.
• This connected cell represent two walls,
internal wall and external wall.
• Allow the rubber chord to contract itself
within the cell such that its perimeter is
minimum.
• Marked in green are the cells enclosing this
particular boundary.
• If the boundary contracts fitting itself in the
connected cells according to the constraints
imposed by the inner and outer wall,
REGION BASED SHAPE DESCRIPTORS

• Shape information can be obtained from the


boundary of a region or from the region itself.
• Area: Total no. of pixels belonging to that
regions (translation and rotation invariant). It
cannot be used for object description or
object recognition.
Euler Number
• Euler Number: Is a topological invariant
descriptor.(rotation, translation and scaling
invariant)
• But dependent on the viewing angle.

N = No. of connected components


S = No. of holes.
Euler Number = S – N
Horizontal and Vertical Projections
• Projection of the object in horizontal axis.
• Projection along the vertical axis.
• This is used in the case of binary image.
Eccentricity
Elongatedness
• Region minimum bounding rectangle.
Elongatedness = Length of the larger side of the minimum bounding rectangle

Length of the smaller side of the minimum bounding rectangle


• For curved region, the elongatedness must be
calculated in a different manner.

Find thickness of the Along with length of the


elongated region Elongated region
Measure of
Elongatedness =
For curved region
Boundary Representation
• The boundaries should be represented in a
suitable form using a data structure so that
the analysis can be done. This stage is called
object representation
• Chain codes or freeman codes are used to
represent the boundary of an object.
• Useful in representing shapes as line drawings,
curves
Chain Code
• Set of pixels in the image and are connected.
• To move from any point on the boundary to
the next point either cw or anti cw, we can
have only one of eight possible moves.
• Length of the move is one with specific
direction with numerical numbers
Chain Code
• Entire boundary can be represented by
sequence of numerals which vary from 0 to 7
called chain code.
Chain Code
• Sample the boundary points by superimposing
on the grid.
• Assign each boundary point to the single point
nearest in the grid.
Chain Code
Rotation variant.
Differential Chain Code
• To move from one point to another, how many
moves have to be made.(consider as a cycle)

0 6 0 6 0 6 0

0 6 0 6 0 6 0
• Redefine the starting point so that the chain
code obtained will have minimum numerical
value.
Shape numbers
• Considering the differential chain code as a
cycle, choose a starting point that gives a
minimum numerical value which is called as
shape numbers which can be used as
descriptors for shape recognition.(boundary
descriptors).
Exercise – Obtain chain code, differential chain code
and shape number for the below image for 4D and 8D
Representation and description
• After the identification of features, the object
must be represented and described.
• Representation involves storing the feature in
a form that can be processed by an image
analysis programs
• After representation the features should be
described using descriptors
Boundary Representation
• The boundaries can be traced and allotted the
respective numbers based on the direction
• The boundary of the object is reduced to a
sequence of numbers
Boundary Representation
Differential chain code
• Normalization solves the problem of the
starting point.
• To normalize the chain code take the first
difference of the chain code by taking two
numbers of the chain code and calculating the
number of transitions required to reach the
second number from the first number in
counter clock wise direction
Boundary Descriptors
• Simple Descriptors: Some of the common methods
to describe boundary are length, diameter
• Boundary length:The number of pixels present in
the boundary gives the boundary length.
• Diameter: Let D(p1,p2) be the line connecting two
points p1,p2 on the boundary. The maximum
distance connecting two points p1 and p2 is called
the diameter
Diameter = max(D(pi,pj))
Boundary Descriptors
• Shape Numbers: Once the normalization is carried out, the
smallest magnitude number is obtained. This number is called
shape number.
• Consider the chain code 1 3 1 0 3 0
• The shape number is obtained by shifting this number by one
position as follows:
• 310301
• 103013
• 030131
• 301310
• 0 1 3 1 0 3 This is the smallest and it is called the shape number
Boundary Descriptors
• Projections: It is a metric that denotes a binary
image as a function of row coordinates The
horizontal projection is defined as

• In the binary image, it is the number of


foreground pixels in the horizontal direction.It
is known as horizontal picture.
Boundary Descriptors
• It can be observed that the sum of the
elements in a row is the horizontal projection
and the sum of the elements in a column is
the vertical projection
Regional Descriptors
• The regional descriptors includes descriptions
that characterize the object.
• These include histogram, geometrical ,
topographical and structural features.
Regional Descriptors
• Histogram Features or Brightness features or intensity features
or amplitude features
• The measurement can be made at specific location or over the
entire neighborhood
• The first order histogram of the image can be represented by

• Where N(b) is the number of pixels having the amplitude r(b)


having L grey levels and m is the total number of pixels in the
image
Regional Descriptors
• Statistical values like mean, media, mode,
minimum intensity, maximum intensity,
number of pixels above the mean intensity
level are some of the useful brightness
information
Feature Extraction
• The segmentation process segments the
foreground object using a boundary.
• This boundary should be encoded into a form
that can be processed by the computer.
• It involves coding of the boundary region.
• This stage is called as object representation.
Feature Extraction
• Once the boundary is identified , the features
that characterize the object should be
described.
• This stage is called object description.
Feature Extraction
• It is a dimensionality reduction
• It represents the interesting parts of an image
in a more compact representation
• Mostly preferred in the case of large images
• Features – The process of extracting useful
information from an image
• The features should carry unique attributes of
the image

You might also like