2D Binary Image Moment Invariants

Bob Fisher

Moment invariants are properties of connected regions in binary images that are invariant to translation, rotation and scale. They are useful because they define a simply calculated set of region properties that can be used for shape classification and part recognition.

Many people have used the set of 7 moment invariants identified by Hu [1] but a recent book by Flusser, Suk and Zitová [2] has presented a related independent basis set of invariants of the same order containing only 6 invariants (and identifying the dependent invariant in the Hu set).

The new invariants are defined below. Let:
$p_{rc}$ be a binary image indexed by $(r,c)$, with the foreground=1
$A = \sum_r \sum_c p_{rc}$ be the area of the shape
$(\hat{r},\hat{c})$ be the center of mass

Define the complex $uv$ central (translation invariant) moments:

\begin{displaymath}
c_{uv} = \sum_r \sum_c ((r - \hat{r}) + i(c-\hat{c}))^u ((r - \hat{r}) - i(c-\hat{c}))^v p_{rc}
\end{displaymath}

From this we define some specific scale invariant moments:
$s_{11} = c_{11}/ (A^{2})$
$s_{20} = c_{20}/ (A^{2})$
$s_{21} = c_{21}/ (A^{2.5})$
$s_{12} = c_{12}/ (A^{2.5})$
$s_{30} = c_{30}/ (A^{2.5})$

These are combined and rescaled (so the values are in a similar range) to get 6 rotation invariants:
$I_{1} = real(s_{11})$
$I_{2} = real(1000*s_{21}*s_{12})$
$I_{3} = 10000*real(s_{20}*s_{12}*s_{12})$
$I_{4} = 10000*imag(s_{20}*s_{12}*s_{12})$
$I_{5} = 1000000*real(s_{30}*s_{12}*s_{12}*s_{12})$
$I_{6} = 1000000*imag(s_{30}*s_{12}*s_{12}*s_{12})$

[1] M.-K. Hu. Visual pattern recognition by moment invariants, IRE Trans. on Information Theory, 8(2):179-187, 1962.

[2] J. Flusser, T. Suk, B. Zitová. Moment and Moment Invariants in Pattern Recognition. John Wiley and Sons, 2009.