Efficient Hashing Method Using 2D-2D PCA for Image Copy Detection

Image copy detection is an important technology of copyright protection. This paper proposes an efficient hashing method for image copy detection using 2D-2D (two-directional two-dimensional) PCA (Principal Component Analysis). The key is the discovery of the translation invariance of 2D-2D PCA. With the property of translation invariance, a novel model of extracting rotation-invariant low-dimensional features is designed by combining PCT (Polar Coordinate Transformation) and 2D-2D PCA. The PCT can convert an input rotated image to a translation matrix. Since the 2D-2D PCA is invariant to translation, the low-dimensional features learned from the translation matrix are rotation-invariant. Moreover, vector distances of low-dimensional features are stable to common digital operations and thus hash construction with the vector distances is of robustness and compactness. Three open image datasets are exploited to conduct various experiments for validating efficiencies of the proposed method. The results demonstrate that the proposed method is much better than some representative hashing methods in the performances of classification and copy detection.


INTRODUCTION
W ITH the wide applications of multimedia technology [1], [2], many images are transmitted and shared via social networks, e.g., Facebook, Flicker, YouTube and Snapchat. Some people would like to download images, process them and republish the processed images by social networks. As a consequence, many copies of an image may be stored in cyberspace. Therefore, it is a challenge to detect image copies from massive images. Fig. 1 illustrates some image copies of an image, where (a) is an image with an imperfect horizontal plane, (b) is a corrected version after rotation, (c) is a compressed version after JPEG compression with factor equaling 50, and (d) is a noise version attacked by AWGN (Additive White Gaussian Noise) with variance equaling 0.01. Given a query image, e.g., Fig. 1(a), efficient techniques for copy detection are expected to successfully find its image copies, such as Figs. 1(b), 1(c) and 1(d). In fact, image copy detection [3], [4] has become an important technology of copyright protection for finding illegal copies with the aid of watermarking technology. This paper investigates a new and efficient hashing method for image copy detection.
Image hashing [5], [6], [7], [8] can compress an input image of any size to a short sequence known as the hash. It is a useful technology of image representation for improving efficiencies of data processing of massive images. In practice, image hashing has been applied to numerous fields [9], [10], [11], such as copy detection, screen quality assessment, tampering detection and social hot event detection. Generally, image hashing needs to meet two essential performance indicators [12], [13], [14], namely, robustness and discrimination. Suppose that I represents an image, I s represents a similar image of I, and I d represents a different image from I. Let HðÁÞ be the hash function for a digital image, P r ðÁÞ represent the probability of occurrence of an event, and DðÁÞ represent the distance function for calculating the similarity of two hashes. Thus, robustness and discrimination can be formally defined as follows.
(1) Robustness. Robustness means that, for visually similar input images, hashing method ought to encode them into similar or the same hash sequences. Specifically, the probability that the hashes of I and I s have the same or similar values should be close to 1. The formula is below.
where T represents a given threshold, and " is a very small positive constant number close to zero.
(2) Discrimination. Discrimination is also called anti-collision [11], [13]. It means that, for images with different contents, hashing method ought to compress them into different hash sequences. Specifically, the probability that the hashes of I and I d have different values should be close to 1. Its formula is below.
Generally, there is a mutual constraint between these two indicators. An improvement in one indicator results in a reduction in the other. Currently, most hashing methods' classifications between robustness and discrimination are not satisfied yet, and thus they are inefficient in application to copy detection. To address this issue, we propose an efficient image hashing method using 2D-2D (two-directional two-dimensional) PCA (Principal Component Analysis) for copy detection. Compared with the reported hashing methods, the prime contributions are presented here.
(1) A new property of 2D-2D PCA called translation invariance is discovered. It is found that if all training images are shifted along the column direction with the same size, the projection feature matrix of 2D-2D PCA is invariant. In other words, the obtained feature matrix after column shifting is the same with that before column shifting. Theoretical proof of the translation invariance of 2D-2D PCA is given. As 2D-2D PCA is a popular technique of data dimensionality reduction, the property of translation invariance is helpful to other image applications.
(2) A novel model of extracting rotation-invariant lowdimensional features is designed by combining the PCT (Polar Coordinate Transformation) and the 2D-2D PCA. The PCT can convert an input rotated image to a translation matrix. Since the 2D-2D PCA is invariant to translation, it can extract rotation-invariant low-dimensional features from the translation matrix. As far as known, the 2D-2D PCA is first used in image hashing and will be helpful to hashing research.
(3) Low-dimensional features are viewed as vectors and their vector distances are taken to construct hash. As common digital operations slightly disturb low-dimensional features in the 2D-2D PCA domain, their vector distances are stable to common operations. Therefore, hash construction with vector distances can guarantee compactness and robustness.
(4) Performances of the proposed hashing method are tested using three open image datasets. Comparisons show that the classification performance of the proposed hashing method outperforms those of some well-known hashing methods. Copy detection results illustrate that the proposed hashing method is much better than some representative hashing methods in terms of the P-R (Precision-Recall) curve.
The rest parts of this paper are organized as follows. Hashing methods closely related to our work are introduced in Section 2. Principle and detailed procedures of the proposed hashing method are explained in Section 3. Various experiments are discussed in Section 4. Conclusions of our work are summarized in Section 5.

