You are on page 1of 103

DIGITAL IMAGE

PROCESSING
DIGITAL IMAGE
PROCESSING

Chapter 11 - Representation and


Description
Road map of chapter 11

3.1 3.2 3.3 3.4 3.5

11.1- Representation
11.2- Boundary Descriptors
11.3- Regional Descriptors
Use of Principal
Regional Components
Descriptors
Representation
Boundary
Relational Descriptors
Descriptors 11.4- Use of Principal Components for Description
for Description 11.5 - Relational Descriptors
11.1 Representation
Representation

11.1- Representation Chain Codes


11.2- Boundary Descriptors
11,3- Regional Descriptors
Polygonal Approximations
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors Signatures

Boundary Segments

Skeletons
Chain Codes

• Chain codes are used to represent a boundary by a


connected sequence of straight-line segments of specified
length and direction.
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors • a chain code can be generated by following a boundary (in
a clockwise direction) and assigning a direction to the
11.4- Use of Principal
Components for Description segments connecting every pair of pixels.
11.5 - Relational Descriptors

• This method generally is unacceptable for two principal


reasons:
 The resulting chain tends to be quite long
 any small disturbances along the boundary due to noise or
imperfect segmentation cause changes in the code that may
not be related to the principal shape features of the
boundary.
Chain Codes

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Chain Codes

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
• The chain code of a boundary depends on the starting point.It can
be normalized with respect to the starting point.
• We simply treat the chain 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 magnitude.
We can normalize also for rotation (in angles that are integer
multiples of the directions in Fig. 11.3) by using the firs
difference of the chain code instead of the code itself.
Chain Codes
Normalization For Rotation

This difference is obtained by counting the number of direction


changes that separate two adjacent elements of the code.

11.1- Representation Example


11.2- Boundary Descriptors Chain code is 10103322
11,3- Regional Descriptors
Normalized with first difference 3133030
11.4- Use of Principal If we treat the code as a circular sequence to normalize with
Components for Description
11.5 - Relational Descriptors
respect to the starting point,the result is 33133030.
Chain Codes

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Chain Codes

• The 8-directional Freeman chain code :


11.1- Representation
11.2- Boundary Descriptors 00006066666666444444242222202202
11,3- Regional Descriptors • The integer of minimum magnitude of the code:
11.4- Use of Principal 00006066666666444444242222202202
Components for Description • The first difference of either code is
11.5 - Relational Descriptors
00062600000006000006260000620626
 
• Using any of these codes to represent the boundary results in a
significant reduction in the amount of data needed to store the
boundary. In addition, keep in mind that the subsampled
boundary can be recovered from any of the preceding codes.
Representation

11.1- Representation Chain Codes


11.2- Boundary Descriptors
11,3- Regional Descriptors
Polygonal Approximations
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors Signatures

Boundary Segments

Skeletons
Polygonal Approximations

• A digital boundary can be approximated with arbitrary


accuracy by a polygon.

11.1- Representation • Polygonal approximations: to represent a boundary by


11.2- Boundary Descriptors
11,3- Regional Descriptors straight line segments, and a closed path becomes a
polygon.
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors
• to be exact,we should have:
Number of segments of polygon=number of points in
boundary
Polygonal Approximations

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Polygonal Approximations

• The size of the cells determines the accuracy of the


11.1- Representation polygonal approximation.
11.2- Boundary Descriptors
11,3- Regional Descriptors
• if the size of each (square) cell corresponds to a pixel in
11.4- Use of Principal the boundary, error in each cell between the boundary
Components for Description
11.5 - Relational Descriptors and the MPP approximation at most would be , where d
is the minimum possible distance between pixels.

• The objective is to use the largest possible cell size


acceptable in a given application
producing MPPs with the fewest number of vertices
Polygonal Approximations

Concave vertex Convex


vertex

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Polygonal Approximations

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


1. The MPP bounded by a simply connected cellular complex
Components for Description is not self intersecting.
11.5 - Relational Descriptors
2. Every convex vertex of the MPP is a W vertex, but not
every W vertex of a boundary is a vertex of the MPP
3. Every mirrored concave vertex of the MPP is a B vertex,
but not every B vertex of a boundary is a vertex of the MPP
4. All B vertices are on or outside the MPR and all W vertices
are on or in side the MPP
5. The uppermost, leftmost vertex in a sequence of vertices
contained in a cellular complex is always a W vertex of the
MPP
Polygonal Approximations

