## 1.

## Introduction

Texture features play an important role in several image-processing applications ranging from computer vision and medical image processing to remote sensing and content-based image retrieval. Almost all the texture processing applications require rotation invariance in the texture features, which we achieve here in a very simple and cost-effective manner. Reference 1 categorizes the wide range of texture features proposed to date into two broad categories and compares them: features that use a large bank of filters or wavelets and features that use immediate pixel neighborhood properties. It shows that the latter outperforms the former. Hence, we take on improving a feature set from the latter category. In Ref. 2, texture features are extracted using a 1-D discrete Fourier transform (DFT) of the circular neighborhood around a pixel. It proposes computing a 1-D DFT of the
$8\text{-}\text{pixel}$
sequence around each image pixel and uses magnitudes of the DFT coefficients to extract texture features. More recent work^{3} extracts similar texture features from the square neighborhood and calls it a local Fourier histogram (LFH)-based feature set. The LFH-based feature set was shown to perform better than the texture features extracted from a large filter bank of Gabor filters,^{4} which are computationally more expensive than the LFH-based features. In this work, we augment the LFH-based feature set by using the phases of the DFT coefficients as texture features as well. However, the improvement suggested herein equally applies to the texture features extracted from the circular neighborhood.^{2} Since the phases are sensitive to image rotation, we also present a method to make them rotation invariant. This does not cause any additional computational cost, but does improve performance.

The following sections explain how the LFH-based features are extracted, how the local image gradient angle is determined from the features themselves, and how the image gradient angle is used to compensate the features against rotation. Results are presented before concluding the paper.

## 2.

## Method of Extracting DFT-Based Texture Features

The texture features proposed in Ref. 3 are extracted in the spatial domain by taking a 1-D DFT of the $8\text{-}\text{pixel}$ sequence ${x}_{0}$ through ${x}_{7}$ , hereafter called $x$ , around a central pixel as shown in Fig. 1 . We use the local image gradient at the central pixel to compensate the extracted features for the effects of image rotation.

When moving a $3\times 3\phantom{\rule{0.3em}{0ex}}\text{pixel}$ window across a texture image, the 1-D DFT of $x$ is computed as

## Eq. 1

$${X}_{k}=\sum _{n=0}^{7}{x}_{n}\phantom{\rule{0.2em}{0ex}}\mathrm{exp}(-\frac{\pi i}{4}kn),$$The phases of the DFT coefficients ${X}_{1}$ through ${X}_{3}$ were also proposed as features in Ref. 3 but only for those applications that do not deal with image rotation. The phase features were otherwise excluded because, unlike magnitudes, the phases of the DFT coefficients are sensitive to image rotation. Reference 2 also proposes only magnitudes of the DFT coefficients as texture features. We propose using the histograms of phases of ${X}_{2}$ and ${X}_{3}$ after appropriately compensating with the local image gradient.

## 2.1.

### Local Image Gradient

Traditionally, as a good compromise between cost and accuracy, the $3\times 3\text{-}\text{pixel}$ edge-detection operators such as the Sobel (SO) and Prewitt operators (PO)are often used to estimate local image gradient at a given pixel. Below are the general $3\times 3$ edge-detection operators in which the value of $b$ varies from 1, as in the PO, to 2, as in the SO:

## Eq. 2

$${S}_{X}=\left[\begin{array}{ccc}-1& 0& 1\\ -b& 0& b\\ -1& 0& 1\end{array}\right],\phantom{\rule{1em}{0ex}}{S}_{Y}=\left[\begin{array}{ccc}-1& -b& -1\\ 0& 0& 0\\ 1& b& 1\end{array}\right],$$^{2}with the $3\times 3\text{-}\text{pixel}$ neighborhood of Fig. 1 gives ${G}_{Y}$ and ${G}_{X}$ , which are substituted in Eq.

^{3}giving

## Eq. 4

$$\mathrm{tan}\phantom{\rule{0.2em}{0ex}}\delta =\frac{-{x}_{1}-b{x}_{2}-{x}_{3}+{x}_{5}+b{x}_{6}+{x}_{7}}{b{x}_{0}+{x}_{1}-{x}_{3}-b{x}_{4}-{x}_{5}+{x}_{7}}.$$^{1}gives

