Multi-features fusion classification method for texture image

: Aiming at the problem of poor classification and recognition rate for distorted texture image based on single texture feature, a classification method of texture image based on multi-features fusion is proposed. First, the corresponding GLCM features, HOG features, and HU moment features were extracted from the segmented texture images. Then, the three feature matrices were cascaded into a new feature matrix, and the principal component analysis method was used to reduce the dimension of the new feature matrix. Finally, the fused feature matrix was inputted to the support vector machine (SVM) for training, so that the final discriminant model was obtained. The model is applied to the classification of distorted texture images and compared with the single texture feature classification method through experiment. The results show that the multi-features fusion classification method improves the classification accuracy of distorted texture images and has better real-time performance.


Introduction
Texture analysis and texture feature extraction of image have been the active field of image processing. The extraction of representative texture feature is the key to describing the texture image, which directly affects the accuracy of subsequent classification [1].
Researchers have proposed many different methods of texture feature extraction to describe the texture information of images, including grey-level co-occurrence matrix (GLCM) [2], Markov random field (MRF) model [3], discrete wavelet transform (DWT) [4], local binary pattern (LBP) algorithm [5]and so on. As a single texture feature cannot fully represent the texture information, the feature fusion method is proposed. The fusion algorithm of Gabor filter [6] and GLCM was proposed by Clausi [7] to extract the texture information at low, middle, and high frequencies simultaneously, which improved the ability of feature space separation. The fusion algorithm of multi-scale GLCM and semivariogram method [8] was proposed by Acqua [9], which combined multi-scale analysis and variogram to better reflect the texture features of radar images. An improved texture descriptor called ILBP (Improve LBP) was proposed by Xu Shao-Ping [10], which combined the advantages of LBP and GLCM to improve the ability of describing regional features of images effectively. There are the problems of the noise pollution, and uneven illumination in the process of filming, which cause inevitably the distortion and degradation of the image [11], and affect the classification of the texture image.
A classification method based on multi-features fusion is proposed to solve the above problem. The classifier uses a support vector machine (SVM), which has the advantages to classify the data quickly and the strong ability to suppress the noise [12], and can achieve classification for distorted texture images better.

Image segmentation
In order to extract the texture features of the target image better, the target image needs to be segmented from the background. The segmentation method based on threshold is used, which includes boundary detection and rotating segmentation.

Boundary detection
In order to segment the target image from the background, the boundary of the target image is first obtained. Threshold-based segmentation methods require grayscale processing of the image, because grayscale image contains only one component and does not lose any texture information of the image so that it is more convenient to handle. The mean value method is adopted for image grayscale. The formula is as follows.
The image collected is greatly influenced by the external light. If the fixed threshold is used to detect the boundary of the grey image, the external light changes will have an influence on the segmentation effect. The dynamic threshold method was used here, which can be used to find the threshold in real time to detect the boundary contour.

Rotating segmentation
The bounding matrix of the boundary contour was obtained by means of boundary contour detection of the target image. According to the angle between the right boundary line and the vertical direction, the transformation matrix was obtained, and the image was rotated by the affine transformation. Affine transformation refers to the process of transforming that a vector space with a linear transformation and a translation into another vector space in geometry without losing any valid information in the image. Its expression is as follows.
x, y, 1 = v, w, 1 T = v, w, 1 where the x, y is the pixel coordinate of the transformed image, and the v, w is the pixel coordinate of the image before transformation.
The image can be rotated by the transforming matrix. With the contour extraction of the rotating image, the image in the contour can be segmented into an independent image for subsequent image classification.

Texture feature extraction
Feature extraction is the most critical step in the detection of texture image classification. In order to describe the features of distorted texture images better, the GLCM feature, HOG feature, and HU moment feature of the segmented texture images were extracted simultaneously.

GLCM feature extraction
GLCM obtains the co-occurrence matrix by calculating the corresponding grey-level images, and the eigenvalues are calculated by the co-occurrence matrix to represent the texture information contained in the images. The grey-level co-occurrence matrix can reflect the overall information of the image greyscale in all directions, adjacent intervals, and amplitude changes. Let f(x, y) is an image of M × N (in pixels) and Ng is its grey level, then the grey-level co-occurrence matrix which matches the specific relationship in space, can be expressed as The C represents the number of elements in the set, and the P is a matrix of size Ng × Ng. If the distance between (x1, y1) and (x2, y2) is d and the angle with the horizontal coordinate for θ, the grey-level cooccurrence matrix P(i, j, d, θ) with different intervals and angles can be obtained.
In order to describe the texture condition more intuitively, the four kinds of statistics, namely contrast, entropy, energy, and deficit moment, were obtained by the grey symbiosis matrix. It is recorded as f1, f2, f3, and f4, respectively. The calculation formula is as follows.

HOG feature extraction
Histogram of oriented gradient (HOG) is a feature descriptor based on a local area, and it is based on the calculation of the image that has been zoned. The principle of division is to form a unified small areas with the same size called cell unit, and these areas are connected together without intervals. In order to reduce the interference of light and so on, the normalised technique of block is also used for reducing the reference. The HOG algorithm divides the different gradient directions from 0° to 360° into nine sections, and then the images are divided into several blocks (16 × 16), each block is reconstructed into four cells (8 × 8). For each cell, the gradient direction and modulus of each pixel are calculated. Finally, the gradient histograms of N cells were combined into a high-dimensional vector.
The gradient of the pixel point of (x, y) in the image are as follows.
where the Gx(x, y), Gy(x, y), and H(x, y) represent the horizontal gradient, the vertical gradient, and the pixel value of the pixel located at (x, y) in the image, respectively. The gradient magnitude and gradient direction at pixel (x, y) are as follows, α(x, y) = tan −1 (Gy(x, y)/Gx(x, y)) (10)

