Improving the performance of image classification by Hahn moment invariants

14
Improving the performance of image classification by Hahn moment invariants Mhamed Sayyouri, 1,2 Abdeslam Hmimid, 1,3 and Hassan Qjidaa 1,4 1 CED-ST; LESSI; Faculty of Sciences Dhar el Mehraz, Sidi Mohamed Ben Abdellah University, BP 1796 Fez-Atlas 30003, Fez, Morocco 2 e-mail: [email protected] 3 e-mail: [email protected] 4 e-mail: [email protected] Received June 24, 2013; revised August 23, 2013; accepted September 23, 2013; posted September 24, 2013 (Doc. ID 192338); published October 25, 2013 The discrete orthogonal moments are powerful descriptors for image analysis and pattern recognition. However, the computation of these moments is a time consuming procedure. To solve this problem, a new approach that permits the fast computation of Hahns discrete orthogonal moments is presented in this paper. The proposed method is based, on the one hand, on the computation of Hahns discrete orthogonal polynomials using the re- currence relation with respect to the variable x instead of the order n and the symmetry property of Hahns poly- nomials and, on the other hand, on the application of an innovative image representation where the image is described by a number of homogenous rectangular blocks instead of individual pixels. The paper also proposes a new set of Hahns invariant moments under the translation, the scaling, and the rotation of the image. This set of invariant moments is computed as a linear combination of invariant geometric moments from a finite number of image intensity slices. Several experiments are performed to validate the effectiveness of our descriptors in terms of the acceleration of time computation, the reconstruction of the image, the invariability, and the classification. The performance of Hahns moment invariants used as pattern features for a pattern classification application is compared with Hu [IRE Trans. Inform. Theory 8, 179 (1962)] and Krawchouk [IEEE Trans. Image Process. 12, 1367 (2003)] moment invariants. © 2013 Optical Society of America OCIS codes: (100.0100) Image processing; (100.3010) Image reconstruction techniques; (100.4994) Pattern recognition, image transforms; (100.5760) Rotation-invariant pattern recognition. http://dx.doi.org/10.1364/JOSAA.30.002381 1. INTRODUCTION Since 1962, the theory of moments has been introduced in the field of image analysis and pattern recognition. Hu [ 1] has pro- posed a complete system of geometrical moment invariants under the transformations of translation, scaling, and rotation of the image. Due to the nonorthogonal kernel polynomial, these moments present many drawbacks, like the redundancy of information and the sensibility to noise especially for the higher order moments [ 2]. In 1980, Teague [ 2] introduced the Legendre and Zernike moments based on continuous orthogonal polynomials. The continuous orthogonal moments possess the best representation of the image compared with the geometric moments and are more robust to noise of the image [ 35]. The computation of continuous orthogonal mo- ments requires a suitable transformation of the coordinates of the image in the space, and an appropriate approximation of the integral. This increases the computational complexity and error of the discretization [ 58]. To eliminate this error, a set of discrete orthogonal moments such as Tchebichef [ 9], Krawchouk [ 10], Meixner [ 11], Charlier [ 12], and Hahn [ 1114] have been recently introduced in the field of image analysis. The use of discrete orthogonal polynomials as basic functions for the computation of the image moments elimi- nates the need for numerical approximation and satisfies ex- actly the property of orthogonality in the discrete domain of the image space coordinates [ 915]. This property makes the discrete orthogonal moments superior to the continuous orthogonal moments in the sense of the capacity of the im- ages representation [ 913]. But, the use of these discrete orthogonal moments generates two major problems which are high computational cost and the propagation of numerical errors in the computation of discrete orthogonal polynomials [ 11, 12]. Indeed, the calculated values of discrete orthogonal polynomials using the hypergeometric function and recur- rence relations of three-terms with respect to the order n are complex and require a high computation time, especially for higher orders, which cause the propagation of numerical errors [ 11]. To limit this error and to ameliorate the accuracy of image reconstruction, Zhu et al. [ 11] applied the recurrence relation with respect to variable x instead of order n in the computation of discrete orthogonal polynomials. To reduce the computational time cost of moments, several algorithms are introduced in [ 12, 1420]. Spiliotis and Mertzios [ 16] have presented a fast algorithm to calculate the geometric mo- ments for binary images using the image block representation (IBR). Hosny [ 17] has given a fast algorithm to calculate the geometric moments for gray-scale images using the image slice representation. Lim et al. [ 20] have presented a fast com- putation technique to calculate exactly Zernike moments by using cascaded digital filter outputs, without the need to com- pute geometric moments. Papakostas et al. [ 21] have given an algorithm that permits the fast and accurate computation of Legendre moments based on the image slice representation method. Shu et al. [ 18] introduced an approach to accelerate Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2381 1084-7529/13/112381-14$15.00/0 © 2013 Optical Society of America

Transcript of Improving the performance of image classification by Hahn moment invariants

Improving the performance of image classificationby Hahn moment invariants

Mhamed Sayyouri,1,2 Abdeslam Hmimid,1,3 and Hassan Qjidaa1,4

1CED-ST; LESSI; Faculty of Sciences Dhar el Mehraz, Sidi Mohamed Ben Abdellah University,BP 1796 Fez-Atlas 30003, Fez, Morocco2e-mail: [email protected]

3e-mail: [email protected]: [email protected]

Received June 24, 2013; revised August 23, 2013; accepted September 23, 2013;posted September 24, 2013 (Doc. ID 192338); published October 25, 2013

The discrete orthogonal moments are powerful descriptors for image analysis and pattern recognition. However,the computation of these moments is a time consuming procedure. To solve this problem, a new approach thatpermits the fast computation of Hahn’s discrete orthogonal moments is presented in this paper. The proposedmethod is based, on the one hand, on the computation of Hahn’s discrete orthogonal polynomials using the re-currence relation with respect to the variable x instead of the order n and the symmetry property of Hahn’s poly-nomials and, on the other hand, on the application of an innovative image representation where the image isdescribed by a number of homogenous rectangular blocks instead of individual pixels. The paper also proposesa new set of Hahn’s invariant moments under the translation, the scaling, and the rotation of the image. This set ofinvariant moments is computed as a linear combination of invariant geometric moments from a finite number ofimage intensity slices. Several experiments are performed to validate the effectiveness of our descriptors in termsof the acceleration of time computation, the reconstruction of the image, the invariability, and the classification.The performance of Hahn’s moment invariants used as pattern features for a pattern classification application iscompared with Hu [IRE Trans. Inform. Theory 8, 179 (1962)] and Krawchouk [IEEE Trans. Image Process. 12, 1367(2003)] moment invariants. © 2013 Optical Society of America

OCIS codes: (100.0100) Image processing; (100.3010) Image reconstruction techniques; (100.4994) Patternrecognition, image transforms; (100.5760) Rotation-invariant pattern recognition.http://dx.doi.org/10.1364/JOSAA.30.002381

1. INTRODUCTIONSince 1962, the theory of moments has been introduced in thefield of image analysis and pattern recognition. Hu [1] has pro-posed a complete system of geometrical moment invariantsunder the transformations of translation, scaling, and rotationof the image. Due to the nonorthogonal kernel polynomial,these moments present many drawbacks, like the redundancyof information and the sensibility to noise especially for thehigher order moments [2]. In 1980, Teague [2] introducedthe Legendre and Zernike moments based on continuousorthogonal polynomials. The continuous orthogonal momentspossess the best representation of the image compared withthe geometric moments and are more robust to noise of theimage [3–5]. The computation of continuous orthogonal mo-ments requires a suitable transformation of the coordinates ofthe image in the space, and an appropriate approximation ofthe integral. This increases the computational complexity anderror of the discretization [5–8]. To eliminate this error, a setof discrete orthogonal moments such as Tchebichef [9],Krawchouk [10], Meixner [11], Charlier [12], and Hahn[11–14] have been recently introduced in the field of imageanalysis. The use of discrete orthogonal polynomials as basicfunctions for the computation of the image moments elimi-nates the need for numerical approximation and satisfies ex-actly the property of orthogonality in the discrete domain ofthe image space coordinates [9–15]. This property makes thediscrete orthogonal moments superior to the continuous

