Pattern Recognition Letters 28 (2007) 1688–1704 www.elsevier.com/locate/patrec

Image analysis by discrete orthogonal dual Hahn moments

Hongqing Zhu a, Huazhong Shu a,c,*, Jian Zhou a, Limin Luo a,c, J.L. Coatrieux b,c

a Laboratory of Image Science and Technology, Department of Computer Science and Engineering, Southeast University, 210096 Nanjing, People’s Republic of China b INSERM U642, Laboratoire Traitement du Signal et de l’Image, Universite´ de Rennes I, 35042 Rennes, France c Centre de Recherche en Information Biome´dicale Sino-franc¸ais (CRIBs), France

Received 29 May 2005; received in revised form 26 February 2007 Available online 29 April 2007

Communicated by L. Younes

Abstract

In this paper, we introduce a set of discrete orthogonal functions known as dual . The Tchebichef and Krawtchouk polynomials are special cases of dual Hahn polynomials. The dual Hahn polynomials are scaled to ensure the numerical stability, thus creating a set of weighted orthonormal dual Hahn polynomials. They are allowed to define a new type of discrete orthogonal moments. The discrete orthogonality of the proposed dual Hahn moments not only ensures the minimal information redundancy, but also elim- inates the need for numerical approximations. The paper also discusses the computational aspects of dual Hahn moments, including the recurrence relation and symmetry properties. Experimental results show that the dual Hahn moments perform better than the Legendre moments, Tchebichef moments, and Krawtchouk moments in terms of image reconstruction capability in both noise-free and noisy con- ditions. The dual Hahn moment invariants are derived using a linear combination of geometric moments. An example of using the dual Hahn moment invariants as pattern features for a pattern classification application is given. 2007 Elsevier B.V. All rights reserved.

Keywords: Discrete orthogonal moments; Dual Hahn polynomials; Image reconstruction; Pattern classification