HU moment feature extraction
The collected texture image may be rotated or scaled relative to the template image, which can affect the accuracy of the classification. The HU moment feature has in-variance in rotation and scaling. Assuming that f (x, y) is a two-dimensional image, then its (p + q) order ordinary moments and central moments are calculated as follows.
In order to obtain the invariable nature of image scaling, the centre moment can be normalised with the zero-order central moment, the normalisation centre is defined as follows.
It is proved that when the image changes in proportion, the normalised central moment becomes as follows.
where the ρ is the scaling factor. So the calculation method of the normalised centre moment is as follows.
At the same time, the formula for calculating the moments of each order can be simplified, as shown below.
The seven invariant moments M1-M7 can be calculated by central moments, but the fluctuation range of the seven invariant moments is large, and it is inconvenient to compare. The fluctuation range of invariant moments can be reduced by formula (17).

Multi-features fusion strategy
The principal component analysis (PCA) [13] was used to realise the multi-features fusion of texture images here. The normalisation of the extracted feature matrices before fusion can effectively improve the learning speed of the classifier.

Feature normalisation
As of the variables with larger variance play a greater role in the overall variance. The variables with large variances in the principal component analysis are prioritised, and this will remove some representative features and affect the accuracy of classification. So before the fusion, the feature should be normalised to make it more convenience to analysis and calculate [14]. The normalised formula is shown in formula (18).
where the μ and σ are the mean and variance of the feature vector, respectively.

Feature fusion based on PCA
The normalised matrix also has a large dimension and contains a lot of redundant information, which can cause the performance of the classifier to be worse. In order to extract fewer dimensions and representative features, the features of normalisation were analysed by principal component analysis. The specific steps are as follows. After the processing by PCA, the feature vector becomes a lowdimensional vector, and the feature recognition rate is the highest at 20 dimensions. Fig. 1 shows the classification accuracy in different dimensions of the method used here after PCA processing.

Image segmentation
Three different textured tiles were selected and 20 samples of each tile image were taken. A total of 60 images were used for training. Another 40 random texture images were taken as test sets to verify the classification accuracy of distorted texture images. These tiles have different levels of distortion. Take three samples of each tile in the training sample are shown as Fig. 2.
The original image must be segmented from the background, which includes five steps: obtaining the original image, greying the image, threshold dynamic, the affine transformation, and cutting the image. The resulting image for each step is shown in Fig. 3.

Extraction of GLCM features:
The four parameters of energy, entropy, contrast, and inverse moment were calculated at 0 degree, 45 degree, 90 degree, and 135 degree, respectively. There were 16 values in total. The experimental results show that the four eigenvalues extracted from the LBP image were better than the four eigenvalues extracted from the original image. The original image and LBP image are shown in Fig. 4.
The GLCM eigenvalues of six LBP images in horizontal direction are shown in Table 1.

Extraction of HOG feature:
In HOG of OpenCv, the detection window is 64 × 64 pixels, and the horizontal and vertical sliding steps are eight pixels. The block size is 16 × 16 pixels, and the cell size is specified as 8 × 8 pixels. The gradient histogram of nine directions in each cell is calculated. By the analysis of knowledge, a detection window has 49 blocks, each block consists of four cells, and each cell is a nine-dimensional vector, so a HOG descriptor vector is 1764 dimensions. The result images are shown in Fig. 5.

Extraction of HU moment feature:
On the basis of normalisation, the seven invariant moments are invariable in rotation and scaling, and they are input to the SVM as another feature of the texture image. Each class of tile image takes two samples. The experiment obtains seven invariant moments data of six images are shown in Table 2.

Analysis of experimental results
In order to illustrate the effect of feature fusion better, three groups of contrast experiments were designed. The multi-features' fusion method proposed here was compared with two mainstream feature operators of LBP and GLCM. All the images in the experiment were unified as 64 × 64 pixels by using bi-linear interpolation. The experimental result of image is showed in Fig. 6. The comparison of the method used here with the LBP and GLCM feature operators in feature extraction time and recognition rate is shown as Table 3.     From the comparison of Table 3, the multi-features' fusion method was shorter than LBP feature in the time of extraction, slightly longer than the GLCM feature, and the method used here was higher than the other two mainstream operators in the recognition rate.

Conclusion
A multi-features' fusion method for distorted texture image classification was designed to solve the problem of poor recognition rate of distorted texture image. For the problem of the gradient of the texture image relative to the background, the method of dynamic threshold and affine transformation was used to realise image correction. In order to describe distorted texture images better, the HOG features, HU moment features, and GLCM features of LBP images were extracted simultaneously. In order to reduce the amount of computation, the PCA was applied to reduce the dimension of the extracted features. Of course, there are no a large number of samples be trained to enhance the robustness of the system. Therefore, further research and improvement are needed in the future.

Acknowledgments
This work is supported partly by National Natural Science Foundation of China under Grant No.5160411.