RELATED WORK
In general, an efficient hashing method should achieve a satisfactory balance between robustness and discrimination. In the literature, many scholars have tried their best to design some meaningful hashing methods for pursuing high classification performance. According to the robustness against image rotation, these image hashing methods can be grouped into the following three categories.
(1) Hashing Methods Sensitive to Rotation. Generally, these methods do not take into account the robustness of rotation operation. For instance, Kang et al. [15] utilized compressive sensing to build an image hash. This method is sensitive to rotation. Wang et al. [16] proposed to calculate a secure hash for authentication using the techniques of DWT (Discrete Wavelet Transform) and DCT (Discrete Cosine Transform). Their method is robust to gamma correction, and JPEG compression. Huang et al. [17] applied the RW (Random Walk) technique to designing a secure hashing scheme. Vadlamudi et al. [18] utilized SIFT (Scale-Invariant Feature Transform) and DWT features to build a hashing method. This method has good robustness against noise, scaling and other operations, while its discrimination is not good enough. Qin, Sun and Chang [19] jointly utilized SVD (Singular Value Decomposition), CVA (Color Vector Angle) and edge detection to design a new hashing method for color images. Their method simultaneously improves robustness and discrimination, but one of its disadvantages is the high time complexity. In another work [20], a hashing scheme with LBP (Local Binary Pattern) and color features is designed. The time complexity of this scheme is reduced, but the discrimination requires to be improved. Sajjad et al. [21] proposed a novel hashing method by Canny edge detection and DCT coefficients. This method has a good application in the field of smart industrial environment, but its rotation robustness should be improved. Iram et al. [22] used Gaussian pyramid and random noise to construct a hashing method. This method has good security. Recently, Hamid et al. [23] exploited the difference of Laplacian pyramids to design a hashing method. This method has good identification performance for small area tampering. However, the effect of rotation is not considered in this method. Shen and Zhao [24] utilized color opponent component and quadtree structure features to devise a hashing method. Shen and Zhao's method has a good localization capability on the tampered image. Liu et al. [25] introduced a novel hashing method with QLRBP (Quaternionic Local Ranking Binary Pattern) and mean pooling. This method is also sensitive to the operation of rotation.
(2) Hashing Methods Moderate to Rotation. These methods take rotation into account, but they can only resist rotation within 20 . For instance, Monga and Evans [26] proposed a hashing method with an end-stopped wavelet. Monga and Evans's method achieves robustness against the rotation of 5 . Wu, Zhou and Niu [27] proposed a print-scan resistant hashing method using RT (Radon Transform), DWT and DFT (Discrete Fourier Transform). Their method can resist small angle rotation within 3 . Motivated by the performance of RT, Ou and Rhee [28] designed a hashing method based on DCT and RT. Ou and Rhee's method can resist rotation up to 5 . Zhao et al. [29] calculated a hash by combining the ZMs (Zernike Moments) and the position and texture features of salient region. Their method can be used for image authentication and can resist the small angle rotation of 5 . Davarzani et al. [30] combined SVD and LBP to find image hash. Davarzani's method has promising robustness, but the discrimination is not good enough. Li and Wang [31] used LRSD (Low-Rank Sparse Decomposition), CS (Compressed Sampling) and random projection to generate a hash. Li and Wang's method has good robustness and can resist the rotation angle of 10 . Qin et al. [32] exploited saliency structure and dual-cross pattern encoding to make up a hashing method. Qin's method is resilient to rotation of 5 . Tang et al. [33] proposed to use Canny edge detection and DWT features to generate an image hash. Tang's method shows good results in the application of image quality assessment, but it can only resist rotation within 5 . Yang et al. [34] used low-rank decomposition and LBP to generate a hash. Yang's method can only resist rotation of 3 . Liu and Huang [35] combined Hu moments in spatial domain and DCT coefficients in frequency domain to design a perceptual hashing method. Liu and Huang's method is robust to rotation of 10 . In another work, a global feature called GLCM (Gray-Level Co-occurrence Matrix) and local features with DCT coefficients are both used to come up with a novel hashing method in [36]. This hashing method is also robust to rotation of 10 and can be applied in copy detection. Recently, Ouyang, Zhang and Wen [37] introduced quaternion Gyrator transform to generate a hash. Their method demonstrates good performance in image authentication. Zhao and Yuan [38] utilized color structure and luminance gradient features to generate a hash. Zhao and Yuan's method is robust to rotation of 8 , but their discrimination needs to be improved. Recently, Tang et al. [39] utilized QSVD (Quaternion SVD) to learn compact hash of color image from PCS (Perceptual Color Space). As all color components are used in the quaternion domain, the discrimination of Tang's method is improved. In another work, Liang et al. [40] computed salient map with a visual attention model and extracted robust hash from the salient map using 2D PCA. Liang's method is robust against common operations except for large rotation.
(3) Hashing Methods Robust to Rotation. These methods can resist the rotation with angle more than 20 . An early hashing method was given by Swaminathan, Mao and Wu [41], in which FMT (Fourier-Mellin Transform) and randomization method are used to generate a secure hash. The rotation robustness of Swaminathan's method is provided by FMT. Chen et al. [42] proposed a hashing method based on the Tchebichef moments. Chen's method can be used for authentication. Wang et al. [43] used Watson's visual model and SIFT features to come up with a hashing method. Wang's method can resist the rotation of 25 and finds good application in detecting tampered images. Karsh et al. [44] combined the spectral residual model, DWT and SVD to generate a hash. The discrimination of Karsh's method needs to be improved. Nie et al. [45] exploited the relationship between local feature points and unsupervised quantization techniques to calculate a hash. Nie's method shows good rotation robustness. To fully use color information, Tang et al. [46] selected CVA histogram as feature and compressed it with DCT for generating a short hash. Tang et al. [47] proposed a technique called RP (Ring Partition) and used RE (Ring Entropy) to produce image hash. In another work, Tang et al. [48] calculated a hash by MDS (MultiDimensional Scaling) and LPT (Log-Polar Transform). This method has promising robustness, but its discrimination is not desirable yet. Based on the RP technique, Alice et al. [49] used Haralick features to devise a hashing method for authentication. Similarly, Khelaifi and He [50] used RP and fractal image coding to design a hashing method. These RP-based methods can resist rotation of large degrees, but their discrimination needs to be improved. Recently, Biswas et al. [51] utilized DNS (Dominant Neighborhood Structure) and DCT to extract textural energy map for hash construction. Biswas's method can be used for recognizing Tor domains, but the time complexity is too high. Abdullahi et al. [52] combined FMT and fractal coding to devise a novel hashing method. Abdullahi's method is stable to rotation and has low time complexity. Singh et al. [53] utilized KAZE feature and SVD technique to produce image hash. Singh's method is also robust to rotation and illustrates a good application in tampering detection.
The rotation robustness and the main techniques of some representative hashing methods are presented in Table 1, where the first column is the reported methods, the second column is the rotation robustness, and the third column is the main techniques of each method. The results of Table 1 show that some methods are sensitive to rotation. Some