• orientation of triplets of points:


the triplet of points, (a, b, c)
a = (x1, y1), b = (x2,y2), and c = (x3,y3)
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Polygonal Approximations

Algorithm:

• form a list whose rows are the coordinates of each


11.1- Representation
11.2- Boundary Descriptors
vertex and an additional element denoting whether the
11,3- Regional Descriptors vertex is W or B.
11.4- Use of Principal
Components for Description • V0 the first vertex be the uppermost leftmost
11.5 - Relational Descriptors
• assume that vertices are arranged in the
counterclockwise direction.
• WC crawls along convex (W) vertices
• Bc crawls along mirrored concave (B) vertices
• VL last MPP vertex found
• Vk  current vertex being examined.
Polygonal Approximations

• SetWC = BC = V0

(a) Vk lies to the positive side of the line through pair (VL, WC);
that is, sgn(VL, WC, Vk) > 0.
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors the next MPP vertex is WC, and we let VL = WC; then we
11.4- Use of Principal
reinitialize the algorithm by setting WC = BC = VL, and continue
Components for Description with the next vertex left
11.5 - Relational Descriptors

(b) Vk lies on the negative side of the line though pair (VL, WC)
or is collinear with it; that is sgn(VL, WC, Vk) 0. At the same
time, VK lies to the positive
side of the line through (VL, BC) or is collinear with it; that is,
sgn(VL,BC, Vk) = 0.

VL becomes a candidate MPP vertex. In this case, we set W C = Vk


if Vk is convex (i.e., it is a W vertex); otherwise we set BC = Vk.
Polygonal Approximations

(c) Vk lies on the negative side of the line though pair (V L,


Bc): that is, sgn(VL, BC, VK) < 0.
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
the next MPP vertex is BC and we let VL = BC; then we
11.4- Use of Principal
Components for Description reinitialize the algorithm by setting W C = BC = VL and
11.5 - Relational Descriptors
continue with the next vertex after VL

• Algorithm terminates when it reaches the first vertex


again, and thus has processed all the vertices in the
polygon. The VL vertices found by the algorithm are
the vertices of the MPP
Polygonal Approximations

Example

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
• letting WC = BC = V0 = VL = (1.4).
The next vertex is V1 = (2, 3).
sgn(VL, WC, V1) = 0 and sgn(VL, BC, V1) = 0

condition (b) holds.

We let BC = V1 = (2, 3) and WC is at (1, 4),


VL is still at (1,4) because no new MPP-vertex was found.
Polygonal Approximations

• Next, we look at V2 = (3, 3).


11.1- Representation sgn(VL, WC, V2) = 0, and sgn(VL, BC, V2) = 1
11.2- Boundary Descriptors
11,3- Regional Descriptors
condition (b) of the algorithm holds again.
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors Because V2 is a W (convex) vertex , we let WC = V2 = (3, 3).
At this stage, the crawlers are at WC = (3,3) and BC = (2,3);
VL remains un- changed.
Polygonal Approximations

• If we we examine V5 = (7,1) ,we’ll have:


11.1- Representation
sgn(VL, WC, V5) = 9
11.2- Boundary Descriptors
11,3- Regional Descriptors
so condition (a) holds
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors
set VL = WC = (4, 1). Because a new MPP
vertex was found, we reinitialize the algorithm
by setting WC = BC = VL and start again with
the next vertex being the vertex after the newly
found VL. The next vertex is V5, so we visit it
again.
Polygonal Approximations

Continuing as above with this and the remaining


11.1- Representation
11.2- Boundary Descriptors vertices yields the MPP vertices in Fig below.
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Polygonal Approximations

11.1-
Representation
11.2- Boundary
Descriptors
11,3- Regional
Descriptors

11.4- Use of
Principal
Components for
Description
11.5 - Relational
Descriptors
Representation

11.1- Representation Chain Codes


11.2- Boundary Descriptors
11,3- Regional Descriptors
Polygonal Approximations
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors Signatures

Boundary Segments

Skeletons
Signatures

• represents a shape by a one dimensional function derived from shape


