1 Introduction
Texture although its difficulty of definition by the scientific community [1]
have been proved as an important source of information for pattern recognition
[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]. In a classical recognition approach, images are first converted to a numerical vector that represent them with reduced dimensionality (the feature extraction step). Then, and artificial intelligence methods are used to compare, separate vectors and label images. However, if those unidimensional representations are not adequate, classification rates are low. Nevertheless, these bad representations affects not only classification but also segmentation and synthesis that also rely on this information.
Therefore, feature extraction is a crucial step to create robust classification and must be performed wisely. For this reason, different methods were developed along the years to describe images based on different approaches such as its structure, statistics, complexity and spectrum [13].
LBP [8], for instance, is one of the examples from statistical category. It is a local descriptor that uses windowed information to compute a histogram of patterns. Given the popularity of this method, extensions of it have been proposed such as LBPV [7]. This later algorithm adds contrast information of the image to improve the classical approach. The method proposed in [11] uses the LBP along with fractal dimension analysis as a way to extract texture features. Also, another example of this category, the GLCM [3] extract features from the cooccurrence matrix calculated by analyzes of neighboring pixels in an image.
A different approach proposed in [14] where images are modeled as complex networks and features are extracted based on random walks on the graph. In [15], the authors use cellular automatta to corrode the image and extract feature from the tesselation. Also, fractal dimension have been proved as an important way to analyze texture as shown in [16, 17, 18, 19]
However, if the data is not good enough, these methods may not be able to work properly. One of the reasons for bad representation is that usually feature extraction methods depend on good quality images where important feature are clear. Unfortunately, real dataset suffers by many types of influences that input some difficulty to recognition. Those problems occur due to presence of different scales in intraclass images, illumination changes, bad quality cameras, noise, among others.
Thus, to reduce these artifacts, one can preprocess original images aiming to enhance certain properties that are relevant to characterize the scene. In the literature, there are many filters proposed to reduce noise and improve image quality such as unsharp masks, Gaussian filters, image normalization, among others [20].
Nowadays, still few researches pay attention on the importance of this approach showing a lack of number of proposals in this area [21, 22, 23]. Therefore, in order to fill this gap and to analyze the complexity of the surface, this paper uses the distance transform to produce different images and combine these images with original ones to extract feature. Distance transform is commonly used for tasks such skeletonization, cluster analyzes, morphological operations [24], segmentation [25], robotics [26], among others. However, it will be used in this research as an intermediate step between original dataset and feature extraction.
Euclidean distance was chosen due to its ability to expand the image by calculating the distance to all nonimage pixels to the surface keeping only stronger characteristics of the image as distance grows. Also, It can be roughly compared to multiscale analysis given its intrinsic feature of creating a image with different resolutions of the original one. Therefore, the goal is to create a set of images that shows the complexity of each group of gray level and use them to improve representation. Experiments are evaluated in four texture datasets: Brodatz, Outex, Vistex and Usptex and shows an advantage in results of proposed technique compared with the use of six feature extraction methods applied on the original dataset.
This paper is organized as follows: Section 2 explains the preprocessing method used to improve the six descriptors, also briefly described in the section. Then, Section 3 illustrates how the proposed method works, explaining the combination of images, feature extraction methods and texture classification. Finally, Sections 4 and 5 the results and conclusions of the work are presented respectively.
2 Related Methods
The main method to be explained in this paper is the distance transform algorithm. Also, six feature extraction methods will be combined with these new images to check if does unions improve or not image representation.
2.1 Euclidean Distance Transform (EDT)
The definition of distance transform algorithm is very simple yet complicated. It finds the minimum distance of background pixels to a region of interest [27]. The distance can be chosen according to the application but most of tasks use the Euclidean metric and it is the one used in this proposal. Euclidean distance of two pixels p and q is defined as:
(1) 
Usually, for binary images, region of interest are white pixels (1) while background pixels are valued as 0, then distance pixel p is then computed as:
(2) 
where function returns the minimum distance of pixel at position p to a set of foreground pixels F.
Finally, the simple definition disappears when one think about the computational cost of calculating all distances to find the minimum one. For a simple image with size , a brute force algorithm must calculate the distance of a pixel to all foreground pixels to find the closest one. This approach would add to much time for a preprocessing step but fortunately many authors have proposed alternatives to reduce computational cost. The method proposed in [28], used in this paper, works faster reducing the dimension constructing a partial Voronoi diagram, the algorithm is proved linear according to the number of pixels in the image.
Finally, to illustrate the transform, Figure 1 shows an example of distance transform applied in a binary image. If we analyze pixels with the same distance in resulted image, it is possible to see that the approach dilates the initial surface and important features are maintained as long as distance grows. Therefore, the transformation enhances the complexity of objects in digitalized scene which can beneficiate feature extraction methods.
2.2 Feature Extraction
The goal of this proposal is to improve feature extraction. Therefore, six different methods were chosen to test the approach and check whether the addition of a transformed image improved or not the representation of images considering each descriptor. This section will briefly describe each of the methods used in the paper and its parameters.