PROPOSED HASHING METHOD
This section consists of four parts. Two main techniques, i.e., PCT and 2D-2D PCA, of the proposed hashing method are first explained in Sections 3.1 and 3.2, respectively. Detailed procedures of the proposed hashing method are described in Section 3.3. Finally, the recommended similarity for evaluating hashes of the proposed method is introduced in Section 3.4. The below Sections explain the abovementioned techniques in detail.

PCT
The PCT can convert an image from Cartesian coordinates to polar coordinates. It has been applied to numerous image applications, such as watermarking [54] and retrieval [55].  (3) where the coordinates ðx; yÞ can be determined by the following equations.
where roundðÁÞ is the rounding operation, floorðÁÞ is the round down function. Note that the image I 1 is generated by substituting all combination values of r and b into the Equations (4) and (5). To understand the above calculations, the relation between polar coordinates and Cartesian coordinates is shown in Fig. 2. It is found that image rotation in the Cartesian coordinates corresponds to the translation in the polar coordinates. To understand this property, Fig. 3 presents visual examples of PCT, where (a) is an original image, (b) is the rotated image of (a) with 90 degrees, (c) and (d) are the PCT results of (a) and (b), respectively. Comparing (c) with (d), (d) is a translated version of (c) by circularly shifting with 90 along the column direction. This illustrates that the PCT can convert a rotated image into a translated image.
Note that the PCT plays an important role in the model of rotation-invariant feature extraction. In this model, the PCT converts an input rotated image to a translation matrix and the 2D-2D PCA learns rotation-invariant features from the translation matrix using the property of translation invariance. Details of this model are explained in Section 3.3.2.

