1 Introduction

A set of moments computed from a digital image provides information about different types of geometrical features of the image. Feature extraction through moment functions is primarily concerned with extracting numerical features of images. The moment descriptors are simple to use and can be designed to provide fast, efficient and versatile systems to calculate numerical features for many applications. An appropriate selection of a feature extraction method enhances the accuracy of the pattern recognition process. Geometric moments (GMs) are one of the oldest moment based shape descriptors, which are used to generate a set of invariants that have been used in many pattern recognition applications [6]. The main drawback of GMs is that their basis functions are not orthogonal, therefore, their information redundancy is very high. On the other hand, orthogonal moments characterize independent features of the image and thus have minimum information redundancy in a set, meaning thereby that each moment describes distinct information of an image. A major advantage of orthogonal moments is their high discriminative power in pattern recognition applications, due to their robustness to image noise and their capability to reconstruct the image they describe with minimum reconstruction error. Some of the orthogonal moments are rotation invariant, while others are not. For example, Legendre moments [30] are not rotation invariant. Among the prominent orthogonal rotation invariant moments (ORIMs) include Zernike moments (ZMs) [30], pseudo Zernike moments (PZMs) [31], orthogonal Fourier Mellin moments (OFMMs) [18], radial harmonic Fourier moments (RHFMs) [17], and Chebyshev Fourier moments (CHFMs) [14]. The rotation, scale and flipping invariance properties of ORIMs make them widely used in many image processing applications such as pattern recognition, image coding and image reconstruction. A set of orthogonal ZMs was introduced by Teague [30] to image analysis that are less sensitive to noise with superior image representation capability. They are widely used in pattern recognition applications [1], image reconstruction [13], image segmentation [4], edge detection [3], watermarking [35], face recognition [5], content based image retrieval [20], palmprint verification [12], etc. Pseudo Zernike moments are introduced by Bhatia and Wolf [2], which possess properties similar to ZMs. Teh and Chin [31] observed that PZMs are more robust to noise. However, they are more computation intensive. OFMMs were introduced by Sheng and Shen [18], which have better performance than ZMs and PZMs in terms of noise sensitivity for small images. OFMMs provide more number of moments compared to ZMs and PZMs for the same maximum moment order. This is due to the fact that the repetition parameter q in the definition of Zernike and pseudo Zernike polynomials is not independent, it is constrained by the condition |q|≤p. However, in OFMMs, order and repetition are independent and for the same maximum order p max, OFMMs have more low-order moments than PZMs and ZMs. Therefore, OFMMs are less sensitive to image noise than ZMs. Other radial moments such as RHFMs [17] and CHFMs [14], are less popular due to their low image reconstruction capability as compared to ZMs, PZMs, and OFMMs [19].

Despite several important characteristics of moments which are useful for image description, they suffer from various errors and numerical instability for high order of moments, which affect their accuracy. The prevalent errors have such a negative impact on the image analysis and reconstruction that when the order of moments reaches a critical value, the resulting reconstruction error becomes intolerable. A most commonly used approach for the computation of ZMs assumes the image function to be discrete and the continuous unit disk is approximated by the square pixels whose centers lie inside the unit disk. In addition, the double integration for ZMs computation is approximated by the zeroth order summation. These assumptions lead to various errors. Liao and Pawlak [9, 10] and the Pawlak [13] have analyzed these errors extensively. They observe two major errors—geometric error and numerical error. The geometric error is caused by mapping a rectangular or square image geometrically inside a unit disk. This mapping process allows only those pixels to take part in moment computation whose centers lie inside the unit disk, while discarding other pixels. As a consequence of this, the total pixel area used for the moment computation is not equal to the area of the unit disk. This discrepancy in the area arises because some pixels, whose centers fall inside the unit disk, are not covered entirely inside the unit disk, and on the other hand, some parts of the unit disk are not covered by pixels whose centers lie outside the unit disk. The numerical error is defined as the difference between the moments computed from a continuous image function over a continuous disk and the moments computed from the discrete image function over the unit disk approximated by square pixel grids whose centers lie within the unit disk. In this paper, we analyze the numerical error in two parts- error due to discrete nature of the image function referred to as image discretization error and the numerical integration error which is caused due to the zeroth order approximation of the double integration. The geometric error is a predominant source of error for small images and the numerical integration error is considerably high for high order of moments. Apart from these errors, the ORIMs computation also suffers from numerical instability. The major cause of numerical instability is due to the high order factorial terms present in radial polynomials of kernel functions of ORIMs. Surprisingly, many recursive algorithms, primarily developed for the fast computation of ORIMs, also enhance the numerical stability for high order of moments to some extent. We have observed in our analysis [22, 24] that not only the factorial terms of large integers but the geometric and numerical integration errors also cause numerical instability in ORIMs calculation. The image discretization error can be reduced by resorting to various interpolation methods to represent the discrete image function in continuous form [7, 8]. There are many algorithms in the literature to reduce geometric error and numerical integration error. Liao and Pawlak [10], and Singh and Upneja [22, 24] have analyzed these errors in detail and some approaches for the removal of numerical integration error using numerical integration method have been proposed. Another approach for the elimination of these errors for ZMs has been proposed by Xin et al. [36] where ZMs are calculated in polar coordinates. Their approach, however, requires conversion of square image domain into circular domain, resulting in the circular grid, consequently, the pixel values at new locations, that is at the center of each circular grid, are required to be interpolated. This process creates new errors due to interpolation although its order is less than the geometric error. Singh and Walia [26] propose an improved configuration of pixel arrangements in polar space thereby enhancing the speed of computation. Lin et al. [11] propose an entirely different approach for improving image reconstruction and orthogonality of ZMs by using numerical optimization technique. In their method, ZMs computed from any conventional direct method are used as initial values in the optimization process. The method is, however, computation intensive. Wee and Paramseran [33] propose an alternative mapping technique in which the complete image is contained inside the unit disk. Therefore, all pixels are involved in the computation of radial moments. Numerical integration error is removed by using the relationship of GMs and ZMs after calculating GMs accurately for the ensembles of the square grids. However, this enhances the domain of calculation. In addition, this kind of computational framework creates boundary problem as the Zernike function is orthogonal on the circle. However, in some applications such as in image retrieval, template matching and image denoising, the computation framework using outer circle provides better results compared to the inscribed circle. Nonetheless, it is applicable for ZMs only because there is a direct relationship of GMs to ZMs and the other ORIMs do not possess this property [23]. The effect of the above errors is so severe that Xin et al. [34] discard certain discretized moments for image watermarking which do not yield accurate results for a constant function using zeroth order approximation of ZMs computation. It is worth noting that for a constant function all moments except for the zeroth order moment should be equal to zero [33]. They observe that the ZMs with repetitions q=4l, lZ, are inconsistent with the theoretical results. All moments except for q=4l become zero for constant function because of symmetry property of ZMs and the moments with repetitions q=4l, do not turn out to be so because of the errors involved in ZMs calculation using zeroth order approximation. Recently, the authors have applied Gaussian numerical integration techniques for the accurate computation of ZMs and OFMMs [22, 24]. It is shown that the moments with repetitions q=4l are calculated more accurately as compared to zeroth order approximation. The enhanced accuracy of these moments also results in its improved invariance and image reconstruction and the moments obtained using Gaussian numerical integration are very close to the theoretical results. An accurate computation framework for the computation of ZMs through GMs has been developed by Singh et al. [29].

