1 October 2005 Rock image classification using color features in Gabor space
Author Affiliations +
J. of Electronic Imaging, 14(4), 040503 (2005). doi:10.1117/1.2149872
In image classification, the common texture-based methods are based on image gray levels. However, the use of color information improves the classification accuracy of the colored textures. In this paper, we extract texture features from the natural rock images that are used in bedrock investigations. A Gaussian bandpass filtering is applied to the color channels of the images in RGB and HSI color spaces using different scales. The obtained feature vectors are low dimensional, which make the methods computationally effective. The results show that using combinations of different color channels, the classification accuracy can be significantly improved.
Lepistö, Kunttu, and Visa: Rock image classification using color features in Gabor space



The division of natural images like rock, stone, clouds, ice, or vegetation into classes based on their visual similarity is a common task in many machine vision and image analysis solutions. Classification of natural images is demanding, because in the nature the objects are seldom homogenous. For example, when the images of rock surface are inspected, there are often strong differences in directionality,1 granularity, or color of the rock, even if the images represented the same rock type. These kinds of variations make it difficult to classify these images accurately. In the current rock imaging applications, rock images analysis is used in, e.g., bedrock investigations. Therefore, effective inspection methods are required to classify the rock images.

Texture is an important feature in the content-based image classification. Also in the analysis of natural images, texture plays a remarkable role. Rao and Lohse2 indicated that most important perceptual dimensions in the natural texture discrimination are repetitiveness, directionality, and granularity. The directionality and granularity of nonhomogenous natural textures have been discussed in our earlier work.1, 3 In addition to texture, color is also an essential feature of natural images. In this study, we combine the color information to the textural features of rock images.

Gabor filtering provides a multiresolution representation of texture. In the comparison of Manjunath and Ma,4 Gabor filtering method proved to be the most effective method in the texture classification. Gabor filtering has also been the basis of many color texture analysis methods.5, 6 In this paper, we present an efficient approach to the classification of colored rock textures. The method is based on the bandpass filtering in Gabor space that is applied to different color channels of the images. In Sec. 2, we present the principle of our method. In Sec. 3, the method is used to classify rock images obtained from the boreholes. The results are discussed in Sec. 4.


Color Filtering in Gabor Space

Gabor filtering is a method for texture description and classification. In most cases, the filters are used to extract orientation and scale information from the local spectrum of the texture image. The local spectrum is the Fourier transform of a window function which is multiplied with the Fourier transform of the image. The filters are used to estimate the selected frequency band of the image using a Gaussian as a smoothing window function. It has been shown that Gabor features correspond to human visual system.7

The filters as texture analysis tools are usually applied to gray-level (intensity) images in the Gabor space. In our previous approach,8 we showed that Gabor filters applied to color channels of the rock texture images can improve the classification accuracy of these images. In this paper, we use rock textures that are not directional or their directionality cannot be regarded as classifying feature. Therefore, we do not utilize the orientation of the texture. We apply filters of different scales to the color channels of the texture images. This way, the obtained feature vectors are shorter than in Ref. 8, which makes the feature extraction and classification significantly faster. Hence, instead of using filters of multiple scales and orientations, we use a filter bank that works independent on the orientation at a selected scale.

In this work, we use ring-shaped bandpass filters whose amplitude responses are presented in Fig. 1 . The cross section of the ring is a Gaussian function. The feature vector is formed using the mean μm and standard deviation σm of the magnitude of the transform coefficients. This is repeated at each scale m . If the number of scales is M , the resulting feature vector is of the form:


A comprehensive comparison presented in Ref. 6 revealed that HSI color space gives the best result in the classification of color textures. This comparison, however, used quite homogenous textures and oriented Gabor filters. In this paper, we compare the results obtained in RGB space with those obtained from HSI space in rock texture filtering without orientation. In our approach, we define the feature vector f for each color channel of the texture image:


Then the feature vectors can be combined to a single vector that characterizes all the color channels:


in which each component is normalized by removing its mean and dividing by its standard deviation. When μm and σm are calculated for M scales and C color channels, the size of the resulting feature vector is 2*M*C , which yields to quite short feature vectors, especially when the number of scales is low. The same procedure is followed with the experiments in HSI and RGB color spaces.

