2009 Fifth International Conference on Natural Computation
A Comparative Study for Texture Classification Techniques on Wood Species Recognition Problem Jing Yi Tou, Yong Haur Tay, Phooi Yee Lau Computer Vision and Intelligent Systems (CVIS) Group, Universiti Tunku Abdul Rahman (UTAR), Petaling Jaya, Malaysia. email:
[email protected], {tayyh, laupy}@utar.edu.my compare the performance of the different algorithms, i.e. grey level co-occurrence matrices (GLCM), onedimensional GLCM [6], Gabor filters, combinations of GLCM and Gabor filters [7] and covariance matrices [8]. We have also studied the deployment of the texture classification techniques onto the embedded system [9]. The main objectives of the paper are: 1. To recognize the wood species through the cross section surface of the wood samples through different texture classification techniques. 2. To compare the performance of each texture classification technique. Section 2 discusses the different texture classification techniques used in the paper. Section 3 shows the dataset and tool used for the experiments. Section 4 shows the experimental results. Section 5 shows the discussion of the findings. Step 6 shows the conclusion and future work.
Abstract Wood species recognition is a texture classification problem that has yet to be well studied. The textures observed on the cross section surface of the wood samples can be used to identify the species of the wood. In this paper, we tested various texture classification techniques, i.e. grey level co-occurrence matrices (GLCM), Gabor filters, combined GLCM and Gabor filters as well as covariance matrix. The experiments are conducted on 512 × 512 images of the six wood species from the CAIRO wood dataset. The experimental results show that the covariance matrix produced using the feature images generated by the Gabor filters is 85% compared to 78.33% for the raw GLCM, 73.33% for the Gabor filters and 76.67% for the combined GLCM and Gabor filters. The experimental results show that the covariance matrix has the best recognition rate.
2. Texture Classification Techniques
1. Introduction
The popular groups of texture classification techniques that are used are the statistical and signal processing methods [10]. Both are used in this paper, i.e. GLCM, Gabor filters, combined GLCM and Gabor filters and covariance matrix. The classifier used is the k-nearest neighbor (k-NN) and a two-stage verificationbased recognition process.
Wood species recognition is a relatively new problem to be solved using computer vision techniques. The texture classification techniques have been proven to be useful to solve several real world problems, such as rock texture classification [1], face detection [2], and wood species recognition [3, 4, 5]. This is accomplished due to the property of the cross section surface of trees that has a pattern for different species. Therefore, by inspecting the patterns on the cross section surface, the species of the tree can be determined. In our previous works, we have tested the texture classification technique on the wood species recognition problem [4, 5]. We have tested different texture classification techniques that have been tested on 32 textures from the Brodatz texture dataset to
978-0-7695-3736-8/09 $25.00 © 2009 IEEE DOI 10.1109/ICNC.2009.594
2.1. GLCM This is a popular statistical texture classification technique ever since it is introduced by Haralick et al. back in 1973 [11] because it is computationally simple yet useful for many texture classification problems. The GLCM calculates the occurrence of pixel pairs within the images according to the spatial distance between the pixel pairs and orientations provided [12]. The computed GLCM can be used as a feature after it 8
distance for all of the techniques described in Section 2.1 to 2.3 except for the covariance matrix where the Forstners and Moonen’s distance is used [16]. This is because the covariance matrix does not lie on the Euclidean space.
is down-sampled which we named as raw GLCM in this paper [9]. A second-order feature can be obtained from the GLCM. There are 5 commonly used textural features, i.e. contrast, correlation, energy, entropy and homogeneity [12]. In this paper, the GLCMs are generated as in [7] and [9].
2.5. Verification-based Recognition
2.2. Gabor Filters
This method is used as a two-stage classifier that first goes through a verification process before going through a recognition process. The feature extraction that is used in this paper is GLCM because of its simpler computations. The GLCMs are generated in eight directions to achieve rotational invariant as proposed in [5]. The test sample will be tested against all training templates. Each training template will accept the test sample as the same species when the distance is determined to be lower than the threshold value defined. Species with the highest number of accepted templates will be selected as the winning class [5].
This is a signal processing method, therefore it processes on the frequency domain rather than the spatial domain [2]. In this paper, the Gabor filters are generated by using different three radial center frequencies and eight orientations as used in [7]. The convolution is performed by applying fast Fourier transform (FFT), point-to-point multiplication and inverse fast Fourier transform (IFFT) [2]. Due to the complexity of the features produced, the Gabor filters are down-sampled and the singular value decomposition (SVD) is further used to reduce the dimensionality of the feature set [7].
2.3. Combined GLCM and Gabor Filters
3. Experimental Materials
Different techniques are often combined to be used and can produce better results compared to using them individually [7, 13, 14, 15]. In this paper, we combine the GLCM feature and the Gabor filters by appending both of them into a single feature set. This combination produces a better result than either GLCM feature or Gabor filters when it is applied on the 32 textures from the Brodatz texture dataset [7].
The dataset used in this paper is the CAIRO wood dataset and the experimental tool used is MATLAB.
3.1. Experimental Dataset Six species of wood are selected from the CAIRO wood dataset to be used in the experiments conducted in this paper as used in [5]. The CAIRO wood dataset is prepared by the Centre for Artificial Intelligence and Robotics (CAIRO), Universiti Teknologi Malaysia (UTM). The images in this dataset are macroscopic view on the cross section surface of the wood samples.
2.4. Covariance Matrix The covariance matrix is a statistical method that calculates the covariance between values. In this paper, the covariance matrix is used to calculate between images which are named as feature images. The feature images are a set of two-dimensional images or matrices generated by a feature extraction algorithm, such as the GLCM and Gabor filters. In this paper, Gabor filters are used to generate the feature images because it performs better than edge-based derivatives and GLCMs as feature images in [8].
2.5. k-NN Figure 1. Samples of Wood Images from the CAIRO
The k-nearest neighbor (k-NN) is used as the classifier in this paper. The k-NN will compare the feature set of the test sample against all the training samples and select the k samples with the shortest distance. The distance metric used is the Euclidean
Dataset
There are two pieces of wood samples provided for each species. The first piece of wood sample is used to capture 90 images under different orientations for the
9
The best accuracy is 76.67% for the GLCM features and 78.33% for raw GLCM. The best parameters are selected to generate the confusion matrices.
training set while the second piece of wood samples is used to capture 10 images under different orientations for the testing set. All the images are captured under the same distance from the camera to the cross section surface of the wood samples. The wood samples provided are limited, therefore only produces a small dataset for experiment purposes. Samples of the dataset are shown in Figure 1 which includes the following wood species: 1. Sesendok (Endospermum malaccense). 2. Keledang (Artocarpus kemando). 3. Nyatoh (Palaquium impressinervium). 4. Punah (Tetramerista glabra). 5. Ramin (Gonystylus bancanus). 6. Melunak (Pentace triptera). All the experiments are conducted on wood images of the size 512 × 512 which is cropped from samples.
4.2. Experimental Results for Gabor Filters The experiments are conducted using Gabor filters with number of features reduced by the SVD producing 20 to 5 features but only 10 to 5 features are shown in Table 2. The best accuracy is 73.33% when the number of feature is 7. Table 2. Experimental Results for Gabor Filters Number of Features 10 9 8 7 6 5
3.2. Experimental Tool MATLAB is used as the experiment tool for all experiments conducted in this paper. MATLAB provides a number of useful toolboxes, including the Image Processing Toolbox and Bioinformatics Toolbox that provides functions such as GLCM and kNN. It also allows easy graph plotting and visualization of the experimental results.
Accuracy (%) 56.67 58.33 65.00 73.33 68.33 66.67
4.3. Experimental Results for Combined GLCM and Gabor Filters The experiments are conducted using the combined GLCM and Gabor filters where the experimental results of the 32 and 64 grey levels is shown in Table 3. The horizontal bar represents the spatial distances. The experimental results are in percentage (%). Only the results of 16 to 20 features are shown. The best accuracy is 76.67% for spatial distance of 1 pixel, 64 grey level and 20 features.
4. Experimental Results There are five experiments conducted in this paper. They are conducted on the GLCM, Gabor filters, combined GLCM and Gabor filters, covariance matrix and verification-based recognition.
4.4. Experimental Results for Covariance Matrix
4.1. Experimental Results for GLCM
The experiments are conducted using 24 Gabor filters to generate the feature images which produces the covariance matrix. The confusion matrix is shown in Table 4 where the vertical bar represents the species label and the horizontal bar represents the species label of the winning classes. The average accuracy is 85%.
The experiments are conducted using the GLCM features and raw GLCM and the experimental results are shown in Table 1. The horizontal bar represents the spatial distances. The experimental results are in percentage (%).
Table 1. Experimental Results for GLCM Features and Raw GLCM Number of Grey Level 8 16 32 64 128 256
1 55.00 63.33 60.00 76.67 73.33 65.00
GLCM Features 2 53.33 68.33 70.00 66.67 73.33 61.67
3 45.00 73.33 76.67 61.67 73.33 66.67
10
1 58.33 71.67 78.33 78.33 68.33 61.67
Raw GLCM 2 73.33 73.33 73.33 75.00 60.00 55.00
3 75.00 66.67 66.67 66.67 63.33 51.67
Table 3. Experimental Results for Combined GLCM and Gabor Filters Number of Grey Level 20 19 18 17 16 15
1 60.00 61.67 63.33 61.67 58.33 58.33
32 Grey Levels 2 70.00 63.33 68.33 61.67 56.67 58.33
3 76.67 75.00 68.33 66.67 56.67 56.67
Covariance Matrix 1 100 0 0 0 0 0
2 0 90 0 0 0 10
3 0 0 100 40 0 20
4 0 10 0 50 0 0
5 0 0 0 0 100 0
64 Grey Levels 2 66.67 70.00 68.33 65.00 61.67 58.33
3 61.67 63.33 61.67 58.33 56.67 56.67
In most cases, Punah are misclassified as Nyatoh due to the similarity of the Punah and Nyatoh as shown in Figure 2. The GLCM features and the raw GLCM are the worst case scenario here as all the samples are wrongly classified, 80% of the samples are wrongly classified as Punah. Only the verification-based recognition can overcome this problem. The capability to check for multiple rotational angles has likely helped to differentiate the two similar species.
Table 4. Confusion Matrix of Experimental Results for (%) 1 2 3 4 5 6
1 76.67 76.67 73.33 68.33 60.00 63.33
6 0 0 0 10 0 70
4.5. Experimental Results for Verificationbased Recognition Technique The experiments are conducted using 4 GLCM with spatial distance of 1 pixel and 8 grey levels. The average accuracy is 78.33%. Figure 2. Comparison between Punah (left) and
4.6. Discussion
Nyatoh (right).
The experiments are conducted on a 512 × 512 rather than the whole image because it is more convenient to have a square image during the implementation of the Gabor filters. Images are not further cropped because the smaller it is, the less information it contains and therefore will reduce the accuracy of the algorithm [5]. The experimental results show that the covariance matrix has the best performance among all the texture classification techniques tested in this paper, which is able to achieve 85%. Both the raw GLCM and the verification-based recognition algorithm that uses GLCM have the same accuracy at 78.33%. The comparison is shown in Table 5.
The verification-based recognition however faces problem with Melunak where the training samples and testing samples are not very similar to each other as shown in Figure 3.
Figure 3. Sample from the training set (left) compared to the sample from the testing set (right) for Melunak.
Table 5. Comparison of Experimental Results for the
The samples with serious defects within the images, such as Sesendok shown in Figure 4 leads to misclassification but the Gabor filter-based covariance matrix and GLCM features does not face this problem. The Gabor filters view the image as a whole and is not affected by the localize changes in different samples. The Gabor filters that are decomposed using SVD failed to tackle this problem.
Texture Classification Techniques Texture Classification Techniques GLCM features Raw GLCM Gabor features Combined GLCM and Gabor features Gabor filter-based Covariance Matrix Verification-based Recognition
Accuracy (%) 76.67 78.33 73.33 76.67 85.00 78.33
11
Matrix”, Proc. of 5th Nordic Signal Processing Symposium, 2002, pp. 308-311. [2] W. H. Yap, M. Khalid, and R. Yusof, “Face Verification with Gabor Representation and Support Vector Machines”, IEEE Proc. of the First Asia International Conference on Modeling and Simulation, 2007, pp. 451-459. [3] Y. L. Lew, “Design of an Intelligent Wood Recognition System for the Classification of Tropical Wood Species”, M. E. Thesis, Universiti Teknologi Malaysia, 2005. [4] J. Y. Tou, P. Y. Lau, and Y. H. Tay, “Computer Visionbased Wood Recognition System”, Proc. Int’l Workshop on Advanced Image Technology, Jan 2007, pp. 197-202. [5] J. Y. Tou, Y. H. Tay, and P. Y. Lau, “Rotational Invariant Wood Species Recognition through Wood Species Verification”, Proc. 1st Asian Conference on Intelligent Information and Database Systems, Apr. 2009, pp. 115-120. [6] J. Y. Tou, Y. H. Tay, and P. Y. Lau, “One-dimensional Grey-level Co-occurrence Matrices for Texture Classification”, Proc. International Symposium on Information Technology, vol. 3, Aug 2008, pp. 1592-1597. [7] J. Y. Tou, Y. H. Tay, and P. Y. Lau, “Gabor Filters and Grey-level Co-occurrence Matrices in Texture Classification”, MMU International Symposium on Information and Communications Technologies, Nov 2007. [8] J. Y. Tou, Y. H. Tay, and P. Y. Lau, “Gabor Filters as Feature Images for Covariance Matrix on Texture Classification Problem”, Lecture Notes in Computer Science - Proc. 15th International Conference on Neural Information Processing, vol. 5507, Nov 2008, pp. 745-751. [9] J. Y. Tou, K. K. Y. Khoo, Y. H. Tay, and P. Y. Lau, “Evaluation of Speed and Accuracy for Comparison of Texture Classification Implementation”, Proc. Int’l Workshop on Advanced Image Processing, Jan 2009. [10] M. Tuceryan, and A. K. Jain, “Texture Analysis”, C.H. Chen, L.F. Pau, P.S.P Wang (eds.), The Handbook of Pattern Recognition and Computer Vision (2nd Edition), World Scientific Publishing Co, 1998. [11] R. M. Haralick, K. Shanmugam, And I. Dinstein, “Textural Features for Image Classification”, IEEE Transactions on Systems, Man and Cybernatics, 1973, pp. 610-621. [12] M. Petrou, and P. G. Sevilla, “Image Processing: Dealing with Texture”, Wiley, 2006. [13] J. Bala, “Combining structural and statistical features in a machine learning technique for texture classification”, Proc. of the 3rd International Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems, 1, 1990, pp. 175-183. [14] J. A. R. Recio, L. A. R. Fernandez, and A. FernandezSarria, “Use of Gabor filters for texture classification of digital images”, 2005. [15] C. Umarani, S. Radhakrishnan, and L. Ganesan, “Combined statistical and structural approach for unsupervised texture classification”, International Journal on Graphics, Vision and Image Processing, vol. 7, no. 1, 2007, pp. 31-36. [16] O. Tuzel, F. Porikli, and P. Meer, “Region Covariance: A Fast Descriptor for Detection and Classification”, European Conference on Computer Vision, vol. 1, 2006, pp. 697-704.
Figure 4. Two samples of obvious defects circled in the images
5. Conclusion and Future Works In this paper, we discovered that the covariance matrix that is produced using feature images generated by the Gabor filters has the best accuracy at 85% for the wood species recognition problem. Due to the different image size and characteristics, the experimental results on the wood species recognition is not exactly similar to conditions on the texture classification problems that are tested on the Brodatz dataset. However both of them showed some similar findings as the followings: x The raw GLCM outperform the GLCM features; x The Gabor filters with SVD produces a poor result compared to other techniques; x The combined GLCM and Gabor filters outperform both GLCM and Gabor filters themselves; x The Gabor filter-based covariance matrix performs the best among all techniques. Wood species recognition is a more challenging problem than the normal texture classification problems because the textures or wood species are naturally similar to each other leading to natural confusions. For our future work, the wood species recognition system will be deployed onto an embedded platform. The embedded platform includes the processor, acquisition device, lightings, LCD display and button controls. It can be designed into a box-shaped embedded device to offer compactness and mobility for the system.
6. Acknowledgement The authors would like to thank Y. L. Lew and the Centre for Artificial Intelligence and Robotics (CAIRO) of Universiti Teknologi Malaysia (UTM) for sharing the wood images. This research is partly funded by Malaysian MOSTI ScienceFund 01-02-11-SF0019.
7. References [1] M. Partio, B. Cramariuc, M. Gabbouj, and A. Visa, “Rock Texture Retrieval using Gray Level Co-occurrence
12