Computing Moments by Prefix Sums

  • Authors:
  • Feng Zhou;Peter Kornerup

  • Affiliations:
  • Department of Information and Electronic Eng., Zhejiang University, People's Republic of China;Department of Math. and Computer Science, SDU/Odense University, Denmark

  • Venue:
  • Journal of VLSI Signal Processing Systems
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

Moments of images are widely used in pattern recognition, because in suitable form they can be made invariant to variations in translation, rotation and size. However the computation of discrete moments by their definition requires many multiplications which limits the speed of computation. In this paper we express the moments as a linear combination of higher order prefix sums, obtained by iterating the prefix sum computation on previous prefix sums, starting with the original function values. Thus the p′th moment m_p=\sum^N_{x=1}x^pf(x) can be computed by O (N · p) additions followed by p multiply-adds. The prefix summations can be realized in time O(N) using p + 1 simple adders, and in time O(p log N) using parallel prefix computation and O(N) adders. The prefix sums can also be used in the computation of two-dimensional moments for any intensity function f(x,y). Using a simple bit-serial addition architecture, it is sufficient with 13 full adders and some shift registers to realize the 10 order 3 image moment computations (m_00, m_01, m_10, m_02, m_20, m_12, m_21, m_03, m_30) for a 512 × 512 size image at the TV rate. In 1986 Hatamian published a computationally equivalent algorithm, based on a cascade of filters performing the summations. Our recursive derivation allows for explicit expressions and recursive equations for the coefficients used in the final moment calculation. Thus a number of alternative forms for the moment computation can be derived, based on different sets of prefix sums. It is also shown that similar expressions can be obtained for the moments introduced by Liao and Pawlak in 1996, forming better approximations to the exact geometric moments, at no extra computational cost.