# Accurate Quaternion Polar Harmonic Transform for Color Image Analysis

Authors: Lina Zhang; Yu Sang; Donghai Dai
Journal: Scientific Programming
 (2021)

---

## Abstract

Polar harmonic transforms (PHTs) have been applied in pattern recognition and image analysis. But the current computational framework of PHTs has two main demerits. First, some significant color information may be lost during color image processing in conventional methods because they are based on RGB decomposition or graying. Second, PHTs are influenced by geometric errors and numerical integration errors, which can be seen from image reconstruction errors. This paper presents a novel computational framework of quaternion polar harmonic transforms (QPHTs), namely, accurate QPHTs (AQPHTs). First, to holistically handle color images, quaternion-based PHTs are introduced by using the algebra of quaternions. Second, the Gaussian numerical integration is adopted for geometric and numerical error reduction. When compared with CNNs (convolutional neural networks)-based methods (i.e., VGG16) on the Oxford5K dataset, our AQPHT achieves better performance of scaling invariant representation. Moreover, when evaluated on standard image retrieval benchmarks, our AQPHT using smaller dimension of feature vector achieves comparable results with CNNs-based methods and outperforms the hand craft-based methods by 9.6% w.r.t mAP on the Holidays dataset.


---

## Body

## 1. Introduction

Rotation-invariant moments (RIMs) are extensively used in image representation and pattern recognition [1–3] because of their outstanding description capability and invariance property. Moreover, RIMs not only provide hand craft features for image representation but also can reconstruct original image from these hand craft features, making them suitable for image watermarking [4–6]. There exist two kinds of RIMs: orthogonal and nonorthogonal. Since the orthogonal RIMs (ORIMs) possess minimum information redundancy and hence better information compactness, they are effective in performance. There are several low order moments and transforms can sufficiently extract the essential features of images. The most popular among these ORIMs [7, 8] are Zernike moments (ZMs) and pseudo ZMs (PZMs). Yap et al. [9] recently introduced a few ORITs, collectively known as PHTs, including the polar sine transforms (PSTs), polar cosine transforms (PCTs), and polar complex exponential transforms (PCETs). ORIMs are different from ORITs in the radial parts of kernel functions, which are polynomials and sinusoidal functions in ORIMs and ORITs, respectively. Compared with ORIMs, PHTs are more efficient in computation [10]. Besides, the high order transforms of PHTs are numerically stable, whereas those of ORIMs are numerically unstable. Therefore, PHTs are preferred to ORIMs and have recently been utilized in numerous image processing applications.Especially for small size images, the current computational framework of PHTs is disadvantaged by geometric errors and numerical integration errors, which can be seen from image reconstruction errors, which are visible near the circular disk center, and even low orders of transform are numerically unstable. Mapping a square image into a unit circular disk can cause geometric errors, and approximating the integration with zeroth-order summation will lead to numerical integration errors. Accurate PHTs are extremely essential in tremendous image processing applications, primarily in template matching and optical character recognition problems using small size images. In addition to the problem of computation accuracy, another problem is that ORIMs and ORITs mainly focus on grayscale images, yet with the continuous improvement of computer performance, color images are drawing more and more attention from researchers in the related fields, because color images can provide much more abundant information compared with grayscale images. Most of the current research on color image moments depends on the intensity or a single channel within the color space of color images, where the information and relationship between color components in a specific color space are discarded. Several traditional orthogonal and nonorthogonal moments have been developed into quaternion moments, e.g., quaternion Zernike moments (QZMs) [2], quaternion radial harmonic Fourier moments (QRHFM) [11], quaternion polar harmonic Fourier moments (QPHFMs) [12], and quaternion polar harmonic transforms (QPHTs) [13, 14], Although various quaternion image orthogonal moments have been proposed by researchers, most of them give unsatisfied image reconstruction performance. In the present work, accurate quaternion orthogonal transforms, i.e., accurate QPHTs (AQPHTs), are proposed. In summary, the innovations of the proposed AQPHTs include the following: firstly, by using the algebra of quaternions, we extend the PHTs to color images. Secondly, a computational framework, which reduces geometric errors and numerical integration errors, is developed to construct an approach to accurately calculate PHTs. Experiments are conducted to comparatively study the performance in image reconstruction and image retrieval of AQPHT and other ORIMs, and the results present that AQPHT has the best image reconstruction performance and superb behavior in invariant image representation with and without noises.The paper is organized as follows. Section2 introduces the quaternion algebra and PHTs. Section 3 describes the computational framework of our AQPHTs. In Section 4, the effectiveness of the proposed AQPHTs is evaluated. Section 5 concludes this study.


## 2. Preliminaries

### 2.1. Quaternion Algebra