In this paper, we reinvestigate the various characteristics of the three prominent ORIMs moments: ZMs, PZMs and OFMMs, and analyze the above errors in view of the recent research works on their accuracy and numerical stability. Firstly, the characteristics of their radial part of kernel functions are analyzed and its behavior on image reconstruction error is studied. A procedure for the reduction in image discretization error using the cubic convolution [7] is proposed. Next, a comparative error analysis of recently developed accurate computation on ORIMs is performed. The performance analysis is evaluated on image reconstruction and invariance to rotation and scale.

The rest of the paper is organized as follows. Section 2 describes an overview of the three ORIMs: ZMs, PZMs and OFMMs, followed by the analysis of their radial kernel functions in Sect. 3. The two major errors, the geometric error and numerical integration error, are analyzed in Sect. 4. In this section, the sources of numerical instability in the computation of high order ORIMs are also analyzed. A computational framework for the accurate computation of ORIMs is proposed in Sect. 5. The detailed experimental results on the comparative performance of ZMs, PZMs and OFMMs are presented in Sect. 6. Conclusions are made in Sect. 7.

2 The Orthogonal Rotation Invariant Moments (ORIMs)

The ORIMs of order p and repetition q of a continuous signal f(x,y) over a unit disk are defined by

$$ A_{pq} = \frac{p + 1}{\pi} \iint_{x^{2} + y^{2} \le1} f(x,y)V_{pq}^{*}(x,y)dxdy, $$
(1)

where p is a non-negative integer and q is an integer (negative or positive) and \(V_{pq}^{*}(x,y)\) is the complex conjugate of the moment basis function V pq (x,y). The function V pq (x,y) has the following invariant form [2]

$$ V_{pq}(x,y) = R_{pq}(r)e^{jq\theta}, $$
(2)

where \(r = \sqrt{x^{2} + y^{2}}\), θ=tan−1(y/x), \(j = \sqrt{ - 1}\) and R pq (r) is the radial polynomial. The basis functions V pq (x,y) are orthogonal to each other, i.e.,

$$ \iint_{x^{2} + y^{2} \le1} V_{nm}(x,y)V_{pq}^{*}(x,y)dxdy = \frac{\pi}{n + 1}\delta_{np}\delta_{mq}, $$
(3)

where δ np is the Kronecker delta, i.e., δ np =1, if n=p and zero otherwise.

Owing to the property of orthogonality and completeness of the basis functions, the image function f(x,y) can be represented as

$$ f(x,y) = \sum_{p} \sum _{q} A_{pq}V_{pq} (x,y). $$
(4)

The three ORIMs, i.e., the ZMs, PZMs, and OFMMs differ in the definition of the radial functions R pq (r) and the constraints imposed on p and q. Therefore, we represent these polynomials with the notation \(R_{pq}^{Z}(r),R_{pq}^{P}(r)\), and \(R_{pq}^{O}(r)\), respectively, and present their forms for each of them.

  • Zernike polynomials (ZPs): The ZPs are defined by

    $$ R_{pq}^{Z}(r) = \sum_{s = 0}^{ ( p - | q | ) / 2} \frac{( - 1)^{s}(p - s)!r^{p - 2s}}{s! ( \frac{p + | q |}{2} - s )! ( \frac{p - | q |}{2} - s )!} $$
    (5)

    with the constraints |q|≤p and p−|q|=even.

  • Pseudo Zernike polynomials (PZPs): The PZPs are defined by

    $$ R_{pq}^{P}(r) = \sum_{s = 0}^{p - |q|} \frac{( - 1)^{s} ( 2p + 1 - s )!r^{p - s}}{s! ( p + |q| + 1 - s )! ( p - |q| - s )!}, $$
    (6)

    with |q|≤p.

  • Orthogonal Fourier-Mellin polynomials (OFMPs): The OFMPs are defined by

    $$ R_{pq}^{O}(r) = R_{p}^{O}(r) = \sum _{s = 0}^{p} \frac{( - 1)^{p + s}(p + s + 1)!r^{s}}{s!(s + 1)!(p - s)!} $$
    (7)

    Since OFMPs are independent of q, there is no restriction on q in Eq. (1) while computing OFMMs, unlike ZMs and PZMs. In fact, the PZPs become OFMPs when q=0 is substituted in PZPs.

2.1 ORIMs for Digital Images

The ORIMs defined by Eq. (1) pertain to continuous signals f(x,y). In digital image processing, the image function f(i,k) is discrete and defined in rectangular arrangements of pixels with i representing rows and k representing columns. Let the image be a square image with N rows and N columns. In order to compute ORIMs, a transformation is performed which converts the square domain of N×N pixels into a unit disk. The following mapping is the most common approach to realize the objective.

$$ \begin{aligned}[c] &x_{i} = \frac{2i + 1 - N}{D},\\ &y_{k} = \frac{2k + 1 - N}{D},\quad i,k = 0,1,\ldots,N - 1 \end{aligned} $$
(8)

with

$$ D = \begin{cases} N\sqrt{2},&\mbox{for outer disk} \\ N,&\mbox{for inscribed disk} \end{cases} $$
(9)

The above mapping is shown in Fig. 1, where Fig. 1(a) is an 8×8 pixel grid, the shaded part in Fig. 1(b) represents the continuous unit disk, and its approximated form obeying the condition \(x_{i}^{2} + y_{k}^{2} \le1\) is shown in Fig. 1(c). The outer unit disk enclosing the complete image is shown in Fig. 1(d).

Fig. 1
figure 1

(a) An 8×8 pixel grid, (b) continuous inscribed circular disk with square and arc-grids, (c) inscribed circular disk approximated by square grids, and (d) outer circular disk containing complete square image grid

Therefore, the ORIMs are defined for a discrete image function f(x i ,y k ) as follows

$$\begin{aligned} \hat{A}_{pq} = \frac{p + 1}{\pi} \sum_{i = 0}^{N - 1} \sum_{{\scriptstyle k = 0\atop+\scriptstyle x_{i}^{2} + y_{k}^{2} \le1}}^{N - 1} f(x_{i},y_{k} )\iint_{(i,k)} V_{pq}^{*}(x,y)dxdy \end{aligned}$$
(10)

