Harman Patil (Editor)

EigenMoments

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
EigenMoments

EigenMoments is a set of orthogonal, noise robust, invariant to rotation, scaling and translation and distribution sensitive moments. Their application can be found in signal processing and computer vision as descriptors of the signal or image. The descriptors can later be used for classification purposes.

Contents

It is obtained by performing orthogonalization, via eigen analysis on geometric moments.

Framework summary

EigenMoments are computed by performing eigen analysis on the moment space of an image by maximizing Signal to Noise Ratio in the feature space in form of Rayleigh quotient.

This approach has several benefits in Image processing applications:

  1. Dependency of moments in the moment space on the distribution of the images being transformed, ensures decorrelation of the final feature space after eigen analysis on the moment space.
  2. The ability of EigenMoments to take into account distribution of the image makes it more versatile and adaptable for different genres.
  3. Generated moment kernels are orthogonal and therefore analysis on the moment space becomes easier. Transformation with orthogonal moment kernels into moment space is analogous to projection of the image onto a number of orthogonal axes.
  4. Nosiy components can be removed. This makes EigenMoments robust for classification applications.
  5. Optimal information compaction can be obtained and therefore a few number of moments are needed to characterize the images.

Problem formulation

Assume that a signal vector s R n is taken from a certain distribution having coorelation C R n × n ,i.e. C = E [ s s T ] where E[.] denotes expected value.

Dimension of signal space, n, is often too large to be useful for practical application such as pattern classification, we need to transform the signal space into a space with lower dimensionality.

This is performed by a two-step linear transformation:

q = W T X T s ,

where q = [ q 1 , . . . , q n ] T R k is the transformed signal, X = [ x 1 , . . . , x n ] T R n × m a fixed transformation matrix which transforms the signal into the moment space, and W = [ w 1 , . . . , w n ] T R m × k the transformation matrix which we are going to determine by maximizing the SNR of the feature space resided by q . For the case of Geometric Moments, X would be the monomials. If m = k = n , a full rank transformation would result, however usually we have m n and k m . This is specially the case when n is of high dimensions.

Finding W that maximizes the SNR of the feature space:

S N R t r a n s f o r m = w T X T C X w w T X T N X w ,

where N is the correlation matrix of the noise signal. The problem can thus be formulated as

w 1 , . . . , w k = a r g m a x w w T X T C X w w T X T N X w

subject to constraints:

w i T X T N X w j = δ i j , where δ i j is the Kronecker delta.

It can be observed that this maximization is Rayleigh quotient by letting A = X T C X and B = X T N X and therefore can be written as:

w 1 , . . . , w k = a r g m a x x w T A w w T B w , w i T B w j = δ i j

Rayleigh quotient

Optimization of Rayleigh quotient has the form:

max w R ( w ) = max w w T A w w T B w

and A and B , both are symmetric and B is positive definite and therefore invertible. Scaling w does not change the value of the object function and hence and additional scalar constraint w T B w = 1 can be imposed on w and no solution would be lost when the objective function is optimized.

This constraint optimization problem can be solved using Lagrangian multiplier:

max w w T A w subject to w T B w = 1

max w L ( w ) = max w ( w T A w λ w T B w )

equating first derivative to zero and we will have:

A w = λ B w

which is an instance of Generalized Eigenvalue Problem (GEP). The GEP has the form:

A w = λ B w

for any pair ( w , λ ) that is a solution to above equation, w is called a generalized eigenvector and λ is called a generalized eigenvalue.

Finding w and λ that satisfies this equations would produce the result which optimizes Rayleigh quotient.

One way of maximizing Rayleigh quotient is through solving the Generalized Eigen Problem. Dimension reduction can be performed by simply choosing the first components w i , i = 1 , . . . , k , with the highest values for R ( w ) out of the m components, and discard the rest. Interpretation of this transformation is rotating and scaling the moment space, transforming it into a feature space with maximized SNR and therefore, the first k components are the components with highest k SNR values.

The other method to look at this solution is to use the concept of simultaneous diagonalization instead of Generalized Eigen Problem.

Simultaneous diagonalization

  1. Let A = X T C X and B = X T N X as mentioned earlier. We can write W as two separate transformation matrices:

W = W 1 W 2 .

  1. W 1 can be found by first diagonalize B:

P T B P = D B .

Where D B is a diagonal matrix sorted in increasing order. Since B is positive definite, thus D B > 0 . We can discard those eigenvalues that large and retain those close to 0, since this means the energy of the noise is close to 0 in this space, at this stage it is also possible to discard those eigenvectors that have large eigenvalues.

Let P ^ be the first k columns of P , now P T ^ B P ^ = D B ^ where D B ^ is the k × k principal submatrix of D B .

  1. Let

W 1 = P ^ D B ^ 1 / 2

and hence:

W 1 T B W 1 = ( P ^ D B ^ 1 / 2 ) T B ( P ^ D B ^ 1 / 2 ) = I .

W 1 whiten B and reduces the dimensionality from m to k . The transformed space resided by q = W 1 T X T s is called the noise space.

  1. Then, we diagonalize W 1 T A W 1 :

W 2 T W 1 T A W 1 W 2 = D A ,