boundary point.
• 1-D function is easier to describe than the original 2-D
boundary.
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Signatures

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Signatures

11.1- Representation
• Problem: Signatures generated by this approach are
11.2- Boundary Descriptors invariant to translation, but they do depend on rotation.
11,3- Regional Descriptors

11.4- Use of Principal • Solution for rotation: We can normalize with respect
Components for Description
11.5 - Relational Descriptors
to rotation .
find a way to select the same starting point to generate the
signature, regardless of the shape’s orientation.

One way to do so is to select the starting point as the point


farthest from the centroid, assuming that this point is
unique for each shape of interest.
Signatures

11.1- Representation
• Solution for scaling: We can normalize with respect to
11.2- Boundary Descriptors scaling.
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description Scale all functions so that they always span the same range
11.5 - Relational Descriptors
of values, e.g., [0, 1].

Advantage: simplicity
disadvantage :depends on only two values the minimum
and maximum.
Representation

11.1- Representation Chain Codes


11.2- Boundary Descriptors
11,3- Regional Descriptors
Polygonal Approximations
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors Signatures

Boundary Segments

Skeletons
Boundary Segments

11.1- Representation
• Decomposition reduces the boundary’s complexity and
11.2- Boundary Descriptors thus simplifies the description process.
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description • In this case, use of the convex hull of the region
11.5 - Relational Descriptors
enclosed by the boundary is a powerful tool for robust
decomposition of the boundary.
Boundary Segments

• convex hull H of an arbitrary set S is the smallest


convex set containing S.
• The set difference H - S is called the convex deficiency
11.1- Representation D of the set S. The region boundary can be partitioned
11.2- Boundary Descriptors
11,3- Regional Descriptors by following the contour of S and marking the points at
which a transition is made into or out of a component of
11.4- Use of Principal
Components for Description the convex deficiency.
11.5 - Relational Descriptors
Convex deficiency
Boundary Segments

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors

S = dbabcbabdbabcbab
Boundary Segments

• Another use of convex deficiency is to recognize human actions.

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Boundary Segments

• Problem: digital boundaries tend to be irregular .


• These effects usually result in convex deficiencies
that have small, meaningless components scattered
randomly through-out the boundary.
11.1- Representation
11.2- Boundary Descriptors • Solution: smooth a boundary prior to partitioning.
11,3- Regional Descriptors
traverse the boundary and replace the coordinates of
11.4- Use of Principal each pixel by the average coordinates of k of its
Components for Description
11.5 - Relational Descriptors neighbors along the boundary.

• works for small irregularities, but it is time-


consuming and difficult to control

• Large values of k  excessive smoothing


• small values of k insufficient in some segments of
the boundary
Boundary Segments

• Better solution: use a polygonal approximation prior to


11.1- Representation finding the convex deficiency of a region. Most digital
11.2- Boundary Descriptors boundaries of interest are simple .Graham and Yao [1983]
11,3- Regional Descriptors
give an algorithm for finding the convex hull of such
11.4- Use of Principal polygons.
Components for Description
11.5 - Relational Descriptors
Representation

11.1- Representation Chain Codes


11.2- Boundary Descriptors
11,3- Regional Descriptors
Polygonal Approximations
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors Signatures

Boundary Segments

Skeletons
Skeletons

• Represent structural shape of a plane region reduce it


11.1- Representation
11.2- Boundary Descriptors to a graph.
11,3- Regional Descriptors • Use skeletonizing algorithm via a thinning
11.4- Use of Principal
Components for Description • Problem of some skeletonizing algorithms:
11.5 - Relational Descriptors
the procedure made no provisions for keeping the skeleton
connected.

• The skeleton of a region may be defined via the medial


axis transformation (MAT) proposed by Blum [1967].
Skeletons

medial axis is the locus of centers of maximal disks that fit


within the shape.

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Skeletons

• Difference between MAT and skeleton

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Skeletons

11.1- Representation
11.2- Boundary Descriptors • The MAT of a region R with border B:
11,3- Regional Descriptors 1. For each point p in R, find its closest neighbor in B.
11.4- Use of Principal
Components for Description 2. If p has more than one such neighbor, it is said to
11.5 - Relational Descriptors
belong to the skeleton of R.

Problem: direct implementation of this definition is