A quaternion can be regarded as a generalized complex number. The formula of a quaternion is as follows:(1)q=a+bi+cj+dk,where q denotes the quaternion, a and bi+cj+dk denote the real and the imaginary part; a, b, c, and d are real numbers, and i, j, and k are complex operators that satisfy these conditions:(2)i2=j2=k2=ijk=−1,ij=k,jk=i,ki=j,ji=−k,kj=−i,ik=−j.The conjugate ofμ is μ¯=a−bi−cj−dk, and the magnitude equals μ=a2+b2+c2+d2. A quaternion μ=sμ+vμ can be considered as the combination of a scalar part sμ=a and a vector part vμ=bi+cj+dk.


### 2.2. Polar Harmonic Transform

The two-dimensional polar harmonic transformsMn,l of an n-order image function fr,θ , with repetition ll≥0 defined by(3)Mn,l=Ωn∫02π∫01Hn,l∗fr,θrdrdθ,where Ωn denotes a normalization factor, and Hn,l∗r,θ denotes the complex conjugate of the basis function Hn,lr,θ. For PCET, Ωn=1/π and Hn,lr,θ are given by(4)Hn,lPCETr,θ=ei2πnr2eilθ,where i=−1. While in PCT and PST,(5)Ωn=1π,n=0,2π,n≠0.The basis functions of PST and PCT are defined, respectively, as(6)Hn,lPSTr,θ=sinπnr2eilθ,Hn,lPCTr,θ=cosπnr2eilθ.The total number of PCET forn=nmax and l=lmax is 1+2nmax1+2lmax where nmax=lmax. However, PST and PCT have a smaller number of features, which are nmax1+2lmax and 1+nmax1+2lmax, respectively.For anN  ×  N image, there is no analytical solution to the integration in equation (3), therefore its zeroth-order approximation is commonly used and given by(7)Mn,l=Ωn∑jN−1∑kN−1fxj,ykHn,l∗xj,yk△xjyk,xj2+yk2≤1,where(8)xj=2j+1−NN,yk=2k+1−NN,j,k=0,1,…,N−1.We perform inverse transforms to reconstruct the image function. It is expressed by(9)f^xj,yk=∑n=nminnmax∑l=lminlmaxMn,lHn,lxj,yk,j,k=0,1,…,N−1,where nmax, nmin, lmax, and lmin are the maximum and minimum orders and repetitions of PHTs, respectively, as specified in equation (3).


## 2.1. Quaternion Algebra

A quaternion can be regarded as a generalized complex number. The formula of a quaternion is as follows:(1)q=a+bi+cj+dk,where q denotes the quaternion, a and bi+cj+dk denote the real and the imaginary part; a, b, c, and d are real numbers, and i, j, and k are complex operators that satisfy these conditions:(2)i2=j2=k2=ijk=−1,ij=k,jk=i,ki=j,ji=−k,kj=−i,ik=−j.The conjugate ofμ is μ¯=a−bi−cj−dk, and the magnitude equals μ=a2+b2+c2+d2. A quaternion μ=sμ+vμ can be considered as the combination of a scalar part sμ=a and a vector part vμ=bi+cj+dk.


## 2.2. Polar Harmonic Transform

The two-dimensional polar harmonic transformsMn,l of an n-order image function fr,θ , with repetition ll≥0 defined by(3)Mn,l=Ωn∫02π∫01Hn,l∗fr,θrdrdθ,where Ωn denotes a normalization factor, and Hn,l∗r,θ denotes the complex conjugate of the basis function Hn,lr,θ. For PCET, Ωn=1/π and Hn,lr,θ are given by(4)Hn,lPCETr,θ=ei2πnr2eilθ,where i=−1. While in PCT and PST,(5)Ωn=1π,n=0,2π,n≠0.The basis functions of PST and PCT are defined, respectively, as(6)Hn,lPSTr,θ=sinπnr2eilθ,Hn,lPCTr,θ=cosπnr2eilθ.The total number of PCET forn=nmax and l=lmax is 1+2nmax1+2lmax where nmax=lmax. However, PST and PCT have a smaller number of features, which are nmax1+2lmax and 1+nmax1+2lmax, respectively.For anN  ×  N image, there is no analytical solution to the integration in equation (3), therefore its zeroth-order approximation is commonly used and given by(7)Mn,l=Ωn∑jN−1∑kN−1fxj,ykHn,l∗xj,yk△xjyk,xj2+yk2≤1,where(8)xj=2j+1−NN,yk=2k+1−NN,j,k=0,1,…,N−1.We perform inverse transforms to reconstruct the image function. It is expressed by(9)f^xj,yk=∑n=nminnmax∑l=lminlmaxMn,lHn,lxj,yk,j,k=0,1,…,N−1,where nmax, nmin, lmax, and lmin are the maximum and minimum orders and repetitions of PHTs, respectively, as specified in equation (3).