where W 2 T W 2 = I . D A is the matrix with eigenvalues of W 1 T A W 1 on its diagonal. We may retain all the eigenvalues and their corresponding eigenvectors since the most of the noise are already discarded in previous step.

  1. Finally the transformation is given by:

W = W 1 W 2

where W diagonalizes both the numerator and denominator of the SNR,

W T A W = D A , W T B W = I and the transformation of signal s is defined as q = W T X T s = W 2 T W 1 T X T s .

Information loss

To find the information loss when we discard some of the eigenvalues and eigenvectors we can perform following analysis:

η = 1 t r a c e ( W 1 T A W 1 ) t r a c e ( D B 1 / 2 P T A P D B 1 / 2 ) = 1 t r a c e ( D B ^ 1 / 2 P ^ T A P ^ D B ^ 1 / 2 ) t r a c e ( D B 1 / 2 P T A P D B 1 / 2 )

Eigenmoments

Eigenmoments are derived by applying the above framework on Geometric Moments. They can be derived for both 1D and 2D signals.

1D signal

If we let X = [ 1 , x , x 2 , . . . , x m 1 ] , i.e. the monomials, after the transformation X T we obtain Geometric Moments, denoted by vector M , of signal s = [ s ( x ) ] ,i.e. M = X T s .

In practice it is difficult to estimate the correlation signal due to insufficient number of samples, therefore parametric approaches are utilized.

One such model can be defined as:

r ( x 1 , x 2 ) = r ( 0 , 0 ) e c ( x 1 x 2 ) 2 ,

where r ( 0 , 0 ) = E [ t r ( s s T ) ] . This model of correlation can be replaced by other models however this model covers general natural images.

Since r ( 0 , 0 ) does not affect the maximization it can be dropped.

A = X T C X = 1 1 1 1 [ x 1 j x 2 i e c ( x 1 x 2 ) 2 ] i , j = 0 i , j = m 1 d x 1 d x 2

The correlation of noise can be modelled as σ n 2 δ ( x 1 , x 2 ) , where σ n 2 is the energy of noise.Again σ n 2 can be dropped because the constant does not have any effect on the maximization problem.

B = X T N X = 1 1 1 1 [ x 1 j x 2 i δ ( x 1 , x 2 ) ] i , j = 0 i , j = m 1 d x 1 d x 2 B = X T N X = 1 1 [ x 1 j + i ] i , j = 0 i , j = m 1 d x 1 = X T X

Using the computed A and B and applying the algorithm discussed in previous section we find W and set of transformed monomials Φ = [ ϕ 1 , . . . , ϕ k ] = X W which produces the moment kernels of EM. The moment kernels of EM decorrelate the correlation in the image.

Φ T C Φ = ( X W ) T C ( X W ) = D C ,

and are orthogonal:

Φ T Φ = ( X W ) T ( X W ) = W T X T X = W T X T N X W = W T B W = I

Example computation

Taking c = 0.5 , the dimension of moment space as m = 6 and the dimension of feature space as k = 4 , we will have:

W = ( 0.0 0 0.7745 0.8960 2.8669 4.4622 0.0 0.0 0.0 0.0 7.9272 2.4523 4.0225 20.6505 0.0 0.0 0.0 0.0 9.2789 0.1239 0.5092 18.4582 0.0 0.0 )

and

ϕ 1 = 2.8669 x 4.0225 x 3 0.5092 x 5 ϕ 2 = 4.4622 x + 20.6505 x 3 18.4582 x 5 ϕ 3 = 0.7745 + 7.9272 x 2 9.2789 x 4 ϕ 4 = 0.8960 + 2.4523 x 2 0.1239 x 4

2D signal

The derivation for 2D signal is the same as 1D signal except that conventional Geometric Moments are directly employed to obtain the set of 2D EigenMoments.

The definition of Geometric Moments of order ( p + q ) for 2D image signal is:

m p q = 1 1 1 1 x p y q f ( x , y ) d x d y .

which can be denoted as M = { m j , i } i , j = 0 i , j = m 1 . Then the set of 2D EigenMoments are:

Ω = W T M W ,

where Ω = { Ω j , i } i , j = 0 i , j = k 1 is a matrix that contains the set of EigenMoments.

Ω j , i = Σ r = 0 m 1 Σ s = 0 m 1 w r , j w s , i m r , s .

EigenMoment invariants (EMI)

In order to obtain a set of moment invariants we can use normalized Geometric Moments M ^ instead of M .

Normalized Geometric Moments are invariant to Rotation,Scaling and Transformation and defined by:

m ^ p q = α p + q + 2 1 1 1 1 [ ( x x c ) c o s ( θ ) + ( y y c ) s i n ( θ ) ] p = × [ ( x x c ) s i n ( θ ) + ( y y c ) c o s ( θ ) ] q = × f ( x , y ) d x d y ,

where: ( x c , y c ) = ( m 10 / m 00 , m 01 / m 00 ) is the centroid of the image f ( x , y ) and

α = [ m 00 S / m 00 ] 1 / 2 θ = 1 2 t a n 1 2 m 11 m 20 m 02 .

m 00 S in this equation is a scaling factor depending on the image. m 00 S is usually set to 1 for binary images.

References

EigenMoments Wikipedia