1 Introduction

The most vital visual attribute in computer vision is the texture, which has wide applications such as remote sensing, medical image analysis, face recognition, industrial assessment, amongst many others. Even though the human visual system can easily distinguish textural patterns, however the explanation through automatic methods has been a great challenge. Analysis of texture can be classified broadly into four categories such as statistical, geometrical, model-based and signal processing approaches [1]. Among all the methods statistical method is one of the most important aspect of texture analysis. Examples of such statistical approaches are the gray-level histogram which have statistical information about texture, the gray level co-occurrence matrix [2,3,4], the gray level difference method [5], the autocorrelation function [6, 7] and the gray level run lengths [8].

The run length method is first introduced by Galloway, and has not been extensively recognized as an efficient texture analysis method. Afterwards various authors have conducted several studies and comparisons for the improvement of the run length approach. Xinli et al. have proposed gray level gap length matrix (GLGLM) for classification and segmentation of texture that is an extension of GLRLM. They have explained that the GLRLM calculates plateaus of an image while the GLGLM reveals peaks and valleys of an image [9]. Chu et al. have suggested two new features, i.e. low gray level run emphasis (LGRE), high gray level run emphasis (HGRE) for the gray value distribution of the runs [10]. Dasarathy and Holder have proposed a new approach based on joint gray level run length distributions for texture classification [11]. Weszka et al., and Conners and Harlow have presented that the texture features are least efficient that are extracted using run-length in a collection of traditional texture features, for example the gray level difference and the co-occurrence features [5, 12]. Later on Tang has proposed a new approach for investigating run length method by utilizing multilevel dominant eigenvector estimation algorithm [13]. There are very few applications of run-length method available in the literature compared to other methods [14, 15].

Texture classification under varying illumination is the greatest challenging problem in real-time application. When lighting conditions, scale and rotation changes, the appearance of texture images varies intensely. An additional factor that becomes relevant is that whenever two materials are photographed under very different imaging conditions can look as quite alike. These entire aspects make the texture classification task challenging.

Various normalization methods have been developed by the research community to tackle the problem. However, the majority of this research are done for face recognition, and has not covered the performance analysis of the illumination normalization for texture classification. Some of the illumination normalization methods those are applied in face recognitions are Histogram equalization and its improvement versions, Homomorphic filtering, Tan and Trigg, Retinex, 2-D Wavelet transform and DCT transform [16,17,18,19,20].

Although many illumination normalization techniques are proposed in the literature, in this work 2-D Wavelet transform and Tan and Trigg illumination normalization methods are chosen for the following reason.

  1. i.

    2-D Wavelet transform is an efficient technique for image decomposition. This technique provides a diversity of channels that signify the feature of probe image by different frequency sub-bands at multi-scales. Furthermore, this technique provides low and high frequency resolution and high temporal localization.

  2. ii.

    Tan and Trigg illumination normalization method integrates a series of steps selected to counter the effects of illumination variations, local shadowing and highlights, while still preserving the essential elements of visual appearance for use in classification.

Very recently, Dash et al. have suggested a new homomorphic normalization method for colour texture classification. They have used Laws’ mask and co-occurrence approach for texture features extraction [21]. Also in the literature study, some integrating models have been recommended for the improvement of the original Laws’ mask approach by combining with traditional texture analysis techniques for texture classification [22,23,24]. Although GLRLM method is the existing method, however there is hardly any improvement found for the gray texture image normalization using GLRLM technique.

In this context, we investigate the robustness to illumination of GLRLM descriptor for gray texture images by applying two different normalization techniques and texture features are extracted through run length approach to improve the texture classification over the traditional GLRLM descriptor. Tan and Triggs (TT) and 2D Wavelet methods are used for the illumination normalization. The purpose of TT technique is to normalize the input image to make them robust/invariant to illumination changes by employing a processing chain. Similarly, the Wavelet based normalization technique employs the discrete Wavelet transform to an image, and then the subbands that give emphasis to detailed coefficients are processed. Histogram equalization is applied to the approximate coefficients of the transform. Afterwards from the manipulated subbands the normalized images are reconstructed utilizing the inverse Wavelet transform. The efficiency of the suggested method is tested with four challenging databases such as Brodatz, VisTex, STex, and ALOT. In the classification task, k-Nearest Neighbors (k-NN) classifier is utilized. Experimental comparison with the traditional run length method shows that the suggested normalization approaches provide superior results in terms of classification.