Local Binary Pattern (LBP):
The simple but powerful descriptor analyses the image based on local patterns [8]. These patterns are obtained thresholding a window by its central pixel. When all pixels are used as central ones, MxN (size of the input image) pattern values are obtained and finally feature vector as the histogram of these patterns. The method requires two parameters to compute within a window: the radius and number of neighbors . In this paper, we used the basic approach with r = 1 and P = 8.

Local Binary Pattern Variance
(LBPV):A variation of basic LBP is the rotation invariant local pattern descriptor represented by [29]. In this method, patterns that only contains two transitions from one to zero or zero to one and codes that only differ by rotation of bits are computed as the same, reducing the number of patterns. Then, a new method included the calculus of local variance to add contrast information to [7]. The measure is used to input weight for each pattern and finally feature vector LBPV is computed as:
(3) where K is the maximum grayscale level of the image, M and N are the number of rows and columns respectively and parameters P and r are set as the same of LBP, 8 and 1 respectively.

Gray Level Difference Matrix (GLDM):
GLDM first calculates a difference image, , according to the equation:
(4) where f is the input image x, y are positions in image f with 1 x M and 1 y
N (M and N are image dimensions). Then, a feature vector is computed by the concatenation of contrast, angular second moment, entropy and mean calculated from the probability function of
[30]. Also, and , parameters of the method, are set as {(1,1),(2,2), (5,5)} for the experiments. 
Gray Level Cooccurrence Matrix (GLCM):
This statistical method computes the frequency between neighboring pixels [3]. In a cooccurrence matrix each position (p,q) represents the frequency that two pixels p and q separated by a distance and angle appears in the original image. These two arguments are parameters of the method are converted to displacements in the image as and used as = = {0,1,1,2,2} in this paper. Then, correlation, energy, contrast and homogeneity are computed from cooccurrence matrix and concatenated to represent the image.

Fourier Descriptor:
Fourier transform changes the domain of the image f from spatial to frequency domain (represented by F) [31]. Therefore, features are taken from analyses of the spectrum and there are two main types of attributes that can be extracted: energy from circular rings Ea and energy from circular sections Eb [32]:
(5) (6) where and are polar coordinates of frequency domain. Also, 1 i r and 1 j N with r and N related to radius and orientations to delimit regions and used as 4 and 7 respectively in this paper. Energies of each region are used as characteristics of the image.

