A Novel Form of Affine Moment Invariants of Grayscale Images

—We present a general method to derive robust invariants of grayscale images under affine geometric transformation. In the literature, there are well studied affine moment invariants of grayscale images. The problem is that only few of the invariants are low orders. Higher order affine moment invariants are sensitive to noise and hard to implement. In this paper, we extend the traditional definition of the geometric moment by encapsulating the image functions by some wrapper functions. A general theorem to construct the affine invariants consisting of the extended moments of a grayscale image is presented. Using this method, different forms of low order affine moment invariants are constructed. The traditional affine moment invariants are a special type of the proposed new affine moment invariants. These forms of invariants are less sensitive to noise and easy to implement.


I. INTRODUCTION
Invariants of an image are functions of the image that remain the same under some changes to the image [1]- [7].A 2D grayscale image is a function f(x, y) that corresponds to a 3D scene.It captures geometrical and physical properties of objects in the 3D world.Under different situations, the same 3D scene can have different images.One image is called a change of another image.There are two basic kinds of intrinsic changes to images.One is geometric changes and the other is lighting changes.We consider only geometric changes in this paper.
Under the pinhole camera model, a 3D point (X, Y, Z) is projected into an image point (x, y) satisfying 1 1 where M is a 3×4 matrix and κ is a scalar factor.When a 3D scene is planar, the geometric relationship between two views of the same scene is The set of all invertible transformations of the form (2) constitutes the planar projective transformation group G.The action of a group element τ on an image f(x, y) is defined as where f(x, y) is the original image and g(u, v) is the transformed image.An invariant of an image f(x, y) is a function I of f(x, y) such that ( ( , )) ( ( , )), It is easy to compute projective invariants for a discrete point set [6].Projective invariants of 2D shapes are well studied also [7].However, Projective invariants of grayscale images are extremely hard to derive [8]- [12].
When there is no projective distortion, two images of the same planar scene undergo an affine transformation The most notable invariants of grayscale images with respect to affine transformations are affine moment invariants.Now it is possible to construct affine moment invariants up to any orders.The problem is that there are only a few low order independent invariants.Higher order affine moment invariants are sensitive to noise and hard to implement.
This paper presents a method to construct low order invariants of images under affine transformation.We first generalize the classical definition of the geometric moment.In the definition of the moment, the image function is encapsulated by some wrapper functions.We then prove a general theorem for constructing affine moment invariants with respect to the generalized moments of images.As examples, some of the new affine moment invariants up to the third order are presented explicitly.Previously, we only have five independent affine moment invariants up to the third order [3].
The paper is organized as follows.In Section II, we review a few related works on the moment invariants.In Section 3, we define the generalized geometric moment of 2D images.In Section IV, we study invariants of the generalized moments under affine transformations.In Section IV, we present experimental results for the proposed affine moment invariants.We conclude in Section IV.

A. Moments
Hu introduced the concept of moments of images into the pattern recognition field in 1962 [5].The geometric moments of order (p, q) of an image f(x, y) are defined by ( , ) p q pq m x y f x y dxdy where p and q are nonnegative integers.If f(x, y) is piecewise continuous and has nonzero values only in a finite domain, moments of all orders exist.The central moments are defined as ( ) ( ) ( , ) where For decades, researchers have extended the concept of moments in various ways.The most notable idea is using orthogonal polynomials as kernels in the definition of moments.Teague introduced the first two orthogonal moments, Legendre moments and Zernike moments [9].From the point of view of information theory, orthogonal moments are superior to geometric moments.However, it is hard to derive invariants of orthogonal moments beyond the similarity transformations.Invariants of geometric moments are relatively easy to derive.

B. Invariants of Geometric Moments under Similarity Transformation
The excellence of moments is that we can construct invariants of images from them for object recognition.By means of classical algebraic invariant theory [4], Hu derived seven functions of normalized central moments that are invariant with respect to translation, scale, and rotation.
Researchers proposed various methods to derive similarity invariant moments of higher orders.Mostafa and Psaltis introduced the idea of using complex moments for deriving invariants [1].The complex moments of order (p, q) of an image f(x, y) are defined as ( ) ( ) ( , ) x iy x iy f x y dxdy Flusser proposed a general method to construct rotational invariants of images based on complex moments [3].Let n ≥ 1 and let k i , p i , and q i (i = 1, . . ., n) be nonnegative integers such that 1 ( ) 0 Then is rotational invariant.Translation invariance is obtained by using central complex moments.Scaling invariance can be achieved by the same normalization proposed by Hu.