## Eq. 5

$$\mathrm{tan}\angle {X}_{1}=\frac{-{x}_{1}-\sqrt{2}{x}_{2}-{x}_{3}+{x}_{5}+\sqrt{2}{x}_{6}+{x}_{7}}{\sqrt{2}{x}_{0}+{x}_{1}-{x}_{3}-\sqrt{2}{x}_{4}-{x}_{5}+{x}_{7}}.$$Equations ^{4, 5} happen to be exactly the same if
$b=\sqrt{2}$
and they are very similar otherwise, because the value
$\sqrt{2}$
falls between the usual values of 1 and 2. For instance, the histograms of the local image-gradient angle from
$\angle {X}_{1}$
and from the SO
$(b=2$
) for image D87 of the Brodatz album (BA) have a cross-correlation coefficient (XCC) of 0.97. In addition, if we consider the
$\angle {X}_{1}$
image as a noisy version of the SO-driven image, the signal-to-noise ratio (SNR) is
$69\phantom{\rule{0.3em}{0ex}}\mathrm{dB}$
, verifying that the former is a very close approximation of the latter. All other images of the album were tested, and more or less similar values of correlation coefficient and SNR were found between the two approximations of the image gradient. Hence, instead of computing the local image-gradient angle using any 2-D edge-detection operators, we use the value
$\angle {X}_{1}$
to compensate the phases of the two other DFT coefficients, i.e.,
$\angle {X}_{2}$
and
$\angle {X}_{3}$
, against the effects of image rotation. It can now be said that
$\delta =\angle {X}_{1}$
.

## 2.2.

### Effects of Image Rotation on Fourier Coefficients

Consider that an image is rotated by an arbitrary angle, with the center of rotation exactly in the middle of the image. The angle of rotation at any other point
${P}_{xy}$
on the image would be different from what it is at the center of rotation. Let the angle of rotation be
$\psi $
deg at point
${P}_{00}$
(see Fig. 1), corresponding to a shift in the string
$x$
by
$m$
places. This shift in
$x$
causes nothing but the changes in the phases of the resulting DFT coefficients. Equation ^{6} states the shift property of DFT:

## Eq. 6

$$F{\left[\left({x}_{n-m}\right)\right]}_{k}=F{\left[\left({x}_{n}\right)\right]}_{k}\phantom{\rule{0.2em}{0ex}}\mathrm{exp}(-\frac{\pi i}{4}km),$$^{6}shows that any displacement in time or space domain causes a phase shift given byin the Fourier domain: hence, where $\Delta {\theta}_{k}$ represents the shift in $\angle {X}_{k}$ . The phase shift in $\angle {X}_{1}$ is given byIntuitively, the change in the local image-gradient angle $\delta $ is equal to the angle of rotation at point ${P}_{00}$ $\left(\psi \right)$ that causes equal change in $\angle {X}_{1}$ . Comparing Eqs.

^{7, 8}gives the phase shift in $\angle {X}_{k}$ asTherefore, the phases $\angle {X}_{2}$ and $\angle {X}_{3}$ are adjusted accordingly against the rotation by subtracting the local image-gradient angle $\delta $ as in Eq.

^{10}. For $k\u220a\{2,3\}$ ,where ${\varphi}_{k}$ represents the rotation-compensated phase $\angle {X}_{k}$ , and $\angle {X}_{1}$ replaces $\delta $ .

## 3.

## Experimental Results

## 3.1.

### Rotation Invariance of the Phase Features

All the images from the BA were rotated to 30, 45, 60, and $90\phantom{\rule{0.3em}{0ex}}\mathrm{deg}$ , and histograms of ${\varphi}_{2}$ and ${\varphi}_{3}$ were computed at each orientation. Table 1 shows the XCC as a similarity measurement between the histograms corresponding to $0\phantom{\rule{0.3em}{0ex}}\mathrm{deg}$ and to 30, 45, 60, and $90\phantom{\rule{0.3em}{0ex}}\mathrm{deg}$ averaged over all the images from the BA. As an example, Figs. 2 and 3 show the histograms of ${\varphi}_{2}$ and ${\varphi}_{3}$ , respectively, for the image D87 from BA. All the histograms appear the same and do not exhibit any left or right shift, indicating that the two phases are highly rotation invariant. We also experimented with the features extracted from the circular neighborhood suggested in Ref. 2 and found that they perform worse than those extracted from the square neighborhood.