Gabor Descriptor:
When Fourier is used, spatial information is lost. Then, Gabor filters are a way to overcome this problem due to its combination of spatial and spectrum analyses [10]. It first creates a bank of filters to represent a variety of features which are convolved with the image. Energy function is calculated from responses of each region in the image to these patterns and used as features. In this paper, filters are created according to 8 scales and 5 orientations.
3 Proposed Method
The goal of this work is to enhance characteristics of the original dataset enabling feature extraction methods to work better finding peculiarities of the scene to create robust representations. As said before, there are many ways to transform an image to improve its features. However, in this paper, binary distance transform is applied on original dataset to create a set of new enhanced images which can be used later to improve representation.
Images from texture datasets are in grayscale. Thus, a binarization must be performed to transform them from grayscale to logical images. To reach this, for each iteration a binarization is done on image I of the dataset according to the following equation:
(7) 
Then, for each logical image binary EDT is applied:
(8) 
Finally, both distance image , output from iteration and original images are converted to feature vectors and respectively by descriptor . These vectors jointed are used to classify images. Therefore, for each experiment recognition rates are obtained using instead of only the original image, the addition of information from distance image . Our approach analyses which one of these iterations input most relevant characteristics to improve feature extraction.
In this work, six different descriptors described in Section 2.2
are used along two classifiers to obtain a quantitative measure for the approach: KNN (k = 1) and Naive Bayes. Moreover, in experiments 150 binarizations are performed (
= 150 and 1 i 150) meaning that for each combination, one descriptor and one classifier, 150 texture recognition are achieved4 Results
With the amount of results obtained (150 for each combination) it is impractical show all rates in this paper. Therefore, in result tables only the best iteration is showed. Also, to test the approach four dataset are used: Outex (1360 images in 68 classes) [33], Usptex (2292 images in 191 classes) [34], Vistex (864 images in 54 classes) [35] and Brodatz (1110 images in 111 classes) [36]. First three datasets contain images of size 128x128 with a variety of textures including differences in scales, illumination and view point. For these datasets, original images are colored but converted to grayscale to the experiments. Brodatz, otherwise, is a grayscale dataset with size 200x200 and no variations in scale, illumination and view point.
These datasets are very common for texture recognition and each one of them contains their own characteristics that somehow makes texture classification complex. Therefore, results table (Tables 1, 2,3, 4) are separated by dataset and we can see which combination works better for each set of images.
Overall, our proposed showed higher results in comparison to traditional approach. Although some results are lower compared to descriptors applied in the original dataset, it only happens for some combinations showing that binary EDT should not be used as a preprocessing method for GLDM, GLCM and LBPV. The last two combinations can be performed when Naive Bayes is used where gains in texture classification are noticed with our approach.
Also, it is important to emphasize that to consider if the combination is bad, it is necessary to analyze the results according to each set. For Outex (Table 1), for instance, the addition of one transformed image improved all feature descriptors for both classification methods. The results for Gabor filters was increased in up to 10.15% with this new approach. Furthermore, the best recognition rate for Outex was reached when the distance image of iteration 67 was combined to improve representation of LBP. While traditional approach had a success rate of 80.81%, the proposed obtained 83.24% considering same parameters and classifier.
Outex Dataset  

KNN, k = 1  Naive Bayes  
best  best  
LBP  72.50 (2.48)    80.81 (3.47)   
EDT + LBP  79.63 (2.58)  57  83.24 (3.78)  67 
LBPV  75.59 (4.20)    59.26 (4.13)   
EDT + LBPV  78.46 (3.80)  51  69.56 (3.75)  58 
GLCM  72.72 (5.19)    62.35 (4.63)   
EDT+ GLCM  72.72 (5.19)  1  73.09 (2.85)  58 
GLDM  74.04 (3.72)    59.19 (4.72)   
EDT+ GLDM  79.85 (2.10)  57  72.72 (3.63)  6 
Fourier  68.75 (2.76)    56.62 (3.70)   
EDT + Fourier  72.65 (3.29)  69  65.74 (2.92)  56 
Gabor  72.06 (2.11)    65.22 (2.48)   
EDT + Gabor  78.09 (3.75)  51  75.37 (3.40)  56 
For Brodatz (Table 2), the simplest dataset, the best result was also obtained by a combination of our approach with LBP reaching a new success rate of 96.58%. In this case, only the combination with EDT plus GLCM and EDT plus GLDM (by KNN) were lower compared to classical approach. GLDM was improved in 6.59% and GLCM in 4.24% when Naive Bayes is used instead of the lazy classifier.
Brodatz Dataset  