This work is structured into five sections. Section 2 discusses the theoretical background of the traditional run length matrix, 2D Wavelet and Tan and Trigg normalization methods. Section 3 discusses the suggested method. Experiments and results are discussed in Sect. 4. Section 5 concludes the work.

2 Theoretical background

2.1 Gray level run length matrix

Texture is understood as a pattern of gray intensity pixel in a particular direction from the reference. The gray level run length matrix (GLRLM) proposed by Galloway is based on the analysis of second-order statistical information [8]. The foundation of gray-level run length approach is depending on calculating the number of gray level runs of different lengths. A gray level run is a collection of linearly adjacent picture points with the similar values of gray level. A run-length matrix Mis described as follows: each element M (p, q) denotes that p is equivalent to number of runs having pixels of gray level intensity, and q is equivalent to length of run on a definite orientation. The size of matrix M is defined as a by b, where a is the maximum gray level in the image and \(b\)is the maximum feasible run length in the analogous image. By utilizing a displacement vector p(x, y) orientation is described, where x and y are the displacement for the x-axis and y-axis correspondingly. In this technique, four directions (0°, 45°, 90° and 135°) are used to define texture runs and accordingly four run length matrices are generated. By using GLRLM, seven numbers of features such as short run emphasis (SRE), long run emphasis (LRE), gray level non-uniformity (GLN), run length non-uniformity (RLN), run percentage (RP), low gray level run emphasis (LGRE), and high gray level run emphasis (HGRE) are derived as follows.

$${\text{SRE }}=\frac{1}{l}\mathop \sum \limits_{{p,q}} \frac{{M(p,q)}}{{{q^2}}}$$
(1)
$${\text{LRE }}=\frac{1}{l}\mathop \sum \limits_{{p,q}} {q^2}M(p,~q)$$
(2)
$${\text{GLN }}=\frac{1}{l}\mathop \sum \limits_{p} {\left( {\mathop \sum \limits_{q} M(p,~q)} \right)^2}$$
(3)
$${\text{RLN }}=\frac{1}{l}\mathop \sum \limits_{p} {\left( {\mathop \sum \limits_{p} M(p,~q)} \right)^2}$$
(4)
$${\text{RP }}=\mathop \sum \limits_{{p,q}} \frac{l}{{M(p,q)q}}$$
(5)
$${\text{LGRE }}=\frac{1}{l}\mathop \sum \limits_{{p,q}} \frac{{M(p,~q)}}{{{q^2}}}$$
(6)
$${\text{HGRE }}=\frac{1}{l}\mathop \sum \limits_{{p,~q}} {p^2}M(p,~~q)$$
(7)

2.2 Illumination normalization methods

2.2.1 2D Wavelet transform normalization method

Du and Ward have proposed the Wavelet based normalization technique [16]. Generally, in the two band multi resolution Wavelet technique a signal is represented as Wavelet and scaling basis functions at various scales, with a hierarchical way.

$$f\left( x \right)=\mathop \sum \limits_{p} {m_{0,p}}_{{0,p}}(x)+\mathop \sum \limits_{q} \mathop \sum \limits_{p} {n_{q,p}}_{{q,p}}(x)$$
(8)

where \(\phi\)is the scaling function and \(\psi\)is the Wavelet function. Whereas m and n are the scaling and Wavelet coefficients respectively.

The image is divided into four sub bands after one level of decomposition. The sub bands are LL1 (low–low), LH1 (low–High), HL1 (High–Low) and HH1 (High–High). The sub bands labelled as LH1, HL1 and HH1 signify the finest scale Wavelet coefficients known as detail images. The sub band LL1 resembles to coarse level coefficients known as approximation image. An example of Wavelet decomposition for two levels is illustrated in Fig. 1.

Fig. 1
figure 1

Two level Wavelet image decomposition