## 3. Accurate QPHTs

### 3.1. QPHTs

In traditional processing methods, color images are usually divided into 3 components and each component is separately handled by a follow-up process without taking into account the association within components. But, quaternion-based theory treats a color image as an integral vector, by which the relationships between each component are reflected. LetfRr,θ, fGr,θ, and fBr,θ denote the color components of red, green, and blue, respectively, then we encode a color pixel fr,θ. The pixel can be encoded as a pure quaternion:(10)fr,θ=fRr,θi+fGr,θj+fBr,θk.Therefore, PHTs can be defined in the quaternion field. The multidimension feature of color images can be addressed by the transforms wherein each color pixel is treated as a whole. Due to the noncommutative multiplication of quaternions, each quaternion transform has two different forms. The left-side quaternion PCET is defined as follows:(11)Mn,lL=1π∫02π∫01Hn,l∗fr,θrdrdθ=1π∫02π∫01e−μlθe−μ2πnr2fr,θrdrdθ,where μ denotes a pure unit quaternion and fr,θ denotes the quaternion representation of a color pixel. μ=i+j+k/3, i.e., the gray line in the RGB space is chosen in this work. By reversing the orders of images and transform kernels in equation (11), we can obtain the right-side QPCET:(12)Mn,lR=1π∫02π∫01fr,θe−μlθe−μ2πnr2rdrdθ.The reconstruction of a color image by using the QPCET coefficients of the left and right sides can be written as equations (13) and (14), respectively:(13)fr,θ=∑n=0nmax∑l=−lmaxlmaxeμ2πnr2eμlθMn,lL,(14)fr,θ=∑n=0nmax∑l=−lmaxlmaxMn,lReμ2πnr2eμlθ.Analogous to QPCET, the left and right-side QPCT can be defined as equations (15) and (16), respectively,(15)Mn,lL=Ωn∫02π∫01cosπnr2e−μlθfr,θrdrdθ,(16)Mn,lR=Ωn∫02π∫01fr,θcosπnr2e−μlθrdrdθ,where all factors are defined as in equation (5). Replace the radial components in Equations (15) and (16) with fBr,θ, and we can obtain the QPST. The construction of color images can also be achieved by using QPCT and QPST coefficients.We note that the QPHT in this paper refers to the left-side QPCETMn,lL as defined in equation (11), unless otherwise specified.


### 3.2. Computation of Accurate QPHT

This subsection provides a computational framework for calculating QPHTs, which can reduce geometric errors and numerical integration errors. Using our method, only the part inside the unit disk of the pixel is considered. For numerical integration, we rewrite equation (11) as(17)Mn,lL=1π∑j=0N−1∑k=0N−1fxj,ykhnl,jk,xj2+yk2≤1.We assume the image functionfBr,θ is constant in one grid. The calculation accuracy of QPHTs can be increased through computing the numerical integration of basis function hnl,jk for each grid, that is,(18)hnl,jk=∫ajaj+1∫bkbk+1Hnl∗x,ydxdy,aj2+bk2≤1,where(19)aj=2j−NN,bk=2k−NN,j,k=0,1,…,N.Since equation (18) is evaluated by using ag×g point Gaussian numerical integration method, it can be simplified into(20)hnl,jk≅1N2∑l=0g−1∑m=0g−1ωlωm×Hnl∗tl+2j+1−NN,tm+2k+1−NNtl+2j+1−NN2+tm+2k+1−NN≤1.The values ofω and t for a given g can be obtained by using standard procedures [15]. For a quick reference, we provide these values in Table 1 for g = 1 through 8. The constraint in equation (21) is an improvement over the constraint xj2+yk2≤1 in the zeroth-order approximation.Table 1
Weights and locations of sampling points forg×g point integration.
gωtgωt12.00.070.129484970.279705390.381830050.41795918±0.94910791±0.74153119±0.405845150.021.0±0.5773502730.555555560.88888889±0.774596670.040.347854850.65214515±0.86113631±0.3399810480.101228530.222381030.313706650.36268378±0.96028987±0.79666648±0.52553241±0.1834346450.236926880.478628670.56888889±0.90617985±0.538469310.060.171324490.360761570.46791393±0.93246951±0.66120939±0.23861919If the center of a grid falls outside the unit circle, this grid will be completely ignored in computation in zeroth-order approximation. But in the new constraint, a grid will be considered in the calculation if its sampling point falls within the unit disk even if its centers fall outside the unit disk. An improvement of the approximation of the unit disk has been observed with this new constraint. This is a great contribution of the numerical integration method for reducing geometric errors and numerical integration errors simultaneously by ensuring that none of the sampling points fall outside the unit disk. We find that the performance of image reconstruction improves as we increase the number ofg, but the gain starts to saturate at g = 6. Therefore, the accurate computation experiment of QPHTs uses 5 × 5 sampling points (i.e., g = 5), which we take as a tradeoff accuracy and speed for color images.


