## 4 Feature Extraction
### Local Phase Quantization (LPQ)  
Blurring in images can limit the analysis of texture information, and such degradation can happen for a number of reasons. Algorithms that enable image blur removal are computationally intensive and may introduce new artifacts, so algorithms that can analyze textures in a robust way are desired. [PERSON] and [PERSON] [3] proposed a texture descriptor insensitive to blur based on the quantized phase of the discrete Fourier transform, which is called Local Phase Quantization (LPQ). The information of the local phase of an image of size \(N\times N\) is given by the Short-Term Fourier Transform in Equation (1), being \(\Phi_{u_{i}}\) defined by the Equation (2), where \(r=(m-1)/2\) and \(u_{i}\) is a 2D frequency vector  
\[\hat{f}_{u_{i}}(x)=(f\times\Phi_{u_{i}})x, \tag{1}\]  
\[\Phi_{u_{i}}=e^{-j2\pi u_{i}^{T}y}|y|\in\mathbb{Z}^{2}||y||\infty\leq r. \tag{2}\]  
Only four complex coefficients are considered in LPQ, which correspond to the 2D frequency \(u_{1}=[a,0]^{T}\), \(u_{2}=[0,a]^{T}\), \(u_{3}=[a,a]^{T}\), \(u_{4}=[a,-a]^{T}\), where \(a=1/m\). The STFT (Equation (1)) is expressed using the vector described in Equation (3) with \(w_{u}\) being the STFT basis vector at a frequency \(u\) and \(f(x)\), a vector of size \(m^{2}\) containing the values of the image pixels in the \(m\times m\) neighborhood of \(x\). \[\hat{f}_{u_{i}}(x)=w_{u_{i}}^{T}f(x) \tag{3}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Abbreviation** & **Image Dimension** & **Number of Samples** \\ \hline Walker 256 tumor & TW & \(1024\times 768\) & 60 \\ Control & C & \(1024\times 768\) & 60 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Dataset characteristics. Figure 2: Liver microphotograph from the Walker 256 tumor group (TW). Here, \(F=[f(x_{1}),f(x_{2})...,f(x_{n^{2}})]\) is denoted as a matrix \(m^{2}\times N^{2}\) containing the neighborhood of all image pixels and \(w=[w_{R},w_{l}]^{T}\), where \(w_{R}=Re[w_{u_{1}},w_{u_{2}},w_{u_{3}},w_{u_{4}}]\) and \(w_{l}=Im[w_{u_{1}},w_{u_{2}},w_{u_{3}},w_{u_{4}}]\). \(Re[]\) and \(Im[]\) represent, respectively, the real and imaginary parts of a complex number, and the \((8\times N^{2})\) transformation matrix is given by \(\hat{F}=wF\). [PERSON] and [PERSON] [3] assume that the function \(f(x)\) of an image is the result of the first-order Markov process, where the correlation coefficient between two pixels \(x_{i}\) and \(x_{j}\) is exponentially related to their \(L^{2}\) distance. The vector \(f\) is defined by a covariance matrix of size \(m^{2}\times m^{2}\) according to the Equation (4), and the covariance matrix of the Fourier coefficients can be obtained by \(D=wCw^{T}\). As long as \(D\) is not a diagonal matrix, the coefficients are correlated and may become not correlated through \(E=V^{T}\hat{F}\), where \(V\) is an orthogonal matrix derivative from the singular value decomposition (SVD) of a matrix D, which is \(D^{\prime}=V^{T}DV\). \[C_{i,j}=o^{||x_{i}-x_{j}||} \tag{4}\]  
The coefficients are quantized using Equation (5), in which \(e_{ij}\) are components of \(E\). The coefficients are represented as integer values between 0 and 255 using the binary code obtained from Equation (6). At last, a histogram of these integer values from all images positions is used to make a 256-dimensional feature vector used for classification. The pseudocode for LPQ is described in Algorithm 1. \[q_{i,j}=\left\{ \begin{array}{ll}1,&\text{if }e_{i,j}\geq 0,\\ 0,&\text{otherwise.}\end{array} \right. \tag{5}\]  
\[b_{j}=\sum_{i=0}^{7}q_{i,j}2^{j} \tag{6}\]  
```
Input:\(img\): Color image under the RGB color space model, \(m\): defines a sized \(m\times m\) neighborhood size of the Short-Term Fourier Transform Output:\(H\): A 256-dimensional feature vector.