2D-2D PCA
2D-2D PCA [56] is an improvement of the classical PCA [57], [58], [59] for data dimensionality reduction. Compared with PCA, 2D-2D PCA can directly and quickly calculate the covariance matrix from the image matrix without transforming the image matrix into a vector. At present, 2D-2D PCA has been applied to face recognition [60], pattern recognition [61], target recognition [62], etc. In this paper, we investigate the use of 2D-2D PCA in hashing method. Specifically, we find a new property of 2D-2D PCA called translation invariance and then exploit it to design an efficient hashing method for copy detection. Section 3.2.1 introduces the principle of 2D-2D PCA and Section 3.2.2 proves the new property of 2D-2D PCA.

Principle of 2D-2D PCA
In general, the calculation of 2D-2D PCA can be divided into three steps, including column dimension reduction, row dimension reduction and projection feature matrix calculation. Details of these steps are introduced below.
(1) Column Dimension Reduction Assume that B j (1 j N) is the jth training image with size m Â n, where N is the number of training images. Let G 1 be an n Â n non-negative covariance matrix of the training images. Thus, G 1 is generated as follows.
where B is the average result of the training images which can be computed below.
Next, the eigenvalues and eigenvectors of G 1 are calculated. The eigenvalues are arranged in descending order. Therefore, the matrix U ¼ ½u 1 ; u 2 ; . . . ; u d can be determined by using the eigenvectors u i ði ¼ 1; 2; . . . ; dÞ of the first d maximum eigenvalues of G 1 .
For an image B j , the projected eigenvectors are obtained below.
where F j is an m Â d matrix composed of d eigenvectors.
(2) Row Dimension Reduction After column dimension reduction, the m Â n image is reduced to m Â d, that is, only the column size is reduced and the row size remains unchanged. With the new training samples F j ðj ¼ 1; 2; . . . ; NÞ, the covariance matrix G 2 can be calculated below.
where F is computed as follows.
Similarly, the eigenvalues and eigenvectors of G 2 are calculated and the eigenvalues are arranged in descending order. Then, the matrix V ¼ ½v 1 ; v 2 ; . . . ; v k can be generated by using the eigenvectors v i ði ¼ 1; 2; . . . ; kÞ corresponding to the first k maximum eigenvalues of G 2 .
(3) Projection Feature Matrix Calculation With the matrices U and V, the final projection matrix for the training image B j is determined as follows.
where Y j is the k Â d matrix, which is also called the principal components (vectors) of B j . More detailed explanations about the 2D-2D PCA are in [56].