### 3.3. Geometric Invariance of AQPHT

Here, we will derive and analyze the rotation and scaling invariant property of AQPHTs.


#### 3.3.1. Rotation Invariance

Letf^r,θ=fr,θ+α denote the image fr,θ rotated by the angle α. Accordingly, the left-side AQPHT of f^r,θ is(21)M^n,lL=12π∫02π∫01f^r,θexp−μ2πnr2exp−μlθrdrdθ=12π∫02π∫01fr,θ+αexp−μ2πnr2exp−μlθrdrdθ12π=∫02π∫01fr,θexp−μ2πnr2exp−μlθrdrdθ×expμlθ=Mn,×expμnθ,l,where Mn,l and M^n,l are the AQPHTs of fr,θ and f^r,θ, respectively.Accordingly to equation (21), we know that a rotation of the color image by an angle α induces a phase shift eμlθ of the Mn,lLf. Taking the norm on both sides of equation (17), we have(22)M^n,l=Mn,lexpμlθ=Mn,lexpμlθ=Mn,l.Therefore, the rotation invariant can be achieved by taking the norm of APHTs. In other words, the AQPHTs modulus coefficientsMn,lLf are invariant with respect to image rotation.


#### 3.3.2. Scaling Invariance

Theoretically, AQPHTs are not invariant to image scaling, but scaling invariance can be obtained by normalizing the image into a unit circle. If an imagefr,θ with N×N pixels is mapped to a unit circle xj,yk∈−1,1×−1,1 with xj=2j−N+1/N,yk=N−1−2k/N,j,k=0,1,…,N−1 and a unit circle is made to cover the same contents of the image, the AQPHTs are variant to image scaling.


## 3.1. QPHTs

In traditional processing methods, color images are usually divided into 3 components and each component is separately handled by a follow-up process without taking into account the association within components. But, quaternion-based theory treats a color image as an integral vector, by which the relationships between each component are reflected. LetfRr,θ, fGr,θ, and fBr,θ denote the color components of red, green, and blue, respectively, then we encode a color pixel fr,θ. The pixel can be encoded as a pure quaternion:(10)fr,θ=fRr,θi+fGr,θj+fBr,θk.Therefore, PHTs can be defined in the quaternion field. The multidimension feature of color images can be addressed by the transforms wherein each color pixel is treated as a whole. Due to the noncommutative multiplication of quaternions, each quaternion transform has two different forms. The left-side quaternion PCET is defined as follows:(11)Mn,lL=1π∫02π∫01Hn,l∗fr,θrdrdθ=1π∫02π∫01e−μlθe−μ2πnr2fr,θrdrdθ,where μ denotes a pure unit quaternion and fr,θ denotes the quaternion representation of a color pixel. μ=i+j+k/3, i.e., the gray line in the RGB space is chosen in this work. By reversing the orders of images and transform kernels in equation (11), we can obtain the right-side QPCET:(12)Mn,lR=1π∫02π∫01fr,θe−μlθe−μ2πnr2rdrdθ.The reconstruction of a color image by using the QPCET coefficients of the left and right sides can be written as equations (13) and (14), respectively:(13)fr,θ=∑n=0nmax∑l=−lmaxlmaxeμ2πnr2eμlθMn,lL,(14)fr,θ=∑n=0nmax∑l=−lmaxlmaxMn,lReμ2πnr2eμlθ.Analogous to QPCET, the left and right-side QPCT can be defined as equations (15) and (16), respectively,(15)Mn,lL=Ωn∫02π∫01cosπnr2e−μlθfr,θrdrdθ,(16)Mn,lR=Ωn∫02π∫01fr,θcosπnr2e−μlθrdrdθ,where all factors are defined as in equation (5). Replace the radial components in Equations (15) and (16) with fBr,θ, and we can obtain the QPST. The construction of color images can also be achieved by using QPCT and QPST coefficients.We note that the QPHT in this paper refers to the left-side QPCETMn,lL as defined in equation (11), unless otherwise specified.


## 3.2. Computation of Accurate QPHT