Fig. 1

The filters used at (a) two, (b) three, (c) four, and (d) five scales.



Experiments Using Rock Images


Nonhomogenous Rock Images

In the field of rock science, the development of digital imaging has made it possible to store and manage the images of the rock material in digital form. Rock represents typical example of nonhomogenous natural image type. This is because there are often strong differences in directionality, granularity, or color of the rock texture, even if the images represented the same rock type.8 In bedrock investigation, rock properties are analyzed by inspecting the images that are collected from the bedrock. Different rock layers can be recognized from the borehole images based on the color and texture properties of rock. Therefore, there is a need for an automatic classifier that is capable of classifying the rock images into visually similar classes.

As a testing database, we use a set of rock images that consists of 336 images, which are obtained by dividing large borehole images into parts. These images are manually divided into four classes by an expert. The division is based on their color and texture properties. Figure 2 presents three example images from each of the four classes. The images show that there is directionality in some of the classes, but the orientations vary within the same classes. Therefore, directionality is not used in the classification. In classes 1–4, there are 46, 76, 100, and 114 images in each class, respectively.

Fig. 2

Three examples from each class of the rock images in the testing database.




The database of rock images is classified using feature vectors of Eq. 2 in different color channels. The number of scales varyies between two and five. In all cases, the filter centers have been located uniformly to the frequency band such that the frequency channels of the filters cover the whole frequency area. The corresponding filters are presented in Fig. 1. In classification, we have used k -nearest neighbor ( k -NN) classification principle. The selection of the k -NN classifier is due to its robustness with nonhomogenous feature distributions of the rock images. With this type of database, the selected classification algorithm is also fast. The selection of value 5 for k was based on preliminary experiments. In the experiments, a leave-one-out validation method was employed. The distance measure in the classification was Euclidean distance. In preliminary experiments, Euclidean distance outperformed slightly L1 -norm that is other common distance metrics for texture features.

The average classification results are presented as percentages in Table 1 . The results are presented for RGB and HSI color spaces, respectively. In Table 1, the average classification rates are presented for each of the four classes separately and as average value. The dimensionality of each descriptor type is also mentioned in the table. To compare our results to other commonly used visual descriptors, we have calculated the classification results for the testing database using some MPEG-7 texture and color descriptors.9 This comparison is presented in Table 2 . We selected the homogenous texture descriptor to represent texture description, because it is based on Gabor filtering in gray-level texture images.9 This descriptor is based on the method presented in Ref. 4, and it uses Gabor filters in five scales and six orientations. Because this paper considers also color information of the rock images, we have included also MPEG-7 color descriptors for comparison. Color structure descriptor and color layout descriptor employ HMMD color space9 whereas scalable color descriptor uses HSI color space.

Table 1

The average classification rates (%) in each class in RGB and HSI color spaces.

DimensionsRGB color spaceHSI color space
2 scales1260.593.586.082.580.147.484.881.081.674.1
3 scales1859.295.787.086.081.356.687.080.082.576.5
4 scales2455.3100.
5 scales3053.9100.

Table 2

The average classification rates (%) in each class using MPEG-7 color and texture descriptors.

MPEG-7 DescriptorDimensions1234Ave
Homogenous Texture Descriptor6240.893.548.073.761.3
Color Layout Descriptor1235.597.883.071.170.3
Color Structure Descriptor25656.689.
Scalable Color Descriptor25648.776.185.086.876.2



The classification rates presented in Table 1 show that the rock texture filtering in RGB color space produces slightly better classification results than that in HSI color space. There are remarkable differencies in the classification performance between the classes. Class 1 is especially difficult to classify for all the features. This is due to the nonhomogenous nature of the class 1 images. These images are very varying in terms of their color distributions and texture properties. In class 2, RGB color space gives clearly better results than HSI space. On the other hand, in classes 3 and 4, RGB space is only slightly better. When the comparison with MPEG-7 visual descriptors is considered (Table 2), one can see that these descriptors are outperformed by the proposed methods. Homogenous texture descriptor uses directional Gabor filtering, which yields poorer classification results than the proposed methods. This is due to the fact that especially in classes 1 and 3 the textures are randomly oriented and therefore directionality cannot be regarded as a classifying feature. In addition, color information of texture has not been utilized in this descriptor. The performance of color descriptors is also lower than in the case of the proposed methods. This is natural, because they consider only color distribution of the images and not their texture content.