orthogonal moments in the sense of the capacity of the im-age’s representation [9–13]. But, the use of these discreteorthogonal moments generates two major problems whichare high computational cost and the propagation of numericalerrors in the computation of discrete orthogonal polynomials[11,12]. Indeed, the calculated values of discrete orthogonalpolynomials using the hypergeometric function and recur-rence relations of three-terms with respect to the order nare complex and require a high computation time, especiallyfor higher orders, which cause the propagation of numericalerrors [11]. To limit this error and to ameliorate the accuracyof image reconstruction, Zhu et al. [11] applied the recurrencerelation with respect to variable x instead of order n in thecomputation of discrete orthogonal polynomials. To reducethe computational time cost of moments, several algorithmsare introduced in [12,14–20]. Spiliotis and Mertzios [16] havepresented a fast algorithm to calculate the geometric mo-ments for binary images using the image block representation(IBR). Hosny [17] has given a fast algorithm to calculate thegeometric moments for gray-scale images using the imageslice representation. Lim et al. [20] have presented a fast com-putation technique to calculate exactly Zernike moments byusing cascaded digital filter outputs, without the need to com-pute geometric moments. Papakostas et al. [21] have given analgorithm that permits the fast and accurate computation ofLegendre moments based on the image slice representationmethod. Shu et al. [18] introduced an approach to accelerate

Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2381

1084-7529/13/112381-14$15.00/0 © 2013 Optical Society of America

the time computation of Tchebichef moments by using theIBR for binary images and image slice representation forgray-scale images and by deriving some properties ofTchebichef polynomials. Sayyouri et al. have proposed in[12] and [14] a fast method to accelerate time computationof Hahn and Charlier moments using the IBR. The theoryof invariant moments has largely been used in pattern recog-nition problems by several researchers [1,22–29]. In the liter-ature, the invariant moments have been computed by twomethods. The first one, which is called image normalization,computes the invariant moments directly from the orthogonalpolynomials. The second one computes the moment invari-ants as linear combination of geometrical moment invariants[22–28]. Chong et al. [23,24] have introduced an effectivemethod to construct the translation and scale invariants ofLegendre and Zernike moment. Zhu et al. [25] have proposeda method directly based on Tchebichef polynomials to makethe translation and scale invariants of Tchebichef moments.Papakostas et al. [26] have introduced a set of Krawchoukmoment invariants computed over a finite number of imageintensity slices, extracted by applying image slice representa-tion. Karakasis et al. [28] have proposed a generalized expres-sion of the weighted dual Hahn moment invariants up to anyorder and for any value of their parameters based on a linearcombination of geometric moments. While most work has fo-cused on the moments of Tchebichef [25], Krawchouk [26],and dual Hahn [27,28], no attention has been paid to acceler-ate the computation time of Hahn’s discrete orthogonal mo-ments and no report has been published on how to makethe translation, scale, and rotation invariant of Hahn’s discreteorthogonal moments. In this paper, we propose a new methodto accelerate the computation time of Hahn’s discreteorthogonal moment based on two notions. The first one isthe use of the recurrence relation with respect to variablex instead of order n and the symmetry property of Hahn poly-nomials in the computation of Hahn’s discrete orthogonalpolynomials. The second one is the description of an imagewith a set of blocks instead of individual pixels by applyingthe algorithm of IBR for binary images and the algorithm ofimage slice representation (ISR) for gray-scale images. In thisapproach we decompose the binary image into a set of gray-level blocks and we compute the Hahn’s moments from theseblocks. The gray-scale image will be decomposed into a seriesof slices and each slice will be decomposed into a set of blocksand calculate the Hahn’s moments from each block for eachslice. The paper also introduces a novel set of Hahn’s invariantmoments under translation, scaling, and rotation of the image.This set of Hahn’s invariant moments is formed by a linearcombination of geometric moment invariants (GMI) from afinite number of image intensity slices. The improved perfor-mance of image classification by our proposed set of Hahn’smoment invariants is compared with Hu [1] and Krawtchouk[10] moment invariants.

The rest of the paper is organized as follows. In Section 2,the definition of Hahn polynomials is presented. It shows howthe recurrence and the symmetry properties of the Hahn’sdiscrete orthogonal polynomials are used to facilitate thecomputation of Hahn’s discrete orthogonal polynomials.Section 3 presents a fast method to compute Hahn’s discreteorthogonal moments for binary and gray-scale images.Section 4 gives the reconstruction of images using Hahn’s

discrete orthogonal moments. The proposed new set ofHahn’s invariant moments is presented in Section 5. Section 6provides experimental validations of the theoretical frame-work developed in the previous sections. In the first subsec-tion of Section 6, we compare the time computation of Hahn’sdiscrete orthogonal moments by the direct method and theproposed fast method. The second subsection examineshow well an image can be reconstructed from Hahn’s discreteorthogonal moments. The third subsection shows the invari-ability of Hahn’s discrete orthogonal moments under transla-tion, scale, and rotation of the image. A comparison ofclassification accuracy of Hahn’s moment invariants withHu and Krawchouk moment invariants in an object recogni-tion task is provided in the last subsection. Section 7concludes this work.

2. HAHN DISCRETE ORTHOGONALPOLYNOMIALSIn this section, we will present a brief introduction to the theo-retical background of Hahn’s discrete orthogonal polyno-mials. The nth Hahn’s discrete orthogonal polynomials withone variable h�a;b�n �x;N� satisfy the following first-order partialdifference equation [30,31]:

σ�x�Δ∇h�a;b�n �x;N� � τ�x�h�a;b�n �x;N� � λnh�a;b�n �x;N� � 0 (1)

with n � 0; 1; 2;…N − 1, x ∈ � 0 N − 1 �, a≻ − 1, and b≻ − 1where σ�x�, τ�x�, and λn are defined by

σ�x� � x�N � a − x�;τ�x� � �b� 1��N − 1� − �a� b� 2�x;

and λn � n�a� b� n� 1�: (2)

ΔPn�x� � Pn�x� 1� − Pn�x� and ∇Pn�x� � Pn�x� − Pn�x − 1�denote the forward and backward finite difference operator,respectively.

The solution of the partial difference equation defined inEq. (1) can be expressed by Rodrigues formula [30]

h�a;b�n �x;N� � �−1�nn!w�x�∇

n�wn�x�� (3)

with

wn�x� �Γ�N � a − x�Γ�n� b� 1� x�

Γ�N − n − x�Γ�x� 1� ; (4)

wherew�x� is the weight functionwn�x� in the case n � 0 andΓ denotes gamma functions defined as Γ�n� � �n − 1�! andΓ�1� � 1 for all positive integer n.

For the backward difference operator ∇ we have thefollowing property:

∇nf �x� �Xnk�0

�nk

��−1�kf �x − k�: (5)

By combining Rodrigues formula defined in Eqs. (3) and(5), we can obtain an explicit expression for Hahn’s discrete

2382 J. Opt. Soc. Am. A / Vol. 30, No. 11 / November 2013 Sayyouri et al.

orthogonal polynomials defined by using a hypergeometricfunction as

h�a;b�n �x;N� � �−1�n�b� 1�n�N − n�nn!

× 3F2�−n;−x; n� 1� a� b; b� 1; 1 − N ; 1�

�Xnk�0

α�a;b�k;n xk: (6)

The hypergeometric function 3F2 is defined as

3F2�a1; a2; a3; b1; b1; x� �X∞k�0

�a1�k�a2�k�a3�k�b1�k�b2�k

xk

k!: (7)

The Pochhammer symbol �x�k is defined as

�x�0 � 1 and �x�k � x�x� 1�…�x� k − 1�; k ≥ 1:

(8)

More explicitly, Hahn’s discrete orthogonal polynomials ofthe nth order are defined as follows:

h�a;b�n �x;N� �Xnk�0