New Property of Translation Invariance
After the investigation of 2D-2D PCA in hashing method, we find a new property of translation invariance. Specifically, if all training images are translated along the column direction with the same size, the projection matrix of the translated training image is the same with that of the original training image. As the 2D-2D PCA has become a useful technique of image processing, the new property is helpful to other image applications. The property of 2D-2D PCA can be theoretically proved as follows.
j and Y j be the projection feature matrices of B 0 j and B j , respectively. Thus, Y 0 j = Y j . Proof. According to the theory of linear algebra [63], the translated matrix B 0 j can be represented as follows.
where P is a matrix of order n, which consists of a set of the elementary matrix. t u Let G 0 1 be the covariance matrix after translation. Thus, according to the formula (6), G 0 1 can be written as below.
where B 0 is the translated mean matrix. According to the formula (7), B 0 is calculated below.
According to the formula (12), the formula (14) can be written as follows.
Substitute the formula (12) and the formula (15) into the formula (13) and thus obtain the below formula.
Since P is an orthogonal matrix, the following formula can be deduced.
Next, substitute the formula (17) into the formula (16) and thus G 0 1 can be written as follows.
According to the definition of similarity matrices, from the Equation (18), it can be concluded that G 0 1 is similar to G 1 , namely G 1 $ G 0 1 . Let 1 and 0 1 be the eigenvalues of G 1 and G 0 1 , and U and U 0 be the eigenvectors of G 1 and G 0 1 , respectively. Thus, the below formulas are obtained.
According to formula (18), the formula (20) can be written as follows.
Left multiply P on both sides of the formula (21) as below.
Thus, the formula (22) can be written as follows.
According to the property that the eigenvalues of similar matrices G 0 1 and G 1 are invariant. The below formula is available.
Therefore, the formula (23) can be written as follows.
Comparing the formula (25) (PU 0 is viewed as a whole) with the formula (19), the below formula can be deduced.
Thus, the following formula can be obtained by left multiplying the matrix P À1 on both sides of the formula (26) as follows.
According to the formula (8), the projection of the translated eigenvector F j 0 is as follows.
Substitute the formula (12) and the formula (27) into the formula (28) and then the formula (28) can be written as follows.
It is clear that F 0 ¼ F according to the formula (10) and the formula (29). Consequently, G 0 2 can be represented as follows.
Let V and V 0 be the eigenvectors of G 2 and G 0 2 , respectively. Thus, According to the formula (11), the projection matrix of the translated matrix B 0 j is as follows.
Theoretical proof is finished. The above proof can be briefly summarized as follows. After translation, the covariance matrix G 0 1 is a similar matrix of its original covariance matrix G 1 . With the property of similar matrices, we have F 0 j ¼ F j and thus obtain G 0 2 ¼ G 2 . As G 0 2 stays the same, its eigenvector matrix V 0 also remains unchanged. Therefore, Y 0 j is the same with Y j . This illustrates that the 2D-2D PCA has the property of translation invariance, i.e., the projection matrix of the translated training image is the same with that of the original training image.
To make an easy understanding of the property of the 2D-2D PCA, visual examples of covariance matrices are presented in Fig. 4, where (a) is the benchmark image Lena, (b) is the covariance matrix G 1 of (a), (c) is the covariance matrix G 2 of (a), (d) is the translated version of (a) by cyclically shifting 60 columns from right to left, (e) is the covariance matrix G 1 of (d), and (f) is the covariance matrix G 2 of (d). Compared with (b), (e) is shifted by 60 units along the diagonal direction. For (c) and (f), they are exactly the same.

Detailed Procedures of the Proposed Method
The proposed hashing method contains three procedures. First, preprocessing is used to prepare a normalized image for stable feature extraction. Second, rotation-invariant features are extracted by combining the PCT and the 2D-2D PCA. Finally, low-dimensional features are treated as vectors and their distances are used to construct hash. Details of these procedures and pseudo-code of the proposed method are explained in the below sections.

Preprocessing
The preprocessing mainly includes three manipulations. First, the input image is resized with the size of M 0 Â M 0 . The main purpose is to generate hashes with the same lengths. Second, Gaussian low-pass filtering is used to mitigate the effects of noise and compression. Finally, the intensity component in the HSI color space is chosen to represent the image. Note that, in contrast to other color spaces, the choice of the HSI space makes preferable classification performance. Section 4.6 will verify the color space selection through experiments.

Rotation-Invariant Feature Extraction
First, the PCT is exploited to convert the preprocessed image sized M 0 Â M 0 to the transformed image sized M 1 Â M 2 in the polar coordinates. Note that image rotation in the Cartesian coordinates corresponds to the translation in the polar coordinates. In other words, compared with the transformed image of an original image, the transformed image of its rotated image is translated along the column direction.
Second, non-overlapping block partition is conducted on the transformed image, where the block size is m Â n. Thus, the block number is N ¼ ðM 1 Â M 2 Þ=ðm Â nÞ. Here, n ¼ M 2 is selected to preserve translation relation in blocks. Consequently, N ¼ M 1 =m.
Finally, the 2D-2D PCA is exploited to learn rotationinvariant low-dimensional features from image blocks. Here, the 2D-2D PCA is applied to all blocks B j (1 j N). It is worth noting that the image blocks are the training images of the 2D-2D PCA. Next, Y j of B j is used to make up a vector r j with the size of L Â 1, in which L ¼ k Â d. Therefore, a feature matrix R can be obtained as follows.
R ¼ ½r 1 ; r 2 ; . . . ; r N : Note that the feature matrix R is rotation-invariant. The reasons are as follows. The PCT can convert an input rotated image to a translation matrix. During image blocking, translation relation is preserved in image blocks due to n ¼ M 2 .
In addition, the 2D-2D PCA is invariant to translation. This property makes rotation-invariant features.

Vector Distance Calculation
To get a compact hash, each column of the feature matrix R is viewed as a vector and the distances of these feature vectors are used to construct hash. The vector distance is selected in this work. This is based on the observation that common digital attacks slightly disturb low-dimensional features in the 2D-2D PCA domain and thus their vector distances are stable to digital operations. Therefore, hash construction based on vector distances can ensure robustness and compactness. Details of vector distance calculation are explained as follows. First, a reference vector r 0 is calculated as below.
where r 0 ðiÞ is the ith element of r 0 computed below.
r j ðiÞ; (34) in which r j ðiÞ is the ith element of the vector r j . Second, the L 2 norm is utilized to calculate the distance between r 0 and r j .
Third, the distance q j is quantized below.
hðjÞ ¼ roundðq j þ 0:5Þ: In the end, the hash sequence h is obtained as follows.

