1 Introduction

The 3D image recognition and 3D pattern classification play essential roles and interesting part of image processing, engineering and computer vision. In general, 3D image recognition or classification is obtained by looking for descriptors representing the 3D object without taking into account certain transformations and/or deformations. 3D moment invariants were demonstrated to be very great means for pattern representation and it has often been proved that 3D moment invariants act out efficiently in 3D object recognition [3, 4, 8, 14]. Up to now, different kinds of 3D moment invariants to spherical transformations of the 3D object have been suggested. Among all transformations TRS (translation, scaling and rotation) that have been analyzed in this context, rotation plays a crucial role. 3D image rotation is found almost in all our applications, though the imaging system is well established and the experiment has been developed in a laboratory. On the other hand, rotation is unimportant to deal with mathematically, for these causes, researches have been interested on invariants to rotation since the beginning. With the quick improvement of mathematics and sensor, 3D image processing, arises engineering and practice thanks to its more precise and flexible descriptions of 3D images. Without doubt, developing rotation invariants for 3D images has become an interesting topic in the computer vision community. However, 2D rotations easier to handle than 3D, since it has three independent parameters. That is perhaps why there has not been enough research papers on 3D rotational invariants. Indeed, Sadjadi [17] use the ternary quadratics extensively theory to extract three scaling, rotation and translation (SRT) moment invariants. More orthogonal moment invariants to rotation and translation in 3D space were extracted by geo [10] using and proving the results of Sadjadi and Hall. The tensor theory has been used by Cyganski and Orr [2] and Reiss [16] to derive 3D rotation invariants. A geometric primitives have been used by Xu and Li [22] to extract the 2D and 3D invariants like distance, area, and volume. The normalization approach was employed by Galvez and Canton [9]. Later, a complex moments [9, 13, 21] has been proved to extract 3D rotation invariants. Suk and Flusser [7, 19] suggested an automatic algorithm to produce 3D rotation invariant from 3D geometric moments to any orders. Despite being the most known 3D shape descriptors, moments are not the only patterns giving 3D rotation invariance. For instance, Kakarala [11] employed the bispectrum popular in statistics for pattern computation. Comparing two images, Kazhdan [12] employed a similar phase correlation based on spherical harmonics. In this specific example, it was employed for registration, but it can also be employed for recognition. Fehr [5] describing an image composed of patches by using the power spectrum and bispectrum calculated from a tensor function. In [6], the same researcher used local binary object features and in [18] he employed harmonic local histograms of oriented gradients. Compared to traditional geometric or complex moments, the most important advantage of orthogonal moments is their outstanding numerical stability, limited types of values, and the recurrent existing relations for their computation. Therefore, many authors have tried to extract the 2D invariants from discrete orthogonal moments. Yet, the extraction of 3D moments becomes more difficult than in 2D. The favorable numerical properties are still preserve by 3D orthogonal moments. There are polynomials orthogonal inside a cube and others that are orthogonal on the sphere. In the same way, the polynomials defined on a cube are less convenient than the sphere for extracting rotation invariants. This method was employed by Canterakis [1] using 3D continuous orthogonal Zernike moments. Sun [20] employed a Pathological Brain Detection based on wavelet entropy and Hu moment invariants. Chenggang Yan et al. [2327] present the efficient Parallel Framework for HEVC Motion Estimation on Many-core Processors. In this paper, we suggest a new set of 2D and 3D translation, scaling and rotation invariants based on discrete orthogonal radial Racah moments as well as a theoretical mathematics to derive them. This paper introduces, in a first case, a new 2D radial Racah moments using polar representation of an object by a one-dimensional discrete Racah polynomials and a polar function. In the second case, we present a new 3D radial Racah moments using a spherical representation of volumetric image by a one-dimensional discrete Racah polynomials as well as a spherical function. Moreover, 2D and 3D rotational invariants are extracted from the suggested 2D and 3D radial Racah moments respectively. We show that the transformation of Racah moments under rotation may be inferred in an indirect way without clear investigation of this transformation. Therefore, it is clear in the article that the translation, scaling and rotation invariants from Racah moments and from Krawtchouk moments have the same forms in 2D and 3D space. This is an outstanding outcome because it permits to cat down rotation invariant extraction from Racah moments to that from Krawtchouk moments in 2D and 3D space, which are not difficult to improve, still taking advantage from the image reconstruction of Racah moments. The transition from 2D to 3D is difficult and need a careful study because the 3D rotation has three degrees of freedom opposed to 2D rotation that has only one parameter. Therefore, any 3D images and structures linked to rotation are richer than in 2D. What distinguishes between the 3D problem and the 2D is that rotation in 3D is not commutative. The generalization from 2D to 3D should be investigated carefully and not done automatically. Such studies may find out a similarity with 2D and may come up with different outcomes. The core idea of the proposed work is that the radial Racah polynomials are orthogonal in ball and are more appropriate for extracting 2D and 3D translation, scaling and rotation invariants. To prove the suggested method, three issues are resolved mainly 2D/3D image reconstruction, 2D/3D translation, scaling and rotation invariance and pattern recognition. The result of the experiment prove that the Racah moments have done better than the Krawtchouk moments in terms of 2D/3D image reconstruction capability. At the same time, the reconstructed 2D/3D image converges quickly to the original image using radial Racah moments and the test of volumetric images are clearly recognized from a set of images that are found in a PSB database.