## Table 1

XCC between the histograms of ϕ2 and ϕ3 , respectively, corresponding to images oriented at 0deg and to those at 30, 45, 60, and 90deg averaged over all the images from the Brodatz album.

Orientation (deg) | Cross correlation coefficient | ||||
---|---|---|---|---|---|

30 | 45 | 60 | 90 | ||

Phase feature | ${\varphi}_{2}$ | 0.979 | 0.988 | 0.984 | 0.987 |

${\varphi}_{3}$ | 0.918 | 0.907 | 0.923 | 0.997 |

## 3.2.

### Texture Recognition

Each of the 107 texture images from the BA was oriented at 0, 30, 45, 60, and
$90\phantom{\rule{0.3em}{0ex}}\mathrm{deg}$
. Then, 16 subimages measuring
$128\times 128\phantom{\rule{0.3em}{0ex}}\text{pixels}$
were cropped from each one of the
$107\times 5$
images, giving a total of 8560 images.^{4} Recognition was performed on this set using the LFH-based feature set without phase features, with phase features, and with texture features based on 30 Gabor filters.^{4, 5} Reference 6 is a more recent work that proposes exactly the same filters but with a new distance metric that cannot be used for rotation-invariant recognition or retrieval. Table 2
presents the overall and orientation-wise texture recognition results, showing that the LFH-based features with phases perform the best in terms of accuracy and the rotation variance (RV).^{4}

## Table 2

Recognition rates relative to Orientation with 8560 Brodatz images.

Orientation (deg) | % Accuracy | |||||||
---|---|---|---|---|---|---|---|---|

0 | 30 | 45 | 60 | 90 | Avg. | RV | ||

Feature set | LFT without $\varphi $ | 71.6 | 68.5 | 68.5 | 68.3 | 72.4 | 69.9 | 2.82 |

LFT with $\varphi $ | 76.2 | 73.3 | 74.9 | 74.2 | 74.2 | 74.6 | 1.52 | |

Gabor | 68.8 | 65.7 | 62.8 | 64.4 | 69.4 | 66.2 | 4.27 |

## 4.

## Effect of Noise

Reference 4 found that the LFT-based texture features exhibit les noise immunity than the features based on Gabor filters. However, our latest results show that the LFT-based features perform even better when extracted from images quantized to only 32 gray levels. Considering this, we expect the proposed features to be more noise resistant than these were without image-quantization as in Ref. 4.

## 5.

## Conclusion

The earlier feature set based on LFH does not use phases of the DFT coefficients as texture features because the phases are sensitive to image orientation. To introduce rotation invariance in the features, we showed that the process of extracting phase features can be guided by the local image gradient. This was achieved by simply subtracting the local image-gradient angle obtained from the 1-D DFT itself, so that the features become self-compensating. This computationally simple and cost-effective method proved useful in making the LFH-based texture features robust against image rotation. The new feature set including the phase features exhibits more rotation invariance and yields higher recognition rates than the one without phase features.

## references

**,” 691 –698 (2003). Google Scholar**

*Texture classification: are filter banks necessary?***,” IEE Proc. Vision Image Signal Process., 145 167 –172 (1998). https://doi.org/10.1049/ip-vis:19981915 Google Scholar**

*Circular neighborhood and 1-D DFT features for texture classification and segmentation***,” 610 –613 (2001). Google Scholar**

*Texture feature based on local fourier transform***,” 67 –72 (2007). Google Scholar**

*Texture features based on Fourier transform and Gabor filters: an empirical comparison***,” IEEE Trans. Pattern Anal. Mach. Intell., 18 (8), 837 –842 (1996). https://doi.org/10.1109/34.531803 Google Scholar**

*Texture features for browsing and retrieval of image data***,” Signal Process. Image Commun., 16 33 –43 (2000). https://doi.org/10.1016/S0923-5965(00)00016-3 Google Scholar**

*A texture descriptor for browsing and similarity retrieval*