Pseudo-Code of the Proposed Method
The proposed hashing method consists of preprocessing, rotation-invariant feature extraction with PCT and 2D-2D PCA, and vector distance calculation. To make an easy understanding of the procedures, the pseudocode of the proposed method is demonstrated in Algorithm 1.
Output: A hash h. 1: An input image is fixed to M 0 Â M 0 size. 2: The resized image is filtered by Gaussian low-pass filtering. 3: The intensity component of the filtered image in the HSI color space is utilized to represent the image. 4: The PCT is used to convert image from Cartesian coordinates to polar coordinates. 5: Divide the transformed image in the polar coordinates into N blocks sized m Â n. 6: Apply 2D-2D PCA to all blocks using the parameters k and d, and obtain the feature matrix R sized L Â N. 7: for j = 1 to j = N do 8: Calculate the distance q j between r 0 and r j by the Eq. (35). 9: Calculate hðjÞ ¼ roundðq j þ 0:5Þ. 10: end for 11: The hash is determined by h ¼ ½hð1Þ; hð2Þ; . . . ; hðNÞ. 12: return h.

Hash Similarity Evaluation
The Pearson correlation coefficient [48] is adopted to analyze the similarity between two hashes. The value of the correlation coefficient is within the range [-1, 1]. Generally, the bigger the value is, the more similar the images of the input hashes are. Practically, a threshold can be used to determine whether two images are similar or not.

EXPERIMENTAL RESULTS
Our used parameters are set below. The input image is fixed to the size of 512 Â 512, the block size is 8 Â 360, the Gaussian low-pass filtering is performed by the 3 Â 3 convolution mask with a standard deviation of 1, and the dimension of feature selection is two. Therefore, the image size after the PCT is 256 Â 360. In other words, our parameter settings are M 0 = 512, M 1 = 256, M 2 = 360, m = 8, n = 360, k = 2, and d = 2. Hence, N ¼ ðM 1 Â M 2 Þ=ðm Â nÞ ¼ 32. Moreover, MATLAB R2018b is used to implement the proposed method, and the used PC is equipped with the Intel i7 dual-core 8700 CPU with 3.2 GHz and the random-access memory with 8.0 GB.

Classification Performance
The Kodak dataset [64] is used to verify the robustness of the proposed hashing method. There are 24 color images in the Kodak dataset, and the sizes of these images are 768 Â 512 or 512 Â 768.  Table 2. Consequently, 24 Â 80=1920 pairs of similar images are produced, and there are 1920+24=1944 images in the robustness test. An image database called VOC2012 [65] is used to conduct the discrimination test. The VOC2012 includes 17125 color images. The width sizes of these images are from 142 to 500 and their height sizes are from 71 to 500. Fig. 6 lists some sample images of the VOC2012 database. Similarity values between the hash of each image and those hashes of the other 17,124 images are computed. Therefore, the total number of similarity values can be determined by the combinatorial number Cð17125; 2Þ ¼ 17125 Â ð17125 À 1Þ=2 ¼ 146624250.
The ROC (Receiver Operating Characteristics) graph [66] is used for analysis. The y-axis and the x-axis of the graph are defined by true positive rate (R 1 ) and false positive rate (R 2 ) as follows.
Clearly, R 1 indicates robustness and R 2 shows discrimination. In addition, the AUC (Area Under the Curve) is calculated. The scope of AUC is from 0 to 1. Generally, a bigger AUC value means a better classification performance between discrimination and robustness. To test the advantage of the proposed hashing method, some famous hashing methods are compared, including RW hashing method [17], QSVD hashing method [39], 2D PCA hashing method [40], MDS hashing method [48], GLCM-DCT hashing method [36] and RE hashing method [47]. The compared methods have been recently published in prestigious conferences or journals, and some of them are also dimension reduction-based methods, such as QSVD hashing method [39], 2D PCA hashing method [40] and MDS hashing method [48]. For these compared methods, their parameters and measures of hash similarity are configured by using their reported settings, and all input images are adjusted to 512 Â 512 before calculating the hash.
The curves of different methods are presented in Fig. 7. To better compare the local details of these curves, their parts located at the upper-left corner are magnified in the lowerright corner. The curve of the proposed hashing method is much nearer to the upper-left corner than those of other methods. Therefore, the classification performance of the proposed hashing method is better than those of other methods. For further analysis, the AUC values of the proposed hashing method and the compared methods are also calculated. The AUCs of RW hashing method, QSVD hashing method, 2D PCA hashing method, MDS hashing method,   GLCM-DCT hashing method, RE hashing method and the proposed hashing method are 0.96716, 0.95499, 0.97012, 0.99211, 0.96821, 0.99800 and 0.99999, respectively. The AUC of the proposed hashing method is greater than those of the compared methods. This illustrates that the proposed hashing method is superior to the compared methods in classification performance. The proposed hashing method demonstrates advanced classification performance. This is mainly attributed to the rotation-invariant feature extraction by combining PCT and 2D-2D PCA. With the PCT, an input rotated image is converted to a translation matrix. Since the 2D-2D PCA is invariant to translation, the learned low-dimensional features from the translation matrix are rotation-invariant. Moreover, the use of 2D-2D PCA can make low-dimensional features discriminative. As common digital operations slightly disturb low-dimensional features in the 2D-2D PCA domain, their vector distances are stable to digital operations.