The double integration in the r.h.s. of Eq. (10) does not have an analytical solution. Therefore, the following form of the ORIMs computation is normally observed in the literature, which is the zeroth order approximation of the double integration.

$$ \tilde{A}_{pq} = \frac{p + 1}{\pi} \sum_{i = 0}^{N - 1} \sum_{{\scriptstyle k = 0 \atop+\scriptstyle x_{i}^{2} + y_{k}^{2} \le1}}^{N - 1} f(x_{i},y_{k} )V_{pq}^{*}(x_{i},y_{k}) \Delta^{2} $$
(11)

with \(\Delta= \frac{2}{D}\).

The discrete reconstructed image \(\hat{f}(x,y)\) and the relative reconstruction error ε are given by Eqs. (12) and (13), respectively.

$$\begin{aligned} &\hat{f}(i,k) = \sum_{p} \sum _{q} \hat{A}_{pq}V_{pq} (x_{i},y_{k}), \\ &\quad i,k = 0,1,2,\ldots,N - 1, \end{aligned}$$
(12)
$$\begin{aligned} & \varepsilon= \frac{\sum_{i = 0}^{N - 1} \sum_{k = 0}^{N - 1} ( f(x_{i},y_{k}) - \hat{f}(x_{i},y_{k}) )^{2}}{\sum_{i = 0}^{N - 1} \sum_{k = 0}^{N - 1} f^{2}(x_{i},y_{k})} \end{aligned}$$
(13)

3 Characteristics of Radial Polynomials

The forms of the three ORIMs are the same except for their definition in the radial polynomials. Therefore, their image representation characteristics are expected to differ due to the difference in the behavior of their radial polynomials. Thus, it is important to analyze the behavior of radial polynomials within the unit disk as a function of radius r. The angular function e jqθ is the same for all ORIMs and its absolute value |e jqθ|=1. Therefore, the trend of R pq (r) for the three ORIMs needs to be analyzed in details.

The ZPs have a very useful characteristic that its magnitude does not exceed one, i.e.,

$$ \bigl|R_{pq}^{Z}(r) \bigr|\le1,\quad r \in[0,1] $$
(14)

This relationship is obtained after performing exhaustive numerical experiments by computing \(R_{pq}^{Z}(r)\) for various values of r∈[0,1], and p and q, although a theoretical proof would strengthen the experimental observation.

On the other hand, the PZPs and OFMPs are increasing functions of p and their values at r=0 are

$$ R_{p,0}^{P}(0) = R_{p}^{O}(0) = ( - 1)^{p}(p + 1) $$
(15)

Therefore, as r→0, \(R_{p,0}^{P}(r)\) and \(R_{p}^{O}(r)\) become unbounded. This trend of PZPs and OFMPs is likely to create numerical instability in high order moments. The trends of ZPs, PZPs, and OFMPs are displayed for a few polynomials in Figs. 2, 3 and 4, respectively. A polynomial of degree p possessing alternating positive and negative coefficients has p real zeros. Thus, the ORIMs polynomial of degree p has p real roots. In case of ZPs there will be p/2 repeating real roots. Thus as p becomes larger, the polynomials will oscillate rapidly around the r-axis. Thus higher order polynomials are likely to make the ORIMs numerically unstable. Later, in Sect. 6, we shall show the effects of the trends of the kernel function on image reconstruction in the vicinity of r=0.

Fig. 2
figure 2

R pq (r) of ZMs for various orders p and repetitions q

Fig. 3
figure 3

R pq (r) of PZMs for various orders p and repetitions q

Fig. 4
figure 4

R pq (r)of OFMMs for various orders p

It is seen from these figures that the magnitude of ZPs is always less than or equal to 1.0, while the PZPs and OFMPs assume magnitudes greater than 1.0 in the neighborhood of r=0. Only those polynomials for PZPs become unbounded for which q=0. The OFMPs have also a similar trend in the vicinity of r=0. In fact, the OFMPs are a special case of PZPs in which the former is derived by substituting q=0 in the latter. Therefore, all OFMPs will become unbounded in the vicinity of r=0, as seen from Fig. 4. Thus, this behavior of OFMPs will have profound effect on image reconstruction in the vicinity of the center of the unit disk. Another important characteristics of the ORIMs polynomials is the rapid change in their values in the neighborhood of r=1.0. Although the rapid change is not perceptible in these figures because all polynomials are bound by 1, i.e., \(| R_{pq}^{Z}(1.0) | = | R_{pq}^{P}(1.0) | = | R_{pq}^{O}(1.0) | = 1.0\), and the scales used in these figures do not reveal this trend. Therefore, we plot the rate of change in R pq (r) in Figs. 5, 6 and 7, w.r.t. r for ZPs, PZPs, and OFMPs, defined in terms of \(\frac{dR_{pq}^{Z}(r)}{dr}\), \(\frac{dR_{pq}^{P}(r)}{dr}\), and \(\frac{dR_{p}^{O}(r)}{dr}\), respectively. It is clear from these figures that the rate of change of Zernike radial polynomial is much more in the neighborhood r=1.0 compared to the other locations of r. The PZPs and OFMPs change more rapidly both in the neighborhood r=0.0 and r=1.0, as shown clearly in Figs. 6 and 7. Therefore, in the case of ZMs, the reconstructed images are likely to deteriorate along the boundary of the unit disk for high order of moments. On the other hand, the reconstructed images obtained by PZMs and OFMMs are likely to deteriorate both in the neighborhood of r=0.0 and r=1.0. This will further be analyzed in Sect. 6.

Fig. 5
figure 5

Rate of change of \(R_{pq}^{Z}(r)\mathrm{w}\).r.t. r, i.e., \(\frac{dR_{pq}^{Z}(r)}{dr}\), of ZMs for various orders p and repetitions q

Fig. 6
figure 6

Rate of change of \(R_{pq}^{P}(r)\mathrm{w}\).r.t. r, i.e., \(\frac{dR_{pq}^{P}(r)}{dr}\), of PZMs for various orders p and repetitions q

Fig. 7
figure 7

Rate of change of \(R_{p}^{O}(r)\mathrm{w}\).r.t. r, i.e., \(\frac{dR_{p}^{O}(r)}{dr}\), of OFMMs for various orders p

4 Errors in ORIMs Computation and Numerical Stability

Apart from the image discretization error, the ORIMs suffer from two types of error: geometric error and numerical integration error. Moreover, the high order moments become numerically unstable. The geometric error is caused when a square pixel grid image is mapped into a unit disk and the mapping does not turn out to be geometrically exact. The geometric error affects low resolution images more severely than the high resolution images. The numerical integration error occurs when the double integration of the kernel function given in Eq. (10) is approximated by the zeroth order approximation. The effect of numerical integration error is more pronounced at high orders of moments. The numerical instability arises when the factorials of large integers are involved in the computation of the coefficients of radial polynomials. This is also caused when the moment order is high because the kernel function changes more rapidly and the zeroth order approximation of the double integration cannot represent this change adequately. We analyze these errors in details.