�−1�k�n − k�!k!

�b� n�!�b� k�!

�a� b� k� n�!�a� b� n�! �−x�k:

(9)

Hahn’s discrete orthogonal polynomials h�a;b�n �x;N� satisfythe following orthogonality condition:

XN−1

x�0

h�a;b�n �x;N�h�a;b�m �x;N�w�x� � ρ�n�δnm; (10)

where ρ�n� denotes the squared norm of Hahn’s discreteorthogonal polynomials defined as

ρ�n� � Γ�a� n� 1�Γ�b� n� 1��a� b� n� 1�N�a� b� 2n� 1�n!�N − n − 1�! ; (11)

and δnm denotes the delta of Kronecker.The normalized discrete orthogonal polynomials of Hahn

are defined as

~h�a;b�n �x;N� � h�a;b�n �x;N������������w�x�ρ�n�

s: (12)

To accelerate the computation of the weight function andthe squared norm we will use the recurrence relation of thegamma function. The gamma function verifies the followingrelation: Γ�x� 1� � xΓ�x� forx≻ 0.

By replacing the previous relationship of gamma in Eq. (4),we obtain the following recurrence relation which calculatesthe weight function w�x� 1� from w�x�:

w�x� 1� � �N − 1 − x��b� 1� x��N � a − x − 1� w�x�;

with w�0� � Γ�N � a�Γ�b� 1�Γ�N� : (13)

By replacing the previous relationship of gamma in Eq. (11),we obtain the following recurrence relation which calculatessquared norm ρ�n� 1� from ρ�n�:

ρ�n� 1� � �a� n� 1��b� n� 1��a� b� n� N � 1��N − n − 1��a� b� 2n� 1��n� 1��a� b� n� 1��a� b� 2n� 3� ρ�n�; with

ρ�0� � Γ�a� 1�Γ�b� 1�Γ�a� b� N � 1��a� b� 1��N − 1�!Γ�a� b� 1� : (14)

Therefore, the orthogonal property of normalized Hahn’sdiscrete orthogonal polynomials defined in Eq. (10) can be re-written as

XN−1

x�0

~h�a;b�n �x;N� ~h�a;b�m �x;N� � δnm: (15)

A. Computation of Hahn’s Discrete OrthogonalPolynomialsThis section discusses the computational aspects ofHahn’s discrete orthogonal polynomials. It is shown in thefirst subsection that the recurrence relation is used tocalculate the discrete orthogonal polynomials of Hahnwith respect to n. In the next subsection, the use of the recur-rence relation with respect to variable x is shown to acceler-ate the computational time. The last subsection givesthe symmetry property of Hahn’s discrete orthogonalpolynomials.

1. Recurrence Relation with Respect to nAs the calculation of normalized discrete orthogonal polyno-mials of Hahn by combining Eqs. (6) and (12) has a great com-putational time cost, we use the following three-termrecurrence relation with respect to order n [31]:

~h�a;b�n �x;N� � B × DA

~h�a;b�n−1 �x;N� − C × EA

~h�a;b�n−2 �x;N�: (16)

The parameters A, B, C, D, and E are defined as follows:

Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2383

A� n�a� b�n��a� b� 2n− 1��a� b� 2n� ;

B� x−a− b� 2N − 2

4−

�b2 − a2��a� b� 2N�4�a� b� 2n− 2��a� b� 2n� ;

C � −�a�n− 1��b�n− 1�

�a� b� 2n− 2� ×�a� b�N �n− 1��N −n� 1�

�a� b� 2n− 1� ;

D���������������������������������������������������������������������������������������������������������������������

n�a� b�n��a� b� 2n� 1��N −n��a�n��b� n��a� b� 2n− 1��a� b�n�N�

s;

E ������������������������������������������������������������������������������������������������������������������������

n�n− 1��a� b�n��a�n��a�n− 1��b�n��b�n− 1��N −n� 1��N −n�

s

×

����������������������������������������������������������������������������������������������������������������a� b�n− 1��a� b� 2n� 1�

�a� b� 2n− 3��a� b� n�N��a� b�n�N − 1�

s:

(17)

The zero-order and first-order of the normalized Hahn’s dis-crete orthogonal polynomials can be calculated as follows:

~h�a;b�0 �x;N� ������������w�x�ρ�0�

s;

~h�a;b�1 �x;N� � �−�b� 1��N − 1� � �a� b� 2�x������������w�x�ρ�1�

s: (18)

2. Recurrence Relation with Respect to xIn the computation of Hahn’s normalized discrete orthogonalpolynomials using the recurrence formula with respect to theorder n, we find problem of propagation of numerical error.To limit this error, we use the recurrence relation with respectto variable x. By considering the properties of the forward andbackward finite difference operator Δ and ∇ defined previ-ously, we have

Δ∇Pn�x� � Pn�x� 1� − 2Pn�x� � Pn�x − 1�: (19)

Thus, the recurrence relation of Hahn’s discrete orthogonalpolynomials with respect to x can be obtained through Eqs. (1)and (19) as follows:

~h�a;b�n �x;N� ������������w�x�

pσ�x − 1� � τ�x − 1�

×�2σ�x − 1� � τ�x − 1� − λn�������������������

w�x − 1�p ~h�a;b�n �x − 1; N�

−σ�x − 1� � τ�x − 1��������������������

w�x − 2�p ~h�a;b�n �x − 2; N�

�: (20)

The initial values of the recurrence relation with respect tox of Hahn’s normalized polynomials with respect to x aredefined as

~h�a;b�n �0; N� � �1 − N�n�n� b

n

� �����������w�0�ρ�n�

s;

~h�a;b�n �1; N� � �n� b� 1��N − n − 1� − n�N � a − 1��b� 1��N − 1�

×

�����������w�1�w�0�

s~h�a;b�n �0; N�: (21)

3. Symmetry PropertyThe computation time of the Hahn’s discrete orthogonal poly-nomials for the special case a � b can be reduced consider-ably by using the symmetry property. The symmetry relationof the Hahn’s discrete orthogonal polynomials can be derivedfrom Eq. (9) as

~h�a;b�n �N − 1 − x;N� � �−1�n ~h�b;a�n �x;N�: (22)

If we replace x by N − 1 − x, a by b, and b by a, then Eq. (1)retains its form. Since, under this replacement, the polynomialh�b;a�n �N − 1 − x;N� remains a polynomial of the same degree,then because of the uniqueness of the polynomial solutions ofthe difference equations of hypergeometric type defined inEq. (1), we obtain the relation

~h�a;b�n �x;N� � �−1�n ~h�b;a�n �N − 1 − x;N�: (23)

The computation of Hahn’s discrete orthogonal polyno-mials can be terminated at x � N∕2. We can make use ofthe symmetry condition to evaluate the Hahn’s polynomial val-ues where x is in the range �N∕2;N − 1�. This greatly reducesthe computational time and the storage space for the Hahn’sdiscrete orthogonal polynomials. Indeed, for the case of N iseven, only the values of h�a;b�n �x;N� for x≺N∕2 − 1 need to becalculated. The symmetry relation can be used to determineh�a;b�n �x;N� for x≻N∕2 − 1. Furthermore, if the N × N size im-age is subdivided into four equal quadrants, only the polyno-mials in the first quadrant, 0≺ x, y≺N∕2 − 1, need to becalculated. In the case of N is odd, the image can be zero-padded to achieve an even N .

3. FAST COMPUTATION OF HAHN’SDISCRETE ORTHOGONAL MOMENTSThe two-dimensional (2D) Hahn’s discrete orthogonal mo-ment of order �n�m� of an image intensity functionf �x; y� with size M × N is defined as

Hnm �XM−1

x�0

XN−1

y�0

~h�a;b�n �x;M� ~h�a;b�m �y;N�f �x; y�; (24)

where ~h�a;b�n �x;M� is the nth order of Hahn’s discrete orthonor-mal polynomials.