This subsection provides a computational framework for calculating QPHTs, which can reduce geometric errors and numerical integration errors. Using our method, only the part inside the unit disk of the pixel is considered. For numerical integration, we rewrite equation (11) as(17)Mn,lL=1π∑j=0N−1∑k=0N−1fxj,ykhnl,jk,xj2+yk2≤1.We assume the image functionfBr,θ is constant in one grid. The calculation accuracy of QPHTs can be increased through computing the numerical integration of basis function hnl,jk for each grid, that is,(18)hnl,jk=∫ajaj+1∫bkbk+1Hnl∗x,ydxdy,aj2+bk2≤1,where(19)aj=2j−NN,bk=2k−NN,j,k=0,1,…,N.Since equation (18) is evaluated by using ag×g point Gaussian numerical integration method, it can be simplified into(20)hnl,jk≅1N2∑l=0g−1∑m=0g−1ωlωm×Hnl∗tl+2j+1−NN,tm+2k+1−NNtl+2j+1−NN2+tm+2k+1−NN≤1.The values ofω and t for a given g can be obtained by using standard procedures [15]. For a quick reference, we provide these values in Table 1 for g = 1 through 8. The constraint in equation (21) is an improvement over the constraint xj2+yk2≤1 in the zeroth-order approximation.Table 1
Weights and locations of sampling points forg×g point integration.
gωtgωt12.00.070.129484970.279705390.381830050.41795918±0.94910791±0.74153119±0.405845150.021.0±0.5773502730.555555560.88888889±0.774596670.040.347854850.65214515±0.86113631±0.3399810480.101228530.222381030.313706650.36268378±0.96028987±0.79666648±0.52553241±0.1834346450.236926880.478628670.56888889±0.90617985±0.538469310.060.171324490.360761570.46791393±0.93246951±0.66120939±0.23861919If the center of a grid falls outside the unit circle, this grid will be completely ignored in computation in zeroth-order approximation. But in the new constraint, a grid will be considered in the calculation if its sampling point falls within the unit disk even if its centers fall outside the unit disk. An improvement of the approximation of the unit disk has been observed with this new constraint. This is a great contribution of the numerical integration method for reducing geometric errors and numerical integration errors simultaneously by ensuring that none of the sampling points fall outside the unit disk. We find that the performance of image reconstruction improves as we increase the number ofg, but the gain starts to saturate at g = 6. Therefore, the accurate computation experiment of QPHTs uses 5 × 5 sampling points (i.e., g = 5), which we take as a tradeoff accuracy and speed for color images.


## 3.3. Geometric Invariance of AQPHT

Here, we will derive and analyze the rotation and scaling invariant property of AQPHTs.


### 3.3.1. Rotation Invariance

Letf^r,θ=fr,θ+α denote the image fr,θ rotated by the angle α. Accordingly, the left-side AQPHT of f^r,θ is(21)M^n,lL=12π∫02π∫01f^r,θexp−μ2πnr2exp−μlθrdrdθ=12π∫02π∫01fr,θ+αexp−μ2πnr2exp−μlθrdrdθ12π=∫02π∫01fr,θexp−μ2πnr2exp−μlθrdrdθ×expμlθ=Mn,×expμnθ,l,where Mn,l and M^n,l are the AQPHTs of fr,θ and f^r,θ, respectively.Accordingly to equation (21), we know that a rotation of the color image by an angle α induces a phase shift eμlθ of the Mn,lLf. Taking the norm on both sides of equation (17), we have(22)M^n,l=Mn,lexpμlθ=Mn,lexpμlθ=Mn,l.Therefore, the rotation invariant can be achieved by taking the norm of APHTs. In other words, the AQPHTs modulus coefficientsMn,lLf are invariant with respect to image rotation.


### 3.3.2. Scaling Invariance

Theoretically, AQPHTs are not invariant to image scaling, but scaling invariance can be obtained by normalizing the image into a unit circle. If an imagefr,θ with N×N pixels is mapped to a unit circle xj,yk∈−1,1×−1,1 with xj=2j−N+1/N,yk=N−1−2k/N,j,k=0,1,…,N−1 and a unit circle is made to cover the same contents of the image, the AQPHTs are variant to image scaling.


## 3.3.1. Rotation Invariance

Letf^r,θ=fr,θ+α denote the image fr,θ rotated by the angle α. Accordingly, the left-side AQPHT of f^r,θ is(21)M^n,lL=12π∫02π∫01f^r,θexp−μ2πnr2exp−μlθrdrdθ=12π∫02π∫01fr,θ+αexp−μ2πnr2exp−μlθrdrdθ12π=∫02π∫01fr,θexp−μ2πnr2exp−μlθrdrdθ×expμlθ=Mn,×expμnθ,l,where Mn,l and M^n,l are the AQPHTs of fr,θ and f^r,θ, respectively.Accordingly to equation (21), we know that a rotation of the color image by an angle α induces a phase shift eμlθ of the Mn,lLf. Taking the norm on both sides of equation (17), we have(22)M^n,l=Mn,lexpμlθ=Mn,lexpμlθ=Mn,l.Therefore, the rotation invariant can be achieved by taking the norm of APHTs. In other words, the AQPHTs modulus coefficientsMn,lLf are invariant with respect to image rotation.


