Abstract:
Moment invariants have found wide applications in pattern recognition, object orientation and others The main difficulty in application of moment invariants is computation of the moment invariants: calculating the moments directly is too expensive in computation cost In this paper, a fast algorithm based on compensating principle is proposed It is considered that the computation of shape moments is summation of the contribution of each line segment Firstly, a binary shape is decomposed into line segments For each line segment L j , whose left end coordinate and right end coordinate are X j1 and X j2 respectively, a line segment A j is appended, whose left end coordinate and right end coordinate are 0 and X j1 -1 respectively, to line segment L j Now there are two line segment A j and B j The left end coordinate and right end coordinate of B j are 0 and X j2 respectively The moment of the line segment L j is the difference of these two line segments ( B j - A j ) The most advantage of the method is that the number of all the possibility of line segment is reduced from N 2 to N as the left end coordinate of all line segment is all zero Secondly, an array is assigned, whose size is N , and is used to store the moment of the line segment When ever calculating the moments of a line segment, it can be obtained from the array directly, so moment computation is more efficient Comparison of the computational complexity with some known methods is also given, which shows that the algorithm under discussion significantly reduces the complexity Compared with some other methods, which have the approximate result and only fit convex object, this method not only has accurate result but also can calculate any complicated object moments