The computation of Hahn’s discrete orthogonal momentsby using Eq. (24) seems to be a time consuming task mainlydue to two factors. First, the need of computing a set of com-plicated quantities for each moment order and second, theneed to evaluate the polynomial values for each pixel ofthe image. If in the first case the recurrence relation with re-spect to x is introduced as an efficient algorithm, which recur-sively computes the orthogonal polynomials, little attentionhas been given in the second case. Moreover, the computationof Hahn’s moments, by using less mathematical operations ofthe image pixels is achieved by describing an image with a setof blocks instead of individual pixels. The computation ofHahn’s discrete orthogonal moments can be accelerated byusing the methodology of the IBR [16] and the image slicerepresentation [19].

In the following two subsections, we will propose a newformula to the fast computation of Hahn’s discrete orthogonal

2384 J. Opt. Soc. Am. A / Vol. 30, No. 11 / November 2013 Sayyouri et al.

moments using the IBR for binary images and image slice rep-resentation for gray-scale images.

A. Binary ImagesIn order to accelerate the time computation of Hahn’s mo-ments, we will apply the algorithm of IBR for the binary image[16]. In this approach, the binary image is represented as a setof blocks, each block corresponds to an object. This block isdefined as a rectangular area that includes a set of connectedpixels.

Therefore, the binary image is described by the followingrelation:

f �x; y� � fbi; i � 0; 1;…:; K − 1g; (25)

where bi is the ith block and K is the total number of blocks.Each block is described by the coordinates of the upper leftand lower right corner in vertical and horizontal axes.

By applying IBR, the Hahn’s moment defined in Eq. (25) canbe rewritten as

Hnm �Xk−1i�0

Xx2;bix�x1;bi

Xy2;biy�y1;bi

~h�a;b�n �x;M� ~h�a;b�n �y;N� �Xk−1i�0

Hbinm;

(26)

with �x1;bi ; x2;bi� and �y1;bi ; y2;bi� are, respectively, the coordi-nates in the upper left and lower right block bi, andHbi

nm is theHahn’s moment of the block bi given by

Hbinm �

Xx2;bix�x1;bi

Xy1;biy�y1;bi

~h�a;b�n �x;M� ~h�a;b�n �y;N�

�Xx2;bi

x�x1;bi

~h�a;b�n �x;M�Xy2;bi

y�y1;bi

~h�a;b�n �y;N�

� Sn�x1;bi ; x2;bi�Sm�y1;bi ; y2;bi�; (27)

with

Sn�x1;bi ; x2;bi� �Xx2;bi

x�x1;bi

~h�a;b�n �x;M� and

Sm�y1;bi ; y2;bi� �Xy2;bi

y�y1;bi

~h�a;b�n �y;N�: (28)

B. Gray-Scale ImagesIn this subsection, we propose the use of the image slice rep-resentation to accelerate the computation time of Hahn’s dis-crete orthogonal moments for gray-scale images. Thisapproach decomposes a gray-scale image f �x; y� in a seriesof two levels of image slices f i�x; y�

f �x; y� �XLi�1

f i�x; y�; (29)

where L is the number of slices and f i�x; y� the intensity func-tion of the ith slice.

After the decomposition of gray-scale image into several sli-ces of two levels, the gray-scale image f �x; y� can be redefinedin terms of blocks of different intensities as

f �x; y� � ff i�x; y�; i � 1; 2;…:; Lg; with

f i�x; y� � fbij; j � 1; 2;…:; Ki − 1g; (30)

where bij is the block of the edge i with intensity f i and Ki isthe number of image blocks.

By using the ISR defined by Eq. (30), the fast method tocompute Hahn’s discrete orthogonal moments of a gray-scaleimage f �x; y� are defined as

Hnm �XM−1

x�0

XN−1

y�O

~h�a;b�n �x;M� ~h�a;b�n �y;N�XLi�1

f i�x; y�

�XLi�1

XM−1

x�0

XN−1

y�O

~h�a;b�n �x;M� ~h�a;b�n �y;N�f i�x; y�

�XLi�1

f iHnm�i�; (31)

where Hnm�i� is the �n�m�th order of Hahn’s discreteorthogonal moments of the ith binary slice.

4. IMAGE RECONSTRUCTION USINGHAHN’S DISCRETE ORTHOGONALMOMENTSIn this section, the image representation capability of Hahn’sdiscrete orthogonal moments is shown. The Hahn’s discreteorthogonal moments of the image are first calculated and sub-sequently its image representation power is verified by recon-structing the image from the moments. An objective measurebased on a mean squared error (MSE) is used to characterizethe error between the original image and the reconstructedimage. Indeed, the Hahn’s discrete orthogonal moments of or-der �n�m� in terms of normalized Hahn’s discrete orthogo-nal polynomials, for an image of size M × N with intensityfunction f �x; y� are defined as

Hnm �XM−1

x�0

XN−1

y�0

f �x; y� ~h�a;b�n �x;M� ~h�a;b�m �y;N�: (32)

By solving Eqs. (15) and (24) for f �x; y�, the image intensityfunction can be written completely in terms of the Hahn’s dis-crete orthogonal moments as

f �x; y� �XM−1

x�0

XN−1

y�0

Hnm~h�a;b�n �x;M� ~h�a;b�m �y;N�: (33)

The image intensity function can be represented as a seriesof normalized Hahn’s discrete orthogonal polynomialsweighted by Hahn’s discrete orthogonal moments. If the mo-ments are limited to order maximum, the series is truncated to

f �x; y� �Xmax

n�0

Xl

m�0

Hn−m;m~h�a;b�n−m�x;M� ~h�a;b�m �y;N�: (34)

The difference between the original image f �x; y� and thereconstructed image f �x; y� is measured using the MSEdefined as follows:

Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2385

MSE � 1MN

XMi�1

XNj�1

�f �xi; yj� − f �xi; yj��2: (35)

5. HAHN’S DISCRETE ORTHOGONALMOMENT INVARIANTSTo use the Hahn’s discrete orthogonal moments for objectclassification, it is indispensable that Hahn’s discrete orthogo-nal moments be invariant under rotation, scaling, and trans-lation of the image. Therefore, to obtain the translation,scale, and rotation invariants of Hahn’s discrete orthogonalmoments, we adopt the same strategy used by Papakostaset al. for Krawchouk’s invariant moments [28]. That is, we de-rive the Hahn’s discrete orthogonal moment invariantsthrough the geometric moments using the direct methodand the fast method based on IBR.

A. Computation of Hahn’s Discrete Orthogonal InvariantMomentsGiven a digital image f �x; y� with size M × N , the geometricmoments are defined using the discrete sum approximation as

GMnm �XN−1

x�0

XM−1

y�0

xnymf �x; y�: (36)

The set of GMI by translation, scaling, and rotation can bewritten as [1]

GMInm � GM−γ00

XN−1

x�0

XN−1

y�0

��x − x� cos θ� �y − y� sin θ�n

× ��y − y� cos θ − �x − x� sin θ�mf �x; y�; (37)

with

γ � n�m2

� 1; x � GM10

GM00;

y � GM01

GM00; and θ � 1

2tan−1

�2μ11

μ20 − μ02

�: (38)

The �n�m�th approximated central geometric momentsare defined in [1] by

μnm �XN−1

x�0

XM−1

y�0

�x − x�n�y − y�mf �x; y�: (39)

The Hahn’s moment invariants can be expanded in terms ofgeometric moments invariants as follows:

HMInm � �ρ�n�ρ�m��−1∕2Xni�0

Xmj�0

α�a;b�i;n α�a;b�j;n Vi;j ; (40)

where α�a;b�i;n are the coefficients relative to Eq. (7) and Vi;j arethe parameters defined as

Vnm �Xnq�0

Xmp�0

�np

��mq

��N ×M

2

���p�q�∕2��1×�N2

�n−p

�M2

�m−p

× GMIpq: (41)

B. Fast Computation of Hahn’s Discrete OrthogonalInvariant MomentsIn order to accelerate the computation time of Hahn’s discreteorthogonal invariant moments, we will apply the same strat-egy for fast computation of Hahn’s discrete orthogonalmoments.