After the decomposition into approximate coefficients and detail coefficients, the next step is the contrast enhancement. Contrast enhancement of the approximation coefficients is carried out through histogram equalization. In the meantime edge enhancement is obtained through the multiplication of the detail coefficients with a scalar (> 1). By applying inverse Wavelet transform, a normalized image is achieved from the modified coefficients. The block diagram of the Wavelet normalization technique suggested by Du and Wardis shown in Fig. 2. The authors have not given importance on Wavelet filters and suggested that any type of Wavelet filters can be utilized.

Fig. 2
figure 2

Block diagram of Wavelet based illumination normalization

2.2.2 Tan and Triggs normalization method

The Tan and Triggs normalization technique (TT) as the name proposes is a normalization technique first suggested by Tan and Triggs [18]. The input images are normalized through this method by using a series of processing, which initially employs gamma correction to the input image, and then the corrected images are applied to a filter known as Difference of Gaussian filter. The final results are obtained by utilizing a robust post-processor in the last step through Contrast Equalization.

  1. a.

    Gamma correction

A nonlinear transformation, which replaces the pixel with intensity I in the image with \({I^\gamma }\) for 0≤γ≤1 or log (I) if γ = 0 is known as gamma correction. Thus, the dynamic range of an image can be increased through gamma correction. The scale of the output image is 0–255. Gamma = 1, is an identity transformation, where every pixel is mapped to itself. Hence, gamma correction has the influence of enhancing the dynamic range of an image in the darker are a show ever compressing it in the brighter are as, thereby improving the visibility of the image.

The underlying concept is that intensity of light reflected from an object is produced from illumination and surface reflectance components

$$f(x,~y)=I(x,~y)*R(x,~y)$$
(9)

Illumination is the amount of light incident on the scene and is dependent on external conditions. Reflectance is the amount of light reflected by the object and arises from property of objects themselves. Illumination varies slowly across the image compared to reflectance. Illumination can be considered as low frequency, while reflectance is a high frequency component present in the same image. The product can be expressed as a sum by taking log as

$$\log \left( {I(x,~y)} \right)+\log \left( {R(x,~y)} \right)$$
(10)
  1. b.

    Difference of Gaussian (DoG) filter

Gamma correction or any other form of contrast normalization algorithm does not eliminate the overall effects of intensity gradients for example shading effects. Shading effects are considered to be predominantly low frequency phenomenon. It is not possible to distinguish between a illumination gradient and one caused by shading effects of surface structure. Since illumination is also modelled as low frequency phenomenon. High pass filtering operation can be performed to remove these components. DoG filter is a way to perform Bandpass filtering operations that removes shading and illumination components in the image and reduces the noise. DoG filter approximates a Laplacian of Gaussian filter, which is used for edge detection. The output of DoG filter is an edge intensity image. Gaussians are characterized by mean and variance/standard deviation/sigma. The inner Gaussian (σ0) with high value will blur out the fine details/edges, hence a small sigma is used which will eliminate only noise. The second Gaussian (outer) has a large sigma (σ1), which removes high frequency details in the image and retains only low frequency components of the image. Then the low frequency image is subtracted from the original low pass filtered image, thereby obtaining a high frequency edge image.

  1. c.

    Contrast equalization

The last step of the processing is contrast equalization, which altogether replaces the image intensities for the standardization of a robust measure of whole intensity variations. Since DoG approximates gradient, there are bound to be extreme value produced by highlights, shadows and noise, etc.

$$I=\frac{I}{{{{\left( {Mean\left( {{I^x}} \right)} \right)}^{\frac{1}{{alpha}}}}}}$$
(11)
$$I=\frac{I}{{{{\left( {Mean\left( {\hbox{min} \left( {T{I^x}} \right)} \right)} \right)}^{\frac{1}{{alpha}}}}}}$$
(12)
$$I=T*\tanh \frac{I}{T}$$
(13)

where x is used as a compression parameter, which reduces the effect of large values, T is the threshold utilized for the truncation of large values when the first phase of normalization is completed for the overall image. The output of above steps is an image with an pixel intensity in the range \(\left( { - T,{\text{~T}}} \right)\). To achieve the integer output, the values between 0 and 255 are normalized. Figure 3 exhibits the procedural steps of TT normalization method.

Fig. 3
figure 3

Procedural steps of TT illumination normalization method

3 Proposed methodology