## 3.3.2. Scaling Invariance

Theoretically, AQPHTs are not invariant to image scaling, but scaling invariance can be obtained by normalizing the image into a unit circle. If an imagefr,θ with N×N pixels is mapped to a unit circle xj,yk∈−1,1×−1,1 with xj=2j−N+1/N,yk=N−1−2k/N,j,k=0,1,…,N−1 and a unit circle is made to cover the same contents of the image, the AQPHTs are variant to image scaling.


## 4. Experiments and Analysis

This section is intended to validate the effectiveness of AQPHT invariants for color images. The experiments are performed using MATLAB version 8.6 on a 2.9 GHz processor, 8 GB RAM computer, and Microsoft Windows 10 Ultimate operating system.


### 4.1. Experiment on Scaling Invariance

Numerous great classification models, e.g., VGG [16] and ResNet [17], have been developed on the basis of the powerful deep learning framework Their recognition accuracy is amazing and even higher than that of human beings. However, the performance is achieved only for large size images having rich object structure and high quality appearance. The resolution of images with small size is low, which limits the learning of discriminative representations, thus leading to identification failure [18]. In this experiment, the impact of down-scaling operation on image representations can be evaluated on Oxford5K dataset [19] by our AQPHT and the widespread deep model of VGG16. For convenience, only the neural activation in the 36-th layers of the VGG16 model is studied as an example of deep models in this work. The ability of representation is measured by the mean Euclidean distance which is calculated between the features extracted from an image at various resolutions. Figure 1 separately presents the experimental results of mean Euclidean distance at various down-sampling scales for the VGG16 model and AQPHT. From Figure 1(a), although the VGG16 model is carefully trained with some extra useful training tricks on the Oxford5K dataset, the mean Euclidean distance is growing larger with the decrease of image resolution, indicating that the ability of deep representation reduces with decreasing image resolution. From Figure 1(b), the mean Euclidean distance of the AQPHT is almost constant, demonstrating the superb performance of the AQPHT invariants under scaling transform.Figure 1
Mean Euclidean distance at various low resolutions on Oxford5K dataset. (a) VGG16 and (b) the proposed AQPHT.
(a)(b)


### 4.2. Experiment on Image Reconstruction

The capability of image representation of image moments can be measured by image reconstruction performance. This subsection compares the performance of image reconstruction between AQPHT and QZM [2], QPHT [14], QPHFM [12], and QRHFM [11]. Following the standard [11, 12], we set the relevant parameters in our experiments. The mean square reconstruction error (MSRE) is used to measure the reconstruction performance [11, 12]; lower MSREs equate to better reconstruction performance. Suppose fx,y and f^x,y indicate the original image and reconstructed image, respectively; the MSRE is defined as(23)MSRE=∑x=0N−1∑y=0N−1fx,y−f^x,y2∑x=0N−1∑y=0N−1f2x,y.In Figure2, we plot the curves of average MSREs versus the data amount of coefficients. The coefficients in image reconstruction can be represented by real values, and the total number of required real values is defined as data amount. For instance, four real values are needed to represent one AQPHT coefficient, while representing the coefficients of three components of APHT-RGB require six real values [9]. It can be seen from Figure 2 that our AQPHT achieves higher MSREs than APHT-RGB. By dealing with various color channels in a holistic way, AQPHTs can obtain the essence of color images from the inter- and intrachannel directions, demonstrating better compactness.Figure 2
The MSREs curves of APH-RGB and our AQPHT on (a) Set 14 and (b) BSD 100.
(a)(b)Next, we use two additional metrics, i.e., PSNR and SSIM, to evaluate the reconstruction performance. The PSNR between the reconstructed imageY^ and original image Y of size is calculated as(24)PSNRY^,Y=10log10∑x=0N−1∑y=0N−1MAXI2∑x=0N−1∑y=0N−1Y^x,y−Yx,y2,where MAXI is the maximum possible pixel intensity value. The SSIM is designed to better match the human perception compared to PSNR; the SSIM is defined as(25)SSIMY^,Y=2μYμY^+c12σY^Y+c2μY2+μY^2+c1+σY2+σY^2+c2,where μ and σ are respectively the average and variance of the pixel values, σY^Y is the covariance of Y^ and Y; c1 and c2 are constants. Following previous methods [20, 21], we set c1=0.01 and c2=0.03 in this paper. Higher values for PSNR and SSIM indicate better performance.The “Lena” of size of 128 × 128 is reconstructed using our AQPHT and the compared methods with a maximum order ranging from 4 to 28. As shown in Figure3, we can find that the reconstructed images of our AQPHT are far better than other moments. When the number of moments exceeds a certain value, the reconstruction performance of QZM [2] and QPHT [14] even degrades, whereas the reconstruction performance of our proposed AQPHT keeps getting better.Figure 3
Comparison of reconstructed images for Lena, w.r.t. PSNR and SSIM. From top to down are QZM, QPHT, QPHFM, QRHFM, and our AQPHT, respectively.