C. Invariants of Geometric Moments under Affine Transformation
Invariants of geometric moments with respect to affine transformations are generally called affine moment invariants.Many researchers contribute to the development of affine moment invariants.Hu presented a fundamental theorem of affine invariants in his paper.Later, several researchers revised the theorem independently [3], [8].
Different research groups have used different mathematical tools to derive moment invariants.At first, only a few affine moment invariants were published.Flusser and Suk derived a set of four affine moment invariants based on classical algebraic invariant theory [2]: Graph theory, tensor algebra, and Lie group theory are also used to construct affine moment invariants [3], [10].It is now possible to get affine moment invariants up to any orders.
Higher order affine moment invariants are sensitive to noise.They are also hard to express and to implement.This is the motivation that we propose the affine invariants of generalized geometric moments.

III. GENERALIZED GEOMETRIC MOMENTS
We give the definition of generalized geometric moments in this section.The idea is quite simple.We encapsulate the image function by another function in the definition of moments.We call such a function the wrapper function.
Let {h I (x), I = 0, 1, 2,…} be a set of functions that are continuous in the range of an image f(x, y).The generalized geometric moments of order (p, q) of the image with the wrapper function h I (x) are defined by the integral 2 ( ( , )) where p and q are nonnegative integers and R is the interval (-∞, +∞).
The generalized central moments with the wrapper function h I (x) are defined as 2 ( ( , )) , .
The standard geometric moments are a special type of the generalized geometric moments with the wrapper function The generalized geometric moments with different wrapper functions convey varied information about the image f(x, y).This is useful for object recognition.It is easy to see that the generalized central geometric moments are translational invariant.Following the method of Hu, we can normalize the moments to achieve scaling invariance.
Although the selection of the set of functions {h I (x)} can be arbitrary, it is preferable to use functions as simple as possible.The elementary functions such as log 2 (x), sin(x), cos(x), and x a are good choices.In this paper, we choose {h 0 (x) = x, h 1 (x) = x 1/2 , h 2 (x) = x -1/2 , h 3 (x) = log 2 x, h 4 (x) = x -1 } as the set of wrapper functions.This is the basic set of wrapper functions that we will use in this paper.The symbols to denote these types of the generalized geometric moments are given below: .
The generalized central moments I pq µ are denoted similarly.
Intuitively, we should choose functions h I (x) such that h I (f(x, y)) will not amplify f(x, y) too much.Amplifying f(x, y) will amplify noise and distortion of f(x, y).Suitably reducing f(x, y) may sometime reduce the noise level in f(x, y).

IV. INVARIANTS OF GENERALIZED MOMENTS UNDER AFFINE TRANSFORMATION
In this section, we shall derive affine moment invariants of the generalized geometric moments.The derivation techniques are common in the literature.
The Jacobian determinant of the transformation ( 5) is The transformation ( 5) is invertible if and only D is nonzero.We always consider invertible transformations.
Let f(x, y) be an image function.Let g(u, v) be the image function transformed from f(x, y) by (5).Let h I (x) be the wrapper function to define the moments.Let I pq m ɶ represent the generalized geometric moments of g(u, v) with respect to (5).It is easy to see that  ( ( , )) .
From ( 21), we immediately obtain the following affine invariants of the generalized geometric moments of f(x, y) 00 0 0 00 This form of invariants is remarkably simple.With respect to the set of basic wrapper functions, we can derive the following four affine moment invariants: With respect to affine transformation (5), the first order generalized moments satisfy: From ( 21), (24), and (25), we obtain By definition, the first order central geometric moments are constant zero.
Let (x 1 , y 1 ) and (x 2 , y 2 ) be two cogredient points in the plane.That is they undergo the same form of affine transformation where (u 1 , v 1 ) and (u 2 , v 2 ) is the corresponding transformed points.From ( 26) and ( 27), we have Now we present a basic theorem for constructing the new affine invariants of the generalized moments.
Theorem.Let f(x, y) be an image function.Let h I (x), h J (x), h K (x), and h L (x) be four wrapper functions that are continuous in the range of the image.With respect to (5), the following functions of the generalized central moments of f(x, y) , , , , , , , , 0 4 00 I J K L p q r s t w p q r s t w p q r s t w i j k l m n i j k l m n I J p q r i j k i j k s t i l m p i l m K w n j l q s j l n are affine invariant (up to a sign), where p, q, r, s, t, and w are nonnegative integers.There are certainly other forms of affine moment invariants.For simplicity, we do not present them in this paper.We guess that invariants of the form (31) with moments up to the third orders are enough for most applications.Below we will present some of the new affine moment invariants with moment orders less than four.
The affine moment invariants of the type (32) and (33) contain generalized central moments up to the second order.They are homogeneous of the orders of the generalized central moments.The type (32) invariants are symmetric with respect to h I (x) and h J (x).That is , , 1 1 . The type (33) invariants are symmetric with respect to h I (x), h J (x), and h K (x).They are also constant zero when two of the wrapper functions are equal.When (p, q, r, s, t, w) = (3, 0, 0, 0, 0, 0), we obtain from (31) the third type of invariants ) The index I and J should be different to obtain a nonzero affine invariant of this type.
By choosing different wrapper functions h I (x), h J (x), h K (x), and h L (x), we can produce an arbitrary number of affine invariants of the generalized geometric moments.In this paper, we choose x, x 1/2 , x -1/2 , log 2 x, and x -1 as wrapper functions.They are indexed by 0, 1, 2, 3, and 4 in the denotation of invariants.For example, some explicit formulas of the type (32) affine moment invariants are: We expect that low order invariants with the five basic wrapper functions are enough for most object recognition applications.If we need more invariants, we can either use low order invariants with new wrapper functions or use higher order invariants with the five basic wrapper functions.