By using the binomial theorem, the GMI defined in Eq. (37)can be calculated as follows:

GMInm � GM−γ00

Xni�0

Xmj�0

�n

i

��m

j

��cos θ�i�j�sin θ�n�m−i−j

× �−1�m−jμm�i−j;n�j−i

�Xni�0

Xmj�0

�n

i

��m

j

��cos θ�i�j�sin θ�n�m−i−j

× �−1�m−jηm�i−j;n�j−i; (42)

where ηnm are normalized central geometric moments

ηnm � μnmGMγ

00

: (43)

By applying the IBR, the normalized central moment de-fined in Eq. (43) can be rewritten as follows:

ηnm � μnmGMγ

00

� 1GMγ

00

XN−1

x�0

XM−1

y�0

�x − x�n�y − y�mf �x; y�

� 1GMγ

00

XN−1

x�0

XM−1

y�0

�x − x�n�y − y�m�Xs

k�1

f k�x; y��

� 1GMγ

00

XSk�1

f k ×XN−1

xk�0

XM−1

yk�0

�x − x�n�y − y�m

� 1GMγ

00

XSk�1

f k

×Xkj�0

�� Xx2;bjxk�x1;bj

�x − x�n�� Xy2;bj

yk�y1;bj

�y − y�m��

� 1GMγ

00

XSk�1

f k × ηknm; (44)

where

ηknm �Xkj�0

�� Xx2;bjxk�x1;bj

�x − x�n�� Xy2;bj

yk�y1;bj

�y − y�m��

; (45)

and f k; k � 1; 2;…S are the slice intensity functions, S is thenumber of slices in image f i, bj; j � 1; 2;…k is the block ineach slice. �x1;bi ; y1;bi� and �x2;bi ; y2;bi� are, respectively, thecoordinates in the upper left and lower right block bj .

2386 J. Opt. Soc. Am. A / Vol. 30, No. 11 / November 2013 Sayyouri et al.

Using Eqs. (42) and (44), the GMI of Eq. (36) can be rewrit-ten as follows:

GMInm �Xni�0

Xmj�0

�n

i

��m

j

��cos θ�i�j�sin θ�n�m−i−j

× �−1�m−jηm�i−j;n�j−i

� 1GMγ

00

Xni�0

Xmj�0

�n

i

��m

j

��cos θ�i�j�sin θ�n�m−i−j

× �−1�m−jXSk�1

f k ×ηkm�i−j;n�j−i

� 1GMγ

00

XSk�1

f kXni�0

Xmj�0

�n

i

��m

j

��cos θ�i�j�sin θ�n�m−i−j

× �−1�m−j ×ηkm�i−j;n�j−i: (46)

Therefore, Hahn’s discrete orthogonal moment invariantsHMI can be obtained from Eqs. (40), (41), and (46).

6. RESULTS AND SIMULATIONSIn this section, we give experimental results to validate thetheoretical results developed in the previous sections. Thissection is divided into four subsections. In the first subsection,we will compare the time computation of Hahn’s discreteorthogonal moments by the direct method and the proposedfast method for binary and gray-scale images. In the secondone, we will test the ability of Hahn’s discrete orthogonal mo-ments to reconstruct the binary and gray-scale imageswith andwithout noise. In Subsection C, we will evaluate the invariabil-ity of Hahn’s invariant moments under translation, scaling, androtation of image. In the last subsections, the recognition ac-curacy of Hahn’s discrete orthogonal moment invariants istested and compared to that of theHu andKrawchoukmomentinvariants in the classification of the object.

A. Computational Time of Hahn’s MomentsIn this subsection, we will compare the computational time ofHahn’s discrete orthogonal moments by the direct method andthe proposed fast method. Figure 1 shows a flowchart of thetwo methods.

In the first example, a set of five binary images with size128 × 128 pixels (Fig. 2) is selected from the well-knownMPEG-7 CE-shape-1 Part B database [32] have been used astest images. After extraction the blocks for each binary imageby applying the IBR algorithm [16], the number of blocksof these images is NB � 247 for spoon, NB � 223 for Jar,NB � 329 for Horse, NB � 85 for Car, and NB � 551 forDevice. The computational processes are performed 19 timesfor each of the five images where the average times are plottedagainst themoment order up to (100, 100) for the images aboveusing the proposed fast method and the direct method in Fig. 3.This figure shows that the proposed fast method is faster thanthe direct method. Notice that the computation time forextracting the blocks of each image is about 0.1 ms, this timeis much less than the computation time required in thecalculation of Hahn’s discrete orthogonal moments.

In the second example, a set of five gray-scale images with asize of 256 × 256 pixels shown in Fig. 4 have been used. Afterextraction, the blocks for each gray-scale image by ISR [19],the number of blocks NB, and the number of slices NS ofthese images are (NB � 47;345; NS � 250) for House,(NB � 55;887; NS � 209) for Woman, (NB � 61;605;NS � 208) for Mandrill, (NB � 54;527; NS � 224) for Pepper,and (NB � 56;338; NS � 231) for Lake. The computation timeto extract the blocks of each image is about 1 ms. The com-putational processes are performed 18 times for each of thefive images where the average times are plotted against themoment order up to (180, 180) for the images above usingthe proposed fast method and the direct method in Fig. 5.The result indicates again that our fast method has a betterperformance than the direct method. Note that the experi-ments were implemented in Matlab on a PC Dual Core2.10 GHz, 2 GB of RAM.

The two figures show that the proposed fast method isfaster than the direct method because the computation ofHahn’s moments by the proposed method depends only onthe number of blocks in the image, knowing that the numberof blocks of the image is smaller than the image’s size.

B. Image Reconstruction from Hahn’s DiscreteOrthogonal MomentsIn this section, we will discuss the capacity of Hahn’smoments for the reconstruction of the binary and gray-scale

Fig. 1. Flowchart of the two methods for the computation of Hahn’s moments. (a) The proposed fast method and (b) the direct method.

Fig. 2. Set of test binary images. Spoon, Jar, Horse, Car, and Device.

Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2387

images with noise and without noise using the proposed fastmethod and the direct method. To evaluate these methods, wewill calculate the MSE between the original and the recon-structed image. MSE is largely used in the domain of imageanalysis as a quantitative measure of accuracy.

A numerical experiment is conducted, where the binary im-age Horse of size 128 × 128 as shown in Fig. 2 is used with amaximum moment order ranging from 0 to 100 and the gray-scale image Woman of size 256 × 256 as shown in Fig. 4 withmoments order ranging from 0 to 200. Figures 7(a) and 7(b)show the MSE for the two images by the two methods. It isobvious that the MSE decreases as the moment of order in-creases where the MSE gets near to zero with increasing timeorder. When the maximum moments order gets to a certainvalue, the reconstructed images will be very close to theoriginal ones. The figures also show that the proposed fastmethod is efficient in terms of quality of the reconstructionof binary and gray-scale images and faster than the directmethod.

In this experience, we will test the robustness of Hahn’s mo-ments in relation to different types of noise. For this, twonumerical experiments are performed using two types ofnoise. The first type of noise is the “salt and pepper” noisewhile the second is the sound of the strong “white Gaussiannoise.” Images contaminated with the two types of noise areshown in Fig. 6, respectively. The two contaminated imagesare reconstructed using Hahn’s discrete orthogonal momentsof order from 0 to 200. Figure 7(c) shows the plotted curves ofMSE for the noise contaminated images. For easier compari-son, the three curves of MSE are plotted in the same figure.Generally, the MSE of the noisy images is greater than thecorresponding values of MSE without noise in the image.Figure 7(c) shows the curves of the noise-contaminated imageMSE approaches zero while increasing the moments order.

The results of these experiments show the robustness ofHahn’s moments against different types of noise.

