Digital Image Processing (Com-3371) : Week 7 - February 25, 2002
Digital Image Processing (Com-3371) : Week 7 - February 25, 2002
Topics:
• Representation schemes
• Chain codes
• Polygonal approximations
• Signatures
• Boundary segments
• The skeleton of a region
• Line segmented encoding
• Boundary descriptors
• Basic descriptors
• Fourier descriptors
• Regional descriptors
• Basic descriptors
• Topological descriptors
• Texture
• Morphology
Readings:
• Chapter 11 (11.1 –11.3) and Chapter 9 (9.1-9.3. 9.5.1, 9.5.2) of text
1
IMAGE REPRESENTATION
AND DESCRIPTION
INTRODUCTION
Region representation:
- based on external characteristics (its boundary)
- based on internal characteristics (pixels comprising the region)
Region description:
- boundary descriptors, such as boundary length, diameter, curvature, etc.
- regional descriptors, such as area, perimeter, compactness, mean value, etc.
REPRESENTATION SCHEMES
2
Chain codes
• represent a boundary by a connected sequence of straight-line segments of
specified length and direction
• the direction of each segment is coded by using a numbering scheme:
3
the boundary representation in figure (c) is: 0033333323221211101101
the boundary representation in figure (d) is: 076666553321212
The accuracy of the resulting code depends on the spacing of the sampling grid.
4
Polygonal approximations
- merging techniques (merge points along a boundary until the least square
error line fit of the points merged exceeds a preset threshold; repeat the
procedure for the new points along the boundary; at the end of the procedure
the intersections of adjacent line segments form the vertices of the polygon)
5
Signatures
• a simple functional representation that can be used to describe and reconstruct
the boundary with appropriate accuracy
• the simplest signature is a plot of the distance from the centroid to the
boundary as a function of angle:
6
• signature is an translation-invariant representation which allows an object to be
compared with a standard prototype by cyclically shifting the signature of one
with respect to the other in steps, while checking for the best match
Boundary segments
7
The skeleton of a region
pixel coordinates
p (x,y)
q (s,t)
D4 distance:
D4(p,q)=|x-s|+ |y-t|
For example, the pixels with D4 distance ≤ 2 from pixel (x,y) form the
following contours of constant distance:
2
2 1 2
2 1 0 1 2
2 1 2
2
8
D8 distance:
D8(p,q)=max (|x-s|, |y-t|)
For example, the pixels with D8 distance ≤ 2 from pixel (x,y) form the
following contours of constant distance:
2 2 2 2 2
2 1 1 1 2
2 1 0 1 2
2 1 1 1 2
2 2 2 2 2
9
BOUNDARY DESCRIPTORS
Length - number of pixels along the contour
p. 496
10
11
Fourier descriptors
• in many cases one can lowpass filter the boundary function spectrum
without destroying the characteristic shape of the region --> this means that
only the amplitudes and phases of the low frequency components in the
spectrum (i.e. the low-order Fourier coefficients) are required to
characterize the basic shape of the object and they can be used as shape
descriptors
12
REGIONAL DESCRIPTORS
Range - the difference between the largest and the smallest pixel
values in a region
13
Mean - average of pixels' intensity values within the region
N
∑ xi
µ = i=1 =x
N
14
Topological descriptors
15
p. 505, fig. 8.19
Texture
16
• three principal approaches used to describe the texture are:
statistical - smoothness, coarseness, graininess (using moments,
entropy, etc.)
structural - arrangement of image primitives, such as regularity of
parallel lines
spectral - based on properties of Fourier spectrum (periodic patterns
in an image)
17
MORPHOLOGY
• Morphological operators - tools for extracting image components that are
useful in the representation and description of region shape (examples:
erosion, dilation, etc.)
• Erosion - removes pixels from the periphery of a region (it also removes
single pixels)
• Dilation - adds a layer of pixels around a periphery of a region (it also fill
small holes within regions)
18
If Abi are translations of the binary image A by 1 pixels of the binary image
B, then the union of the translations of A by the 1 pixels of B is called the dilation
of A by B.
19
20
• Erosion and dilation are often used in filtering the images - if the nature of
noise is known, then a suitable structuring element can be used and a
sequence of erosion and dilation operations can be applied for removing the
noise
21
• The structuring element (probe) does not have to be compact or regular - it
can be any pattern of pixels
• Morphological operations can be used for boundary extraction:
Set A
• Morphological operations can also be used for region filling and for
extraction of connected components
22