1. Introduction ric moments are not orthogonal. The lack of orthogonality leads to a certain degree of information redundancy and Since Hu (1962) introduced moment invariants, causes the recovery of an image from its geometric moments and functions of moments due to their ability moments strongly ill-posed. Indeed, the fundamental rea- to represent global features of an image have found wide son for the ill-posedness of the inverse moment problem applications in the fields of image processing and pattern is the serious lack of orthogonality of the moment sequence recognition such as noisy signal and image reconstruction (Talenti, 1987). To surmount this shortcoming, Teague (Yin et al., 2002; Mukundan et al., 2001b), image indexing (1980) suggested the use of the continuous orthogonal (Mandal et al., 1996), robust line fitting (Kiryati et al., moments defined in terms of Legendre and Zernike polyno- 2000), and image recognition (Qing et al., 2004). Among mials. Since the Legendre polynomials are orthogonal over the different types of moments, the Cartesian geometric the interval [1,1], and Zernike polynomials are defined moments are most extensively used. However, the geomet- inside the unit circle, the computation of these moments requires a suitable transformation of the image co-ordinate space and an appropriate approximation of the integrals * Corresponding author. Present address: Laboratory of Image Science (Shu et al., 2000; Chong et al., 2003). and Technology, Department of Computer Science and Engineering, Southeast University, 210096 Nanjing, People’s Republic of China. Tel.: The study of classical special functions and in particular +86 25 83794249; fax: +86 25 83794298. the discrete has recently received an E-mail address: [email protected] (H. Shu). increasing interest (Mukundan et al., 2001a; Arvesu´ et al.,

0167-8655/$ - see front matter 2007 Elsevier B.V. All rights reserved. doi:10.1016/j.patrec.2007.04.013 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1689

2003; Foupouagnigni and Ronveaux, 2003; Ronveaux et al., dratic lattices x(s)=s(s + 1)). The dual Hahn polynomials 2000). The use of discrete orthogonal polynomials in image are scaled, to ensure that all the computed moments have analysis was first introduced by Mukundan et al. (2001b) equal weights, and are used to define a new type of discrete who proposed a set of discrete orthogonal moment func- orthogonal moments known as dual Hahn moments. Simi- tions based on the discrete Tchebichef polynomials. An effi- lar to Tchebichef and Krawtchouk moments, there is no cient method for computing the discrete Tchebichef need for spatial normalization; hence, the error in the com- moments was also developed (Mukundan, 2004). Another puted dual Hahn moments due to discretization does not new set of discrete orthogonal moment functions based on exist. However, our new moments are more general because the discrete Krawtchouk polynomials was presented by both the Tchebichef and Krawtchouk polynomials are spe- Yap et al. (2003). It was shown (Mukundan et al., 2001b; cial cases of the dual Hahn polynomials (Nikiforov and Yap et al., 2003) that the discrete orthogonal moments per- Uvarov, 1988). Since the dual Hahn moments contain more form better than the conventional continuous orthogonal parameters (due to the fact that the dual Hahn polynomials moments in terms of image representation capability. are defined on the non-uniform lattice) than the discrete The classical orthogonal polynomials can be character- Tchebichef and Krawtchouk moments, these extra parame- ized by the existence of a differential equation. In fact, ters give more flexibility in describing the image, the the classical continuous polynomials (e.g., Hermite, improvement in performance could thus be expected. Laguerre, Jacobi, Bessel) satisfy a differential equation of It is worth mentioning that although the dual Hahn the form (Nikiforov and Uvarov, 1988) polynomials are orthogonal on a non-uniform lattice, the r~ðxÞy00ðxÞþ~sðxÞy0ðxÞþkyðxÞ¼0 ð1Þ discrete dual Hahn moments defined in this paper are still applied to uniform pixel grid image. The difference between where r~ðxÞ and ~sðxÞ are polynomials of at most second and the dual Hahn moments and the discrete moments based first degree, and k is an appropriate constant. It is possible on the polynomials that are orthogonal on uniform lattice to expand polynomial solutions of partial differential equa- (e.g., discrete Tchebichef moments and Krawtchouk tions in any basis of classical orthogonal polynomials. moments) is that the latter is directly defined on the image When the differential equation (1) is replaced by a differ- grid but, for the former, we should introduce an intermedi- ence equation, we can find the main properties of classical ate, non-uniform lattice, x(s)=s(s + 1). orthogonal polynomials of a discrete variable. Consider the The rest of the paper is organized as follows. In Section simplest case, when (1) is replaced by the following differ- 2, we introduce the dual Hahn polynomials of a discrete ence equation: variable. This section also provides the derivation of 1 yðx þ hÞyðxÞ yðxÞyðx hÞ weighted dual Hahn polynomials and the dual Hahn r~ðxÞ moments. Section 3 discusses the computational aspects h h h ~sðxÞ yðx þ hÞyðxÞ yðxÞyðx hÞ of dual Hahn moments. It is shown how the recurrence for- þ þ þ kyðxÞ¼0 2 h h mulae and symmetry property of the dual Hahn polynomi- als can be used to facilitate the moment computation. The ð2Þ dual Hahn moment invariants are also derived in this sec- which approximates (1) on a lattice of constant mesh tion. The experimental results are provided and discussed Dx = h. The classical discrete polynomials such as Charlier, in Section 4. Section 5 concludes the paper. Meixner, Tchebichef, Krawtchouk, and Hahn polynomials are all the polynomial solutions of (2). 2. Dual Hahn moments After a change of independent variable x = x(s)in(2),we can obtain a further generalization when (1) is replaced by a 2.1. Discrete orthogonal polynomials on the non-uniform difference equation on a class of lattices with variable mesh lattice Dx = x(s + h) x(s)(Nikiforov and Uvarov, 1988). The discrete orthogonal polynomials on the non-uniform lattice Let us first review some general properties of orthogonal are of great importance for applications in quantum integral polynomials of a discrete variable on a non-uniform lattice systems, quantum field theory and statistical physics (Vega, (Nikiforov and Uvarov, 1988; A´ lvarez-Nodarse and Smir- 1989). In recent years, much attention has been paid to the nov, 1996). As previously indicated, the discrete orthogo- study of this class of polynomials (Koepf and Schmersau, nal polynomials on the non-uniform lattice can be 2001; Kupershmidt, 2003; A´ lvarez-Nodarse et al., 2001a; constructed using a variable mesh in (1) when it is replaced A´ lvarez-Nodarse and Costas-Santos, 2001b; A´ lvarez-Nod- by a difference equation. Let arse and Smirnov, 1996; Temme and Lo´pez, 2000). How- ever, to the best of our knowledge, until now, no discrete D ryðsÞ ~sðxðsÞÞ DyðsÞ ryðsÞ r~ðxðsÞÞ 1 þ þ þ kyðsÞ¼0 orthogonal polynomials defined on a non-uniform lattice Dxs 2 rxðsÞ 2 DxðsÞ rxðsÞ have been used in the field of image analysis. In this paper, ð3Þ we address this problem by introducing a new set of discrete orthogonal polynomials, namely the dual Hahn polynomi- be the second order difference equation of hypergeometric als, which are orthogonal on a non-uniform lattice (qua- type for some lattice function x(s), where 1690 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

2 rgðsÞ¼gðsÞgðs 1Þ; DgðsÞ¼gðs þ 1ÞgðsÞð4Þ where dn denotes the square of the norm of the correspond- ing orthogonal polynomials, and q(s) is a non-negative denote respectively the backward and forward finite differ- function (weighting function), i.e., ence quotients. r~ðxÞ and ~sðxÞ are polynomials in x(s)of 1 degree at most two and one, respectively, and k is a con- qðsÞ Dxs > 0; a 6 s 6 b 1 ð11Þ stant. It is convenient to rewrite (3) in the following equiv- 2 ´ alent form (Nikiforov and Uvarov, 1988; Alvarez-Nodarse supported in a countable set of the real line (a,b) and such and Smirnov, 1996) that D ryðsÞ DyðsÞ D rðsÞ þ sðsÞ þ kyðsÞ¼0 ð5Þ ½rðxÞqðxÞ ¼ sðxÞqðxÞð12Þ Dxs 1 rxðsÞ DxðsÞ 1 2 Dxs 2 where Some important discrete orthogonal polynomials on the non-uniform lattice are listed in Table 1. Among them, the 1 1 rðsÞ¼r~ðxðsÞÞ ~sðxðsÞÞ Dxs ð6Þ dual Hahn polynomials and Racah polynomials are rela- 2 2 tively simple in terms of the lattice form and weighting sðsÞ¼~sðxðsÞÞ ð7Þ function, moreover, both polynomials have a finite domain of definition that is suited for square images of size N · N The polynomial solutions of equation (5), denoted by pixels. We choose here the dual Hahn polynomials to y (x(s)) P (s), are uniquely determined, up to a normaliz- n n define a new type of moments. The Racah polynomials ing factor B , by the difference analogue of the Rodrigues n have already been used by the authors in another paper formula (Nikiforov and Uvarov, 1988) (Zhu et al., 2007). A comparison of these two moments is B P ðsÞ¼ n rðnÞ½q ðsÞ; given in Table 2. n qðsÞ n n

ðnÞ r r r 2.2. Dual Hahn polynomials rn ½qnðsÞ ¼ ½qnðsÞ ð8Þ rx1ðsÞ rxn1ðsÞ rxnðsÞ ðcÞ The classical dual Hahn polynomials wn ðs; a; bÞ, where n =0,1,...,N 1, defined on a non-uniform lattice n Yn x(s)=s(s + 1), are solutions of (5) corresponding to (Nik- x ðsÞ¼xsþ ; q ðsÞ¼qðn þ sÞ rðs þ kÞð9Þ n 2 n iforov and Uvarov, 1988) k¼1 rðsÞ¼ðs aÞðs þ bÞðs cÞ It is known that for some special kind of lattices, solutions s s ab ac bc a b c 1 x s 13 of (5) are orthogonal polynomials of a discrete variable, ð Þ¼ þ þ ð Þ ð Þ i.e., they satisfy the following orthogonality property (Nik- k ¼ n iforov and Uvarov, 1988) and the weighting function q(s) is given by Xb1 1 2 Cða þ s þ 1ÞCðc þ s þ 1Þ P nðsÞP mðsÞqðsÞ Dxs ¼ dnmdn ð10Þ qðsÞ¼ ð14Þ s¼a 2 Cðs a þ 1ÞCðb sÞCðb þ s þ 1ÞCðs c þ 1Þ

Table 1 Some important discrete orthogonal polynomials on the non-uniform lattice (p, q, a, b, c, c, l, a, b, and x are parameters attached to the respective polynomials, n denoting the order)

Name Notation Lattice smin smax q(s) ðcÞ Cðaþsþ1ÞCðcþsþ1Þ Dual Hahn wn ðs; a; bÞ x(s)=s(s +1) ab Cðsaþ1ÞCðbsÞCðbþsþ1ÞCðscþ1Þ ða;bÞ Cðaþsþ1ÞCðsaþbþ1ÞCðbþasÞCðbþaþsþ1Þ Racah un ðs; a; bÞ x(s)=s(s+1) ab Cðabþsþ1ÞCðsaþ1ÞCðbsÞCðbþsþ1Þ sðs1Þ s q-Krawtchouk kðpÞðs; N; qÞ x(s)=q2s 0 N q l ½N! ; l ¼ p=ð1 pÞ n Cqðsþ1ÞCqðNþ1sÞ s q-Meixner mðr;lÞðs; qÞ x(s)=q2s 0 1 l CqðrþsÞ n CqðrÞCqðsþ1Þ sðsþ1Þ ðcÞ q ½sþaq!½sþcq! q Hahn w ðs; a; bÞ x(s)=[s]q[s +1]q ab n q ½saq!½scq!½sþbq!½bs1q!

Table 2 Comparison of dual Hahn moments and Racah moments Moment Polynomials Symmetry Number of Reconstruction Compression parameters capability capability

Dual Hahn Relatively simple: 2F3 Orthogonal About n Three: (a,b,c) Very good Good

Racah More complex: 3F4 Orthogonal About n + a and s only if Four: (a,b,a,b) Good Very good a = a = b H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1691 where the parameters a, b and c are restricted to In this case, the orthogonality condition given by (19) 1 becomes < a < b; jcj < 1 þ a; b ¼ a þ N ð15Þ Xb1 2 ðcÞ ðcÞ w^ n ðs; a; bÞw^ m ðs; a; bÞ¼dnm; n; m ¼ 0; 1; ...; N 1 Note that if the uniform lattice, i.e., x(s)=s, is used in s¼a (5), and the parameters a, b, and c are defined as ð22Þ a =(a + b)/2, b = a + N, c =(b a)/2, the dual Hahn ða;bÞ The values of the weighted dual Hahn polynomials are polynomials become the Hahn polynomials hn ðx; NÞ (Nikiforov and Uvarov, 1988). Setting a = 0 and b =0, thus confined within the range of [1,1]. Fig. 1 shows the the Hahn polynomials reduce to the Tchebichef polynomi- plots for the first few orders of the weighted dual Hahn polynomials with the parameters a = c = 0 and b = N = 40. als. If we take b = pt and a =(1 p)t in the Hahn polyno- mials and let t !1, we obtain the Krawtchouk polynomials Kn(x;p,N)(Koekoek and Swarttouw, 1998). 2.4. Dual Hahn moments The nth order dual Hahn polynomials are defined as (A´ lvarez-Nodarse and Smirnov, 1996) The dual Hahn moments are a set of moments formed ða b þ 1Þ ða þ c þ 1Þ by using the weighted dual Hahn polynomials. Given a uni- wðcÞðs; a; bÞ¼ n n f s t N N n n! form pixel lattices image ( , ) with size · , the (n + m)th order dual Hahn moment is defined as 3F 2ðn; a s; a þ s þ 1; a b þ 1; a þ c þ 1; 1Þ Xb1 Xb1 n ¼ 0; 1; ...; N 1; s ¼ a; a þ 1; ...; b 1 ð16Þ ðcÞ ðcÞ W nm ¼ w^ n ðs; a; bÞw^m ðt; a; bÞf ðs; tÞ; s¼a t¼a where (u)k is the Pochhammer symbol defined as n; m ¼ 0; 1; ...; N 1 ð23Þ Cðu þ kÞ ðuÞ ¼ uðu þ 1Þðu þ k 1Þ¼ ð17Þ k CðuÞ The orthogonality property of the dual Hahn polynomials helps in expressing the image intensity function f(s, t) in terms and 3F2(Æ) is the generalized hypergeometric function given of its dual Hahn moments. The reconstructed image can be by obtained by using the following inverse moment transform. X1 k ða1Þ ða2Þ ða3Þ z XN1 XN1 F ða ; a ; a ; b ; b ; zÞ¼ k k k ð18Þ 3 2 1 2 3 1 2 b b k! f s; t W w^ðcÞ s; a; b w^ðcÞ t; a; b ; k¼0 ð 1Þkð 2Þk ð Þ¼ nm n ð Þ m ð Þ n¼0 m¼0 The dual Hahn polynomials satisfy the following ortho- s; t ¼ a; a þ 1; ...; b 1 ð24Þ gonality property: Xb1 1 In (24), s and t represent horizontal and vertical directions wðcÞðs; a; bÞwðcÞðs; a; bÞqðsÞ Dxs ¼ d d2; of reconstructed image with uniform pixel grid. If only the n m 2 nm n s¼a dual Hahn moments of order up to M are used, (24) is n; m ¼ 0; 1; ...; N 1 ð19Þ approximated by where the weighting function q(s) is given by (14) and XM XM ðcÞ ðcÞ f ðs; tÞ¼ W nmw^n ðs; a; bÞw^m ðt; a; bÞð25Þ 2 Cða þ c þ n þ 1Þ d ¼ ; n¼0 m¼0 n n!ðb a n 1Þ!Cðb c nÞ n ¼ 0; 1; ...; N 1 ð20Þ 0.4

The set of dual Hahn polynomials is not suitable for 0.3 defining the moments because the range of values of the polynomials expands rapidly with the order. To surmount 0.2 this shortcoming, we introduce the weighted dual Hahn polynomials in the following subsection. 0.1 w 2.3. Weighted dual Hahn polynomials 0

To avoid numerical instability in polynomial computa- –0.1 tion, the dual Hahn polynomials are scaled by utilizing n=0 –0.2 n=1 the square norm and the weighting function. The set of n=2 the weighted dual Hahn polynomials is defined as n=3 sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi n=4 –0.3 5 10 15 20 25 30 35 40 ðcÞ ðcÞ qðsÞ 1 w^n ðs; a; bÞ¼wn ðs; a; bÞ 2 Dxs ; s dn 2 ðcÞ Fig. 1. Plot of scaled of dual Hahn polynomials w ¼ w^n ðs; a; bÞ for n ¼ 0; 1; ...; N 1 ð21Þ N = 40 with a = c = 0, and b = 40. 1692 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

3. Computational aspects of dual Hahn moments Eq. (26) is used to compute the values of the weighted dual Hahn polynomials. The algorithm for computing the dual ðcÞ In this section, we discuss the computational aspects of Hahn polynomial values w^n ðs; a; bÞ is shown in Fig. 2. dual Hahn moments. We present some properties of dual Fig. 3 shows the reconstruction algorithm based on Eq. (24). Hahn polynomials and show how they can be used to facil- itate the computation of moments. 3.2. Recurrence relation with respect to s 3.1. Recurrence relation with respect to n The recurrence relation of discrete dual Hahn polynomi- als with respect to s is as follows (The detailed derivation is In order to decrease the computational cost in the calcu- given in Appendix B): lation of moments, the recurrence relation can be used to ð2s 1Þ½rðs 1Þþðs 1Þsðs 1Þ2k sðs 1Þ avoid the overflowing for mathematical functions like the wðcÞðs; a; bÞ¼ wðcÞðs 1; a; bÞ hypergeometric and gamma functions. The weighted dual n ðs 1Þ½rðs 1Þþð2s 1Þsðs 1Þ n s rðs 1Þ Hahn polynomials obey the following recurrence relation wðcÞðs 2; a; bÞ ð31Þ ðs 1Þ½rðs 1Þþð2s 1Þsðs 1Þ n (the derivation of the relation is given in Appendix A)

ðcÞ dn1 ðcÞ dn2 ðcÞ To obtain the values for s = 0 and s = 1, we derive w^n ðs; a; bÞ¼A w^n1ðs; a; bÞþB w^ n2ðs; a; bÞð26Þ ðnÞ dn dn rn ½qnðsÞ defined by (8) for dual Hahn polynomials as fol- lows (A´ lvarez-Nodarse et al., 2001a): where Xn l n! 1 2 rðnÞ½q ðsÞ ¼ ð1Þ A ¼ ½sðsþ 1Þab þ ac bc ðb a c 1Þð2n 1Þþ2ðn 1Þ n n l! n l ! n l¼0 ð Þ ð27Þ rx ðs l þ 1=2Þ Q n q ðs lÞ 1 n x s m l 1 =2 n B ¼ ða þ c þ n 1Þðb a n þ 1Þðb c n þ 1Þð28Þ m¼0 r nð ð þ Þ Þ n ð32Þ with sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Using (32) and x(s)=s(s + 1), we have qðsÞ 1 w^ðcÞðs;a;bÞ¼ Dxs ð29Þ 0 2 2 1 nþ1 d0 sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi rxn rx rðnÞq ð0Þ¼Q 2 q ð0Þ¼Q 2 1 q ðsÞq ðs 1Þ qðsÞ 1 n n n rx ð m1Þ n n rx nmþ1 w^ðcÞðs;a;bÞ¼ 1 1 Dxs m¼0 n 2 m¼0 2 1 qðsÞ xðs þ 1=2Þxðs 1=2Þ 2 2 d1 Q n þ 1 qnð0Þ ¼ n qnð0Þ¼ ð33Þ ð30Þ m¼0ðn m þ 1Þ n!

Fig. 2. Algorithm for computing the weighted dual Hahn polynomial values. H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1693

Fig. 3. Algorithm for reconstruction of the original image using Eq. (24).

ðnÞ Q n þ 3 Q nðn þ 1Þ Similarly, we can obtain the recurrence relation for the rn qnð1Þ¼ n qnð1Þ n qnð0Þ m¼0ðn þ 3 mÞ m¼0ðn þ 2 mÞ weighted dual Hahn polynomials with respect to s 2 nðn þ 1Þ c ð2s 1Þ½rðs 1Þþðs 1Þsðs 1Þ2k sðs 1Þ ¼ qnð1Þ qnð0Þ ð34Þ w^ ð Þðs; a; bÞ¼ ðn þ 2Þ! ðn þ 2Þ! n ðs 1Þ½rðs 1Þþð2s 1Þsðs 1Þ sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiÂÃ we deduce from (8), (33), and (34) that qðsÞ Dxs 1 2 w^ ðcÞðs 1; a; bÞ qðs 1Þð2s 1Þ n ðcÞ 1 wn ð0;a;bÞ¼ ða þ 1Þ ðc þ 1Þ ðb nÞ ð35Þ ðn!Þ2 n n n s rðs 1Þ ðs 1Þ½rðs 1Þþð2s 1Þsðs 1Þ 2 qð0Þ qnð1Þ nðn þ 1Þ sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi wðcÞð1;a;bÞ¼ wðcÞð0;a;bÞ ÂÃ n n 2 n 1 q 1 q 0 2 n 1 ð þ Þð þ Þ ð Þ nð Þ qðsÞ Dxs 2 ðcÞ w^ n ðs 2; a; bÞ; ð36Þ qðs 2Þð2s 3Þ Cða þ s þ n þ 1ÞCðc þ s þ n þ 1Þ n ¼ 0; 1; ...; N 1; s ¼ 2; 3; ...; b 1 q ðsÞ¼ n Cðs a þ 1ÞCðb s nÞCðb þ s þ 1ÞCðs c þ 1Þ ð38Þ ð37Þ with 1694 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

ab0.4 0.5 0.3 0.4

0.3 0.2 0.2 0.1 0.1 w

0 w 0 –0.1 –0.1 –0.2

–0.3 n=0 –0.2 n=0 n=1 n=1 –0.4 n=2 n=2 n=3 –0.3 n=3 –0.5 n=4 n=4 –0.4 5 10 15 20 25 30 35 40 45 50 5 10 15 20 25 30 35 40 45 50 s s cd0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

w 0 w 0

–0.1 –0.1

–0.2 –0.2 n=0 n=0 n=1 n=1 n=2 –0.3 –0.3 n=2 n=3 n=3 n=4 n=4 –0.4 –0.4 5 10 15 20 25 30 35 40 45 50 5 10 15 20 25 30 35 40 45 50 s s

e 0.4

0.3

0.2

0.1

w 0

–0.1

–0.2 n=0 n=1 n=2 –0.3 n=3 n=4 –0.4 5 10 15 20 25 30 35 40 45 50 s

ðcÞ Fig. 4. The influence of parameter c on the weighted dual Hahn polynomials w ¼ w^n ðs; a; bÞ, a =8,b = 48. (a) c = 8, (b) c = 4, (c) c = 0, (d) c = 4, and (e) c =8. sffiffiffiffiffiffiffiffiffi 1 qð0Þ ðcÞ q q n n w^n ð0; a; bÞ¼ 2 ða þ 1Þnðc þ 1Þnðb nÞn 2 ðcÞ 2 ð0Þ nð1Þ ð þ 1Þ n! d w^ n ð1; a; bÞ¼ ð Þ n ðn þ 2Þðn þ 1Þ qð1Þ q ð0Þ 2 1 d sffiffiffiffiffiffiffiffiffiffiffiffi n ¼ ða þ nÞðc þ nÞðb nÞ n1 w^ ðcÞ ð0; a; bÞ 2 n1 3qð1Þ n dn w^ðcÞð0; a; bÞð40Þ ð39Þ qð0Þ n H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1695

Table 3 Image reconstruction of the letter ‘‘F’’ of size (40 · 40) without noises, a =8,b =48 Original image (40 · 40)

Reconstructed image Iterative number c= 8 c = 4 c =0 c =4 c =8 1

5

15

39

0.12 The symmetry property is also useful in minimizing the a = 8, b = 48, c = –8 a = 8, b = 48, c = –4 memory requirements for storing the dual Hahn polyno- 0.1 a = 8, b = 48, c = 0 mial values. In fact, Eq. (23) can be rewritten as a = 8, b = 48, c = 4 a = 8, b = 48, c = 8 8 > bP1 bP1 0.08 > w^ ðcÞðs; a; bÞw^ ðcÞðt; a; bÞf ðs; tÞ > n m > s¼a t¼a > > if n < N=2 and m < N=2 0.06 > > > bP1 bP1 > 1 sw^ ðcÞ s; a; b w^ ðcÞ t; a; b f s; t 0.04 > ð Þ N1nð Þ m ð Þ ð Þ Reconstruction Error > > s¼a t¼a <> if n > N=2 and m < N=2 0.02 W nm ¼ > bP1 bP1 > c > ð1Þtw^ðcÞðs; a; bÞw^ ð Þ ðt; a; bÞf ðs; tÞ > n N1m 0 > s¼a t¼a 0 5 10 15 20 25 30 35 > > if n < N=2 and m > N=2 Moment Order > > > bP1 bP1 Fig. 5. Comparative analysis of reconstruction error of dual Hahn > sþt ðcÞ ðcÞ moment with different coefficients c. > ð1Þ w^ N1nðs; a; bÞw^N1mðt; a; bÞf ðs; tÞ > s¼a t¼a :> if n > N=2 and m > N=2 Eqs. (38)–(40) can be used to effectively calculate the ð42Þ weighted dual Hahn polynomial values. Using (41), the inverse transformation (24) can be modified as 3.3. Symmetry property NX=21 NX=21 ðcÞ ðcÞ The symmetry property can be used to reduce the time f ðs; tÞ¼ w^ n ðs; a; bÞw^m ðt; a; bÞ required for computing the dual Hahn moments. The n¼Â0 m¼0 W þð1ÞsW þð1ÞtW weighted dual Hahn polynomials have the symmetry prop- nm N1nÃ;m n;N1m sþt erty with respect to n þð1Þ W N1n;N1m ð43Þ

ðcÞ s ðcÞ where f(s,t) represents image intensity with uniform pixel w^n ðs; a; bÞ¼ð1Þ w^N1nðs; a; bÞð41Þ grid. Such decomposition permits decreasing the computa- The above relation shows that only the values of the dual tional complexity in the reconstruction process. In fact, the Hahn polynomials up to order n = N/2 1 need to be cal- number of multiplication required in (43) is N2/4 assuming culated, thus the computational cost can be reduced. that all the polynomial values have been already calculated, 1696 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

a 0.4

0.3

0.2

0.1 w 0

–0.1 n=0 n=1 –0.2 n=2 n=3 n=4 –0.3 10 20 30 40 50 60 70 80 s

bc0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1 w w 0 0

–0.1 –0.1 n=0 n=0 n=1 n=1 –0.2 n=2 –0.2 n=2 n=3 n=3 n=4 n=4 –0.3 –0.3 10 20 30 40 50 60 70 80 10 20 30 40 50 60 70 80 s s

ðcÞ Fig. 6. Plot of weighted dual Hahn polynomials w ¼ w^n ðs; a; bÞ for different choices parameters. (a) a = c = 0 and b = 60; (b) a = c = 7, and b = 67; (c) a = c = 18, and b = 78. and the number of addition in (43) is 3N2/4. On the other XN1 XN1 c p hand, the multiplication number and addition number in vpq ¼ m00 ½ðs sÞ cos h þðt tÞ sin h (24) are both N2. s¼0 t¼0 ½ðt tÞ cos h ðs sÞ sin hqf ðs; tÞð45Þ 3.4. Invariant pattern recognition using geometric moments where p þ q To obtain the translation, scale and rotation invariants c ¼ þ 1 ð46Þ 2 of dual Hahn moments, we adopt the same strategy used by Yap et al. (2003) for Krawtchouk moments. That is, m10 m01 s ¼ ; t ¼ ð47Þ we derive the dual Hahn moment invariants through the m00 m00 geometric moments. If the geometric moments of an image 2l f(s,t) are expressed using the discrete sum approximation h ¼ 0:5 tan1 11 ð48Þ as l20 u02

and lpq are the central moments defined by XN1 XN1 Z Z m ¼ sptqf ðs; tÞð44Þ 1 1 pq p q s¼0 t¼0 lpq ¼ ðs sÞ ðt tÞ f ðs; tÞdsdt ð49Þ 1 1 then the set of geometric moment invariants, which are The dual Hahn moments of f~ðs; tÞ¼½qðsÞqðtÞð2s þ 1Þ independent to rotation, scaling and translation can be ð2t þ 1Þ1=2f ðs; tÞ can be written according to the geomet- written as (Hu, 1962) ric moments as H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1697

Table 4 Image reconstruction of the Chinese character of size 60 · 60 without noises Original image (60 · 60)

Reconstructed image Iterative number a = c =0,b =60 a = c =7,b =67 a = c = 18, b =78 10

20

30

50

Xb1 Xb1 XN1 XN1 ðcÞ ðcÞ 1 4 3 7 2 D ¼ w^ ðs; a; bÞw^ ðt; a; bÞf~ðs; tÞ D20 ¼ðN 1Þ!ðN 3Þ! s þ s þ 2N s nm n m 2 2 s¼a t¼a s¼0 t¼0 Xb1 Xb1 þð3 2NÞs þ N 2 3N þ 2 f ðs; tÞ 1 ðcÞ ðcÞ ¼ðdndmÞ wn ðs; a; bÞwm ðt; a; bÞf ðs; tÞð50Þ s¼a t¼a 1 7 ¼ðN 1Þ!ðN 3Þ! m40 þ m30 þ 2N m20 2 2 For simplicity, we only consider the case of a =0, 2 b = a + N, and c = 0. In this case, Eq. (50) can be rewritten þð3 2NÞm10 þðN 3N þ 2Þm00 ð56Þ as 1 7 D02 ¼ðN 1Þ!ðN 3Þ! m04 þ m03 þ 2N m02 XN1 XN1 2 2 1 ð0Þ ð0Þ Dnm ¼ðdndmÞ w ðs; 0; NÞw ðt; 0; NÞf ðs; tÞð51Þ n m 3 2N m N 2 3N 2 m s¼0 t¼0 þð Þ 01 þð þ Þ 00 ð57Þ Eq. (51) shows that the dual Hahn moments can be ex- The new set of moments can be formed by replacing the panded as a linear combination of the geometric moments. regular geometric moment {mpq} by their invariant coun- The explicit expressions of the dual Hahn moments in terparts {vpq}. Thus, we have terms of geometric moments up to the second order are 0.25 as follows: a=0, b=60, c=0 a=7, b=67, c=7 XN1 XN1 a=18, b=78, c=18 2 D00 ¼ðN 1Þ!ðN 1Þ! f ðs; tÞ¼½ðN 1Þ! m00 ð52Þ 0.2 s¼0 t¼0 XN1 XN1 q ðs 1Þq ðsÞ D ¼ðN 1Þ!ðN 2Þ! ÂÃ1 1 f ðs; tÞ 10 1 1 0.15 s¼0 t¼0 qðsÞ xðs þ 2Þxs 2 XN1 XN1 ¼ðN 1Þ!ðN 2Þ! ðs2 þ s þð1 NÞÞf ðs; tÞ ð53Þ s¼0 t¼0 0.1

¼ðN 1Þ!ðN 2Þ!ðm20 þ m10 þð1 NÞm00Þ Reconstruction Error D01 ¼ðN 1Þ!ðN 2Þ!ðm02 þ m01 þð1 NÞm00Þ ð54Þ XN1 XN1 0.05 2 D11 ¼ðN 2Þ!ðN 2Þ! ðs þ s þð1 NÞÞ s¼0 t¼0 ðt2 þ t þð1 NÞÞf ðs; tÞ 0 0 5 10 15 20 25 30 35 40 45 50 2 ¼½ðN 2Þ! ½m22 þ m21 þð1 NÞm20 þ m12 þ m11 Moment Order þð1 NÞm þð1 NÞm þð1 NÞm þð1 NÞ2m 10 02 01 00 Fig. 7. Comparisons of reconstruction errors with different choices of ð55Þ parameters. 1698 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

Original image of size 60 × 60

Reconstructed images using Legendre moments

Reconstructed images using Tchebichef moments

Reconstructed images using Krawtchouk moments with (p1 = p2 = 0.5)

Reconstructed images using dual Hahn moments with a = c = 7, and b = 67

Fig. 8. Columns 1–5 show the reconstructed gray-level images with maximum order up to 8, 16, 24, 32, and 50, respectively. The last column is the binary image corresponding to the results of the fifth column.

0.2 D~ 01 ¼ðN 1Þ!ðN 2Þ!ðv02 þ v01 þð1 NÞv00Þð60Þ Legendre 2 0.18 Tchebichef D~ 11 ¼½ðN 2Þ! ½v22 þ v21 þð1 NÞv20 þ v12 þ v11 Krawtchouk 2 Dual Hahn 1 N v 1 N v 1 N v 1 N v 0.16 þð Þ 10 þð Þ 02 þð Þ 01 þð Þ 00 ð61Þ 0.14 1 7 D~ 20 ¼ðN 1Þ!ðN 3Þ! v40 þ v30 þ 2N v20 0.12 2 2 2 0.1 þð3 2NÞv10 þðN 3N þ 2Þv00 ð62Þ 0.08 Reconstruction Error 1 7 D~ 02 ¼ðN 1Þ!ðN 3Þ! v04 þ v03 þ 2N v02 0.06 2 2 2 0.04 þð3 2NÞv01 þðN 3N þ 2Þv00 ð63Þ

0.02 Note that the new set of moments defined by Eqs. (58)–(63) 0 5 10 15 20 25 30 35 40 45 50 is rotation, scale and translation invariant. Moment Order

Fig. 9. Comparative analysis of reconstruction error of Legendre, 4. Experimental results and discussion Tchebichef, Krawtchouk, and dual Hahn moment. To demonstrate the effectiveness of the proposed method, we apply it to a set of binary and gray-level images D~ ¼½ðN 1Þ!2v ð58Þ 00 00 and compare the results with other discrete orthogonal ~ D10 ¼ðN 1Þ!ðN 2Þ!ðv20 þ v10 þð1 NÞv00Þð59Þ moments. H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1699

4.1. Effect of parameter c in image reconstruction 1 Xb1 Xb1 e ¼ ½f ðs; tÞfðs; tÞ2 ð64Þ N 2 We first illustrate the influence of the parameter c on s¼a t¼a image reconstruction. A constant value is assigned to the where f(s,t) and fðs; tÞ denote the original image and the parameter a, we arbitrarily set a = 8 for this example. Five reconstructed image, respectively. The reconstructed re- cases have been tested in terms of the constraints give by sults and corresponding errors are shown in Table 3 and Eq. (15): (a) c = 8; (b) c = 4; (c) c = 0; (d) c = 4; (e) Fig. 5. It can be seen that the fifth choice (a = c =8, c =8. Fig. 4 depicts the plots of dual Hahn polynomials b = 48) gives the best reconstructed results among all the with different values of c with N = 40. We can observe from test cases. We believe this is because the weighted dual Fig. 4 that the dual Hahn polynomials shift from left to Hahn polynomials, with this choice of parameters, are right as c increases. We use a binary English character approximately situated at the middle of the region of defi- whose size is 40 · 40 pixels as original image to test the nition (see Fig. 4(e)), so that the emphasis of the moments influence of the parameter c on the reconstruction results. will be at the center of the image. The following mean square error e is used to measure the In the following experiment, we will discuss the influence performance of the reconstruction: of parameter a on the reconstruction results. According to

Original gray-level image of size 256×256

Reconstructed images using Legendre moments

Reconstructed images using Tchebichef moments

Reconstructed images using Krawtchouk moments (p = p = 0.5), 1 2

Reconstructed images using dual Hahn moments (a = 0, b = 256, and c = 0)

Fig. 10. Image reconstruction of a gray-level image without noise. The orders from left to right are 50, 100, 150, 200, and 255, respectively. 1700 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

–3 the above results and the constraints imposed on these x 10 parameters given in (15), we have systematically set a = c Legendre and b = a + N in all experiments. Fig. 6 shows several plots 6 Tchebichef Krawtchouk of dual Hahn polynomials with increasing values of a Dual Hahn where it can be observed that the dual Hahn polynomial 5 moves from left to right. We then select a Chinese character whose size is 60 · 60 pixels as the original image. Three 4 cases have been tested: (a) a = c =0, and b = 60; (b) a = c =7,andb = 67; (c) a = c = 18, and b = 78. Table 4 depicts the original image and the reconstructed patterns 3

with a moment order going from 10 to 50. The plot of cor- Reconstruction Error responding reconstruction errors is tabulated in Fig. 7. 2 From Table 4 and Fig. 7, we can observe that the recon- structed images with a = c = 7, and b = 67, are better. 1 For this parameter setting, the weighted dual Hahn poly- nomials are approximately situated at the middle of the 170 180 190 200 210 220 230 240 250 region of definition (see Fig. 6(b)). It can be also seen that Moment Order when the first choice is used, the reconstruction starts from Fig. 11. Comparative analysis of reconstruction errors for Lena image. top left corner, and with the third one, the reconstruction begins from bottom right corner. Therefore, the dual Hahn trated in Fig. 10. A detailed comparison of the variation of moments can be used to extract the feature of an image by reconstruction errors is shown in Fig. 11. It can be adjusting the parameters. For dual Hahn moments, so far observed that these data confirm, both qualitatively and as a = c, the smaller of the value of a and c, the emphasis quantitatively, the good behavior highlighted above. of the region-of-interest (ROI) on the top left corner will be. Conversely, the ROI of the image shift to the bottom right corner when they take greater value. Note that the 4.4. Robustness to different kind of noises other selections (a =6,a =8,a = 9, and a = 10 have also been tested for this example, but the reconstruction results It is well known that the reconstruction quality can be are very similar to those obtained with a = 7. From these severely affected by image noise. Generally speaking, results, we found if the parameters are set a = c and moments of higher orders are more sensitive to image noise b = a + N, where N · N is the image size, a N/10 pro- (Mukundan et al., 2001a). To further test the robustness of vides the best reconstruction. dual Hahn moments regarding to different kind of noises, we first add in this example a zero mean Gaussian noise 4.2. Image reconstruction capability for binary image with variance 0.1 to the three original gray-level images shown in the first row of Fig. 12. Fig. 12 depicts the recon- We use a noise-free binary Chinese character image to structed images using Legendre, Tchebichef, Krawtchouk, compare the performance of the proposed method with and dual Hahn moments. The reconstruction errors are Legendre, Tchebichef and Krawtchouk moments. The shown in Fig. 13(a) which again indicates the better perfor- image size is 60 · 60 pixels. Fig. 8 shows the reconstruction mance of dual Hahn moments. results. Note that the parameters are set to a = c = 7, and The effect of salt-and-pepper noise (5%) is also analyzed. The reconstructed images with the maximum order of b = 67 for the proposed moments, and p1 = p2 = 0.5 is used in the Krawtchouk moments. moments up to 50 are shown in Fig. 12 and the mean Fig. 9 displays the detailed plot of the mean square square errors are reported in Fig. 13(b). It can be seen that errors using four different orthogonal moments with max- the dual Hahn moments is more robust to noise with imum order up to 50. As it can be seen from Figs. 8 and 9, respect to Legendre and Tchebichef moments, and that the reconstructed images using Krawtchouk and dual the Krawtchouk ones provide similar performances. Hahn moments perform better than the other moments. When the moment order is high (M P 25), the reconstruc- 4.5. Invariant pattern recognition tion error with dual Hahn moments is the smallest one. This subsection provides the experimental study on the 4.3. Image reconstruction capability for gray-level image classification accuracy of dual Hahn moments in both noise-free and noisy conditions. In our classification task, For this experiment, a gray-level standard image Lena we use the following feature vector: of size 256 · 256 pixels is used to compare the performance V ¼½D~ ; D~ ; D~ ; D~ ; D~ ; D~ ð65Þ the proposed dual Hahn moments with the other moments. 00 10 01 11 20 02 Moments up to maximum order of 255 are computed from where D~ nm are the dual Hahn moment invariants defined in the original image, and the reconstruction results are illus- Section 3.4. The objective of a classifier is to identify the H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1701 class of the unknown input character. During classification, Number of correctly classified images g ¼ 100% features of the unknown character are compared against The total number of images used in the test the training information being assigned a particular class. ð67Þ The Euclidean distance measure is commonly used for clas- sification purpose and is given by Fig. 14 shows a set of similar binary English characters used as the training set. The reason for choosing such a XT character set is that the elements in subset {I,L}, {D,O}, dðV ; V ðkÞÞ¼ ðv v Þ2 ð66Þ s t sj tj and {H,T,Y} can be easily misclassified due to the similar- j¼1 ity. Seven testing sets are used, which are generated by add- where Vs is the T-dimensional feature vector of unknown ing different densities of salt-and-pepper noise add to the ðkÞ sample, and V t is the training vector of class k. In this rotational version of each character. Each testing set is experiment, the classification accuracy g is defined as composed of 168 images, which are generated by rotating

Original gray-level image (Flower,Water, Bridge) of size 60×60

Gaussian noisy images (mean: 0, variance: 0.1) Salt-and-pepper noisy images (5%)

Reconstructed images using Legendre moments

Reconstructed images using Tchebichef moments

Reconstructed images using Krawtchouk moments (p1 = p2 = 0.5),

Reconstructed images using dual Hahn moments (a = c = 7, and b = 67)

Fig. 12. The first three columns are reconstructed images using Gaussian noise-contaminated images. The last three columns are reconstructed images using salt-and-pepper noise-contaminated images. The maximum order used is 50 for each algorithm. 1702 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

Table 5 Classification results of the image with rotation transformation Noise-free Salt-and-pepper noise 1% 2% 3% 4% Hu 100% 96.62% 87.047% 75.76% 70.83% Dual Hahn 100% 98.22% 92.88% 81.57% 78.67%

Table 6 Classification results of the image with Rotation and Scaling transformation Noise-free Salt-and-pepper noise 1% 2% 3% 4% Hu 98.70% 89.02% 78.01% 72.16% 65.81% Dual Hahn 98.75% 92.53% 82.48% 79.31% 75.74% Scale: 0.9, 1, 1.1 Rotation: 0,45,90,...

racy decreases when the noise is high. The second testing Fig. 13. Comparative analysis of reconstruction errors using Legendre, set is generated by rotating and scaling the training set with Tchebichef, Krawtchouk (p1 = p2 = 0.5), and dual Hahn moment (a = c = 7, and b = 67) with different noise. (a) Gaussian noise with rotating angles, / =0,45,90,...,315 and scaling fac- (mean 0, variance: 0.1) and (b) 5% salt-and-pepper noise. tors, S = 0.9, 1.0, 1,1; forming a testing set of 168 images. This is followed by the addition of salt-and-pepper noise similar to that of the first testing set. The classification re- sults of the image with rotation and scaling transformation are depicted in Table 6. Table 6 shows that the better re- sults are obtained with the dual Hahn invariant vector. Fig. 14. Binary images as training set for invariant character recognition Experimental results demonstrated that the dual Hahn mo- in the experiment. ments perform better than the traditional Hu’s moments in terms of invariant pattern recognition accuracy in both noise-free and noisy conditions. Therefore, the dual Hahn moments could be useful as new image descriptors.

5. Conclusion

The hypergeometric polynomials of continuous or dis- crete variable, whose canonical forms are the so-called clas- sical orthogonal polynomial systems, play a crucial role in many scientific research fields. Recently, some sets of dis- crete orthogonal moment functions have been introduced in image processing. The discrete orthogonal moments based on discrete orthogonal polynomials, such as Tchebi- chef and Krawtchouk polynomials, have better image rep- resentation capability than the continuous orthogonal Fig. 15. Part of the images of the testing set in the experiment. moments. These discrete orthogonal polynomials are the polynomial solutions of the difference equation on the uni- form lattice. the training images every 45 degrees in the range [0, 360) In this paper, we have proposed the use of a new type of and then by adding different densities of noises. Fig. 15 discrete orthogonal polynomials (so-called dual Hahn shows some of the testing images contaminated by 2% polynomials) on a non-uniform lattice to define the salt-and-pepper noise. The feature vector based on dual moments. It is noted that the reconstructed images still Hahn moment invariants are used to classify these images have uniform pixel lattices. The discrete Krawtchouk poly- and its recognition accuracy is compared with that of nomials, discrete Tchebichef polynomials are special cases Hu’s moment invariants (Hu, 1962). Table 5 shows the of dual Hahn polynomials. All of them are orthogonal in classification results using a full set of features. One can certain range. The computational aspects and symmetry see from this table that 100% recognition results are ob- property of dual Hahn moments have been discussed in tained in noise-free case. Note that the recognition accu- detail. In experimental studies, we have compared the dual H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704 1703

Hahn moments with other orthogonal moments such as For dual Hahn orthogonal polynomial, yn(x)in(A.5) is de- ðcÞ Legendre, Tchebichef, and Krawtchouk moments in terms fined as wn ðs; a; bÞ. From Eqs. (21) and (A.5), we can ob- of the reconstruction capability with and without noise. tain the weighted dual Hahn polynomials in recursive form The reconstruction results and detailed error analysis have as shown that the dual Hahn moments perform better than d d other moment’s methods. Pattern classification experi- w^ ðcÞðs; a; bÞ¼A n1 w^ ðcÞ ðs; a; bÞþB n2 w^ ðcÞ ðs; a; bÞ n d n1 d n2 ments also demonstrated that the dual Hahn moments per- n n form better than the Hu’s moment invariants in terms of ðA:8Þ invariant pattern recognition accuracy in both noise-free where and noisy conditions. To conclude, the discrete dual Hahn d2 n moments are potentially useful as feature descriptors for n1 ¼ ðA:9Þ d2 ðaþ cþ nÞðb a nÞðb c nÞ image analysis, and the method described in this paper n d2 nðn 1Þ can be easily extended to the construction of moment func- n2 ¼ d2 ðaþ cþ nÞða þ c þ n 1Þðb a n þ 1Þðb a nÞðb c n þ 1Þðb c nÞ tions from other discrete orthogonal polynomials on the n ðA:10Þ non-uniform lattice. ðcÞ ðcÞ The initial value of w0 ðs; a; bÞ and w1 ðs; a; bÞ (see Eqs. Acknowledgements (29) and (30)) can be obtained from (8) as B P ðsÞ¼ n rðnÞ½q ðsÞ ðA:11Þ This work was supported by National Basic Research n qðsÞ n n Program of China under grant No. 2003CB716102, the ðcÞ National Natural Science Foundation of China under where P nðsÞwn ðs; a; bÞ, and Bn is defined as follows grant No. 60272045, and Program for New Century Excel- (Nikiforov and Uvarov, 1988): n lent Talents in University under grant No. NCET-04-0477. Bn ¼ð1Þ =n! ðA:12Þ It has been carried out in the frame of the CRIBs, a joint international laboratory associating Southeast University, thus the University of Rennes 1 and INSERM, with a grant B wðcÞðs; a; bÞ¼ 0 q ðsÞ¼1 ðA:13Þ provided by the French Consulate in Shanghai. We thank 0 qðsÞ 0 the anonymous referees for their helpful comments and ðcÞ B1 r suggestions. w1 ðs; a; bÞ¼ q1ðsÞ qðsÞ rx1ðsÞ 1 q1ðsÞq1ðs 1Þ Appendix A ¼ 1 1 ðA:14Þ qðsÞ xðs þ 2Þxs 2 In this appendix, we give a detailed derivation of the ðcÞ ðcÞ Finally, the original values w^ 0 ðs; a; bÞ and w^1 ðs; a; bÞ can recurrence relation with respect to n. be obtained from (21). According to Nikiforov and Uvarov (1988), we can con- struct the recursive relation for dual Hahn orthogonal Appendix B polynomials as follows: In this appendix we derive the recurrence relation (38) of xynðxÞ¼anynþ1ðxÞþbnynðxÞþcnyn1ðxÞðA:1Þ discrete dual Hahn polynomials. By using Eq. (5) and with x(s)=s (s + 1), we can be rewritten the first term of (5) as a n 1 A:2 n ¼ þ ð Þ 2 D ryðsÞ rðsÞ ryðsÞ bn ¼ ab ac þ bc þðb a c 1Þð2n þ 1Þ2n ðA:3Þ rðsÞ ¼ D Dxs 1 rxðsÞ 2s þ 1 rxðsÞ c ¼ða þ c þ nÞðb a nÞðb c nÞðA:4Þ 2 n rðsÞ yðsÞyðs 1Þ Using Eqs. (A.1)–(A.4), we have ¼ D 2s þ 1 2s ynðxÞ¼Ayn1ðxÞþByn2ðxÞðA:5Þ rðsÞ yðs þ1ÞyðsÞ yðsÞyðs 1Þ ¼ with 2s þ 1 2ðs þ1Þ 2s 1 A ¼ ½x ab þ ac bc ðb a c 1Þð2n 1Þþ2ðn 1Þ2 ðB:1Þ n ðA:6Þ Similarly, the second term of (5) can also be rewritten as 1 ¼ ½sðs þ 1Þab þ ac bc ðb a c 1Þð2n 1Þþ2ðn 1Þ2 n 1 DyðsÞ yðs þ 1ÞyðsÞ B ¼ ða þ c þ n 1Þðb a n þ 1Þðb c n þ 1Þ ðA:7Þ sðsÞ ¼ sðsÞ ðB:2Þ n DxðsÞ 2ðs þ 1Þ 1704 H. Zhu et al. / Pattern Recognition Letters 28 (2007) 1688–1704

From (5), (B.1) and (B.2),wehave Chong, C.W., Raveendran, P., Mukundan, R., 2003. A comparative analysis of algorithms for fast computation of Zernike moments. ðs 1Þ½rðs 1Þþð2s 1Þsðs 1ÞyðsÞ Pattern Recognition 36 (3), 731–742. þ½ð1 2sÞðrðs 1Þþðs 1Þsðs 1Þþ2s kð1 sÞÞ Foupouagnigni, M., Ronveaux, A., 2003. Difference equations for the co- recursive rth associated orthogonal polynomials of the Dq-Laguerre– yðs 1Þþs rðs 1Þyðs 2Þ¼0 ðB:3Þ Hahn class. J. Comput. Appl. Math. 153, 213–223. Hu, M.K., 1962. Visual pattern recognition by moment invariants. IRE ðcÞ where y(s) denotes the dual Hahn polynomials wn ðs; a; bÞ. Trans. Inform. Theory 8, 179–187. Eq. (38) can thus be derived from (B.3) and (21).To Kiryati, N., Bruckstein, A.M., Mizrahi, H., 2000. Comments on: Robust ðcÞ line fitting in a noisy image by the method of moments. IEEE Trans. obtain the initial value of wn ðs; a; bÞ, we use the Rodrigues formula (8). Pattern Anal. Machine Intell. 12 (11), 1340–1341. Koekoek, R., Swarttouw, R., 1998. The Askey-scheme of hypergeometric B orthogonal polynomials and its q-analogue, Report 98-17, Fac. Techn. P ð0Þ¼ n rðnÞ½q ð0Þ ðB:4Þ n qð0Þ n n Math. Informatics, Delft University of Technology, Delft. Koepf, W., Schmersau, D., 2001. On a structure formula for classical ðcÞ where P nð0Þwn ð0; a; bÞ. Using (33) and (B.4), we have q-orthogonal polynomials. J. Comput. Appl. Math. 136, 99–107. Kupershmidt, B.A., 2003. Q-analogs of classical 6-periodicity: From Euler B q ð0Þ wðcÞð0; a; bÞ¼ n n to Chebyshev. J. Nonlinear Math. Phys. 10 (3), 318–339. n qð0Þ n! Mandal, M.K., Aboulnasr, T., Panchanathan, S., 1996. Image indexing 1 using moments and wavelets. IEEE Trans. Consumer Electron. 42 (3), 557–565. ¼ 2 ða þ 1Þnðc þ 1Þnðb nÞn ðB:5Þ ðn!Þ Mukundan, R., Ong, S.H., Lee, P.A., 2001a. Discrete vs. continuous orthogonal moments for image analysis. Internat. Conf. on Imag- Similarly, P ð1ÞwðcÞð1; a; bÞ n n ing Science, Systems and Technology-CISST’01, Las Vegas, pp. 23–29. ðcÞ Bn 2 nðn þ 1Þ wn ð1; a; bÞ¼ qnð1Þ qnð0Þ Mukundan, R., Ong, S.H., Lee, P.A., 2001b. Image analysis by Tchebichef qð1Þ ðn þ 2Þ! ðn þ 2Þ! moments. IEEE Trans. Image Process. 10 (9), 1357–1364. B qð0Þ n! 2q ð1Þ nðn þ 1Þ Mukundan, R., 2004. Some computational aspects of discrete orthonor- ¼ n q ð0Þ n qð0Þ qð1Þ n! n q ð0Þðn þ 2Þ! ðn þ 2Þ! mal moments. IEEE Trans. Image Process. 13 (8), 1055–1059. n Nikiforov, A.F., Uvarov, V.B., 1988. Special Functions of Mathematical qð0Þ q ð1Þ 2 n Physics. Birkhauser, Basel, Boston. ¼ n Qing, C., Emil, P., Xiaoli, Y., 2004. A comparative study of Fourier qð1Þ qnð0Þ ðn þ 2Þðn þ 1Þ ðn þ 2Þ descriptors and Hu’s seven moment invariants for image recognition. wðcÞð0; a; bÞ n Canadian Conf. Electrical Comput. Eng. 1 (2–5), 103–106. Ronveaux, A., Zarzo, A., Area, I., Godoy, E., 2000. Classical orthogonal 2 qð0Þ qnð1Þ nðn þ 1Þ ¼ polynomials: Dependence of parameters. J. Comput. Appl. Math. 121 ðn þ 2Þðn þ 1Þ qð1Þ q ð0Þ 2 n (1–2), 95–112. ðcÞ wn ð0; a; bÞðB:6Þ Shu, H.Z., Luo, L.M., Yu, W.X., Fu, Y., 2000. A new fast method for computing Legendre moments. Pattern Recognition 33, 341–348. Using Eqs. (21), (B.5), and (B.6), we can obtain the Talenti, G., 1987. Recovering a function from a finite number of moments. weighted initial values of dual Hahn polynomials shown Inverse Problem 3, 501–517. in (39) and (40). Teague, M.R., 1980. Image analysis via the general theory of moments. J. Opt. Soc. Amer. 70 (8), 920–930. Temme, N.M., Lo´pez, J.L., 2000. The for hypergeometric References orthogonal polynomials viewed from asymptotic analysis. Technology Report, MAS-R0005. A´ lvarez-Nodarse, R., Arvesu´, J., Ya´n˜ez, R.J., 2001a. On the connection Vega, H.J., 1989. Yang–Baxter algebras, integral theories and quantum and linearization problem for discrete hypergeometric q-polynomials. groups. Int. J. Mod. Phys., 2371–2463. J. Math. Anal. Appl. 257 (1), 52–78. Yap, P.T., Paramesran, R., Ong, S.H., 2003. Image analysis by Krawtc- A´ lvarez-Nodarse, R., Costas-Santos, R.S., 2001b. Factorization method houk moments. IEEE Trans. Image Process. 12 (11), 1367–1377. for difference equations of hypergeometric type on nonuniform lattice. Yin, J.H., Pierro, A.R.D., Wei, M., 2002. Analysis for the reconstruction J. Phys. A: Math. Gen. 34, 5551–5569. of a noisy signal based on orthogonal moments. Appl. Math. Comput. A´ lvarez-Nodarse, R., Smirnov, Y.F., 1996. The dual Hahn q-polynomials 132 (2), 249–263. in the lattice x(s)=[s]q[s +1]q and the q-algebras SUq(2) and SUq(1,1). Zhu, H.Q., Shu, H.Z., Liang, J., Luo, L.M., Coatrieux, J.L., 2007. Image J. Phys. A: Math. Gen. 29, 1435–1451. analysis by discrete orthogonal Racah moments. Signal Process. 87, Arvesu´, J., Coussement, J., Assche, W.V., 2003. Some discrete multiple 687–708. orthogonal polynomials. J. Comput. Appl. Math. 153 (1), 19–45.