4.1 Geometric Error

The geometric error arises when a rectangular or square image pixel grid is mapped into a unit disk. The mapping is performed using Eq. (8). It is clear from Eq. (8) that only those pixels take part in the ORIMs computation whose centers (x i ,y k ) fall inside the unit disk. Those pixels which do not satisfy the condition are left out in the process of moment computation. The circumference of the unit disk is, therefore, approximated in a zig-zag pattern as shown in Fig. 1(c), contrary to the analog unit disk of Fig. 1(b). For any p,q≥0 The nature of geometric error has been analyzed by Pawlak [13] whose upper bound is given by

$$ \bigl|E_{pq}^{g} \bigr|\le\overline{f}\min \biggl[ \biggl\{ \biggl( \frac{p + 1}{\pi} \biggr)\bigl|G(N) \bigr| \biggr\}^{\frac{1}{2}},\bigl|G(N) \bigr|\biggr] \quad \mbox{where} $$
(16)

\(\overline{f} = \max_{x,y}f ( x,y )\) and \(G(N) = \frac{4}{N^{2}}\sum\sum_{x_{i}^{2} + y_{k}^{2} \le1} 1 - \pi\). Clearly as N→∞,G(N)→0. The term |G(N)| represents the absolute error between the area of the analog unit disk and the area of the discrete unit disk which is approximated after applying the condition \(x_{i}^{2} + y_{k}^{2} \le1\). The order of |G(N)| is O(N −285/208) [13]. The value of |G(N)| can be simulated as a function of image size N, as shown in Fig. 8. For a perfect mapping |G(N)| must be zero. However, the actual value of G(N) oscillates around zero meaning thereby that the area of the discrete unit disk becomes greater or less than the area of the unit disk, π. As the size of image increases, the magnitude of G(N) keeps on decreasing, which shows that the geometric error is more prominent for small images. Thus it is clear that the geometric error can be reduced if the image resolution is increased. However, for a given digital image the image resolution is fixed. Thus for those applications where small images are used, such as optical character recognition and template matching, the geometric error plays a critical role in ORIMs calculation.

Fig. 8
figure 8

Effect of image size on the geometric error G(N)

4.2 Numerical Integration Error

The numerical integration error is caused due to zeroth order approximation of the double integration. The zeroth order approximation given by Eq. (11) cannot represent adequately the value of double integration given in Eq. (10) for high values of p and q. The inaccuracy arises because of the fact that the magnitude of \(V_{pq}^{*}(x,y)\) changes rapidly about zero because of the large number of zeros of the kernel function. Thus, a more accurate approximation, such as the higher order numerical integration, is needed for the computation of ORIMs. Liao and Pawlak [10] suggested an approach based on numerical integration to reduce numerical integration error. Their approach, however, uses a smaller unit disk with radius \(r = \sqrt{1 - \frac{1}{N} - 0.0001}\). The reduced radius was taken to ensure that the sampling points used in the numerical integration do not cross the boundary of the unit disk to avoid the radial kernel functions from becoming unbounded. This approach causes the increase in the geometric error because the area of the disk with reduced radius is further affected by taking reduced radius. Thus, they concluded that the geometric error and numerical integration error cannot be reduced simultaneously. Recently, Singh and Upneja [21, 22, 24] have proposed a technique through which geometric error and numerical integration error can be reduced simultaneously. A more general form of numerical integration error, referred to numerical error by Liao and Pawlak [10] and Pawlak [13], is defined by

$$\begin{aligned} E_{pq}^{n} &= \frac{p + 1}{\pi} \Biggl[ \sum _{{\scriptstyle i = 0 \atop+\scriptstyle x_{i}^{2} + y_{k}^{2} \le1}}^{N - 1} \sum_{k = 0}^{N - 1} \biggl( \iint_{(i,k)} f(x_{i},y_{k})V_{pq}^{*}(x,y)dxdy \\ &\quad - \iint_{x^{2} + y^{2} \le1} f(x,y)V^{*}_{pq}(x,y)dxdy \biggr) \Biggr] \end{aligned}$$
(17)

In view of Eq. (1) and Eq. (3), we can rewrite Eq. (17) as

$$ E_{pq}^{n} = \hat{A}_{pq} - A_{pq} $$
(18)

The moments \(\hat{A}_{pq}\) are approximations of A pq in which it is assumed that the image function f(x i ,y k ) and the domain of integration both are discrete. The double integration in \(\hat {A}_{pq}\) is computed for each pixel (i,k) for which \(x_{i}^{2} + y_{k}^{2} \le1\). However, even using these assumptions, the double integration involved in \(\hat{A}_{pq}\) cannot be found analytically. Therefore, in the existing approaches a zeroth order approximation is considered which is given by Eq. (11). The exact moments A pq are even far difficult to compute because their computation assumes a continuous image functions f(x,y) and the integration \(\iint_{x^{2} + y^{2} \le1} f(x,y)V^{*}_{pq}(x,y)dxdy\) is required to be evaluated over the entire unit disk. An approach to approximate the value of A pq is given as follows. The discrete image function f(x i ,y k ) is converted into a continuous function using an interpolation method. A bicubic interpolation method, as used in this paper for analyzing image discretization error, is a good trade-off between a low interpolation error and computation complexity [7]. Next, the integration \(\iint f(x,y)V^{*}_{pq}(x,y)dxdy\) is evaluated using a numerical integration approach. As we observe in our analysis later in Sect. 5.1 that the image discretization error plays an insignificant role, we assume that

$$\begin{aligned} f(x,y) &\cong f(x_{i},y_{k}), \\ (x,y)&\in \biggl[ x_{i} - \frac{\Delta x}{2},x_{i} + \frac{\Delta x}{2} \biggr] \times \biggl[ y_{k} - \frac{\Delta y}{2},y_{k} + \frac{\Delta y}{2} \biggr] \end{aligned}$$

Under these assumptions, the numerical error represented by Eq. (17), reduces to the difference between the zeroth order approximation and a higher order numerical integration, which we call numerical integration error \(E_{pq}^{a}\). Therefore, the numerical integration error \(E_{pq}^{a}\) is given by

$$\begin{aligned} E_{pq}^{a} &= \frac{p + 1}{\pi} \Biggl( \sum _{{\scriptstyle \scriptstyle i = 0 \atop+\scriptstyle x_{i}^{2} + y_{k}^{2} \le1}}^{N - 1} \sum_{k = 0}^{N - 1} f(x_{i},y_{k})\biggl|V_{pq}^{*}(x_{i},y_{k}) \Delta^{2} \\ &\quad - \iint_{(i,k)} V_{pq}^{*}(x_{i},y_{k})dxdy \biggr|\Biggr) \end{aligned}$$
(19)