This section explains the suggested descriptor, whose principles are presented on the procedural steps illustrated on Fig. 4.

Fig. 4
figure 4

Procedural steps of the suggested method

The proposed normalization based GLRLM method is conducted in three steps: (a) the texture images are normalized by employing Wavelet normalization techniques, (b) the texture images are normalized by employing TT normalization techniques, (c) using the normalized images texture features are derived through GLRLM descriptor, and (3) classification is performed using k-NN classifier.

  1. a.

    Wavelet normalization: As described in Sect. 2.2.1 that any type of Wavelet filter can be used for normalization, hence in this method we have chosen sym1 Wavelet as Wavelet filter. Initially the images are decomposed into its low frequency and high frequency components. Then different band coefficients are manipulated separately. Then the histogram equalization is executed in the Wavelet domain for approximation coefficients value to attain a better contrast enhancement. As a result the normalization of the approximation image (LL subband) is also achieved. The next step is to enhance the detailed coefficients (fine details) for the edge enhancement. This is achieved by increasing the amplitude of the high frequency component. To highlight the detailed coefficients, each element of the detail coefficient matrix (LH, HL, and HH subbands) is multiplied with a scalar factor (> 1). In this proposed method, different scalar values are used for the edge enhancement. Hence, the resultant images are enhanced in terms of contrast and edge. In the last step,by utilizing the inverse Wavelet transform the image is restored.

  2. b.

    TT normalization:Already the process of TT normalization method is described in Sect. 2.2.2. The gamma correctionimproves the local dynamic range of the image in darker or shaded areas. However, compressing it in the brighter areas. Therefore, different TT normalized images are obtained for different gamma values. For the DoG filter the inner Gaussian value is σ0 = 1 and the outer Gaussian value is σ1 = 2 as selected originally in TT method. Hence, DoG filtering is capable of removing the shadowing effects and enhances the image. For contrast equalization the threshold is selected as T = 10 and α = 0.1 as suggested by the authors [18].

  3. c.

    Texture features extractions are donethrough GLRLM descriptor: Texture features from the normalized images are extracted by utilizing GLRLM descriptor. Seven texture features such as SRE, LRE, GLN, RLN, RP, LGRE, and HGRE from each normalized image.

  4. d.

    Classification: In the literature, various classifiers have been recommended. Even though some achieve better performance than others, usually the selection of the classifier has the minimum effect on the whole performance of the system. The k-NN classifier has got some advantages such as robust to noisy data by averaging k-nearest neighbors, k-NN is conceptually simple yet able to solve complex problems, can work with relatively little information and learning is simple. In the experiments, k-NN classifier is employed for the purpose of classification, which is a supervised learning technique. The k-NN is a computational methodutilizedto recognizethe patterns of the objectsto classify the objects based on training by examples in the space nearer the objects. The value of k is selected as k = 5 (majority vote of its 5 nearest neighbors).

The steps of k-NN classifier are as follows.

  • The input data are stored in the training set.

  • By utilizing a distance measure (like Euclidean distance, City block, Cosine distance) every pattern in the test set search for the k-nearest patterns to the input pattern.

  • Calculate the confidence of every class as Pm/K for classification. Pm is the number of patterns amongst the K nearest patterns belongs to class m. The class with the highest confidence is considered as classification for the input pattern.

  • In this paper, first the normalization of the features are done to avoid the large range of variations, and then the classification is conducted based on the train and test validation for each dataset following the k-NN rule.

4 Experimental results and discussions

The efficiency of the suggested approach is verified using four benchmark databases such as Brodatz, STex, VisTex, and ALOT. The four challenging databases are different from each other, and the comparison among the databases is presented in Table 1.

Table 1 Experimental dataset details

The first dataset used is the Brodatz database. There is diversity in textures in Brodatz database [25]. In this database, some textures belong to the same class but at different scales, whereas the others are so inhomogeneous that a human observer may not be able to distinguish the samples correctly. Based on these considerations we have chosen the Brodatz dataset from which 24 numbers of image of size 640 × 640 pixels have been selected randomly as shown in Fig. 5. Splitting of each image into 25 non overlapping sub images of size 128 × 128 pixels. Thus, 600 patches are derived. Out of which 288 patches are utilized for training and 312 patches are utilized for testing.