### 4.3. Experiment on Image Retrieval

Here, a series of extensive experiments are conducted to compare our method with other leading edge ones, namely, traditional hand craft-based methods [22–25] and CNN-based methods [26–30]. To evaluate the performance, we use the average precision (AP) measure computed as the area under the precision-recall curve for a query. We compute an average precision score for each of the 5 queries for a landmark, averaging these to obtain a mean average precision (mAP) score. The average of these mAP scores is used as a single number to evaluate the overall performance. For a fair comparison, postprocessing methods, e.g., query expansion are excluded in the work, and only mAP in representation with relevant feature dimensions is reported. The results of retrieval accuracy (mAP) [31] of the UK-bench [32], Holidays [33], and Oxford5k [19] are presented in Table 2, in which the bold indicates the best results. From Table 2, the performance of our method is much better than all hand craft-based methods but marginally worse than some CNN-based methods [28–30]. However, the length of a feature vector largely determines its retrieval efficiency. We note that our method uses feature vectors with significantly low dimensions comparing with CNN-based methods. In other words, the retrieval efficiency of our method is increased under the same experimental conditions in spite of the slight decrease of its accuracy, which means our method is a more effective compromising method for color image retrieval. Besides, the proposed AQPHT performs better than the QPHT [31] on 3 datasets by a large margin, which demonstrates the image representation ability of AQPHT which is stronger than that of QPHT.Table 2
Comparison of retrieval performance in terms of mean average precision (mAP).
MethodFeature vector lengthOxford5KHolidaysUK-benchHand craft-based methodsLCS + RN [22]0.5170.6580.324Improved BOW [23]0.5460.7470.352LTF [24]—0.6890.355LBP + color [25]0.6640.7350.347CNN-based methodsNeural codes [26]1280.5570.7890.356CRB-M [27]5120.5820.8090.340VGG + GeM [28]5120.8200.831—AWF [29]5120.8110.8260.360Triplet network [30]5120.8200.8420.362QPHT [31]950.6960.8120.356Our AQPHT950.7420.8310.363The bold values represent results of our proposed method, which denote the best results among the methods in Table2.


## 4.1. Experiment on Scaling Invariance

Numerous great classification models, e.g., VGG [16] and ResNet [17], have been developed on the basis of the powerful deep learning framework Their recognition accuracy is amazing and even higher than that of human beings. However, the performance is achieved only for large size images having rich object structure and high quality appearance. The resolution of images with small size is low, which limits the learning of discriminative representations, thus leading to identification failure [18]. In this experiment, the impact of down-scaling operation on image representations can be evaluated on Oxford5K dataset [19] by our AQPHT and the widespread deep model of VGG16. For convenience, only the neural activation in the 36-th layers of the VGG16 model is studied as an example of deep models in this work. The ability of representation is measured by the mean Euclidean distance which is calculated between the features extracted from an image at various resolutions. Figure 1 separately presents the experimental results of mean Euclidean distance at various down-sampling scales for the VGG16 model and AQPHT. From Figure 1(a), although the VGG16 model is carefully trained with some extra useful training tricks on the Oxford5K dataset, the mean Euclidean distance is growing larger with the decrease of image resolution, indicating that the ability of deep representation reduces with decreasing image resolution. From Figure 1(b), the mean Euclidean distance of the AQPHT is almost constant, demonstrating the superb performance of the AQPHT invariants under scaling transform.Figure 1
Mean Euclidean distance at various low resolutions on Oxford5K dataset. (a) VGG16 and (b) the proposed AQPHT.
(a)(b)


## 4.2. Experiment on Image Reconstruction