The integration \(\iint_{(i,k)} V_{pq}^{*}(x_{i},y_{k})dxdy\) is evaluated using Gaussian numerical integration method which is explained in detail in Sect. 5.2. The kernel functions \(V_{pq}^{*}(x,y)\) are different for the different ORIMs. Therefore, the magnitude and trend of \(E_{pq}^{a}\) will be different. We compute \(E_{pq}^{a}\) for the three ORIMs in Sect. 6.2 after proposing a computational framework for the accurate computation of ORIMs.

4.3 Numerical Instability

The numerical instability of high order ORIMs is another concern for the researchers. The numerical instability is reflected through high magnitudes of the moments and distortions in the image reconstruction for high order moments. It is attributed to the finite precision arithmetic used in the digital computers as the large numbers cannot be represented accurately. The ORIMs computation involves factorial of large numbers and high powers of r. Therefore, these two quantities are believed to cause numerical instability. It is observed that ZMs, PZMs and OFMMs become numerical unstable for p>45, 21 and 15, respectively, when double precision arithmetic is used. They become numerically unstable at a much lower moment order when single precision arithmetic is used. Singh and Walia [25, 27], and Singh et al. [28] show that the numerical instability is caused mainly by high order factorial terms. They prove this fact by conducting numerical experiments on PZPs computation by using the direct equation for the computation of the radial polynomials, R pq (r), and by using recursive expressions. The recursive equations do not involve the computation of the factorial terms. It was observed that the ORIMs computed by recursive equations are much more stable even upto moment order p=400 for a 256×256 pixels image. They further observe that the high powers of r, i.e., r p do not affect the numerical stability as the term r p also appears in the recursive equations. Thus, the high order factorial terms are the major cause of numerical instability. In a recent study by Singh and Upneja [22, 24] it is observed that the numerical integration error at high orders of moments also causes numerical instability. They perform two sets of experiments. Both sets use the recursive equations thus avoiding the numerical instability due to factorial terms. The first set uses zeroth order approximation of the double integration of the kernel function in the ORIMs calculation while the second set uses Gaussian numerical integration of several orders. It is observed that the reconstruction error keeps on decreasing in the second set for moment orders much larger than the moment orders at which the first set exhibits distortion in the reconstructed images.

The reason for numerical instability due to numerical integration error is explained as follows. At high order of moment p, the function, R pq (r) oscillates more frequently about r-axis, because R pq (r) has (pq)/2 zeros for ZPs and p zeros for PZPs and OFMPs, in the interval [0,1]. For a given discrete image of the size N×N pixels, the zeroth order approximation computes the values of R pq (r) only at the center of each pixel. When a high order moment is computed using zeroth order approximation the rapid change in the kernel function R pq (r) is not correctly represented by a single value at the center of the pixel area

$$\biggl[ x_{i} - \frac{\Delta x}{2},x_{i} + \frac{\Delta x}{2} \biggr] \times \biggl[ y_{k} - \frac{\Delta y}{2},y_{k} + \frac{\Delta y}{2} \biggr],$$

leading to high inaccuracy in moments. A numerical integration technique computes the kernel function at many locations of pixel area, thus providing accurate estimation of double integration. This leads to numerical stability in moment computation at high order.

5 Computational Framework for the Accurate Computation of ORIMs

As discussed in Sect. 3, the ORIMs computation suffers from four errors; image discretization error, geometric error, numerical integration error and numerical instability. We reduce these errors as follows.

5.1 Reduction in Image Discretization Error

The image function f(x,y) is a discrete signal defined on an N×N image grid with the values f(i,k), i,k=0,1,2,…,N−1. The discrete signal is converted into a continuous signal using some interpolation methods. The bilinear interpolation and cubic convolution [7, 8] are the two most frequently used methods. The cubic convolution is one of the best methods in terms of interpolation accuracy and computation complexity [7]. It has much superior performance than bilinear interpolation although bilinear interpolation is simple to use. It has been proved by Reichenbach and Geng [16] that other advanced methods provide marginal improvement in interpolation accuracy at the cost of high time complexity. Let g(x,y) be the continuous signal obtained from the discrete 2-D signal f(i,k) after applying cubic interpolation. The value of the continuous signal at a point (x,y)∈[i,i+1]×[k,k+1] is obtained as

$$ g(x,y) = \sum_{l = 0}^{3} \sum _{m = 0}^{3} a_{lm} x^{l}y^{m} $$
(20)

where a lm are the coefficients of the cubic convolution which depend on f(i,k). A complete procedure of cubic convolution is given in [7]. The major steps of the cubic convolution incorporating the requirements of the present analysis are given in the Appendix.

5.2 Reduction in Geometric Error and Numerical Integration Error

The geometric error and numerical integration error can be reduced simultaneously by employing numerical integration techniques. A numerical integration technique uses more than one sampling point over a pixel area thereby providing two advantages. This approach not only reduces the numerical integration error but also provides a better approximation of the circular boundary of the unit disk which results in the reduction of geometric error. More sampling points in a pixel area provide a better approximation of the rapid change in the kernel functions at high order of moments. This leads to better numerical stability of moments. There are many standard techniques for numerical integration but the Gaussian numerical integration method is preferred over other methods because it outperforms other methods [15]. We can now convert Eq. (1) into the following form for incorporating the image interpolation using cubic convolution and approximating the double integration using an n×n point Gaussian integration method.

$$\begin{aligned} & \begin{aligned}[b] \hat{A}_{pq} &= \frac{(p + 1)}{\pi N^{2}}\\ &\quad \times \sum_{i = 0}^{N - 1} \sum_{k = 0}^{N - 1} \sum _{l = 0}^{n - 1} \sum_{m = 0}^{n - 1} w_{l} w_{m}g(x_{il},y_{km})V_{pq}^{*}(x_{il},y_{km}), \end{aligned} \\ &\quad x_{il}^{2} + y_{km}^{2} \le1 \end{aligned}$$
(21)

where

$$ x_{il} = \frac{2i + t_{l} + 1 - N}{N},\qquad y_{km} = \frac{2k + t_{m} + 1 - N}{N} $$
(22)

The quantities w u and t u , u=0,1,…,n−1, are weights and sampling points of an n×n point Gaussian numerical integration method. These values can be obtained in any standard numerical analysis book [15]. Typically, for n=5, w 0=0.2369268851, w 1=0.4786286705, w 2=0.5688888889, w 3=w 1, and w 4=w 0, and t 0=−0.9061798459, t 1=−0.5384693101, t 2=0.0, t 3=−t 1, and t 4=−t 0. The constraint \(x_{il}^{2} + y_{km}^{2} \le1\) is an improvement over the constraint \(x_{i}^{2} + y_{k}^{2} \le1\) used for the zeroth order approximation. The zeroth order approximation is a special case of n×n point Gaussian integration method which is obtained from Eq. (21) by taking n=1, t 0=0.0, w 0=2.0, g(x i0,y k0)=f(i,k).

