Image Processing Reference
In-Depth Information
17.4 Moment-Based Description of Shape
The region to be described here may contain varying gray shades as opposed to many
simple shape descriptors. In that case, the entire function
f
is assumed to represent
the region. Otherwise, the function takes the value
f
=1inside the region to be
described and
f
=0outside. A function
f
can be translated via
f
x
m
10
m
00
m
01
m
00
,y
−
(17.19)
−
where
m
10
,
m
01
,
m
00
are the real moments of
f
given by Eq. (10.9). The centroid of
the resulting image coincides with the new origin because (
m
10
m
00
,
m
01
m
00
)
T
represents
the position of the centroid in the above equation. Accordingly, we assume that
f
's
centroid is already brought to the origin, making
f
translation-invariant. Because of
this, the complex moments of
f
,
I
pq
(
f
)=
(
x
+
iy
)
p
(
x
iy
)
q
f
(
x, y
)
dxdy
−
are translation-invariant, too. We investigate now how
I
pq
(
f
)=
r
p
exp(
ipθ
)
r
q
exp(
−
iqθ
)
f
(
x
(
r, θ
)
,y
(
r, θ
))
rdrdθ
=
r
p
+
q
exp(
i
(
p
−
q
)
θ
)
f
(
x
(
r, θ
)
,y
(
r, θ
))
rdrdθ
(17.20)
where
x
(
r, θ
)=
r
cos(
θ
) and
y
(
r, θ
)=
r
sin(
θ
), will be affected by a rotation and
scaling. In consequence of Eq. (17.20), the complex moment of a function defined in
polar coordinates,
f
(
r, θ
), will be given by
I
pq
(
f
)=
r
p
+
q
exp(
i
(
p
−
q
)
θ
)
f
(
r, θ
)
rdrdθ
(17.21)
For convenience, we assume below that
f
is given in polar representation as
f
(
r, θ
)
with its centroid at the origin. To discuss how complex moments transform under a
rotation and scaling transformation, we use primed variables for the variables after
the CT, i.e.,
r
=
αr
where
α>
0 and
θ
=
θ
+
ϕ
. The transformed function
f
,is
thus obtained from
f
via
f
(
r
,θ
)=
f
(
r
α
,θ
−
ϕ
). Using Eq. (17.21), a complex
moment of the transformed image yields
I
pq
(
f
)=
r
p
+
q
exp(
i
(
p
q
)
θ
)
f
(
r
,θ
)
r
dr
dθ
−
=
r
p
+
q
exp(
i
(
p
q
)
θ
)
f
(
r
α
,θ
−
ϕ
)
r
dr
dθ
−
=
(
αr
)
p
+
q
exp(
i
(
p
−
q
)
θ
) exp(
i
(
p
−
q
)
ϕ
)
f
(
r, θ
)
αrαdrdθ
q
)
ϕ
)
r
p
+
q
exp(
i
(
p
=
α
p
+
q
+2
exp(
i
(
p
−
−
q
)
θ
)
f
(
r, θ
)
rdrdθ
=
α
p
+
q
+2
exp(
i
(
p
−
q
)
ϕ
)
I
pq
(
f
)
(17.22)