# Perceptual Image Hashing Using Latent Low-Rank Representation and Uniform LBP
## 3 Proposed Perceptual Image Hashing Algorithm  
In order to achieve a good balance between discriminability and robustness, a new PIH scheme is proposed in this paper by combining LLRR and LBP features (called LLRR-RiuLBP). In the proposed scheme, LLRR is first employed in order to obtain the principal and salient components of the original images, considering its robustness of salient feature extraction to corrupted data; following this, the RiuLBP feature extraction is applied to the principal and salient components and generates the perceptual hash. The proposed PIH scheme consists of three main stages: pre-processing, feature extraction, and hash generation. The block diagram of the proposed image hashing scheme is shown in Figure 1, and the whole hash generation process is depicted as follows. 1. For color images, only the luminance component is considered because it contains significant information on the input images. An original color image I is first converted to a grayscale image I\({}_{\text{g}}\). 2. In order to produce a fixed-length hash code, the image normalization of the bilinear interpolation is applied to the grayscale image, and a resized image I\({}_{\text{r}}\) is generated with a \(M\times M\) size. 3. Following this, a pixel-wise adaptive Wiener filter is applied to the resized input image I\({}_{\text{r}}\) in order to reduce disturbances caused by the image operation, such as noise addition and lossy compression; a filtered input image I\({}_{\text{f}}\) is then generated. 4. LLRR is applied to the resized input image I\({}_{\text{r}}\) in order to obtain the principle feature matrix \(\mathbf{Z}\), salient feature matrix \(\mathbf{L}\) and error matrix \(\mathbf{E}\) using Equation (4). 5. The principle feature matrix \(\mathbf{Z}\) and salient feature matrix \(L\) are divided respectively into non-overlapping sub-blocks with a \(b\times b\) size. For each image sub-block, the normalized histogram of the CSLBP codes is computed as follows. Consequently, two histograms \(H^{r}\), \(r\in\{Z,L\}\), are built according to the principle feature matrix \(\mathbf{Z}\) and salient feature matrix \(\mathbf{L}\), respectively. Figure 1: The perceptual image hashing (PIH) scheme, based on latent low rank representation (LLRR) and rotation invariant uniform local binary patterns (RiuLBP). \[H^{\prime}(t)=\frac{1}{b^{2}}\sum_{i=1}^{b}\sum_{j=1}^{b}f\Big{(}LBP_{P,R}^{\mu i }(i,j),t\Big{)},\ t=0,1,\ldots,P+1,r\in\{Z,L\}, \tag{8}\]  
where  
\[f(x,y)=\left\{ \begin{array}{ll}1&\quad if\ x=y\\ 0&\quad else\.\end{array} \right. \tag{9}\]  
1. To reduce feature redundancy, zero-mean normalization is applied to the histogram feature to produce a normalized histogram feature \(\overline{H}^{\prime}\) by using Equation (10): \[\overline{H}^{\prime}=\frac{H^{\prime}-\mu}{\delta+\varepsilon},\ r\in\{Z,L\},\] (10)  
where \(\mu\) and \(\delta\) are the mean and standard deviations of the feature set \(H^{\prime}\), and where \(\varepsilon\) is a minimal value in order to avoid division by zero. 2. The normalized histogram \(\overline{H}^{\prime}\) is a \(P+2\) bins histogram, and the features of all the blocks are concatenated in order to generate a final LLRR-RiuLBP feature. \[H=\left[\overline{H}_{1}^{Z},\ldots,\overline{H}_{q}^{Z},\overline{H}_{1}^{ L},\ldots,\overline{H}_{q}^{L}\right],\ q=(P+2)\times\left(\frac{M}{b}\right)^{2}.\] (11)
3. The principal component analysis (PCA) is applied on the feature vector \(\mathbf{H}\) in order to obtain an effective perceptual feature; the process can be written as follows: \[H_{PCA}=\left[H^{\prime}{}_{1},\cdots,H^{\prime}{}_{m}\right]\ m<2q,\] (12)  
where \(m\) denotes the feature dimension after the dimension reduction, and where \(H^{\prime}{}_{i}\)\(i=1,\cdots,m\) are the principal components after the PCA feature reduction [39]. 1. A binary sequence of perceptual features \(\mathbf{V}\) is generated by mapping \(H_{PCA}\) onto the binary bits. \[V(i)=\left\{ \begin{array}{ll}1&\quad if\ H_{PCA}(i)\geq 0.5\\ 0&\quad else\end{array} \right.\ i=1,\ldots,m.\] (13)  
1.