C. InvariabilityTo evaluate the invariability of Hahn’s discrete orthogonalinvariant moments under translation, scaling, and rotationof the image, we will use a binary image character “R” whosesize is 64 × 64 pixels transformed by translation vectorTV ∈ f�−5;−5�; �−5; 5�; �5;−5�; �0; 0�; �5; 5�g, scaling factorSF ∈ f0.8; 0.9; 1; 1.1; 1.2g, and rotation angle RA ∈ f0°; 45°;90°; 135°; 180°g within the framework of the image (Fig. 8).All invariant moments of Hahn are calculated up to ordertwo n, m ≤ 2 for each transformation. The results are pre-sented in Tables 1–4 for the case �a � 10; b � 10�.Finally, in order to measure the ability of the proposed invar-iants to remain unchanged under different image transforma-tions, the following relation is used: α � σ∕jμj�%�, where σdenotes the standard deviation of Hahn’s invariant momentsfor the different factors of each transformation, and μ is thecorresponding mean value.

It is clear from the tables that the rate σ∕μ is very low, in-dicating that the Hahn’s moment invariants are very stableunder different types of image transformations which give ex-cellent results with Hahn’s moment invariants. Therefore, theinvariant moments of Hahn derived in this paper could be auseful tool in pattern recognition tasks that require the trans-lation, scaling, and rotation invariance.

D. ClassificationIn this section, we will provide experiments to validate theprecision of recognition and the classification of objects usingthe proposed set of Hahn’s invariant moments. For this, wewill put in place the characteristic vectors defined by

V � �HMI00;HMI01;HMI10;HMI11;HMI02;HMI20;

HMI21;HMI12;HMI22� (47)

where HMInm are the Hahn’s moment invariants defined inSection 5.

We will use simple classifiers based on plain distances.These measures count the distance of each object in the proc-ess and the objects which represent the problem’s classes.Two well-known distances from the literature, the Euclidean[33] and correlation coefficient [33], are selected and pre-sented in the following:

Euclidean distance

d1�x; y� ������������������������������Xni�1

�xi − yi�2s

; (48)

and the correlation coefficient method

Fig. 4. Set of test gray-scale images. House, Woman, Pepper, Mandrill, and Lake.

10 20 30 40 50 60 70 80 90 1000

5

10

15

20

25

30

35

moment order

time

of c

ompu

tatio

n in

sec

onds

direct method

proposed method

Fig. 3. Average computation time for binary image using the directmethod and the proposed method.

2388 J. Opt. Soc. Am. A / Vol. 30, No. 11 / November 2013 Sayyouri et al.

d2�x; y� �Pn

i�1 xiyi�����������������������Pni�1 �xi�2

q �����������������������Pni�1 �yi�2

q : (49)

The above formulas measure the distance between two vec-tors x � �x1; x2; x2;…; xn�; y � �y1; y2; y3;…; yn�, which aredefined in the IRn space. These distances are quick to calcu-late and easy to implement. The idea of these distances is thateach image which has N features is a point in the space ofdimension N . Each feature is a vector of this space. The dis-tance between two images is the distance between two pointsin this space. If the two vectors x and y are equal, then d1tends to 0 and d2 tends to 1. Therefore, to classify the images,one takes the minimum values for d1 and the maximum valuesfor d2. The recognition accuracy is defined as

η � Number of correctly classified imagesThe total of images used in the test

× 100%: (50)

In order to validate the precision of recognition and theclassification of objects using Hahn’s invariant moments,we will use two image databases. The first is a set of binaryEnglish characters and numbers. The reason for the choice ofsuch a character is that the elements of the subsetffB;E; Rg; fM;Ng; fq; 8; 9g; fI; J; 1; Lgg can be easily misclassi-fied due to similarity (Fig. 9). The test set is generated bytranslation, scaling, and rotation of the training set with scal-ing factor SF ∈ f1.2; 1.1; 1; 0.9; 0.8g, translation TV �f�−5;−5�; �0; 0�; �−5; 5�; �5;−5�; �5; 5�g in horizontal and verti-cal directions, and rotation θ ∈ f0°; 45°; 90°; 135°; 180°; 225°;270°; 315°g, forming a set of tests of 2,400 images, as shownin Fig. 10. The second image database is the Columbia ObjectImage Library (COIL-20) database [34]. The total number of images is 1,440 distributed as 72 images for each object. All

images of this database have the size 128 × 128. Figure 11 dis-plays a collection of the 20 objects. The test set also isdegraded by salt and pepper noise with noise densities 1%,

0 20 40 60 80 100 120 140 160 1800

5

10

15

20

25

30

35

moment order

time

of c

ompu

tatio

n in

sec

onds

direct method

proposed method

Fig. 5. Average computation time for gray-scale images using thedirect method and the proposed method.

Fig. 6. (a) Woman gray-scale image, (b) noisy image by salt andpepper, and (c) noisy image by white Gaussian.

0 10 20 30 40 50 60 70 80 90 1000

0.2

0.4

0.6

0.8

1

1.2

1.4

moment order

MS

E

Proposed method

Direct method

0 20 40 60 80 100 120 140 160 180 2000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

moment order

MS

E

Proposed method

Direct method

0 20 40 60 80 100 120 140 160 180 2000

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

moment order

MS

E

noise-free image

salt and peppers noisy image

White Gaussian noisy image

(a)

(b)

(c)

Fig. 7. (a) MSE for the binary image of Horse by two methods,(b) MSE for gray-scale image of Woman by two methods, and(c) MSE for gray-scale image of Woman with salt and pepper andwhite Gaussian noise.

Fig. 8. Set of the transformed binary image character “R” by trans-lation, scaling, and rotation.

Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2389

Table

1.

Hahn’s

MomentIn

variants

�a�

10;b�

10�,

TranslationofCharacter“R”

Hah

nMom

entInvarian

ts

Translation

Vector(TV)

HMI 00

HMI 01

HMI 10

HMI 11

HMI 20

HMI 02

HMI 21

HMI 12

HMI 22

00

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514721E�1

21;89037805E�14

5;76047704E�1

1−2;06973287E�1

7−1;38867671E�1

62;69573599E�1

9−5−5

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514760E�1

21;89037605E�14

5;76057863E�1

1−2;06973187E�1

7−1;38867571E�1

62;69573699E�1

9−5�5

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514649E�1

21;89037805E�14

5;76047704E�1

1−2;06973187E�1

7−1;38867771E�1

62;69573599E�1

9�5−5

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514793E�1

21;89037705E�14

5;76047704E�1

1−2;06973387E�1

7−1;38867571E�1

62 ;69573699E�1

9�5�5

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514689E�1

21;89037875E�14

5;76057863E�1

1−2;06973287E�1

7−1;38867671E�1

62;69573599E�1

9Perform

ance

σ∕jμ

j�%�

0;00000000E�0

01;22052957E−13

5;23186668E−14

2;68777296E−05

5;56905643E−05

9;65904698E−04

4;04517583E−05

6;02349291E−05

2;03424824E−05

Table

2.

Hahn’s

MomentIn

variants

�a�

10;b�

10�,

ScalingofCharacter“R”

Hah

nMom

entInvarian

ts

Scaling

Factor(SF)

HMI 00

HMI 01

HMI 10

HMI 11

HMI 20

HMI 02

HMI 21

HMI 12

HMI 22

16;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514721E�1

21;89037805E�1

45;76047704E�1

1−2;06973287E�1

7−1;38867671E�1

62;69573599E�1

90,8

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514229E�1

21;89037192E�1

45;76047897E�1

1−2;06977669E�1

7−1;38869671E�1

62;69573699E�1

90,9

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514229E�1

21;89037147E�1

45;76047692E�1

1−2;06977669E�1

7−1;38867681E�1

62;69573799E�1

91,1

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514589E�1

21;89037985E�1

45;76047321E�1

1−2;06977669E�1

7−1;38867651E�1

62;69573499E�1

91,2

6 ;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514833E�1

21;89037297E�1

45;76047263E�1

1−2;06977669E�1

7−1;38866671E�1

62;69573699E�1

9Perform

ance

σ∕jμ

j�%�

0;00000000E�0