Copy Detection Performance
To illustrate our superiority in copy detection, comparisons are also conducted. To do so, Wang's database [67] is used. Fig. 8 demonstrates some images of Wang's database. Wang's database has 10 categories and each category contains 100 images. Hence, the total number of images in the database is 1,000. In the experiment, one image is randomly selected from each category, some operations are used to attack the selected image of each category, and 24 image copies of every selected image are then generated. The used operations include: SN, GLF, CA, SPN, JPEG compression, BA, IS, AWGN, TI (Text Insertion), GM (Global Mosaic), LI (Logo Insertion), GC, and the IR (Image Rotation). These operations are implemented by MATLAB and their parameters for producing image copies are listed in Table 3. As there are 10 categories, the number of total image copies reaches 240. Hence, the test database has 1,240 images. Note that the IR operation will expand the sizes of the attacked images. To make equal sizes of a query image and its image copies, every selected image is resized to a square image whose width is set to the maximum value of its width and its height before implementing these operations. And after these operations, the inscribed square of the inscribed circle of the square image is selected as the image copy. Similarly, every selected image is processed with the same manipulations to produce the actual query image. The well-known tool called P-R curve [36] is selected to theoretically analyze copy detection performance. In the P-R curve, the y-axis is the Precision and the x-axis is the Recall. They are calculated as follows: Precision ¼ # image copies correctly detected # all images returned Recall ¼ # image copies correctly detected # all image copies : A P-R curve is formed by some points with the coordinates (Recall, Precision). In general, the P-R curve near the upper-right corner is better than the curve far away from the upper-right corner. Fig. 9 demonstrates the P-R curves of different hashing methods. Compared with the P-R curve of other methods, our P-R curve is much nearer to the upperright corner. Hence, the proposed method is better than the compared hashing methods in copy detection performance. The PRAUC ( P-R AUC) is utilized for quantitative analysis. The scope of PRAUC is from 0 to 1. Generally, a bigger PRAUC means a better copy detection performance. The results indicate that the PRAUCs of RW hashing method, QSVD hashing method, 2D PCA hashing method, MDS hashing method, GLCM-DCT hashing method, RE hashing method and the proposed hashing method are 0.76737, 0.82526, 0.85605, 0.76031, 0.84006, 0.93436 and 0.99529, respectively. The PRAUC of the proposed hashing method is much greater than those of other methods. This also proves   that the proposed hashing method achieves better copy detection performance than the compared methods. The definitions of precision and recall reveal that a hashing method will have good performance in copy detection when its precision and recall are both high. Fig. 10 shows the precision curve and recall curve of the proposed hashing method under different thresholds, where the horizontal axis is the used threshold and the vertical axis is the precision/recall curve. In general, when the precision curve and the recall curve intersect, the corresponding threshold is selected as the optimal threshold, which provides the same value of precision and recall. From Fig. 10, it can be found that the optimal threshold of the proposed hashing method is 0.94552, and the corresponding values of precision and recall are both 0.97308. This means that 97.30% of image copies are correctly detected under the optimal threshold.
Similarly, the optimal thresholds of the compared methods are calculated. With the optimal thresholds, their precision/recall values are also computed. The results show that the precision/recall values of RW hashing method, QSVD hashing method, 2D PCA hashing method, MDS hashing method, GLCM-DCT hashing method, and RE hashing method are 0.75049, 0.78885, 0.85633, 0.71714, 0.78497, and 0.87627, respectively. Our precision/recall value under the optimal threshold is much greater than those of the compared methods. Fig. 11 presents the comparison results of these methods in copy detection, where the x-axis is the hashing method and the y-axis is the PRAUC and precision/ recall.