V. EXPERIMENTS
We have tested the proposed new affine moment invariants (AMIs) using Microsoft VC++ and Intel OpenCv.The first objective of the test is to confirm the invariance of the proposed new AMIs under affine transformation.The second goal of the experiment is to test the discriminating power of the new AMIs.We downloaded 96 gray level test images from the web.To validate the invariance of the new AMIs, we performed six affine transformations for each of the test images.The affine distortions of the images are depicted in Figure 1.They are transformed images of the second test image.
To validate the invariance of the proposed new AMIs, we have tested all invariants of the type Inv Inv on the first 20 test images in Table I and Table II.Inv ON THE FIRST 20 TEST IMAGES.

Trans. 3
Trans. 4 Trans. 5 Trans.The intra-class variances of the AMIs are caused by numerical imprecision of the digital images.
To conserve space, we omit the experimental results on noisy conditions.From the experiment we have known that the traditional AMIs are robust to uniformly distributed noise and white noise.They are sensitive to the mean value of the Gaussian distributed noise.They lose discriminating power under dilation and erosion distortions.On the other hand, the proposed new AMIs have similar discriminating power under uniformly distributed noise and white noise.They are less sensitive to the mean value of the Gaussian distributed noise.They still have certain discriminating power under dilation and erosion distortions.We found that some of the new AMIs can be very stable for specific images under certain noise model.This is important for object recognition.It provides the possibility to obtain specific invariants that are stable for the special object.

VI. CONCLUSIONS
We have presented a novel method to construct affine moment invariants of grayscale images through the generalized moments of images.Using this method, we can derive an arbitrary number of invariants consisting of only low order moments.The method is clear, simple, and easy to implement.
We have proposed a set of five wrapper functions.There are certainly other choices.When the number of wrapper functions is large, the number of affine invariants beyond the second order is huge.It is a hard problem to select the set of independent invariants from them.At present, we do not know whether one set of wrapper functions is superior to another set.This might be application sensitive.That is, for specific applications, one set of wrapper functions is better than another set.All these problems are the directions of future research.

1 ,
Inv 2 , Inv 3 , and Inv 4 .A few of the invariants of the type Inv 5 were tested also.The complete test results are too huge to include in this paper.So we only present the test results of the invariants Manuscript received March 19, 2012; accepted May 22, 2012.This work is supported by the National Natural Science Foundation of China under Grant No. 61070162, No. 71071028 and No. 70931001; the Specialized Research Fund for the Doctoral Program of Higher Education under Grant No. 20100042110025 and No. 20110042110024; the Fundamental Research Funds for the Central Universities under Grant No. N110204003.

TABLE I .
THE TEST RESULTS OFInv ON THE FIRST 20 TEST IMAGES.

TABLE II .
THE TEST RESULTS OF