expensive computationally.
Implementation involves calculating the distance from
every interior point to every point on the boundary of a
region.
Skeletons

Solution: thinning algorithms that iteratively delete


11.1- Representation
boundary points of a region subject to the constraints that
11.2- Boundary Descriptors deletion of these points
11,3- Regional Descriptors

11.4- Use of Principal (1) does not remove end points


Components for Description (2) does not break connectivity
11.5 - Relational Descriptors
(3) does not cause excessive erosion of the region.
Skeletons

Algorithm for thinning binary regions


Step 1 flags a contour point p, for deletion if
the following conditions are satisfied:
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors

• N(p1) is the number of nonzero neighbors


of p1
• T(p1) is the number of 0-1 transitions in the
ordered sequence p2, p3, ,..., p8. p9, p2.
Skeletons

Example

11.1- Representation
11.2- Boundary Descriptors 0 0 1
11,3- Regional Descriptors 1 p1 0
11.4- Use of Principal 1 0 1
Components for Description
11.5 - Relational Descriptors
N(p1) = 4 and T(p1) = 3
Skeletons

Step 2 conditions (a) and (b) remain the same, but


11.1- Representation conditions (c) and (d) are changed to
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors

Algorithm:
1.Apply Step 1 to every border pixel in the binary region .
2. if all conditions (a)-(d) are satisfied the point is flagged
for deletion. 3.Delete flagged points (changed to 0).
4.Apply step 2 to the resulting data
Skeletons

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
11.2 Boundary Descriptors
Boundary Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Shape Numbers
11.5 - Relational Descriptors

Fourier Descriptors

Statistical Moments
Some Simple Descriptors

11.1- Representation
11.2- Boundary Descriptors • There are several simple geometric measures that can
11,3- Regional Descriptors
be useful for describing a boundary.
11.4- Use of Principal • The length of a boundary: the number of pixels
Components for Description
11.5 - Relational Descriptors
along a boundary gives a rough approximation of its
length.
• Curvature: the rate of change of slope
• To measure a curvature accurately at a point in a
digital boundary is difficult
• The difference between the slops of adjacent
boundary segments is used as a descriptor of
curvature at the point of intersection of segments
Boundary Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors
Shape Numbers

Fourier Descriptors

Statistical Moments
Shape Numbers

First
difference

• The shape number of a boundary is defined as the first


difference of smallest magnitude.
• The order n of a shape number is defined as the number of
digits in its representation.
Shape Numbers
Shape Numbers
Boundary Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Shape Numbers
11.5 - Relational Descriptors

Fourier Descriptors

Statistical Moments
Fourier Descriptors

• This is a way of using the Fourier transform to analyze


11.1- Representation
11.2- Boundary Descriptors
the shape of a boundary.
11,3- Regional Descriptors • The x-y coordinates of the boundary are treated as
the real and imaginary parts of a complex number.
11.4- Use of Principal
Components for Description • Then the list of coordinates is Fourier transformed
11.5 - Relational Descriptors using the DFT (chapter 4).
• The Fourier coefficients are called the Fourier
descriptors.
• The basic shape of the region is determined by the
first several coefficients, which represent lower
frequencies.
• Higher frequency terms provide information on the
fine detail of the boundary.
Fourier Descriptors
Fourier descriptor: view a coordinate (x,y) as a complex number
(x = real part and y = imaginary part) then apply the Fourier
transform to a sequence of boundary points.
Let s(k) be a coordinate
s(k )  x(k )  jy (k )
of a boundary point k :
K 1
Fourier descriptor : 1
a (u ) 
K
 s
k 0
( k ) e  2uk / K

Reconstruction formula
K 1
1
s(k ) 
K
 a
k 0
( u ) e 2uk / K

Boundary
points
1 P 1

Fourier Descriptors  2uk / K


ˆs (k )  a (u ) e
K k 0
Fourier Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors

Some properties of Fourier descriptors


Boundary Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Shape Numbers
11.5 - Relational Descriptors

Fourier Descriptors

Statistical Moments
Statistical Moments

11.1- Representation
11.2- Boundary Descriptors • Moments are statistical measures of data.
11,3- Regional Descriptors
• They come in integer orders.
11.4- Use of Principal • Order 0 is just the number of points in the data.
Components for Description
11.5 - Relational Descriptors • Order 1 is the sum and is used to find the average.
• Order 2 is related to the variance, and order 3 to the
skew of the data.
• Higher orders can also be used, but don’t have
simple meanings.
Statistical Moments