00;00000000E�0

00;00000000E�0

01;32319057E−04

2;02801987E−04

4;72301524E−05

9;46756755E−04

7;89206995E−04

4;23135005E−05

2390 J. Opt. Soc. Am. A / Vol. 30, No. 11 / November 2013 Sayyouri et al.

Table

3.

Hahn’s

MomentIn

variants

�a�

10;b�

10�,

RotationofCharacter“R”

Rotation

Ang

le(R

A)

Hah

nMom

entInvarian

ts

HMI 00

HMI 01

HMI 10

HMI 11

HMI 20

HMI 02

HMI 21

HMI 12

HMI 22

06;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514721E�1

21;89037805E�1

45;76047704E�1

1−2;06973287E�1

7−1;38867671E�1

62;69573599E�1

945

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11547246E�1

21;89037826E�1

45;76056587E�1

1−2;06973539E�1

7−1;38867770E�1

62;69576400E�1

990

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514723E�1

21;89037815E�1

45;76057863E�1

1−2;06973594E�1

7−1;38881689E�1

62;69572778E�1

9135

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514722E�1

21;89037854E�1

45;76056587E�1

1−2;06973518E�1

7−1;38864150E�1

62;69576741E�1

9180

6;55360000E�0

4−3;71916800E�0

8−8;15189197E�0

92;11514722E�1

21;89037844E�1

45;76057863E�1

1−2;06973187E�1

7−1;38860748E�1

62;69578765E�1

9Perform

ance

σ∕jμ

j�%�

0;000000E�0

01;492688E−13

8;272308E−14

6;876410E−03

1;064082E−05

7;473760E−04

8;564783E−05

5;739797E−03

9;069392E−04

Table

4.

Hahn’s

MomentIn

variants

�a�

10;b�

10�,

MixedTransformationofCharacter“R”

Hah

nMom

entInvarian

ts

Mixed

Transform

ation

HMI 00

HMI 01

HMI 10

HMI 11

HMI 20

HMI 02

HMI 21

HMI 12

HMI 22

TV:(0

0);SF

:1;RA:0°

6;55360000E�04

−3;71916800E�0

8−8;15189197E�0

92;11514721E�1

21;89037805E�1

45;76047704E�1

1−2;06973287E�1

7−1;38867671E�16

2;69573599E�1

9TV:(−

5−5);SF

:0,8;

RA:45°

6;55360000E�04

−3;71916800E�0

8−8;15189197E�0

92;11514723E�1

21;89037117E�1

45;76049475E�1

1−2;06972786E�1

7−1;38867675E�16

2;69573598E�1

9

TV:(−

5�5

);SF

:0,9;

RA:90°

6;55360000E�04

−3;71916800E�0

8−8;15189197E�0

92;11514724E�1

21;89037058E�1

45;76041767E�1

1−2;06972782E�1

7−1;38867673E�16

2;69573596E�1

9

TV:(�

5−5);SF

:1,1;

RA:135°

6;55360000E�04

−3;71916800E�0

8−8;15189197E�0

92;11514721E�1

21;89037487E�1

45;76045940E�1

1−2;06972785E�1

7−1;38867671E�16

2;69573593E�1

9

TV:(�

5�5

);SF

:1,2;

RA:180°

6;55360000E�04

−3;71916800E�0

8−8;15189197E�0

92;11514767E�1

21;89037490E�1

45;76041031E�1

1−2;06972780E�1

7−1;38867472E�16

2;69573590E�1

9

Perform

ance

σ∕jμ

j�%�

0;00000000E�00

1;36929095E−13

5;88827168E−14

5;78925663E−07

1 ;84309313E−04

5;73220713E−04

1;21591815E−04

6;46627083E−05

1;66512503E−06

Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2391

2%, 3%, and 4%. The feature vector based on Hahn’s momentinvariants cited in Eq. (47) is used to classify these images andits recognition accuracy is compared with that of Hu’s mo-ment invariants [1] and Krawchouk’s moment invariants[10] for the two databases. The results of the classification us-ing all features are presented in Tables 5–8.

The results show the efficiency of Hahn’s moment invari-ants in terms of recognition accuracy of noisy images, com-pared to those of Hu and Krawchouk. Note that therecognition of non-noisy binary images by our method is100%, and the accuracy of the recognition decreases with in-creasing noise.

Finally, we will compare the computational time of Hahn’sdiscrete orthogonal moment invariants by two methods: thedirect method described in Subsection A and the proposed

fast method based on the application of algorithms IBR de-fined previously in Subsection B.

For this, we will measure the computational time of char-acteristic vector defined in Eq. (47) by two methods. To com-pare the two computational methods, the execution timeimprovement ratio (ETIR) is used as a criterion [35]. This ratiois defined as ETIR � �1 − Time1∕Time2� × 100, where Time1and Time2 are the execution time of the first and the secondmethods, respectively. ETIR � 0 if both execution times areidentical.

In the first experiment, a set of five binary images Spoon,Jar, Horse, Car, and Device with size 128 × 128 pixels (Fig. 2)selected from the well-known MPEG-7 CE-shape-1 Part B da-tabase [32] were used as test images. The computational proc-esses are performed for each of the five images where theaverage times and ETIR are included in Table 9 using the pro-posed fast method and the direct method. Table 9 shows thatour proposed method is faster than the direct method.

In the second experiment, a set of five gray-scale imageswith a size of 128 × 128 pixels, shown in Fig. 12, selected fromthe COIL-20 database [34] were used as test images. Thecomputational processes are performed for each of the five

Table 5. Classification Results of the Set of Binary

English Characters and Numbers by Using d1 Distance

InvariantMoments Noise Free

Salt and Pepper Noise

1% 2% 3% 4%

Hu 100% 95.5% 86.23% 76.26% 72.25%Krawchouk 100% 97.12% 94.32% 91.25% 89.56%Hahn 100% 97.5% 94.26% 92.45% 92.23%

Table 6. Classification Results of the Set of Binary

English Characters and Numbers by Using d2 Distance

Salt and Pepper Noise

Invariant Moments Noise Free 1% 2% 3% 4%

Hu 100% 94.28% 84.12% 75.03% 71.24%Krawchouk 100% 96.85% 92.64% 90.26% 89.95%Hahn 100% 97.56% 93.94% 92.15% 92.14%

Table 7. Classification Results of COILL-20 Objects

Database by Using d1 Distance

Salt and Pepper Noise

Invariant Moments Noise Free 1% 2% 3% 4%

Hu 94.58% 92.26% 85.27% 74.86% 70.01%Krawchouk 96.48% 95.17% 90.87% 85.98% 77.25%Hahn 97.35% 96.71% 91.45% 86.58% 78.56%

Table 8. Classification Results of COILL-20 Objects

Database by Using d2 Distance

Salt and Pepper Noise

Invariant Moments Noise Free 1% 2% 3% 4%

Hu 93.56% 91.25% 85.21% 73.42% 68.87%Krawchouk 95.79% 94.18% 90.64% 84.76% 76.54%Hahn 96.27% 96.11% 91.15% 88.44% 77.86%

Fig. 9. Binary images as a training set for invariant character recog-nition in the experiment.

Fig. 10. Part of the images of the testing set in the experiment.

Fig. 11. Collection of the COIL-20 objects.

Table 9. Average Times and Reduction Percentage

of Hahn’s Invariant Moments for Binary and

Gray-Scale Images

Average Time Computation of HMI by

Set of Direct Method Fast Method ETIR%

Binary images 0.1418 0.0485 65.80%Gray-scale images 0.2562 0.1025 59.59%

2392 J. Opt. Soc. Am. A / Vol. 30, No. 11 / November 2013 Sayyouri et al.

images where the average times and ETIR are included inTable 9 using the proposed fast method and the direct method.The result indicates again that our method has a better per-formance than the direct method.

The result shows that the proposed method is faster thanthe direct method because the computation of Hahn’s discreteorthogonal invariant moments by the fast method dependsonly on the number of blocks in the image.