Fig. 5
figure 5

24 classes of Brodatz

The second dataset is collected from VisTex database that contains 25 monochrome images of original size 512 × 512 pixels as presented in Fig. 6 [26]. Each image is subdivided into sixteen 128 × 128 pixels non overlapping samples, thus 400 patches are available. For the purpose of classification, we have taken 200 training patches from each of the texture classes and other remaining 200 patches are for testing.

Fig. 6
figure 6

25 classes of VisTex

The third dataset is collected from STex database that contains 476 different colour texture images of size 512 × 512 pixels [27]. The images are captured using three different cameras: Canon IXUS 70, Canon EOS 450D, and Nikon D40 [28]. For the analysis purpose, 25 different texture images are selected from this database as shown in Fig. 7. For this dataset, also images are subdivided into sixteen 128 × 128 pixels non overlapping samples from which each 200 samples are used for traing and testing.

Fig. 7
figure 7

25 classes of STex

The fourth dataset is produced from the ALOT database which is the most challenging database. This database is collection of 250 different colour texture images with variations in viewing angle, illumination angle, and illumination colour of every material [29]. There are one hundred images of each material. Each image has six illuminations (I = (1, 2, 3, 4, 5, 8)) and four viewing directions (r = 0°, 60°, 120°, 180°) and captured by four different colour cameras. The database consists of three different sizes of images, full, half, quarter resolution of size 1536 × 1024, 768 × 512, and 384 × 256 pixels. In this experiment,20 images with varied angle, rotation, and illumination from different 10 classes of quarter resolution are chosen as shown in Fig. 8.Every image is splitted into six 128 × 128 pixels of non overlapping patches, therefore created a whole of 1200 patches. Each 600 patches are utilized for training and testing.

Fig. 8
figure 8

10 classes of ALOT

The results of the different proposed methods for each database are discussed as follows.

4.1 Results of GLRLM based on TT normalization

Table 2 reports the classification rates of the original GLRLM descriptor are 55.96, 96.50, 94.00, and 91.83% on Brodatz, VisTex, STex, and ALOT respectively. Figure 9 represents the classification rates achieved from the original GLRLM descriptor.

Table 2 Classification success rates of the original GLRLM approach
Fig. 9
figure 9

Classification rates of the original GRLM descriptor

As explained in the proposed methodology the normalized images using TT normalization are obtained for various gamma values. Figure 10 depicts examples of illuminated images, which are obtained from TT normalization at different gamma values. Table 3 shows the various gamma values chosen for the proposed method and the corresponding results obtained for each database. From the table it is noted that for all the gamma values improved classification rates are obtained on Brodatz and ALOT datasets. The highest success rate of 62.37% is obtained at gamma value of 0.8 on Brodatz dataset. The highest success rate of 99.00% is attained on both VisTex and STex datasets for gamma values 0.7 and 1.1, respectively. For ALOT dataset, the highest classification rate of 96.87%is obtained at gamma value 0.9.

Fig. 10
figure 10

Examples of effects of TT normalization with different gamma values

Table 3 Classification results of the proposed GLRLM based on TT normalization

4.2 Results of GLRLM based on Wavelet normalization

In this method, at various scalar values the normalized images are achieved using Wavelet normalization. Figure 11 show examples of illuminized images that are achieved from Wavelet normalization at different scalar values. Table 4 represents the various scalar values selected for the experiment and the corresponding classification accuracies achieved for each dataset. From the table it is observed that for all the scalar values improved classification rates are obtained on Brodatz and ALOT datasets. The maximum success rate of 63.01% is obtained for two different scalar values, i.e. at 1.9 and 2 on Brodatz dataset. The maximum success rate of 99.00% is obtained for three scalar values, i.e. at 1.6, 1.7, and 1.8 on VisTex dataset. For STex and ALOT datasets, the best classification rates of 98.00 and 99.63% are achieved respectively at scalar value of 2.1.

Fig. 11
figure 11

Examples of effects of Wavelet normalization with different scalar values

Table 4 Classification results of the proposed GLRLM based on Wavelet normalization

Also from the results, it is observed that improved classification accuracies are attained for many other gamma values and scalar values on all the four datasets.

4.3 Comparison and summarize of the results