Complexity Performance
Complexity performance includes time complexity and storage complexity. Here, the time complexity is measured by the computational time of generating a hash using the evaluated hashing methods. Specifically, the computational time is the average time of computing a hash in the discrimination test. The results indicate that the computational time of the proposed hashing method is 0.03423 seconds and the computational time of RW hashing method, QSVD hashing method, 2D PCA hashing method, MDS hashing method, GLCM-DCT hashing method and RE hashing method is 0.05875, 0.37287, 0.06126, 0.42853, 0.10248 and 0.01546 seconds, respectively. Obviously, the proposed hashing method is quicker than all compared methods, except RE hashing method. Compared with some dimension reduction-based methods, such as QSVD hashing method, 2D PCA hashing method and MDS hashing method, the proposed hashing method reaches a much faster speed due to the low computational cost of 2D-2D PCA.
Storage complexity is measured by the storage cost of a hash. To analyze the required bits of a hash, 17,125 different images in VOC2012 are utilized. As every hash of the proposed hashing method has 32 integers, there are 17125 Â 32 ¼ 548000 integers in total. It is found that the maximum integer is 9,978 and the minimum integer is 0. As 9978 < 16384 = 2 14 , 14 bits can represent a hash element. Therefore, the bit number of a hash of the proposed hashing method is 14 Â 32 = 448. For reference, RW hashing method, QSVD hashing method, 2D PCA hashing method, MDS hashing method, GLCM-DCT hashing method and RE hashing method require 144 bits, 640 bits, 384 bits, 720 bits, 720 bits and 64 float digits to store a hash, respectively. Since a float digit needs 32 bits at least according to the IEEE standard, the bit length of a hash of RE hashing method is 64 Â 32 = 2048. It can be seen that the storage complexity of the proposed hashing method is higher than those of RW hashing method and 2D PCA hashing method, but it is lower than those of QSVD hashing method, MDS hashing method, GLCM-DCT hashing method and RE hashing method. The complexity summary is presented in Table 4.

Block Size Selection
This section analyzes the performance of selecting different block sizes on hash performance.  Table 5 shows the performance comparison under different block sizes. From the above results, it can be found that the proposed hashing method achieves better performances in classification and computational time when the block size is 8 Â 360.

Dimension Selection
In 2D-2D PCA, the parameters k and d correspond to the dimension selections along the row direction and column direction, respectively. For simplicity, k ¼ d is selected in the discussion. Here, the dimension values of 2, 3, 4, 5, 6 and 7 are chosen. In the experiments, only the k and d values are varied and other parameters remain unaltered.  Table 6. From the results, it can be found that the selection of k ¼ d ¼ 2 is a good choice in terms of the whole performance.

Color Space Selection
To verify the superiority of the use of HSI color space, classification performances of the proposed hashing method under different spaces are also compared. The compared color spaces consist of HSI, CIE L*a*b*, YCbCr, and HSV spaces. In the comparison, only the intensity/luminance/ value component is different. Specifically, the intensity    The AUC value of the HSI space is slightly larger than those of other spaces. Moreover, the computational time of CIE L*a*b* space, HSI space, YCbCr space and HSV space is 0.05286, 0.03423, 0.03292 and 0.03521 seconds, respectively. Table 7 presents performance comparison under different color spaces. In the viewpoint of the whole performance, the HSI color space is better than other spaces.

CONCLUSION
This paper has proposed an efficient hashing method using 2D-2D PCA for image copy detection. The key is the discovery of the translation invariance of 2D-2D PCA which is first reported and theoretically proved in this work. With the property of translation invariance, a novel model of extracting rotation-invariant low-dimensional features is designed by combining PCT and 2D-2D PCA. The PCT can convert an input rotated image to a translation matrix. Since 2D-2D PCA is invariant to translation, the learned low-dimensional features from the translation matrix are rotation-invariant. In addition, vector distances of low-dimensional features are exploited to construct hash. As common digital operations slightly disturb low-dimensional features in the 2D-2D PCA domain, hash construction with vector distances provides good robustness and compactness of the proposed hashing method. Numerous experiments on three open image databases have been discussed to demonstrate the efficiencies of the proposed hashing method. Comparison results have demonstrated that the proposed hashing method outperforms some state-of-the-art hashing methods in the performances of classification and copy detection.