• Let r be a random variable, and g(ri) be normalized (as


11.1- Representation the probability of value ri occurring), then the moments
11.2- Boundary Descriptors
11,3- Regional Descriptors are K 1

11.4- Use of Principal


 n (r )   (ri  m) n g (ri )
Components for Description k 0
11.5 - Relational Descriptors
K 1
where m   ri g (ri )
i 0
11.3 Regional Descriptors
Regional Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors

Texture

Moments of Two-Dimensional Functions


Some Simple Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
• Some simple descriptors
• The area of a region: the number of pixels in the
11.4- Use of Principal region
Components for Description
11.5 - Relational Descriptors • The perimeter of a region: the length of its boundary
• The compactness of a region: (perimeter)2/area
• The mean and median of the gray levels
• The minimum and maximum gray-level values
• The number of pixels with values above and below
the mean
Some Simple
Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Regional Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors

Texture

Moments of Two-Dimensional Functions


Topological Descriptors

Topological property 1:
11.1- Representation the number of holes (H)
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors

Topological property 2:
the number of connected
components (C)
Topological Descriptors

Topological property 3:
11.1- Representation Euler number: the number of connected components
11.2- Boundary Descriptors subtract the number of holes
11,3- Regional Descriptors
E=C-H
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors

E=0 E= -1
Topological Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for
Description
11.5 - Relational
Descriptors

Topological
property 4:
the largest
connected
component.
Regional Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors

Texture

Moments of Two-Dimensional Functions


Texture

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
• Texture is usually defined as the smoothness or
roughness of a surface.
11.4- Use of Principal • In computer vision, it is the visual appearance of the
Components for Description uniformity or lack of uniformity of brightness and color.
11.5 - Relational Descriptors
• There are two types of texture: random and regular.
• Random texture cannot be exactly described by
words or equations; it must be described statistically.
The surface of a pile of dirt or rocks of many sizes
would be random.
• Regular texture can be described by words or
equations or repeating pattern primitives. Clothes
are frequently made with regularly repeating
patterns.
• Random texture is analyzed by statistical methods.
• Regular texture is analyzed by structural or spectral
(Fourier) methods.
Texture

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Statistical Approaches
• Let z be a random variable denoting gray levels and let p(zi),
i=0,1,…,L-1, be the corresponding histogram, where L is the
number of distinct gray levels.
• The nth moment of z:
L 1 L 1
 n ( z )   ( zi  m) p( zi ) where m   zi p( zi )
n

k 0 i 0
1
• The measure R: R  1
1   2 ( z)
L 1
• The uniformity: U   p 2 ( zi )
i 0
L 1
• The average entropy: e   p ( zi ) log 2 p ( zi )
i 0
Statistical Approaches

Smooth Coarse Regular


Statistical Approaches

• Structural concepts:
• Suppose that we have a rule of the
form S→aS, which indicates that
the symbol S may be rewritten as
aS.
• If a represents a circle [Fig.
11.23(a)] and the meaning of
“circle to the right” is assigned to a
string of the form aaaa… [Fig.
11.23(b)] .
Spectral Approaches

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Spectral Approaches
Regional Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors

Texture

Moments of Two-Dimensional Functions


Moments of Two-Dimensional Functions

• For a 2-D continuous function f(x,y), the moment of order (p+q) is defined as
 
m pq    x p y q f ( x, y )dxdy for p, q  1,2,3,...
 

• The central moments are defined as

 
 pq    ( x  x ) p ( y  y ) q f ( x, y )dxdy
 
m10 m01
where x  and y 
m00 m00
Moments of Two-Dimensional Functions
• If f(x,y) is a digital image, then

 pq   ( x  x ) p ( y  y ) q f ( x, y )
• The central moments
x of yorder up to 3 are

 00   ( x  x ) 0 ( y  y ) 0 f ( x, y )   f ( x, y )  m00
x y x y
m10
10   ( x  x )1 ( y  y ) 0 f ( x, y )  m10  (m00 )  0
x y m00
m01
 01   ( x  x ) ( y  y ) f ( x, y )  m01 