Further, the constraint used in Eq. (21) is written in its expanded form

$$\begin{aligned} x_{il}^{2} + y_{km}^{2} &= \biggl( \frac{2i + t_{l} + 1 - N}{N} \biggr)^{2} \\ &\quad + \biggl( \frac{2k + t_{m} + 1 - N}{N} \biggr)^{2} \le1 \end{aligned}$$
(23)

which is a generalization of the constraint \(x_{i}^{2} + y_{k}^{2} \le1\). This condition allows all those sampling points to take part in the numerical integration which lie within the unit disk. Therefore, a better approximation of the circular boundary is achieved which otherwise results in a coarser approximation. This results in the reduction in the geometrical error. In Sect. 6, we provide experimental results showing the reduction in geometric error with respect to the different order of numerical integration n for various image sizes.

5.3 Accurate Computation of ZMs through GMs

Among the three ORIMs, the ZMs can be computed accurately by computing GMs exactly and then invoking the relationship between GMs and ZMs to derive the latter. No such relationship exists for PZMs and OFMMs [23]. The GMs of order (p+q) are computed exactly using the following equation.

$$ G_{pq} = \sum_{i = 0}^{N - 1} \sum _{k = 0}^{N - 1} \int_{x_{i} - \frac{\Delta x}{2}}^{x_{i} + \frac{\Delta x}{2}} \int_{y_{k} - \frac{\Delta y}{2}}^{y_{k} + \frac{\Delta y}{2}} f(x_{i},y_{k})x^{p}y^{q}dxdy $$
(24)

The mapping, given by Eq. (8) with \(D = N\sqrt{2}\), i.e., the outer unit disk is used. Therefore, the condition \(x_{i}^{2} + y_{k}^{2} \le1\) is not required as it is automatically satisfied.

The discrete image function f(i,k) is converted to a continuous function g(x,y) using cubic convolution which is given by Eq. (20). Therefore, the exact GMs are derived by Eq. (25).

$$\begin{aligned} & \begin{aligned}[b] G_{pq} &= \sum_{i = 0}^{N - 1} \sum _{k = 0}^{N - 1} \int_{x_{i} - \frac{\Delta x}{2}}^{x_{i} + \frac{\Delta x}{2}} \int_{y_{k} - \frac{\Delta y}{2}}^{y_{k} + \frac{\Delta y}{2}} \\ &\quad \times \sum_{l = 0}^{3} \sum_{m = 0}^{3} a_{lm} x^{p + l}y^{q + m}dxdy,\quad x_{i}^{2} + y_{k}^{2} \le1 \end{aligned} \end{aligned}$$
(25)

Equation (24) is simplified to

$$\begin{aligned} \begin{aligned}[b] G_{pq} &= \sum_{i = 0}^{N - 1} \sum _{k = 0}^{N - 1} \sum _{l = 0}^{3} \sum_{m = 0}^{3} \frac{a_{lm}}{(p + l + 1)(q + m + 1)}\\ &\quad \times \bigl[ x^{p + l + 1} \bigr ]_{x_{i} - \frac{\Delta x}{2}}^{x_{i} + \frac{\Delta x}{2}} \bigl[ y^{q + m + 1} \bigr]_{y_{k} - \frac{\Delta y}{2}}^{y_{k} + \frac{\Delta y}{2}},\quad x_{i}^{2} + y_{k}^{2} \le1 \end{aligned} \end{aligned}$$
(26)

The ZMs are derived from GMs using the following relationship

$$\begin{aligned} A_{pq} &= \frac{p + 1}{\pi} \sum_{{\scriptstyle k = | q | \atop+\scriptstyle p - k = even}}^{p} \sum_{m = 0}^{s} \sum _{n = 0}^{| q |} w^{n} \\ &\quad \times{s \choose m} { |q |\choose n} G_{k - 2m - n,2m + n} \end{aligned}$$
(27)

where B p|q|k is given in [29] and

$$ w = \begin{cases} - j,&q > 0 \\ + j,&q \le0 \end{cases} $$
(28)

with

$$s = \frac{1}{2}\bigl(k - |q |\bigr),\quad\mbox{and}\quad j = \sqrt{ - 1}. $$

Since all pixels of the image take part in moment computation, the geometric error is eliminated. Numerical integration error is removed as a consequence of performing exact integration of GMs. Therefore, the computed ZMs are accurate.

6 Experimental Analysis

The performance of the proposed computational framework to reduce image discretization error, geometric error and numerical integration error in the ORIMs computation is analyzed on twelve standard gray scale images of 256×256 pixels normally used in image processing [22]. A comparative performance analysis is made on the three ORIMs: ZMs, PZMs, and OFMMs. The computational framework is implemented in Microsoft’s Visual C++ 6.0 in Windows environment on a PC with 3.0 GHz CPU and 2 GB RAM. The experimental analysis covers the following issues.

  1. 1.

    Test of accuracy on orthogonality of kernel functions

  2. 2.

    Image discretization error

  3. 3.

    Reduction in geometric error and numerical integration error

  4. 4.

    Image reconstruction, reconstruction error and effect of mode of image mapping

  5. 5.

    Rotation invariance

  6. 6.

    Scale invariance.

We refer to the 5×5 numerical integration method as the accurate method for the computation of ORIMs. The zeroth order approximation and the accurate computation of ORIMs use recursive methods for the computation of kernel functions because they provide numerical stability to high order moment [27, 28, 32]. The GMs are, however, computed using non-recursive method. Therefore, ZMs obtained from GMs will numerically be unstable for lower p max which will be mentioned at appropriate places. It is also to be noted that wherever the value of p max is specified, the value of |q| for ZMs and PZMs is bound by p. Being independent of p, for OFMMs q ranges from −q max to q max where in this paper the value of q max is taken to be the same as that of p max for conducting experiments.

6.1 Test of Accuracy on Orthogonality of Kernel Functions

The accurate computation of ORIMs is tested for the orthogonality of the kernel functions, which is given by Eq. (3). We define the mean absolute error E which measures the deviation in the orthogonality of kernel function from its correct value.

$$\begin{aligned} E &= \frac{1}{N^{2}}\sum_{p} \sum _{q} \sum_{m} \sum _{n} \biggl|\delta_{np}\delta_{mq} \\ &\quad - \frac{n + 1}{\pi} \iint_{x^{2} + y^{2} \le1} V_{nm}(x,y)V_{pq}^{*}(x,y)dxdy \biggr| \end{aligned}$$
(29)