KNN, k = 1  Naive Bayes  
best  best  
LBP  93.96(1.70)    95.05(1.60)   
EDT + LBP  96.49 (0.85)  91  96.58 (1.59)  132 
LBPV  94.23(1.76)    91.26(2.72)   
EDT + LBPV  93.42 (1.80)  126  91.62 (2.46)  89 
GLCM  90.00(2.77)    84.77(2.80)   
EDT + GLCM  88.65 (2.72)  76  89.01 (3.15)  70 
GLDM  90.36(2.04)    79.10(3.50)   
EDT + GLDM  87.57 (3.53)  77  85.86 (4.74)  89 
Fourier  85.32(2.40)    81.44(2.95)   
EDT + Fourier  86.67 (1.94)  136  83.33 (2.29)  128 
Gabor  90.90(2.10)    89.10(3.02)   
EDT + Gabor  92.43 (2.97)  148  91.89 (2.79)  89 
The smallest dataset, Vistex (Table 3), also had the best result with the combination of the preprocessing method plus LBP, a 97.93% (KNN) success rate. It can be perceived that it is best to use these combinations with Naive Bayes. In three combinations classified by KNN, the texture recognition is not improved (with LBPV, GLDM and GLCM), but for the same methods, classification is enhanced when Naive Bayes is used.
Vistex Dataset  

KNN, k = 1  Naive Bayes  
best  best  
LBP  94.21 (2.74)    95.49 (3.27)   
EDT + LBP  97.92 (2.20)  92  97.34 (2.29)  70 
LBPV  92.82 (3.14)    79.75 (4.33)   
EDT + LBPV  91.78 (4.74)  67  85.07 (3.70)  125 
GLCM  87.38 (3.56)    73.03 (5.14)   
EDT + GLCM  86.11 (5.41)  124  82.41 (3.36)  72 
GLDM  88.89 (2.84)    77.20 (4.46)  53 
EDT + GLDM  87.04 (5.61)  54  66.67 (5.64)   
Fourier  80.44 (3.60)    71.99 (3.09)   
EDT + Fourier  83.22 (2.77)  122  79.40 (4.35)  68 
Gabor  88.43 (1.93)    84.14 (3.40)   
EDT + Gabor  91.55 (2.60)  132  88.19 (2.69)  90 
For this dataset, Figure 4 shows the results for all iterations and relative success rates by Naive Bayes. From all plots it is possible to see that GLCM and GLDM are the most improved methods for this set. However, all methods are overall enhanced by this approach, especially in higher iterations.
Finally, the last and biggest dataset, Usptex was increased in up to 7.02%. Same analyses with which classifier is better to use in these combinations: Naive Bayes. Descriptors suffers a higher improvement when this classifier is associated. In addition, highest recognition rate is hit with LBP considering the use of iteration 134 to add robustness to representation. Results with KNN (k = 1) is increased in 6.93% going from 73.65% to 80.58%.
Usptex Dataset  

KNN, k = 1  Naive Bayes  
best  best  
LBP  73.65 (2.47)    78.71 (1.44)   
EDT + LBP  80.58 (2.09)  134  80.50 (2.93)  126 
LBPV  73.30 (3.62)    60.60 (1.76)   
EDT + LBPV  73.08 (3.57)  1  63.44 (3.37)  139 
GLCM  63.74 (4.23)    47.86 (3.23)   
EDT + GLCM  56.54 (3.24)  136  55.72 (3.02)  144 
GLDM  71.86 (1.90)    52.71 (2.57)   
EDT + GLDM  72.16 (2.04)  1  61.43 (3.51)  135 
Fourier  56.85 (3.23)    48.43 (2.98)   
EDT + Fourier  57.72 (2.73)  136  53.88 (2.79)  138 
Gabor  70.59 (2.71)    62.52 (2.85)   
EDT + Gabor  70.90 (2.83)  1  65.84 (2.83)  144 
Furthermore, it was observed that the iteration that added most representation for classification is very particular of each combination. Therefore, it is important to perform the preprocessing step to analyze this aspect. Since the preprocessing method is very fast (methods was implemented in Matlab) and gains are considerable, the increasing of cost in this proposal compared to traditional approach is minimal.
5 Conclusion
This paper proposed a combination of the original dataset with transformed images by binary euclidean distance transform. The method of preprocessing has two main steps: first, it thresholds the image according to a value and then distance transform is applied on these binary images. The main goal was check if the addition of a modified image increased feature extraction power of tested methods and to evaluate it, texture recognition was performed.
Also, four datasets were used and results shows that in general the addition of an image does improves texture recognition. For instance, Outex had an increase of 10.74% of classification in comparison with feature extraction by LBP applied only in the original dataset.
Among all feature extraction methods, the most benefited by the new proposal was GLCM (classified by Naive Bayes) as can be noticed in Figure 4 and tables of results. However, the method that reached the highest result for all datasets is the combination of binary distance transform and LBP.
Due to differences in dataset and the way that descriptors analyses images, this approach must be observed according to each dataset. However, as can be seen in results, most of the combinations improves all datasets. From this results, new descriptors and different methods can be tested to show the power of the addition of preprocessed images to empower feature extraction and consequently increase texture recognition.
Acknowledgments
The authors acknowledges support from CNPq (National Counsel of Technological and Scientific Development) (Grant Nos. 132409/20143, 307797/20147 and 484312/20138) and FAPESP (Grant No. 14/080261).
References