7. CONCLUSIONIn this paper, we have presented a new fast method for thecomputation of Hahn’s discrete orthogonal moments forbinary and gray-scale images using some properties of Hahn’sdiscrete orthogonal polynomials and the IBR. The computa-tion of Hahn’s discrete orthogonal moments, using thismethod, eliminates the propagation of numerical error and de-pends only on the number of blocks, which can significantlyreduce the time computation of Hahn’s discrete orthogonalmoments because the number of blocks in the image issmaller than the size of the image. Experimental results alsoshow the effectiveness of Hahn’s discrete orthogonal mo-ments for the reconstruction of binary and gray-scale imageswith noise and without noise. Moreover, we have proposed anew set of Hahn’s moment invariants computed by the pro-posed fast method. The accuracy of recognition of Hahn’s mo-ment invariants in the classification of the object is morerobust than Hu and Krawchouk moment invariants, especiallyfor noisy images.

ACKNOWLEDGMENTSThis work was supported in part by a grant from Moroccanpole of Competence STIC (Science and Technology of Infor-mation and Communication). We also thank the anonymousreferees for their helpful comments and suggestions.

REFERENCES1. M. K. Hu, “Visual pattern recognition by moment invariants,”

IRE Trans. Inform. Theory 8, 179–187 (1962).2. M. R. Teague, “Image analysis via the general theory of mo-

ments,” J. Opt. Soc. Am. 70, 920–930 (1980).3. C. H. Teh and R. T. Chin, “On image analysis by the method of

moments,” IEEE Trans. Pattern Anal. Mach. Intell. 10, 496–513(1988).

4. A. Khotanzad and Y. H. Hong, “Invariant image recognition byZernike moments,” IEEE Trans. Pattern Anal. Mach. Intell. 12,489–497 (1990).

5. S. X. Liao and M. Pawlak, “On image analysis by moments,”IEEE Trans. Pattern Anal. Mach. Intell. 18, 254–266 (1996).

6. C. W. Chong, R. Paramesran, and R. Mukundan, “Translationand scale invariants of Legendre moments,” Pattern Recogn.37, 119–129 (2004).

7. H. Lin, J. Si, and G. P. Abousleman, “Orthogonal rotation-invariant moments for digital image processing,” IEEE Trans.Image Process. 17, 272–282 (2008).

8. B. Yang, G. Li, H. Zhang, and M. Dai, “Rotation and translationinvariants of Gaussian–Hermite moments,” Pattern Recogn.Lett. 32, 1283–1298 (2011).

9. R. Mukundan, S. H. Ong, and P. A. Lee, “Image analysis byTchebichef moments,” IEEE Trans. Image Process. 10,1357–1364 (2001).

10. P. T. Yap, R. Paramesran, and S. H. Ong, “Image analysis byKrawchouk moments,” IEEE Trans. Image Process. 12,1367–1377 (2003).

11. H. Zhu, M. Liu, H. Shu, H. Zhang, and L. Luo, “General form forobtaining discrete orthogonal moments,” IET Image Process. 4,335–352 (2010).

12. M. Sayyouri, A. Hmimd, and H. Qjidaa, “A fast computationof Charlier moments for binary and gray-scale images,” inThe 2nd Edition of the IEEE Colloquium on Information

Sciences and Technology (CIST’12), Fez, Morocco, October22–24, 2012.

13. P. T. Yap, P. Raveendran, and S. H. Ong, “Image analysis usingHahn moments,” IEEE Trans. Pattern Anal. Mach. Intell. 29,2057–2062 (2007).

14. M. Sayyouri, A. Hmimd, and H. Qjidaa, “A fast computation ofHahn moments for binary and gray-scale images,” in IEEE

International Conference on Complex Systems (ICCS’12),Agadir, Morocco, November 5–6, 2012.

15. L. Yang and F. Albregtsen, “Fast and exact computation ofCartesian geometric moments using discrete Green’s theorem,”Pattern Recogn. 29, 1069–1073 (1996).

16. I. M. Spiliotis and B. G. Mertzios, “Real-time computation oftwo-dimensional moments on binary images using image blockrepresentation,” IEEE Trans. Image Process. 7, 1609–1615(1998).

17. K. M. Hosny, “Exact and fast computation of geometric mo-ments for gray level images,” Appl. Math. Comput. 189,1214–1222 (2007).

18. H. Z. Shu, H. Zhang, B. J. Chen, P. Haigron, and L. M. Luo,“Fast computation of Tchebichef moments for binary andgray-scale images,” IEEE Trans. Image Process. 19, 3171–3180 (2010).

19. G. A. Papakostas, E. G. Karakasis, and D. E. Koulourisotis,“Efficient and accurate computation of geometricmoments on gray-scale images,” Pattern Recogn. 41, 1895–1904 (2008).

20. C. Lim, B. Honarvar, K. H. Thung, and R. Paramesran, “Fastcomputation of exact Zernike moments using cascaded digitalfilters,” Inf. Sci. 181, 3638–3651 (2011).

21. G. A. Papakostas, E. G. Karakasis, and D. E. Koulouriotis,“Accurate and speedy computation of image Legendre momentsfor computer vision applications,” Image Vision Comput. 28,414–423 (2010).

22. J. Flusser, “Pattern recognition by affine moment invariants,”Pattern Recogn. 26, 167–174 (1993).

23. C.-W. Chong, P. Raveendran, and R. Mukundan, “Translation in-variants of Zernike moments,” Pattern Recogn. 36, 1765–1773(2003).

24. C.-W. Chong, P. Raveendran, and R. Mukundan, “Translationand scale invariants of Legendre moments,” Pattern Recogn.37, 119–129 (2004).

25. H. Zhu, H. Shu, T. Xia, L. Luo, and J. L. Coatrieux, “Translationand scale invariants of Tchebichef moments,” Pattern Recogn.40, 2530–2542 (2007).

26. G. A. Papakostas, E. G. Karakasis, and D. E. Koulouriotis, “Novelmoment invariants for improved classification performance incomputer vision applications,” Pattern Recogn. 43, 58–68(2010).

27. H. Zhu, H. Shu, J. Zhou, L. Luo, and J. L. Coatrieux, “Image analy-sis by discrete orthogonal dual Hahnmoments,” Pattern Recogn.Lett. 28, 1688–1704 (2007).

28. E. G. Karakasis, G. A. Papakostas, D. E. Koulouriotis, and V. D.Tourassis, “Generalized dual Hahn moment invariants,” PatternRecogn. 46, 1998–2014 (2013).

29. H. Zhang, H. Z. Shu, G. N. Han, G. Coatrieux, L. M. Luo, and J. L.Coatrieux, “Blurred image recognition by Legendre moment in-variants,” IEEE Trans. Image Process. 19, 596–611 (2010).

30. R. Koekoek, P. A. Lesky, and R. F. Swarttouw, Hypergeometric

Orthogonal Polynomials and Their q-Analogues, Springer

Fig. 12. Set of test binary images (a) Cup, (b) Duck, (c) Box, (d) Cat,and (e) Object.

Sayyouri et al. Vol. 30, No. 11 / November 2013 / J. Opt. Soc. Am. A 2393

Monographs in Mathematics, Library of Congress Control Num-ber: 2010923797 (Springer-Verlag, 2010).

31. A. F. Nikiforov, S. K. Suslov, and V. B. Uvarov, Classical

Orthogonal Polynomials of a Discrete Variable (Springer,1991).

32. http://www.dabi.temple.edu/~shape/MPEG7/dataset.html.

33. R. Mukundan and K. R. Ramakrishnan, Moment Functions in

Image Analysis (World Scientific, 1998).34. http://www.cs.columbia.edu/CAVE/software/softlib/coil‑20.php.35. K. M. Hosny, “Fast computation of accurate Gaussian–Hermite

moments for image processing applications,” Digit. Signal Proc-ess. 22, 476–485 (2012).

2394 J. Opt. Soc. Am. A / Vol. 30, No. 11 / November 2013 Sayyouri et al.