Computational complexity is always a central matter with practical image classification tasks. Compared to conventional Gabor filtering,4, 9 the proposed method is somewhat lighter because it does not calculate the filter responses for different orientation. On the other hand, the filtering is repeated for three color channels instead of one. Therefore the computational cost is dependent on the number of scales and color channels. In fact, the computational complexity can be estimated by comparing the dimensionality of the descriptors. In Tables 1, 2, the dimensionality of each method is presented. For example, by using two scales the dimensionality of the proposed method is 12, which yields to a classification rate of 80.1% in RGB space. This can be regarded as a good result with such a low dimensional descriptor.



In this paper, we showed that the classification of natural rock texture images can be improved by combining the color information to the texture description. We used bandpass filtering that was applied to the images in different color spaces. This way it is possible to analyze colored texture images in multiple scales, which is desirable in practical applications. This is due to the variations in the granular size of the rock textures. In the practical solutions, the computational cost is always an essential matter. In the presented approach the filtering is a straightforward operation that is repeated for the selected color channels. The obtained feature vectors are relatively short, which makes online classification possible.


The authors wish to thank Prof. Josef Bigun from Halmstad University, Sweden, for his help in the filter design. The rock images used in the experiments were provided by Saanio & Riekkola Oy. The authors are also thankful to Mr. Rami Rautakorpi from Helsinki University of Technology, Finland, for evaluation of MPEG-7 descriptors for the test set images.


1.  L. Lepistö, I. Kunttu, J. Autio, and A. Visa, “Retrieval of non-homogenous textures based on directionality,” Proc. 4th European Workshop Image Analysis for Multimedia Interactive Services, pp. 107–110 (2003). Google Scholar

2.  A. R. Rao and G. L. Lohse, “Towards a texture naming system: identifying relevant dimensions of texture,” Proc. IEEE Conf. Visualization, pp. 270–227 (1993). Google Scholar

3.  L. Lepistö, I. Kunttu, J. Autio, and A. Visa, “Rock image retrieval and classification based on granularity,” Proc. 5th Inlt. Workshop Image Analysis for Multimedia Interactive Services (2004). Google Scholar

4.  B. S. Manjunath and W. Y. Ma, “Texture features for browsing and retrieval of image data,” IEEE Trans. Pattern Anal. Mach. Intell.  10.1109/34.531803 18(8), 837–842 (1996). Google Scholar

5.  J. F. Camapum Wanderley and M. H. Fisher, “Multiscale color invariants based on the human visual system,” IEEE Trans. Image Process. 10(11), 1630–1638 (2001). Google Scholar

6.  G. Paschos, “Perceptually uniform color spaces for color texture analysis: an empirical evaluation,” IEEE Trans. Image Process.  10.1109/83.923289 10(6), 932–937 (2001). Google Scholar

7.  M. Porat and Y. Y. Zeevi, “The Gabor scheme of image representation in biological and machine vision,” IEEE Trans. Pattern Anal. Mach. Intell.  10.1109/34.3910 10(4), 452–468 (1998). Google Scholar

8.  L. Lepistö, I. Kunttu, J. Autio, and A. Visa, “Classification method for colored natural textures using Gabor filtering,” Proc. 12th Intl. Conf. Image Analysis Processing, pp. 397–401 (2003). Google Scholar

9.  B. S. Manjunath, P. Salembier, and T. Sikora, Introduction to MPEG-7 Multimedia Content Description Interface, John Wiley & Sons, UK (2002). Google Scholar

Leena Lepistö, Iivari Kunttu, Ari J.E. Visa, "Rock image classification using color features in Gabor space," Journal of Electronic Imaging 14(4), 040503 (1 October 2005). http://dx.doi.org/10.1117/1.2149872

Image classification

Optical filters

Image filtering

RGB color model

Image analysis

Bandpass filters


Back to Top