[1]
Mihran Tuceryan, Anil K Jain, et al.
Texture analysis.
Handbook of pattern recognition and computer vision
, 2:207–248, 1993.  [2] Jong Kook Kim and Hyun Wook Park. Statistical textural features for detection of microcalcifications in digitized mammograms. Medical Imaging, IEEE Transactions on, 18(3):231–238, 1999.
 [3] Robert M Haralick. Statistical and structural approaches to texture. Proceedings of the IEEE, 67(5):786–804, 1979.
 [4] Oscar GarcíaOlalla, Enrique Alegre, Laura FernándezRobles, and Víctor GonzálezCastro. Local oriented statistics information booster (losib) for texture classification. In 2014 22nd International Conference on Pattern Recognition (ICPR), pages 1114–1119. IEEE, 2014.
 [5] Alceu Ferraz Costa, Gabriel HumpireMamani, and Agma Juci Machado Traina. An efficient algorithm for fractal analysis of textures. In Graphics, Patterns and Images (SIBGRAPI), 2012 25th SIBGRAPI Conference on, pages 39–46. IEEE, 2012.
 [6] Zhenhua Guo, Lei Zhang, and David Zhang. A completed modeling of local binary pattern operator for texture classification. Image Processing, IEEE Transactions on, 19(6):1657–1663, 2010.
 [7] Zhenhua Guo, Lei Zhang, and David Zhang. Rotation invariant texture classification using lbp variance (lbpv) with global matching. Pattern recognition, 43(3):706–719, 2010.
 [8] Timo Ojala, Matti Pietikäinen, and Topi Mäenpää. Multiresolution grayscale and rotation invariant texture classification with local binary patterns. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 24(7):971–987, 2002.