The suggested techniques have attained improved classification accuracy than the traditional GLRLM method for all the four datasets. Maximum increment in the classification rate is 6.41 and 7.05% by utilizing the GLRLM based on TT normalization and GLRLM based on Wavelet normalization techniques respectively on Brodatz database. For VisTex database, the increased in classification accuracy is 2.5% by applying both the proposed techniques. For STex database, the increased in classification accuracies are 5 and 4% by applying the GLRLM based on TT normalization and GLRLM based on Wavelet normalization techniques respectively. For ALOT database, the increased in classification accuracies are 5.04 and 7.8% by using the GLRLM based on TT normalization and GLRLM based on Wavelet normalization techniques respectively.

Hence, it is observed that from the two proposed method the GLRLM based on Wavelet normalization is delivering better classification rates on Brodatz and ALOT databases. For STex database, the GLRLM based on TT normalization is giving higher classification rates. For VisTex database, both the methods give same improved classification accuracy.

Figures 12 and 13 show the classification accuracy rates obtained from the proposed approaches on all the four databases.

Fig. 12
figure 12

Classification results of proposed Wavelet normalized based GLRLM

Fig. 13
figure 13

Classification results of proposed TT normalized based GLRLM

4.4 State-of-the-art comparison

Finally, we provide a comparison with the state-of-the-art approaches in literature. As we have verified the suggested methods with four databases such as Brodatz, VisTex, STex and ALOT a brief review of on recently developed approaches that classify these four databases are presented for a fair comparison.

In 2011, Kwitt et al. have suggested Bayesian framework by using copulas for texture image retrieval. They have used four datasets; VisTex (small), VisTex (full), ALOT and STex. They have reported classification rates on colour images of 78.82% on VisTex (small), 49.61% on VisTex (full), 42.14% on ALOT, and 49.94% on STEX by using multi resolution histogram (MRH) approach [28]. In 2013, Dong and Ma have suggested a new approach of contour let sub band clustering for feature extraction. The suggested method is verified on two different datasets of Brodatz and two different datasets of VisTex database. It is observed that for different datasets, different results are obtained such as accuracy of 99.92% on the first dataset and 96.81 ± 0.44% on the second dataset of Brodatz database. The classification accuracy of 99.25 ± 0.38% is achieved on the first dataset and 85.95 ± 1.50% on the second dataset of VisTex database [30]. In 2014, Muralaand Wu have recommended by combining Gabor transform with robust local binary (RLBP) and reported that the maximum classification accuracy is achieved as 84.92% on Brodatz database and 93.25% on VisTex database [31]. In 2014, Yuan has proposed a rotation and scale invariant local binary pattern and stated that the maximum classification accuracy of 75.20% is obtained on Brodatz database [32]. In 2017, Dash et al. have recommended homomorphic based descriptors for the classification on colour images. They have achieved best classification accuracies of 92.00% on STex, 70.50% on VisTex, and 99.17% on ALOT databases using Laws’ mask approach. For co-occurrence approach they have achieved best classification accuracies of 76.00% on STex, 66.50% on VisTex, and 91.00% on ALOT databases [21]. In 2018, Dash et al. have suggested bilateral filter based texture descriptor in which they have used all the four datasets. They have obtained three different classification rates on Brodatz database such as 94.87, 92.63 and 97.12% by utilizing three different filters. For VisTex database, maximum classification rate of 57.00% is achieved. Classification rates of 74 and 66.5% are obtained on STex database by utilizing two different filters. Classification rate of 95.33% is achieved on ALOT database [22].

5 Conclusions

This paper explains an extension of the existing GLRLM texture descriptor to be more robust under different illumination condition. To achieve the robustness to illumination variations and to improve the texture classification, two illumination normalization techniques are integrated with the traditional GLRLM approach. The illuminations normalized run length texture features are extracted that significantly improve the classification rates over original run length features. The proposed techniques compensate at the preprocessing level for any illumination changes. The advantages of the suggested approaches are demonstrated experimentally by the classification on four independent texture datasets. The suggested approach is simple for computation, effectual at attaining illumination invariant. Yet, the performance of the proposed techniques depends on their utilization, and choosing the parameters suitably that must be set through empirical observation.