The rest of the paper is organized as follows. Section 2 present an overflow on 2D/3D Racah moment. Section 3 introduces a brief background of radial Racah moment for 2D and 3D case. Section 4 introduces the simulation results of 2D/3D invariant Racah moments. Finally, Section 5 concludes this paper.

2 Racah moments

In this section, we present a short introduction on 2D and 3D Racah moments.

2.1 Background on 2D Racah moments

In this subsection, we introduce a short background of Racah moments before presenting the radial Racah moments.

Racah moments Rnm of order (n, m) for an intensity image f(x,y) of size N × M are given by [28]

$$ {R}_{n m}=\sum_{x= a}^{b-1}\sum_{y= a}^{b-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( y, a, b\right) f\left( x, y\right) $$
(1)

To ensure the numerical stability of weighted Racah polynomial \( {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right) \) on non-uniform lattice is presented as [28]

$$ {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right)={u}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right)\sqrt{\frac{\rho_n(x)}{d_n^2}\left(\Delta \mathrm{s}\left( x-\frac{1}{2}\right)\right)} $$
(2)

Where \( {u}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right) \)the nth order Racah polynomial [28], which is defined by using a Hypergeometric function as

$$ {u}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right)=\frac{1}{\Gamma \left( n-1\right)}{\left( a- b+\alpha +1\right)}_n{\left( a- b+1\right)}_n{}_4 F_3\left(\begin{array}{c}\hfill - n,\alpha +\beta + n+1, a- x, a+ x+1\hfill \\ {}\hfill \beta +1, a- b+1,\alpha + a+ b+1\hfill \end{array}|1\right)=\sum_{i=0}^n{B}_{n i}{x}^i $$
(3)

where n ≥ 0 and x = a , a + 1 ,  … b − 1.

and the generalized Hypergeometric function 4 F 3(.) is defined by

$$ {}_4{} F_3\left(\begin{array}{c}\hfill {a}_1,{a}_2,{a}_3,{a}_4\hfill \\ {}\hfill {b}_1,{b}_2,{b}_3\hfill \end{array}| z\right)=\sum_{i=0}^{\infty}\frac{{\left({a}_1\right)}_i{\left({a}_2\right)}_i{\left({a}_3\right)}_i{\left({a}_4\right)}_i}{{\left({b}_1\right)}_i{\left({b}_2\right)}_i{\left({b}_3\right)}_i}\frac{z^i}{i!} $$
(4)

and the Pochhammer symbol (y) i is given by

$$ {(y)}_i= y\left( y+1\right)\dots \left( y+ i-1\right)=\frac{\Gamma \left( y+ i\right)}{\Gamma (y)} $$
(5)
$$ \mathrm{with}\ \Gamma \left( y+1\right)= y! $$
(6)

and ρ n (x) the weight function

$$ {\rho}_n(x)=\frac{\left(\mathrm{a}+\mathrm{x}+\mathrm{n}\right)!\left(\mathrm{x}-\mathrm{a}+\upbeta +\mathrm{n}\right)!}{\left(\mathrm{a}-\upbeta +\mathrm{x}\right)!\left(\mathrm{x}-\mathrm{a}\right)!\left(\mathrm{b}-\mathrm{x}-\mathrm{n}-1\right)!}\frac{\left(\upalpha +\mathrm{b}+\mathrm{x}+\mathrm{n}\right)!\left(\upalpha +\mathrm{b}-\mathrm{x}-1\right)!}{\left(\mathrm{b}+\mathrm{x}\right)!} $$
(7)

and the square norm \( {d}_n^2 \) is defined as

$$ {d}_n^2=\frac{\left(\upalpha +\mathrm{n}\right)!\left(\upbeta +\mathrm{n}\right)!\left(\mathrm{b}-\mathrm{a}+\upalpha +\upbeta +\mathrm{n}\right)!}{\left(\alpha +\beta +2 n+1\right) n!\left( b- a- n-1\right)!}\frac{\left(\mathrm{a}+\mathrm{b}+\upalpha +\mathrm{n}\right)!}{\left(\alpha +\beta + n\right)!\left( a+ b-\beta - n-1\right)!} $$
(8)