The capability of image representation of image moments can be measured by image reconstruction performance. This subsection compares the performance of image reconstruction between AQPHT and QZM [2], QPHT [14], QPHFM [12], and QRHFM [11]. Following the standard [11, 12], we set the relevant parameters in our experiments. The mean square reconstruction error (MSRE) is used to measure the reconstruction performance [11, 12]; lower MSREs equate to better reconstruction performance. Suppose fx,y and f^x,y indicate the original image and reconstructed image, respectively; the MSRE is defined as(23)MSRE=∑x=0N−1∑y=0N−1fx,y−f^x,y2∑x=0N−1∑y=0N−1f2x,y.In Figure2, we plot the curves of average MSREs versus the data amount of coefficients. The coefficients in image reconstruction can be represented by real values, and the total number of required real values is defined as data amount. For instance, four real values are needed to represent one AQPHT coefficient, while representing the coefficients of three components of APHT-RGB require six real values [9]. It can be seen from Figure 2 that our AQPHT achieves higher MSREs than APHT-RGB. By dealing with various color channels in a holistic way, AQPHTs can obtain the essence of color images from the inter- and intrachannel directions, demonstrating better compactness.Figure 2
The MSREs curves of APH-RGB and our AQPHT on (a) Set 14 and (b) BSD 100.
(a)(b)Next, we use two additional metrics, i.e., PSNR and SSIM, to evaluate the reconstruction performance. The PSNR between the reconstructed imageY^ and original image Y of size is calculated as(24)PSNRY^,Y=10log10∑x=0N−1∑y=0N−1MAXI2∑x=0N−1∑y=0N−1Y^x,y−Yx,y2,where MAXI is the maximum possible pixel intensity value. The SSIM is designed to better match the human perception compared to PSNR; the SSIM is defined as(25)SSIMY^,Y=2μYμY^+c12σY^Y+c2μY2+μY^2+c1+σY2+σY^2+c2,where μ and σ are respectively the average and variance of the pixel values, σY^Y is the covariance of Y^ and Y; c1 and c2 are constants. Following previous methods [20, 21], we set c1=0.01 and c2=0.03 in this paper. Higher values for PSNR and SSIM indicate better performance.The “Lena” of size of 128 × 128 is reconstructed using our AQPHT and the compared methods with a maximum order ranging from 4 to 28. As shown in Figure3, we can find that the reconstructed images of our AQPHT are far better than other moments. When the number of moments exceeds a certain value, the reconstruction performance of QZM [2] and QPHT [14] even degrades, whereas the reconstruction performance of our proposed AQPHT keeps getting better.Figure 3
Comparison of reconstructed images for Lena, w.r.t. PSNR and SSIM. From top to down are QZM, QPHT, QPHFM, QRHFM, and our AQPHT, respectively.


## 4.3. Experiment on Image Retrieval

Here, a series of extensive experiments are conducted to compare our method with other leading edge ones, namely, traditional hand craft-based methods [22–25] and CNN-based methods [26–30]. To evaluate the performance, we use the average precision (AP) measure computed as the area under the precision-recall curve for a query. We compute an average precision score for each of the 5 queries for a landmark, averaging these to obtain a mean average precision (mAP) score. The average of these mAP scores is used as a single number to evaluate the overall performance. For a fair comparison, postprocessing methods, e.g., query expansion are excluded in the work, and only mAP in representation with relevant feature dimensions is reported. The results of retrieval accuracy (mAP) [31] of the UK-bench [32], Holidays [33], and Oxford5k [19] are presented in Table 2, in which the bold indicates the best results. From Table 2, the performance of our method is much better than all hand craft-based methods but marginally worse than some CNN-based methods [28–30]. However, the length of a feature vector largely determines its retrieval efficiency. We note that our method uses feature vectors with significantly low dimensions comparing with CNN-based methods. In other words, the retrieval efficiency of our method is increased under the same experimental conditions in spite of the slight decrease of its accuracy, which means our method is a more effective compromising method for color image retrieval. Besides, the proposed AQPHT performs better than the QPHT [31] on 3 datasets by a large margin, which demonstrates the image representation ability of AQPHT which is stronger than that of QPHT.Table 2
Comparison of retrieval performance in terms of mean average precision (mAP).
MethodFeature vector lengthOxford5KHolidaysUK-benchHand craft-based methodsLCS + RN [22]0.5170.6580.324Improved BOW [23]0.5460.7470.352LTF [24]—0.6890.355LBP + color [25]0.6640.7350.347CNN-based methodsNeural codes [26]1280.5570.7890.356CRB-M [27]5120.5820.8090.340VGG + GeM [28]5120.8200.831—AWF [29]5120.8110.8260.360Triplet network [30]5120.8200.8420.362QPHT [31]950.6960.8120.356Our AQPHT950.7420.8310.363The bold values represent results of our proposed method, which denote the best results among the methods in Table2.


## 5. Conclusion

This paper presents a novel computational framework of quaternion-based polar harmonic transform, namely, accuracy quaternion polar harmonic transforms (AQPHTs). Firstly, to holistically deal with color images, AQPHTs are introduced based on the algebra of quaternions. Secondly, geometric errors and numerical errors are reduced by using the Gaussian numerical integration. Many comparative experiments are conducted to analyze the performance of AQPHTs and other ORIMs. Experimental results verify the superb performance of AQPHTs in image reconstruction and invariant image representation. For future work, AQPHTs would be tested in other color image processing domains, e.g., watermarking, segmentation, and retrieval. Besides, more accurate algorithms will be put forward and the computational method of quaternion moments will be improved.



---

*Source: 7162779-2021-12-29.xml*