The integration on the r.h.s. of Eq. (29) is computed using zeroth order approximation and accurate computation of ORIMs kernels. The inscribed unit disk is considered for mapping N×N pixel grid. The mean absolute orthogonality error E is plotted in Fig. 9 as a function of p and q for a square domain of 64×64 pixels. It is observed that the value of E is very small for Zernike kernels even for the zeroth order approximation showing the orthogonality condition to be much better than the kernel functions of the two other ORIMs. The magnitude of E increases rapidly with the increase in p and q showing the highly unstable behavior of the kernel functions of PZMs and OFMMs. The accurate computation of ORIMs reduces the value of E significantly, especially for higher moment orders p max. The reduction is much more significant for OFMMs, followed by PZMs and the least for ZMs.

Fig. 9
figure 9

Mean absolute orthogonality error E w.r.t. the maximum order of moment p max for zeroth order approximation and accurate method for a 64×64 pixels domain (inner unit disk)

6.2 Image Discretization Error

The role of image discretization error is investigated on ZMs for three image sizes: 32×32, 64×64 and 256×256. Cubic convolution is performed for converting a discrete image into a continuous form which results in a cubic polynomial in x and y of degree 3 in each variable as shown in Eq. (20). The exact GMs are used to derive ZMs using Eq. (26). The average reconstruction error ε computed for 12 images is shown in Figs. 10(a), 10(b) and 10(c) for the three image sizes. It is observed from these figures that there is no reduction in ε after removing the image discretization error. In fact, the ZMs become unstable at a lower value of p max as compared to the ZMs computed using discrete function. As the image size increases, the instability starts at lower p max. We conducted experiments for rotation and scale invariance analysis and observed similar trends for these characteristics also. The experiments were repeated for several image sizes, both lower than 32×32 and larger than 256×256, no change in the trend of the results is observed. The PZMs and OFMMs cannot be computed through GMs, therefore, 5×5 numerical integration is used for their accurate computation with and without cubic convolution of the image function. Like ZMs, no improvement in image reconstruction, and rotation and scale invariance was observed due to the removal of image discretization error. The above experiments were also repeated for inscribed unit disk using 5×5 numerical integration. As before, no significant improvement was observed in the accuracy of ORIMs due to the removal of image discretization error. It is, therefore, concluded that the discretization error plays negligible role in the accurate computation of the three ORIMs.

Fig. 10
figure 10

Average reconstruction error ε vs. maximum order of moment p max for (a) 32×32, (b) 64×64, and (c) 256×256 pixels images (outer unit disk)

6.3 Reduction in Geometric Error and Numerical Integration Error

The geometric error arises when a square region is mapped into the circular region. This is a common error that exists in the computation of all rotational moments of which ORIMs are a particular case. As explained in Sect. 5, the numerical integration method reduces not only the numerical integration error, but also the geometric error. This characteristic of the numerical integration method is depicted in Fig. 11, where the measure of the geometric error, G(N), is plotted as a function of the order of numerical integration n. The value of G(N) for n=1, yields the difference between the area of unit disk π and the area of approximated unit disk as shown by Fig. 1(c). It is observed in Fig. 11 that the magnitude of G(N) decreases rapidly w.r.t. the increasing order of numerical integration. Further, for larger images, the magnitude of G(N) becomes smaller. Therefore, the results are shown for three small image resolutions 32×32, 48×48, and 64×64 pixels.

Fig. 11
figure 11

Magnitude of geometric error G(N) for different order of numerical integration n

The upper bound of normalized numerical integration error \(E_{pq}^{a}\) given by Eq. (19) which measures the deviations of ORIMs from their accurate values is shown in Fig. 12 for outer unit disk and for the three image sizes by taking f(x i ,y k )=1. It is observed from these figures that the value of \(E_{pq}^{a}\) is maximum for OFMMs, followed by PZMs and the smallest for ZMs. The reason of high integration error for OFMMs and PZMs is obvious because for q=0, |R p0(0)| becomes unbounded as explained in Sect. 3. The radial polynomials of OFMMs are a special case of PZMs obtained by substituting q=0. Therefore, all radial OFMPs become unbounded in the vicinity of r=0. Their contribution towards the integration error becomes much more prominent as compared to PZMs. For a given order p, there are (p+1) number of PZPs and only one polynomials for which q=0 becomes unbounded in the vicinity of r=0. Therefore, the contribution of such PZPs towards the numerical integration is subdued. For ZPs, there is no such polynomial which becomes unbounded. Therefore, the numerical integration error is the least for the ZMs. It is also seen that the integration error \(E_{pq}^{a}\) increases as the order of moment increases. However, it decreases with the increase of the size of the image.

Fig. 12
figure 12

Upper bound of normalized numerical integration error \(E_{pq}^{a}\) with respect to moment order p max for (a) 32×32, (b) 64×64, and (c) 256×256 pixels images (outer unit disk)

6.4 Image Reconstruction, Reconstruction Error and Effect of Mode of Image Mapping

The performance of the accurate computation of the ORIMs on image reconstruction is shown for 64×64 pixel Pirate image which is given in Fig. 13. The reconstructed images are shown in Fig. 14 for inscribed unit disk and plotted for moment orders 10 through 70 with an interval of 10 in p max, using zeroth order approximation and accurate computation. Both methods use recursive computation of radial polynomials [27, 28, 33], thereby providing stability to moments at high p max. The reconstructed images for ZMs at high order of moments are far better than the other two ORIMs. There is distortion in the quality of reconstructed images using zeroth order approximation for PZMs and OFMMs in the neighborhood of r=0.0 and along the boundary of unit disk, whereas for ZMs the reconstructed images display this trend only along the boundary. The reason for this distortion is explained in Sect. 3. The accurate computation not only improves the quality of the reconstructed images, but also reduces the degradation along the circular boundary. The quality of reconstructed images also improves significantly in the neighborhood of r=0.0 for PZMs and OFMMs. The reconstruction error ε is also shown along with the reconstructed images. The accurate computation of moments exhibits a decreasing trend in ε w.r.t. p max.

Fig. 13
figure 13

A 64×64 pixels Pirate image

Fig. 14
figure 14

Reconstructed Pirate image of 64×64 pixels using various ORIMs for different values of p max (inner unit disk)

An interesting aspect of the mapping process of the square image into a unit disk is observed when the outer unit disk is considered. The entire image is contained in the unit disk as shown in Fig. 1(d). For this kind of mapping, the value of r=1.0 is not obtained for any pixel location and the maximum value of \(r = 1 - \frac{1}{N}\) is achieved at the pixels located at four vertices of the square image. The mapping process results in a far better quality of reconstructed image even for the zeroth order approximation. The reconstructed images are shown in Fig. 15. First, we analyze the quality of reconstructed images for ZMs using zeroth order approximation and its accurate computation. It is observed that the reconstruction error is almost the same. Surprisingly, the zeroth order approximation provides slightly lower ε than the accurate method, except for p max=10. No degradation in the image is found along the boundary of the reconstructed images unlike the mapping when the inscribed unit disk is used. PZMs and OFMMs are also do not affect the reconstructed images along the boundary. However, they are affected in the vicinity of the center of the unit disk. As a result, the accurate computation of PZMs and OFMMs provides significant improvement in reconstructed images. The improvement is due to the fact that the kernel functions are sampled for higher number of locations which provides much needed succor to the radial polynomials in the neighborhood of r=0.0 where the radial polynomials for PZMs and OFMMs change more rapidly. Therefore, the accurate computation of PZMs and OFMMs provides significant improvement in image reconstruction at higher order of moments.