0 1
(m00 )  0
x y m00
m10m01
11   ( x  x ) ( y  y ) f ( x, y )  m11 
1 1

x y m00
 m11  x m01  m11  ym10
Moments of Two-Dimensional Functions

• The central moments of order up to 3 are

 20   ( x  x ) 2 ( y  y ) 0 f ( x, y )  m20  x m10
x y
 02   ( x  x ) 0 ( y  y ) 2 f ( x, y )  m02  ym01
x y

 21   ( x  x ) 2 ( y  y )1 f ( x, y )  m21  2 x m11  ym20  2 x m01


x y

12   ( x  x )1 ( y  y ) 2 f ( x, y )  m12  2 ym11  x m02  2 ym10


x y

30   ( x  x ) 3 ( y  y ) 0 f ( x, y )  m30  3 x m20  2 x 2 m10


x y

03   ( x  x ) 0 ( y  y ) 3 f ( x, y )  m03  3 ym02  2 y 2 m01


x y
Moments of Two-Dimensional Functions

• The normalized central moments


are defined as
 pq
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
 pq  
11.4- Use of Principal
Components for Description
 00
11.5 - Relational Descriptors
pq
where   1 for p  q  2,3,....
2
Moments of Two-Dimensional Functions

• A seven invariant moments can be derived from the


second and third moments:
1   20   02
2  ( 20   02 ) 2  4112
3  (30  312 ) 2  (3 21   03 ) 2
4  (30  12 ) 2  ( 21   03 ) 2

5  (30  312 )(30  12 ) (30  12 ) 2  3( 21   03 ) 2 

 (3 21   03 )( 21   03 ) 3( 30  12 ) 2  ( 21   03 ) 2 
Moments of Two-Dimensional Functions


6  ( 20   02 ) (30  12 ) 2  ( 21   03 ) 2 
 411 (30  12 )( 21   03 )
 2
7  (3 21   03 )(30  12 ) (30  12 )  3( 21   03 ) 2


 (312  30 )( 21   03 ) 3(30  12 ) 2  ( 21   03 ) 2 
This set of moments is invariant to translation,
rotation, and scale change
Moments of Two-Dimensional Functions
Moments of Two-Dimensional Functions

Table 11.3 Moment invariants for the images in Figs. 11.25(a)-(e).


11.4 Use of Principal
Components for Description
Principal Components for Description

Purpose: to reduce dimensionality of a vector image while


maintaining information as much as possible.

Let x  [ x1 x2 ... xn ]T

1 K
Mean: m x  E{x} 
K
x
k 1
k

1 K
Covariance matrix T
C x  E{(x  m x )( x  m x ) } 
K
 k k x x
x x
k 1
T
 m m T
Principal Components for Description
Let y  A(x  m x )
11.1- Representation
11.2- Boundary Descriptors
Where A is created from eigenvectors of Cx as follows
11,3- Regional Descriptors Row 1 contain the 1st eigenvector with the largest
11.4- Use of Principal eigenvalue.
Components for Description Row 2 contain the 2nd eigenvector with the 2nd largest
11.5 - Relational Descriptors
eigenvalue.
…. 1 0 0 ...
m y  E{y}  0  0  ... 0 
and Cy   1 
C y  ACx A T  ... ... ... ... 
 
 0 ... ... 1 
Then elements of y  A(x  m )
x
are uncorrelated. The
component of y with the largest l is called the principal
component.
Principal Components for Description

11.1- Representation
11.2- Boundary Descriptors Eigenvector and eigenvalue of Matrix C are defined as
11,3- Regional Descriptors
Let C be a matrix of size NxN and e be a vector of size
11.4- Use of Principal Nx1.
Components for Description
11.5 - Relational Descriptors
If
Ce  e
Where l is a constant

We call e as an eigenvector and l as eigenvalue of C


Principal Components for Description
6 spectral images
from an airborne
Scanner.
Principal Components for Description

Component l

1 3210
2 931.4
3 118.5
4 83.88
5 64.00
6 13.40
Original image After Hotelling transform
Principal Components for Description

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
11.5 Relational Descriptors
Relational Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Relational Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Relational Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Relational Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Relational Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors
Relational Descriptors

11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors

11.4- Use of Principal


Components for Description
11.5 - Relational Descriptors

You might also like