Image Processing Reference
In-Depth Information
ellipse, Figure 7.22 (a), gives the second-order moments in Figure 7.22 (d). In all cases, the
first-order moments are zero, as expected. The moments, Figure 7.22 (e), of the translated
ellipse, Figure 7.22 (b), are the same as those of the original ellipse. In fact, these moments
show that the greatest rate of change in mass is around the horizontal axis, as consistent
with the ellipse. The second-order moments, Figure 7.22 (f), of the ellipse when rotated by
90°, Figure 7.22 (c), are simply swapped around, as expected: the rate of change of mass is
now greatest around the vertical axis. This illustrates how centralised moments are invariant
to translation, but not to rotation.
However, centralised moments are as yet only translation invariant. In order to accrue
invariance to scale, we require normalised central moments , η pq , defined as (Hu, 1962).
µ
µ
pq
η
=
(7.86)
pq
00
where
pq
+
2
γ =
+ 1
pq
+
2
(7.87)
Seven rotation invariant moments can be computed from these given by
M 1 =
η 20 +
η 02
2
2
M 2 = (
ηη
-
)
+ 4
η
20
02
11
η 12 ) 2 + (3
η 03 ) 2
M 3 = (
η 30 - 3
η 21 -
η 12 ) 2 + (
η 03 ) 2
M 4 = (
η 30 +
η 21 +
η 12 ) 2 - 3(
η 03 ) 2 )
M 5 = (
η 30 - 3
η 12 )(
η 30 +
η 12 ) + ((
η 30 +
η 21 -
η 12 ) 2 - (
η 03 ) 2 )
+ (3
η 21 -
η 03 )(
η 21 +
η 03 )(3(
η 30 +
η 21 +
(7.88)
η 12 ) 2 - (
η 03 ) 2 ) + 4
M 6 = (
η 20 -
η 02 )((
η 30 +
η 21 +
η 11 (
η 30 +
η 12 )(
η 21 +
η 03 )
η 12 ) 2 - 3(
η 03 ) 2 )
M 7 = (3
η 21 -
η 03 )(
η 30 +
η 12 )((
η 30 +
η 21 +
η 30 ) 2 - (
η 03 ) 2 )
+ (3
η 12 -
η 30 )(
η 21 +
η 03 )(3(
η 12 +
η 21 +
The first of these, M 1 and M 2, are second-order moments, those for which p + q = 2. Those
remaining are third-order moments, since p + q = 3. (The first-order moments are of no
consequence since they are zero.) The last moment M 7 is introduced as a skew invariant
designed to distinguish mirror images.
Code 7.5 shows the Mathcad implementation that computes the invariant moments M 1,
M 2 and M 3. The code computes the moments by straight implementation of Equations
7.81 and 7.86. The use of these invariant moments to describe three shapes is illustrated in
Figure 7.23 . Figure 7.23 (b) corresponds to the same plane in Figure 7.23 (a) but with a
change of scale and a rotation. Thus, the invariant moments for these two shapes are very
similar. In contrast, the invariant moments for the plane in Figure 7.23 (c) differ.
These invariant moments have the most important invariance properties. However,
these moments are not orthogonal, as such there is potential for reducing the size of the set
of moments required to describe a shape accurately. This can be achieved by using Zernike
moments (Teague, 1980) that give an orthogonal set of rotation-invariant moments. Rotation
invariance is achieved by using polar representation, as opposed to the Cartesian
Search WWH ::




Custom Search