Fig. 15
figure 15

Reconstructed Pirate image of 64×64 pixels using various ORIMs for different values of p max (outer unit disk)

The trend of average reconstruction error ε computed for 12 images w.r.t. the maximum moment order p max for the three image sizes are plotted in Fig. 16 for inscribed unit disk. For outer unit disk, its behavior is plotted in Fig. 17. It is observed from these figures that the effects of geometric error and numerical integration error are much more significant for OFMMs, followed by PZMs and smallest for ZMs. These errors are much more pronounced in smaller images as compared to large images. An interesting aspect of the mapping process involving the outer unit disk is that there is virtually no difference between the zeroth order approximation of ZMs and its accurate computation. It is clear from Fig. 17 that the reconstruction error for ZMs is approximately the same upto moment orders 50, 100, and 320, for the image sizes 32×32, 64×64, and 256×256, respectively.

Fig. 16
figure 16

Average reconstruction error ε as a function of order of moments for (a) 32×32, (b) 64×64, and (c) 256×256 pixels images (inner unit disk)

Fig. 17
figure 17

Average reconstruction error ε as a function of order of moments for (a) 32×32, (b) 64×64, and (c) 256×256 pixels images (outer unit disk)

6.5 Rotation Invariance

The effect of accurate computation of ORIMs on rotation invariance is measured by computing the mean square error E r of the deviations of magnitudes of moments of rotated images from their unrotated counterparts. The mean square error is defined by

$$ E_{r} = \frac{1}{L}\sum_{p} \sum _{q} \bigl( \bigl|A_{pq}^{\theta} \bigr|- \bigl|A_{pq}^{O} \bigr| \bigr)^{2} $$
(30)

where L is the total number of moments upto a given order and repetition, p max and q max, and \(| A_{pq}^{O} |\) and \(| A_{pq}^{\theta} |\) are the magnitudes of the moments of the unrotated and rotated images, respectively. The trend of average value of E r computed for 12 images as a function of rotation angle θ is shown in Fig. 18, for three image sizes for inscribed unit disk. We have taken p max=20 for ZMs, p max=14 for PZMs and p max=q max=10 for OFMMs, so that the value of L is nearly the same for the three ORIMs which turns out to be L=121 for ZMs and OFMMs, and L=120 for PZMs. It is surprising to observe that the OFMMs provide the least value of E r , followed by PZMs and it is maximum for ZMs. The accurate computation of ORIMs reduces the value of E r significantly, providing much better rotational invariance characteristics of all ORIMs. It is also observed that the large images exhibit lower values of E r as compared to small images.

Fig. 18
figure 18

Effect of rotation on average mean square error E r on ORIMs for (a) 32×32, (b) 64×64, and (c) 256×256 pixels images (inner unit disk)

6.6 Scale Invariance

Scale invariance is another important characteristic of ORIMs. Since ORIMs are computed in a unit disk after mapping a digital image of a given size, it is expected that the magnitude of moments must be scale invariant. However, due to various errors and discrete nature of the image function the scale invariance is affected. Like rotation invariance, we define mean square error E s for scale invariance as follows

$$ E_{s} = \frac{1}{L}\sum_{p} \sum _{q} \bigl( \bigl|A_{pq}^{s} \bigr|- |A_{pq} |\bigr)^{2} $$
(31)

where L is the total number of moments for given p max and q max which is taken same as in rotation invariance. A pq and \(A_{pq}^{s}\) represent the moments of an image of standard size and a scaled image, respectively. We take 64×64 as the standard size and vary the size from 32×32 through 256×256 with an interval of 32 along each direction. The average values of E s computed for the 12 images are shown in Fig. 19 as a function of image size for inner unit disk. The trend in scale invariance for the three ORIMs is similar to the trend for the rotation invariance. The scale invariance property of ZMs is more affected by the various errors compared to PZMs and OFMMs. The accurate computation of ORIMs improves the scale invariance property significantly. The scale invariance property of small images is much more affected by errors than the larger images.

Fig. 19
figure 19

Effect of scale on average mean square error E s on ORIMs

7 Conclusion

Accurate computation of ORIMs is very essential for several pattern recognition problems to represent subtle details in images. The inaccuracies in the moments arise due to several digitization processes. The most prominent errors are the image discretization error, geometric and numerical integration error. The influence of these errors is reflected in poor image reconstruction and invariance properties at high orders of moments. This results in the numerical instability at high order of moment rendering the moments to be useless where a large number of moments are required. In this paper, we have analyzed the role of image discretization error by resorting to cubic convolution to derive a continuous signal. A computational framework based on numerical integration method is presented which reduces geometric error and numerical integration error simultaneously. The following conclusions are drawn after performing detail experimental analysis.

  1. (i)

    Image discretization error plays an insignificant role in the accuracy of ORIMs computation. Therefore, it can be ignored and the image intensity function can be considered constant over a pixel area.

  2. (ii)

    Numerical integration error plays crucial role in the accurate computation of moments of high orders. It not only affects the accuracy, but also makes them numerical unstable for high orders of moments.

  3. (iii)

    The numerical integration technique not only reduces numerical integration error, but it also decreases geometric error and enhances numerical stability of ORIMs at high orders of moments. The proposed accurate computation of ORIMs results in much better reconstructed images and provides significant improvements in invariance properties of ORIMs.

  4. (iv)

    The radial part of kernel function of ORIMs plays a vital role in influencing the numerical integration error. The radial kernel functions of OFMMs and PZMs distort the reconstructed images in the vicinity of the center of the images. ZMs are not affected by such distortion. All three ORIMs provide distorted images along the outer boundary of the unit disk.

  5. (v)

    Geometric error does not contribute much towards the inaccuracies of moments except for small images. The images with size 48×48 or less are affected by geometric error.

  6. (vi)

    When an outer disk is considered for mapping a square image, the accuracy of moments are less affected compared to the inscribed unit disk. The ZMs are not at all affected by any error. The zeroth order approximation provides as accurate results as to those obtained by numerical integration method. Consequently, no distortion on the reconstructed images is observed. The OFMMs and PZMs are, however, affected in the vicinity of the center of the image and the effect is as prominent as in the case of inscribed unit disk for these two ORIMs. No distortion is observed along the boundary of the reconstructed image for these moments also.