[9]
Ludovic Journaux, MarieFrance Destain, Johel Miteran, Alexis Piron, and
Frederic Cointault.
Texture classification with generalized fourier descriptors in
dimensionality reduction context: An overview exploration.
In
Artificial Neural Networks in Pattern Recognition
, pages 280–291. Springer, 2008.  [10] John G Daugman. Complete discrete 2d gabor transforms by neural networks for image analysis and compression. Acoustics, Speech and Signal Processing, IEEE Transactions on, 36(7):1169–1179, 1988.
 [11] Joao B Florindo and Odemir M Bruno. Local fractal dimension and binary patterns in texture recognition. Pattern Recognition Letters, 78:22–27, 2016.
 [12] Marcos William da Silva Oliveira, Núbia Rosa da Silva, Antoine Manzanera, and Odemir Martinez Bruno. Feature extraction on local jet space for texture classification. Physica A: Statistical Mechanics and its Applications, 439:160–170, 2015.
 [13] Andrzej Materka, Michal Strzelecki, et al. Texture analysis methods–a review. Technical university of lodz, institute of electronics, COST B11 report, Brussels, pages 9–11, 1998.
 [14] Wesley Nunes Gonçalves, Núbia Rosa da Silva, Luciano da Fontoura Costa, and Odemir Martinez Bruno. Texture recognition based on diffusion in networks. Information Sciences, 364:51–71, 2016.
 [15] Núbia Rosa da Silva, Pieter Van der Weeën, Bernard De Baets, and Odemir Martinez Bruno. Improved texture image classification through the use of a corrosioninspired cellular automaton. Neurocomputing, 149:1560–1572, 2015.
 [16] João Batista Florindo and Odemir Martinez Bruno. Texture analysis by fractal descriptors over the wavelet domain using a best basis decomposition. Physica A: Statistical Mechanics and its Applications, 444:415–427, 2016.
 [17] João Batista Florindo and Odemir Martinez Bruno. Fractal descriptors based on fourier spectrum applied to texture analysis. Physica A: Statistical Mechanics and its Applications, 391(20):4909–4922, 2012.
 [18] João Batista Florindo, André Ricardo Backes, Mário de Castro, and Odemir Martinez Bruno. A comparative study on multiscale fractal dimension descriptors. Pattern Recognition Letters, 33(6):798–806, 2012.
 [19] João Batista Florindo and Odemir Martinez Bruno. Texture analysis by multiresolution fractal descriptors. Expert Systems with Applications, 40(10):4022–4028, 2013.
 [20] Rafael C Gonzalez and Richard E Woods. Digital image processing. Nueva Jersey, 2008.
 [21] Bruno Brandoli Machado, Dalcimar Casanova, Wesley Nunes Gonçalves, and Odemir Martinez Bruno. Partial differential equations and fractal analysis to plant leaf identification. In Journal of Physics: Conference Series, volume 410, page 012066. IOP Publishing, 2013.
 [22] Loris Nanni, Sheryl Brahnam, Stefano Ghidoni, and Emanuele Menegatti. Improving the descriptors extracted from the cooccurrence matrix using preprocessing approaches. Expert Systems With Applications, 42(22):8989–9000, 2015.
 [23] Michael Gadermayr and Andreas Uhl. Making texture descriptors invariant to blur. EURASIP journal on image and video processing, 2016(1):1–9, 2016.
 [24] Jim R Parker. Algorithms for image processing and computer vision. John Wiley & Sons, 2010.
 [25] Luc Vincent and Pierre Soille. Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE transactions on pattern analysis and machine intelligence, 13(6):583–598, 1991.
 [26] Yew Tuck Chin, Han Wang, Leng Phuan Tay, Hui Wang, and William YC Soh. Vision guided agv using distance transform. In Proceedings of the 32nd ISR (International Symposium on Robotics), volume 19, page 21. Citeseer, 2001.
 [27] Azriel Rosenfeld and John L Pfaltz. Distance functions on digital pictures. Pattern recognition, 1(1):33–61, 1968.
 [28] Calvin R Maurer Jr, Rensheng Qi, and Vijay Raghavan. A linear time algorithm for computing exact euclidean distance transforms of binary images in arbitrary dimensions. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 25(2):265–270, 2003.
 [29] Timo Ojala, Matti Pietikäinen, and Topi Mäenpää. Gray scale and rotation invariant texture classification with local binary patterns. In European Conference on Computer Vision, pages 404–420. Springer, 2000.
 [30] Joan S Weszka, Charles R Dyer, and Azriel Rosenfeld. A comparative study of texture measures for terrain classification. IEEE Transactions on Systems, Man, and Cybernetics, 4(SMC6):269–285, 1976.
 [31] Charles T Zahn and Ralph Z Roskies. Fourier descriptors for plane closed curves. IEEE Transactions on computers, 100(3):269–281, 1972.
 [32] Robert Azencott, JiaPing Wang, and Laurent Younes. Texture classification using windowed fourier filters. IEEE Transactions on Pattern Analysis and Machine Intelligence, 19(2):148–153, 1997.
 [33] Timo Ojala, Topi Maenpaa, Matti Pietikainen, Jaakko Viertola, Juha Kyllonen, and Sami Huovinen. Outexnew framework for empirical evaluation of texture analysis algorithms. In Pattern Recognition, 2002. Proceedings. 16th International Conference on, volume 1, pages 701–706. IEEE, 2002.
 [34] André Ricardo Backes, Dalcimar Casanova, and Odemir Martinez Bruno. Color texture analysis based on fractal descriptors. Pattern Recognition, 45(5):1984–1992, 2012.
 [35] R Pickard, C Graszyk, S Mann, J Wachman, L Pickard, and L Campbell. Vistex database. Media Lab., MIT, Cambridge, Massachusetts, 1995.
 [36] Phil Brodatz. Textures: a photographic album for artists and designers, volume 66. Dover New York, 1966.