and Δs(x) = s(x + 1) − s(x), with non-uniform lattice s(x) = x(x + 1).

with the orthogonal property of normalized orthogonal polynomial can be rewritten as

$$ \sum_{x= a}^{b-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( x, a, b\right)={\delta}_{n m} $$
(9)

with δ nm denote the Dirac function.

The recurrence relation respect to n of Racah polynomials are defined as

$$ {A}_n{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right)={B}_n\frac{d_{n-1}}{d_n}{\tilde{u}}_{n-1}^{\left(\alpha, \beta \right)}\left( x, a, b\right)+{C}_n\frac{d_{n-2}}{d_n}{\tilde{u}}_{n-2}^{\left(\alpha, \beta \right)}\left( x, a, b\right) $$
(10)

Where

$$ {A}_n=\frac{\left(\alpha +\beta + n\right) n}{\left(\alpha +\beta +2 n\right)\left(\alpha +\beta +2 n-1\right)} $$

\( {B}_n= x-\frac{a^2+{b}^2+{\left( a-\beta \right)}^2+{\left( b+\alpha \right)}^2-2}{4}+\frac{\left(\alpha +\beta +2 n-2\right)\left(\alpha +\beta +2\right)}{8}-\frac{\left({\beta}^2-{\alpha}^2\right)\left[{\left( b+\frac{\alpha}{2}\right)}^2-{\left( a-\frac{\beta}{2}\right)}^2\right]}{2\left(\alpha +\beta +2 n\right)\left(\alpha +\beta +2 n-2\right)} \) \( {C}_n=-\frac{\left(\alpha + n-1\right)\left(\beta + n-1\right)}{\left(\alpha +\beta +2 n-1\right)\left(\alpha +\beta +2 n-2\right)}\left[{\left( b+ a+\frac{\alpha -\beta}{2}\right)}^2-\left( n-1+\frac{\alpha +\beta}{2}\right)\right]\ \left[{\left( b- a+\frac{\alpha +\beta}{2}\right)}^2-{\left( n-1+\frac{\alpha +\beta}{2}\right)}^2\right] \)

with n ≥ 2.

The first orders of discrete normalized Racah polynomials are calculated from the above equations

$$ {\tilde{u}}_0^{\left(\alpha, \beta \right)}\left( x, a, b\right)=\sqrt{\frac{\rho_0(x)}{d_0^2}\left(\Delta \mathrm{s}\left( x-\frac{1}{2}\right)\right)} $$
(11)
$$ {\tilde{u}}_1^{\left(\alpha, \beta \right)}\left( x, a, b\right)=\frac{\rho_1\left( x-1\right)-{\rho}_1(x)}{\rho_0(x)\left( x+\frac{1}{2}\right)}\times \sqrt{\frac{\rho_0(x)}{d_1^2}\left(\Delta \mathrm{s}\left( x-\frac{1}{2}\right)\right)} $$
(12)

The weighted Racah polynomials form an orthonormal system, the reconstruct image can be deduced by

$$ f\left( x, y\right)=\sum_{n=0}^{N-1}\sum_{m=0}^{M-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( y, a, b\right){R}_{n m} $$
(13)

For computed the 2D moments to order Max, we can approximated the reconstructed image in Eq. 13 by

$$ \widehat{f}\left( x, y\right)=\sum_{n=0}^{Max-1}\sum_{m=0}^{Max-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( y, a, b\right){R}_{n m} $$
(14)

The Fig. 1 represents the six first orders of polynomials Racah with different values of parameters α , β , a and b.

Fig. 1
figure 1

Plot of weighted Racah polynomials of the four first orders with different values of parameters a a = α = 10 , β = 0, b a = α = 10 , β = 5, c a = α = 10 , β = 30, d a = α = β = 0, e a = α = β = 10, f a = α = β = 30, and b = a + N , N = 128.

2.2 Background on 3D Racah moments

The three-dimensional Racah moments of order n + m + l for a volumetric image function f(x, y, z) of size N × M × L are defined as

$$ {R}_{n ml}=\sum_{x= a}^{b-1}\sum_{y= a}^{b-1}\sum_{z= a}^{b-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( y, a, b\right){\tilde{u}}_l^{\left(\alpha, \beta \right)}\left( z, a, b\right) f\left( x, y, z\right) $$
(15)

Using the orthogonality property, the inverse transform of Racah moments are given by

$$ f\left( x, y, z\right)=\sum_{n=0}^{N-1}\sum_{m=0}^{M-1}\sum_{l=0}^{L-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( y, a, b\right){\tilde{u}}_l^{\left(\alpha, \beta \right)}\left( z, a, b\right){R}_{n ml} $$
(16)

For computed the 2D moments to order (Max), we can approximated the reconstructed image in Eq.16 by

$$ \widehat{f}\left( x, y, z\right)=\sum_{n=0}^{Max-1}\sum_{m=0}^{Max-1}\sum_{l=0}^{Max-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( x, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( y, a, b\right){\tilde{u}}_l^{\left(\alpha, \beta \right)}\left( z, a, b\right){R}_{n ml} $$
(17)

3 Radial Racah moment invariants

In this section, we present a brief background of radial Racah moment invariants for 2D and 3D case.

3.1 2D radial Racah moment invariants

In this subsection, we present a brief background of 2D radial Racah moment invariants based on the polar representation of a 2D image.

The rotational invariants are extracted from the radial Racah moments. Radial polar coordinate of image intensity f(r, θ s ) are used to extract the radial moments by one-dimensional polynomials by a circular function. Fig. 2 displays the region for computing the radial Racah moments for an image of size N × N with υ and η represent the number of pixels along the radius r and perimeter respectively.

Fig. 2
figure 2

The computation’s region of radial Racah moments

The discrete angle θ s is given by

$$ {\theta}_s=\frac{2\pi s}{\eta} $$

with s = 0,. . η − 1.

The radial Racah moments are presented as

$$ {R}_{n m}=\frac{1}{\eta}\sum_{r=0}^{v-1}\sum_{s=0}^{\eta -1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( r, a, b\right){e}^{- i\frac{2\pi sm}{\eta}} f\left( r,{\theta}_s\right) $$
(18)

The transform inverse of moments are defined as

$$ f\left( r,{\theta}_s\right)=\sum_{n=0}^{Max-1}\sum_{m=0}^{Max-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( r, a, b\right){e}^{i\frac{2\pi sm}{\eta}}{R}_{n m} $$
(19)

The radial Racah polynomials \( {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( r, a, b\right) \) are given by

$$ {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( r, a, b\right)=\sum_{i=0}^n{B}_{n i}{r}^i $$
(20)

\( {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( r, a, b\right) \)is the discrete Racah polynomial of order n, which satisfies the following orthogonal property in discrete domain

$$ \sum_{r=0}^{N-1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( r, a, b\right){\tilde{u}}_m^{\left(\alpha, \beta \right)}\left( r, a, b\right)={\delta}_{n m} $$
(21)

δ nm denotes the Kronecker symbol.

The Cartesian coordinates (x, y) of each pixel will be obtained from the polar coordinate relations given by

$$ \left\{\begin{array}{c}\hfill x=\frac{rN}{2\left( v-1\right)} \cos \left(\frac{2\pi s}{\eta}\right)+\frac{N}{2}\hfill \\ {}\hfill y=\frac{rN}{2\left( v-1\right)} \sin \left(\frac{2\pi s}{\eta}\right)+\frac{N}{2}\hfill \end{array}\right. $$
(22)

with r = 0, 1,… v-1 and s = 0, 1,… η-1.

The scale and rotation invariant property of image moments has a high significance in image recognition. The scale invariant of radial Racah moments can be usually achieved by image normalization method, named radial Racah moments. This subsection presents a new approach to derive the scale and rotation invariant of radial Racah moments. Assume that the original image is scaled with factor x and rotated with angle θ ', respectively. The rotated and scaled radial Racah moments can be defined as follows

$$ {R}_{n m}^{r s}=\frac{x}{\eta}\sum_{r=0}^{v-1}\sum_{s=0}^{\eta -1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( xr, a, b\right){e}^{- j\frac{2\pi m\left( s-{\theta}^{\hbox{'}}\right)}{\eta}} f\left( r,{\theta}_s\right) $$
(23)

The scaled radial Racah polynomials \( {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( xr, a, b\right) \)can be expressed as a series of \( {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( xr, a, b\right) \) as follows:

$$ {\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( xr, a, b\right)=\sum_{k=0}^n{\tilde{u}}_k^{\left(\alpha, \beta \right)}\left( r, a, b\right)\sum_{i= k}^n{x}^i{B}_{n i}{D}_{i k} $$
(24)

The derivation process of Eq. 24 is given in Appendix 1. According to Eqs. 23 and 24, we have

$$ \begin{array}{l}\ {R}_{n m}^{r s}=\frac{x}{\eta}\sum_{r=0}^{v-1}\sum_{s=0}^{\eta -1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( xr, a, b\right){e}^{- j\frac{2\pi \left( s-{\theta}^{\hbox{'}}\right) m}{\eta}} f\left( r,{\theta}_s\right)\\ {}\kern1.33em ={e}^{j\frac{2\pi m{\theta}^{\hbox{'}}}{\eta}}\frac{x}{\eta}\sum_{r=0}^{v-1}\sum_{s=0}^{\eta -1}{\tilde{u}}_n^{\left(\alpha, \beta \right)}\left( xr, a, b\right){e}^{- j\frac{2\pi sm}{\eta}} f\left( r,{\theta}_s\right)={e}^{j\frac{2\pi m{\theta}^{\hbox{'}}}{\eta}}\sum_{k=0}^n\sum_{i= k}^n{x}^{i+1}{B}_{n i}{D}_{i k}{R}_{k m}\end{array} $$
(25)

Eq. 25 shows that the radial Racah moments of transformed image can be expressed as a linear combination of the radial Racah moments of original image. Based on this relationship, we can construct a set of scale and rotation invariants I nm which are described as follows

$$ {I}_{n m}={e}^{j\frac{2\pi m}{\eta} \arg \left({R}_{01}\right)}\sum_{k=0}^n\sum_{i= k}^n{R}_{00}^{-\left( i+1\right)}{B}_{n i}{D}_{i k}{R}_{k m} $$
(26)

3.2 3D radial Racah moment invariants

To enlarge this method directly to 3D, we will use the Euler angles for any orientations/rotations in special orthogonal system in 3D case SO(3). With three successive rotations of angles θ ∈ [0, 2π], φ ∈ [0, π] and ψ∈ [0, 2π] around the Z , X and Z axes we can represent any three-dimensional rotation by

$$ R={R}_Z\left(\theta \right){R}_X\left(\varphi \right)\ {R}_Z\left(\psi \right) $$
(27)

where R Z (θ) , R X (φ)and R Z (ψ) are given by

$$ \begin{array}{l}{R}_Z\left(\theta \right)=\left(\begin{array}{ccc}\hfill \cos \left(\theta \right)\hfill & \hfill \sin \left(\theta \right)\hfill & \hfill 0\hfill \\ {}\hfill - \sin \left(\theta \right)\hfill & \hfill \cos \left(\theta \right)\hfill & \hfill 0\hfill \\ {}\hfill 0\hfill & \hfill 0\hfill & \hfill 1\hfill \end{array}\right)\\ {}{R}_X\left(\varphi \right)=\left(\begin{array}{ccc}\hfill 1\hfill & \hfill 0\hfill & \hfill 0\hfill \\ {}\hfill 0\hfill & \hfill \cos \left(\varphi \right)\hfill & \hfill \sin \left(\varphi \right)\hfill \\ {}\hfill 0\hfill & \hfill - \sin \left(\varphi \right)\hfill & \hfill \cos \left(\varphi \right)\hfill \end{array}\right)\\ {}{R}_Z\left(\psi \right)=\left(\begin{array}{ccc}\hfill \cos \left(\psi \right)\hfill & \hfill \sin \left(\psi \right)\hfill & \hfill 0\hfill \\ {}\hfill - \sin \left(\psi \right)\hfill & \hfill \cos \left(\psi \right)\hfill & \hfill 0\hfill \\ {}\hfill 0\hfill & \hfill 0\hfill & \hfill 1\hfill \end{array}\right)\end{array} $$
(28)

The rotation of the volumetric images are only defined for any choice of angles with φ ≠ 0. For φ = 0, we obtain a rotation of angle θ + ψ around the principal Z-axis which are obtained by any mixture of values θ and ψ. This discretization is avoided by switching the values of φ by half of the step size of our discretization.

The 3D radial Racah moments R knml with order (k + n + m + l) for an image with intensity f(r, θ s , φ t , ψ u ) are defined as

$$ {R}_{k nml}=\frac{1}{\eta +\delta +\lambda}\sum_{r=0}^{v-1}\sum_{s=0}^{\eta -1}\sum_{t=0}^{\delta -1}\sum_{u=0}^{\lambda -1}{\tilde{u}}_k^{\left(\alpha, \beta \right)}\left( r, a, b\right){e}^{- j\frac{2\pi sn}{\eta}}{e}^{- j\frac{2\pi tm}{\delta}}{e}^{- j\frac{2\pi ul}{\lambda}} f\left( r,{\theta}_s,{\varphi}_t,{\psi}_u\right) $$
(29)

Where

$$ \begin{array}{l}\ {\theta}_s=\frac{2\pi s}{\eta}, s=0,1,\dots \eta -1\\ {}\ {\varphi}_t=\frac{\pi t+0.5}{\delta}, t=0,1,\dots \delta -1\\ {}\ {\psi}_u=\frac{2\pi u}{\lambda}, u=0,1,\dots \lambda -1\end{array} $$
(30)

The scale and rotation invariant property of volumetric image moments has a high significance in 3D image recognition. The scale invariant of 3D radial Racah moments can be usually achieved by image normalization method, named radial Racah moments. This subsection presents a new approach to derive the 3D scale and rotation invariant of radial Racah moments. Assume that the original image is scaled with factor xand rotated with angle θ ' , φ ' and ψ ' , respectively. The 3D rotated and scaled radial Racah moments can be defined as follows

$$ \begin{array}{l}{R}_{k n m l}^{r s}=\frac{x}{\eta +\delta +\lambda}\sum_{r=0}^{v-1}\sum_{s=0}^{\eta -1}\sum_{t=0}^{\delta -1}\sum_{u=0}^{\lambda -1}{\tilde{u}}_k^{\left(\alpha, \beta \right)}\left( xr, a, b\right)\times {e}^{- j\frac{2\pi \left( s-{\theta}^{\hbox{'}}\right) n}{\eta}}{e}^{- j\frac{2\pi \left( t-{\varphi}^{\hbox{'}}\right) m}{\delta}}{e}^{- j\frac{2\pi \left( u-{\psi}^{\hbox{'}}\right) l}{\lambda}} f\left( r,{\theta}_s,{\varphi}_t,{\psi}_u\right)\\ {}\kern1.57em ={e}^{j\frac{2{\pi \theta}^{\hbox{'}} n}{\eta}}{e}^{j\frac{2{\pi \varphi}^{\hbox{'}} m}{\delta}}{e}^{j\frac{2{\pi \psi}^{\hbox{'}} l}{\lambda}}\frac{x}{\eta +\delta +\lambda}\sum_{r=0}^{v-1}\sum_{s=0}^{\eta -1}\sum_{t=0}^{\delta -1}\sum_{u=0}^{\lambda -1}{\tilde{u}}_k^{\left(\alpha, \beta \right)}\left( xr, a, b\right)\ {e}^{- j\frac{2\pi sn}{\eta}}{e}^{- j\frac{2\pi tm}{\delta}}{e}^{- j\frac{2\pi ul}{\lambda}} f\left( r,{\theta}_s,{\varphi}_t,{\psi}_u\right)\\ {}\kern1.57em ={e}^{j\frac{2{\pi \theta}^{\hbox{'}} n}{\eta}}{e}^{j\frac{2{\pi \varphi}^{\hbox{'}} m}{\delta}}{e}^{j\frac{2{\pi \psi}^{\hbox{'}} l}{\lambda}}\sum_{p=0}^k\sum_{i= p}^k{x}^{i+1}{B}_{k i}{D}_{i p}{R}_{p nml}\end{array} $$
(31)

The derivation process of Eq. 31 is given in Appendix 2.

Eq. 31 shows that the radial Racah moments of transformed image can be expressed as a linear combination of the radial Racah moments of original image. Based on this relationship, we can construct a set of scale and rotation invariants I knml which are described as follows

$$ {I}_{k nml}={e}^{j\frac{2\pi n}{\eta} \arg \left({R}_{0100}\right)}{e}^{j\frac{2\pi m}{\delta} \arg \left({R}_{0010}\right)}{e}^{j\frac{2\pi l}{\lambda} \arg \left({R}_{0001}\right)}\sum_{p=0}^k\sum_{i= p}^k{R}_{0000}^{-\left( i+1\right)}{B}_{k i}{D}_{i p}{R}_{p nml} $$
(32)

3.3 The 2D and 3D pattern recognition

In this section, we present two new set of 2D and 3D radial Racah moments invariants.

3.3.1 Characteristic vectors for 2D case

These 2D radial Racah moments can then be used to form the descriptor vector of every 2D object. Specifically, the descriptor vector is composed of 2D radial Racah moments up to order s, where s is experimentally selected.

The characteristic vectors V 2D is represented as

$$ {V}_{2 D}=\left[{I}_{nm}| n+ m\in \left[0,1,\dots s\right]\right] $$
(33)

3.3.2 Characteristic vectors for 3D case

These 3D radial Racah moments can then be also used to form the descriptor vector of every 3D object. Specifically, the descriptor vector is composed of 3D radial Racah moments up to order s, where s is experimentally selected.

The characteristic vectors V 3D is represented as

$$ {V}_{3 D}=\left[{I}_{knml}| k+ n+ m+ l\in \left[0,1,\dots s\right]\right] $$
(34)

3.3.3 2D and 3D objet recognition

To perform the recognition of 2D and 3D objects to their appropriate classes. we use two method based on Euclidean distances and distance of correlations measuring the distance from V query and V test where V represent the characteristic vectors V 2D for 2D and V 3D for 3D case

$$ {d}_{euclidean\ }\left({V}_{query},{V}_{test}^K\right)=\sqrt{\sum_{j=0}^T{\left({V}_{query}^j-{V}_{test}^j\right)}^2} $$
(35)

and

$$ {d}_{Correlation\ }\left({V}_{query},{V}_{test}^K\right)=\sum_{j=0}^T{V}_{query}^j{V}_{test}^j{\left|\sum_{j=0}^r{V}_{query}^j{V}_{test}^j\right|}^{\frac{-1}{2}}{\left|\sum_{j=0}^r{V}_{query}^j{V}_{test}^j\right|}^{\frac{-1}{2}} $$
(36)

where the T-dimensional feature V query is represented as

$$ {V}_{query}=\left[{V}_{query}^1,{V}_{query}^2,\dots {V}_{query}^T\right] $$
(37)

and the T-dimensional training vector of class K is represented as

$$ {V}_{test}^K=\left[{V}_{test}^1,{V}_{test}^2,\dots {V}_{test}^T\right] $$
(38)

3.3.4 Classification criteria

Therefore, to classify the images, one takes the minimum values for d Euclidean and the maximum values for d Correlation .

The recognition precision is represented as

$$ \xi =\frac{\mathrm{Number}\;\mathrm{of}\ \mathrm{correctly}\ \mathrm{classified}\ \mathrm{volumetric}\ \mathrm{images}}{\mathrm{The}\ \mathrm{number}\ \mathrm{of}\ \mathrm{volumetric}\ \mathrm{images}\ \mathrm{used}\ \mathrm{in}\ \mathrm{the}\ \mathrm{test}}\times 100\% $$
(39)

To prove the accuracy of the reconstruction, classification and recognition images using radial Racah moment invariants for 2D and 3D image recognition, we will use two databases of image. Columbia Object Image Library database (http://www.cs.columbia.edu/CAVE/software/softlib/coil-20.php) in 2D case, and PSB database [15] in 3D case.

We used the statistical normalization image reconstruction error to measure the performance of the reconstruction

$$ \overline{\varepsilon^2}=\frac{\int \int {\int}_{-\infty}^{+\infty }{\left( f\left( x, y, z\right)-\hat{f}\left( x, y, z\right)\right)}^2 dxdydz}{\int \int {\int}_{-\infty}^{+\infty }{\left( f\left( x, y, z\right)\right)}^2 dxdydz} $$
(40)

As for the previous example, we present the reconstructed results and corresponding errors in Fig. 3. It can be seen that the choice, α = a = 10, β = 5 and b = 50, gives the best reconstructed results among all the test cases.

Fig. 3
figure 3

Comparison of reconstruction errors with different choices of parameters of volumetric Head image

Figs. 3 and 4 shows the plot the reconstruction of Head image of the mean square errors using different approaches with maximum value of M = 100. The results demonstrate the superiority of 3D radial Racah moments over the radial Krawtchouk in terms of feature representation capability.

Fig. 4
figure 4

Comparative study of reconstruction error of 3D radial Krawtchouk and 3D radial Racah moment for Head image of size 128x128x128

4 Simulation results

In this section, we present the simulation results of 2D and 3D radial Racah moments invariant for the invariability, recognition and classification.

4.1 Invariability for radial Racah moment

In this subsection, we will discuss the invariability for 2D and 3D case.

4.1.1 Invariability for 2D radial Racah moment

To validate the rotational invariant property of the radial Racah moments, the same image Lena is selected Fig.6. The image is rotated by 0o, 30 o, 120 o and 230 o. The selected order of the invariants I00, I01, I10, I11 with η = N/2 and δ = 4 N are computed for each of these images. The results are entered in Table 1. To measure the similarity of the proposed invariants under different image rotation, we will use the formula σ/μ(%) where σ represent the standard deviation of radial Racah’s invariant moments for the different angle of each rotation, and μ is the average value. The Table 1 show that the ratio σ/μ is very low and consequently the radial Racah’s moment invariants are very stable under different types of image rotation. Hence, the property of invariability of radial Racah moments will be used to pattern recognition.

Table 1 Selected order of rotational invariants of radial Racah moments computed for Lena image with arbitrary scale and rotation angles

4.1.2 Invariability for 3D radial Racah moment

To validate the rotational invariant property of the 3D radial Racah moments, the128x128x128 Head image (as illustrated in Fig. 7). and there rotated version ( λ = 0 , 8 ; θ '=90; φ '= − 180; ψ '=120), ( λ = 0 , 9 ; θ '= − 90; φ '= − 90; ψ '= − 180), ( λ = 1 , 2 ; θ '=90; φ '=90; ψ '=180) shown in Fig. 7 will be used. The selected order of the invariants I0000, I0001, I0010, I0100, I1000, I0011, I0101, I1001 and I1100 with η = N/2, δ = 4 N, μ = 4Nandλ = 4N are computed for each image. The results of simulation are shown in Tables 2 taking a = α = 10 , β = 0 and b = a + N , N = 128 or Racah moment parameter. Lastly, the ratio σ/μ can used to measure the capability of the proposed 3D rotation invariants under different image transformation, Where σ represents the standard deviation of radial Racah moment for the different factors of each rotation, and μ is the equivalent mean value. The Table 2 show that the ratio σ/μ is very low and consequently the 3D radial Racah’s moment invariants are very stable under different types of 3D image rotation. Hence, the property of invariability of radial Racah moments well be used to pattern recognition.

Table 2 The proposed extracted invariants for the Head image and its transformed versions of Fig.7

4.2 Classification

In this subsection, we will discuss the classification for 2D and 3D case.

4.2.1 Classification for 2D radial Racah moment

To validate the proposed approach for classification, we have taken the image from the Columbia Object Library (COIL-20) database (http://www.cs.columbia.edu/CAVE/software/softlib/coil-20.php). The total number of images is 1440 distributed as 72 images for each object. All images of this database have the size 128 × 128. Figure 8 displays a collection of the six objects. The test set also is degraded by salt and pepper noise with noise densities 1%, 2%, 3%, and 4%. The feature vector based on rotational Racah’s moment invariants cited in Eq. 33 is used to classify these images and its recognition accuracy is compared with that of radial Krawtchouk moment invariants. The results of the classification using all features are presented in Tables 3 and 4.

Table 3 Classification Results of COILL-20 Object Database by using d1 Distance
Table 4 Classification Results of COILL-20 Object Database by using d2 Distance

4.2.2 Classification for 3D radial Racah moment

To prove the proposed method for classification, we have taken the image from the Princeton Shape Benchmark (PSB) database [15]. Being known, this database consists of 907 3D models classified into 35 main categories and 92 subcategories. All images of this database have the size 128 × 128 × 128. In Table 5, we find that the measure between the query of volumetric image and same images of classes from PSB database of the two vectors Vquery and Vtest (class) using deuclidean and dcorrelation.

Table 5 The Euclidean distance and correlation coefficient between request free-noise image and same images of classes from PSB database

The test set also is degraded by salt and pepper noise (as illustrated in Fig. 5). With noise densities 1%, 2%, 3%, and 4% The feature vector based on 3D rotational radial Racah’s moment invariants cited in Eq. 34 is used to classify these images and its recognition accuracy is compared with that of 3D radial Krawtchouk moment invariants. The results of the classification using all features are presented in Tables 6.

Fig. 5
figure 5

Different types of noises. a Salt and paper noisy images (5%), b Gaussian noisy images (mean 0, variance: 0.1)

Table 6 Classification results of Princeton Shape Benchmark (PSB) using dEuclidien distance
Fig. 6
figure 6

An image with various rotations. a θ’ = 0, b θ’ = 30, c θ’ = 120 and d θ’ = 230

Fig. 7
figure 7

A set of transformed pattern of the original Head image with combination of rotation. a Original volumetric image, b ( λ = 0 , 8 ; θ '=90; φ '= − 180; ψ '=120), c ( λ = 0 , 9 ; θ '= − 90; φ '= − 90; ψ '= − 180) and d ( λ = 1 , 2 ; θ '=90; φ '=90; ψ '=180)

Fig. 8
figure 8

Collection of the COIL-20 objects

5 Conclusion

In this article, we propose a new set of 2D and 3D rotation invariants based on orthogonal radial Racah moments. We have found a theoretical mathematics to derive them. Therefore, this paper introduces, in a first case, a new 2D radial Racah moments using polar representation of an image by a one-dimensional orthogonal discrete Racah polynomials and a circular function. In the second case, we present a new 3D radial Racah moments using a spherical representation of volumetric image by a one-dimensional orthogonal discrete Racah polynomials and a spherical function. Further 2D and 3D rotational invariants are derived from the proposed 2D and 3D radial Racah moments respectively.

In order to prove the proposed approach, three issues are resolved mainly image reconstruction, rotational invariance and pattern recognition. Experimental results prove that the radial Racah moments have perform better than the radial Krawtchouk moments in terms of volumetric image reconstruction capability simultaneously, the reconstructed volumetric image converges quickly to the original image using 2D and 3D radial Racah moments and the test images are correctly recognized from a set of images that are available in a PSB database.