1 Introduction

Texture information is one of the most important image features that can be used in several computer vision and image-processing applications such as remote sensing, object-based image and video coding, image retrieval in large databases and medical image analysis and understanding. As the domain of such applications increases, texture features have received more attention. Numerous algorithms for texture description have been proposed in literature, which can be divided mainly into statistical and structural approaches. In the statistical methods, such as co-occurrence matrices [1], frequency domain filtering [2], Gabor filtering [3, 4] and wavelet transform [5], texture primitives are described using the stochastic properties of the spatial distribution of image’s gray levels or using stochastic models like Gaussian Markov random fields [6]. In the structural approaches, such as morphological operators [7] and spatial filtering techniques [8], texture primitives are defined using geometrical placement rules of unit patterns.

More recently, the local binary patterns (LBP) operator, proposed by Ojala et al. [9, 10], described the statistical texture information in term of local structure primitives. Since the LBP uses both statistical and structural characteristics of texture, it has become a powerful tool for texture analysis and has been used in several image-processing applications such as face recognition [11], facial expression detection [12], remote-sensing image analysis [13], classification of fingerprint images [14] and real-time visual inspection [15]. In the LBP operator, local texture primitives are extracted by comparing the value of neighbor pixels with the value of the central pixel and represented with binary codes. Each bit of the obtained binary code corresponds to one of the neighbor pixels and its value is obtained by thresholding the gray value of neighbor pixel with the value of the central pixel. By assigning one label to each binary code, the texture primitives are described and extracted. If the decimal value of the obtained binary code with P-bits is used as the pattern’s label, we have 2P distinct texture primitives in this version of LBP (LBPall). Therefore, with a large number of neighbor pixels (P) the number of existing texture patterns in the LBPall is intensively grown. Hence, providing a suitable labeling scheme to reduce the number of texture primitives is valuable. In this paper, we propose a general extension of the LBP operator, which can describe and extract all texture primitives. The proposed LBP is rotation invariant and effectively reduces the number of primitive patterns using a suitable clustering and labeling scheme.

Since the proposed LBP operator (LBPGRI) can effectively extract all patterns, it can be successfully used in recognizing a wide variety of texture primitives, especially in medical images such as retinal images. The detection and quantitative measurement of retinal blood vessels can be used for the diagnosis of several diseases such as diabetic retinopathy [16], hypertension [17], glaucoma [18], obesity [19], lesions [20], etc. In the literature, several techniques for automatic blood vessel segmentation have been reported. These methods generally can be categorized into three classes: (1) kernel based, (2) tracking based and (3) classifier based.

In the kernel-based methods, the retinal images are filtered by various vessel-like kernels. The blood vessel structures are detected by maximizing the responses of such kernels. The mathematical morphology operators [2123] and matched filters [16, 2426] are two examples of this category. In the matched filters, a series of different Gaussian-shaped filters like the simple Gaussian model [16, 24], a derivative of Gaussian function [25] or a dual-Gaussian model [26] are used to detect the blood vessels. However, the matched filters have strong responses not only to blood vessels, but also to non-vessel edges like bright blobs. They also have to use several kernels to detect vessels with different thicknesses and orientations.

In the tracking-based methods, the vessel seems as a line and vessel edges are followed by exploiting local information. In these methods, various vessel profile models such as Gaussian profile [27], Bayesian probabilistic model [28], generic parametric model [29], deformable model [30] and Hessian-based region growing technique [31, 32] are used to find the path which has the best matches to the vessel profile model. Although these methods have high performance in detecting blood vessels, they usually have two weak spots: the limitation in handling of bifurcations especially in thin vessels and the need of manual seek points.

The classifier-based methods are divided into two subclasses: supervised and unsupervised methods. In the supervised methods [3335], some prior information of labeled vessels is exploited to decide whether a pixel belongs to a vessel or non-vessel. For this purpose, different classifiers such as artificial neural network [33], KNN classifier [34] and Gaussian mixture model classifier [35] were used. In the unsupervised methods, the vessel segmentation is done without any prior labeling knowledge [36, 37]. In the classifier-based methods, the performance of detected vessels heavily depends on the features which are extracted from retinal images. Various types of feature extraction methods such as Gabor wavelet transform [35], ridge detection [33], matched filters [36] and trench detection [37] have been reported in literature.

In this paper at first, we propose a general rotation-invariant extension of the LBP operator to describe and extract all texture primitives effectively. Then, we present a new supervised approach for automatic retinal blood vessel segmentation. An effective 6-D feature vector is extracted for each pixel in the retinal images using the proposed LBP operator. A multi-layer perceptron artificial neural network (MLP-ANN) is used as classifier to enhance vessels with different widths. The thin and thick blood vessels are separately detected by applying proper top-hat transforms and length filtering on the enhanced blood vessels. The final blood vessel network is detected by integrating and smoothing the detected thin and thick vessels.

The rest of this paper is organized as follows: the extraction of general rotation-invariant local binary patterns operator is presented in Sect. 2. The proposed method for robust blood vessel detection is presented in Sect. 3. The experimental results are reported in Sect. 4 and finally conclusion is given in Sect. 5.

2 General rotation-invariant local binary patterns operator

Since in the traditional LBP operator by increasing the number of neighbor pixels (P), the number of existing texture patterns is intensively grown, the obtained texture information is not applicable. To reduce the number of texture patterns, numerous extensions of the LBP were proposed in literature [10, 3840]. Ojala et al. [10] proposed a novel rotation-invariant method, called LBPriu2, for calculating the pattern’s label. They used the number of “1” bits existing in the obtained binary code as its label instead of its binary value. They also divided patterns into “uniform” and “non-uniform” sets and to reduce the number of patterns only uniform patterns were used as texture primitives. The uniform patterns contain at most two bitwise transitions from 0 to 1 or vise versa in the obtained binary code when it is considered as circular structure. The other patterns, so-called non-uniform patterns, are merged into one pattern with the label P + 1. This version of LBP (LBPriu2) is formulated as below:

$$ {\text{LBP}}_{P,R}^{\text{riu2}} = \left\{ {\begin{array}{*{20}c} {\sum\limits_{i = 0}^{P - 1} {{\text{BC}}_{P,R} (i)} } & {U({\text{BC}}_{P,R} ) \le 2} \\ {P + 1} & {\text{Otherwise}} \\ \end{array} } \right. $$
(1)

where

$$ {\text{BC}}_{P,R} (i) = \left\{ {\begin{array}{*{20}c} 1 & {g_{i} \ge g_{c} } \\ 0 & {g_{i} < g_{c} } \\ \end{array} } \right.\quad \quad \quad i = 0,1, \ldots ,P - 1 $$
(2)

and

$$ U({\text{BC}}_{P,R} ) = |{\text{BC}}_{P,R} (P - 1) - {\text{BC}}_{P,R} (0)| + \sum\limits_{i = 0}^{P - 2} {|{\text{BC}}_{P,R} (i) - {\text{BC}}_{P,R} (i + 1)|} \, $$
(3)

where g c corresponds to the gray value of the central pixel and g i (i = 0, 1, …, P − 1) corresponds to the gray values of P equally spaced neighbor points on a circle with radius R (R > 0) that forms a circularly symmetric structure. BC is the obtained binary code and U is uniformity measuring function. An example of obtaining the LBPriu2 and LBPall values are shown in Fig. 1.

Fig. 1
figure 1

The details of obtaining the LBP value of a traditional LBP operator

Since the non-uniform patterns are merged into one label; the stochastic information of texture patterns is discarded. In the textures which mostly contain flat surfaces and straight edges, the LBPriu2 effectively extract texture primitives. However, in natural images and especially in medical images, which contain more complicated shapes like high curvature edges, lines and different crossing boundaries or corners, utilizing the LBPriu2 is inapplicable to extract texture information. Based on this reason, Zhou et al. [38] suggested using more than one label for describing non-uniform patterns, especially for line-shaped patterns which have four bitwise transitions. Heikkila et al. [39] tried to address the problem by modifying the scheme of how to compare the pixels in the neighborhood. Instead of comparing each pixel with the center pixel, they compare center-symmetric pairs of pixels. They reduced the number of comparison bits for the same number of neighbors to half. Although this extension of LBP (LBPsym) reduced the number of patterns, it could not describe the texture primitives effectively. Also Liao et al. [40] tried to extract the dominant (uniform and non-uniform) patterns for each image. To retrieve the dominant patterns, the histogram of all patterns in the input image is constructed and the histogram bins are arranged in descending order. The dominant patterns are defined based on the occurrence of the most frequently occurring patterns which cover 80% of all existing patterns in the input image. They discarded the information on the pattern’s type and only used the pattern occurrence frequency as texture information. Although these extensions of LBP tried to use non-uniform patterns, they solved this problem ineffectively.

By analyzing the proportions of different pattern groups in the real images, it can be observed that by increasing the number of neighbor pixels (P), the ratio of uniform patterns (patterns with U ≤ 2) is decreased and, instead, the ratio of non-uniform patterns (patterns with U > 2) is increased. Table 1 shows the extracted proportion of all uniform and non-uniform patterns on the images of the Brodatz album [41] for three scales: (P = 8 and R = 1), (P = 16 and R = 2) and (P = 24 and R = 3).

Table 1 The percentage of different pattern types in all the images of the Brodatz database for (P = 8 and R = 1), (P = 16 and R = 2) and (P = 24 and R = 3)

Based on the obtained results, we can find that for small P the uniform patterns are dominant, but for a large number of neighbor pixels (P) the non-uniform patterns are dominant. Therefore, merging all non-uniform patterns to one label (as done in LBPriu2) or merging to some limited labels (as done in Zhou et al. [38]) cannot effectively describe the stochastic characteristics of texture primitives.

Hence, we design a general extension of LBP operator (LBPGRI) that attends to use all uniform and non-uniform patterns using a proper rotation-invariant labeling scheme. In the proposed LBP operator (LBPGRI), at first, all local texture patterns are clustered based on their roughness value which is calculated as below:

$$ \lambda ({\text{BC}}_{P,R} ) = \frac{1}{2}\left( {|{\text{BC}}_{P,R} (P - 1) - {\text{BC}}_{P,R} (0)| + \sum\limits_{i = 0}^{P - 2} {|{\text{BC}}_{P,R} (i) - {\text{BC}}_{P,R} (i + 1)|} } \right) $$
(4)

The value of roughness is equal to half the uniformity measure U. For each cluster with roughness value λ, we categorized all existing patterns into (P − 2λ + 1) subsets. Similar to the LBPriu2, the number of “1” bits existing in the patterns is selected as the index of each subset. Therefore, by increasing the roughness value (large λ), the number of labels is decreased and this is compatible with distribution of patterns in real images. Based on these assumptions, the proposed method can efficiently describe texture patterns and has full compatibility with distribution of patterns in real images. The proposed general rotation-invariant extension of the LBP operator (LBPGRI) can be formulated as below:

$$ {\text{LBP}}_{P,R}^{\text{GRI}} \left\{ {\begin{array}{*{20}c} {{{\left( {\sum\limits_{i = 0}^{P - 1} {{\text{BC}}_{P,R} (i)} } \right)} \mathord{\left/ {\vphantom {{\left( {\sum\limits_{i = 0}^{P - 1} {{\text{BC}}_{P,R} (i)} } \right)} P}} \right. \kern-\nulldelimiterspace} P}} & {{\text{if}}\quad \lambda ({\text{BC}}_{P,R} ) = 0} \\ {(P - \lambda )(\lambda - 1) + 1 + \sum\limits_{i = 0}^{P - 1} {{\text{BC}}_{P,R} (i)} } & {{\text{if}}\quad \lambda ({\text{BC}}_{P,R} ) > 0} \\ \end{array} } \right. $$
(5)

The proposed LBP operator is rotation invariant, because it assigns a unique label to each pattern based on the number of its “1” bits, and the placement of “1” bits does not have any effect on the LBP outputs. By applying this operator, not only uniform pattern, such as flat area, spots, corners, line-ends and edges, but also non-uniform patterns, such as lines, bifurcations and different crossover lines, can be extracted. Some of these patterns are shown in Table 2.

Table 2 Different uniform and non-uniform patterns for P = 16, which can be extracted using the proposed LBP operator. Dark circle is used to indicate 0 and white to indicate 1

In the proposed method, the patterns which have the same roughness value (λ) and the same number of “1” bits are merged and assigned the same LBP code to them. For example, the same LBP code is assigned for the junction points of both “T”- and “Y”-shaped patterns. These patterns are bifurcation patterns and the only difference between them is their bifurcation angles. In the proposed method, the information of angles between pattern’s branches is neglected to reduce the number of distinct patterns from 2P to (P 2/4) + 2. If this information is used, the number of patterns is dramatically increased and the calculation of the proposed LBP is too complicated.

In the proposed LBP, all patterns with different shapes and structures can be detected, and also the multi-resolution texture primitives can be extracted by employing different values for P and R. These multi-resolution texture primitives can be successfully used in recognizing a wide variety of patterns types, especially in medical images like blood vessels structures.

3 The proposed method for robust blood vessel detection

In this paper, a new supervised method is introduced for automatic blood vessel segmentation. In the first step, a 6-D multi-scale feature vector for each pixel of retinal images is extracted by applying the proposed general rotation-invariant LBP operator (LBPGRI) with different values for P and R. Next, the obtained feature vectors are applied to the trained multi-layer perceptron artificial neural network (MLP-ANN) to enhance the vessel structures. Finally, by using simple and proper post-processing procedure, for thin and thick vessels, the blood vessel trees are obtained. The details of the proposed method are given in the next section.

3.1 Feature extraction and vessel enhancement

The color retinal images captured by the fundus camera are saved in the RGB representation. This representation is appropriate for screening practice. In the image-processing domain, several color spaces such as HSV, YIQ, NTSC, YCbCr, CIE-Lab and CIE-Luv were introduced. Each color space has its characteristics and is suitable for some applications. The finding of an effective color space which has the best vessel/background contrast is an open challenge and depends highly on the imaging system. For example, Mendonca and Compilho in [21] show that the Lab color space is an appropriate representation for images in the STARE dataset and is not suitable for representation of images in the DRIVE dataset. A common and natural choice for monochromatic representation of retinal images is the green channel of the RGB color space. This representation was wildly used in literature. Because when the colored images of retinal vessels and their red, green and blue channels are visualized separately, the green channel shows the best vessel/background contrast, as shown in Fig. 2b. Therefore, this channel is selected to be processed by the LBPGRI operators.

Fig. 2
figure 2

The results of different steps in the proposed method. a Color image. b Green channel of image. c Enhanced vessels using ANN. d Final detected vessel network

Since the width of blood vessels are usually in the range of 2 and 10 pixels, to cover all vessel’s width, the proposed LBP operators are applied in three scales: \( {\text{LBP}}_{16,3}^{\text{GRI}} ,\,{\text{LBP}}_{32,5}^{\text{GRI}} \,{\text{and}}\,{\text{LBP}}_{48,9}^{\text{GRI}} \). Effective 6-D multi-resolution feature vectors are obtained using the values of the \( {\text{LBP}}_{P,R}^{\text{GRI}} \) operators and their corresponding roughness values (λ(BC P,R )). Since the value of these features may vary considerably, the feature vectors are normalized before applying to ANN:

$$ {\text{NFV}} = \left\{ {\left[ {{\text{LBP}}_{16,3}^{\text{GRI}} } \right]/65,\,\left[ {\lambda ({\text{BC}}_{16,3} )} \right]/8,\,\left[ {{\text{LBP}}_{32,5}^{\text{GRI}} } \right]/257,\,\left[ {\lambda ({\text{BC}}_{32,5} )} \right]/16,\,\left[ {{\text{LBP}}_{48,9}^{\text{GRI}} } \right]577,\,\left[ {\lambda ({\text{BC}}_{48,9} )} \right]/24} \right\} $$
(6)

These normalized feature vectors (NFV) are applied to the trained MLP-ANN to detect and enhance the vessel structures in the retinal images. The output of MLP-ANN is in the range of 0 and 1 (the value 1 for vessel and 0 for background). To reduce the effect of noise, a simple uniform averaging filter with 5 × 5 kernel structure is applied to the obtained values of MLP-ANN. The output of this step is the enhanced blood vessels, as shown in Fig. 2c. This enhanced image is used to extract the thin and thick vessels.

3.2 Vessel segmentation

To extract blood vessel trees, the thin and thick vessels are separately extracted by using morphological top-hat transform with suitable circular structuring elements. Circular structuring elements of radii 2 and 4 are applied to the enhanced images to highlight the thin vessels with a specific range of widths. The thick vessels are also emphasized by applying circular structuring elements of radii 10 and 12. To obtain the binary image for each range of the vessel width, a proper thresholding process is applied. For each image with a specific range of width, the threshold value is selected by analyzing the histogram and the corresponding cumulative density function (CDF). Since the ratio of blood vessel pixels in the retinal images is less then 12.7% [20], the threshold value (TV) is adopted such that its value is equal to 87.3% of the existing pixel’s values:

$$ {\text{TV }} = \mathop {\arg }\limits_{j} {\text{ \{CDF}}(j) = 0.873{\text{\} }} $$
(7)

After applying the obtained threshold value, a proper length filter is also applied to each sub-image to eliminate small regions. The final blood vessels are obtained by integrating of the vessel images with a specific range of width using logical OR function. A simple averaging filter with 5 × 5 uniform kernel structure is applied to fill out the final blood vessel network, as shown in Fig. 2d. The proposed method for automatic retinal blood vessel detection is summarized below.

 

Algorithm 1. The proposed method for automatic retinal blood vessel detection

Step I:

Apply the LBPGRI operator in three scales to extract normalized feature vector \( {\text{NFV}} = \left\{ {\left[ {{\text{LBP}}_{16,3}^{\text{GRI}} } \right]/65,\,\left[ {\lambda ({\text{BC}}_{16,3} )} \right]/8,\,\left[ {{\text{LBP}}_{32,5}^{\text{GRI}} } \right]/257,\,\left[ {\lambda ({\text{BC}}_{32,5} )} \right]/16,\,\left[ {{\text{LBP}}_{48,9}^{\text{GRI}} } \right]577,\,\left[ {\lambda ({\text{BC}}_{48,9} )} \right]/24} \right\} \) for each pixel of retinal image

Step II:

Enhance the blood vessels by applying the obtained feature vectors to the trained MLP-ANN

Step III:

Apply the top-hat transform with circular structuring elements of radii 2, 4, 10 and 12 to obtain the sub-images of vessels with a specific range of widths

Step IV:

Obtain the histogram-based threshold value and apply to each sub-image

Step V:

Apply the length filter to remove small region from the sub-images

Step VI:

Combine the results of sub-images using logical OR function

Step VII:

Fill out the obtained blood vessel network by applying average filtering with uniform kernel.

4 Experimental results

Two experiments were performed to evaluate the proposed method: First, we evaluated the discrimination ability of the proposed \( {\text{LBP}}_{P,R}^{\text{GRI}} \) operator on the basis of texture classification and compared it with some existing LBP operator. The second experiment was carried out to evaluate the performance of the proposed method for automatic retinal blood vessel detection by using images from two publicly available databases, the DRIVE and the STARE, and compared with several state-of-the-art methods.

4.1 Evaluation of the discrimination ability of the LBPGRI operator

To evaluate the discrimination ability of the proposed \( {\text{LBP}}_{P,R}^{\text{GRI}} \) operator, the Dataset1, which is shown in Fig. 3, containing 18 textured images was used as reference pattern. This dataset was selected from the Brodatz album [41]. Then, we extracted 1,278 images by rotating all reference images from 5° to 355° by step angle size 5° as test images.

Fig. 3
figure 3

Dataset1 selected from the Brodatz album to use in our experiments

The discrete occurrence histogram of the LBP operator outputs (i.e., pattern labels), which were accumulated over all pixels of images, is used as a texture feature. By analyzing the occurrence histogram of different texture classes, texture classification can be realized. We calculated the χ 2 distance between the LBP texture feature of each reference image (\( \vec{R} \)) and test image \( (\vec{T}) \) as below:

$$ \chi^{2} (\overrightarrow {R} ,\overrightarrow {T} ) = \sum\limits_{i} {\left[ {(R_{i} - T)^{2} /(R_{i} + T_{i} )} \right]} $$
(8)

The test image was assigned to one of the reference images, which has the minimum distance to it. This experiment was repeated for two cases: when (P = 8, R = 1) and (P = 16, R = 2). To emphasize the discrimination ability of the proposed method \( ({\text{LBP}}_{P,R}^{\text{GRI}} ) \) in classifying rotated texture images, we compared it with \( {\text{LBP}}_{P,R}^{\text{all}} \), which uses all existing binary patterns, \( {\text{LBP}}_{P,R}^{\text{riu2}} \) that was presented by Ojala et al. [10], \( {\text{LBP}}_{P,R}^{\text{extend}} \) presented by Zhou et al. [38], \( {\text{LBP}}_{P,R}^{\text{sym}} \) proposed by Heikkila et al. [39] and \( {\text{LBP}}_{P,R}^{\text{dom}} \), which uses dominant patterns and was presented by Liao et al. [40]. Table 3 shows the average ratio of correct labeling of the rotated images to the true reference images for all methods. The obtained results show that the proposed method has the highest performance in discriminating the rotated images. The ability of the proposed method in a large number of neighbor pixels (P) is superior to other methods. Furthermore, the use of all patterns \( ({\text{LBP}}_{P,R}^{\text{all}} ) \) deteriorated classification performance, especially for using large number of neighbors (P).

Table 3 The classification accuracy (%) of different LBP operators on Dataset1 images in two cases: (P = 8, R = 1) and (P = 16, R = 2)

4.2 Retinal blood vessel detection method evaluation

In the second section of our experiments, the proposed method for automatic blood vessel detection was tested on two publicly available databases, the DRIVE and the STARE. To evaluate the proposed method, we used detection accuracy (ACC), true positive rate (TPR) and false positive rate (FPR) as performance measures. The ACC is defined as the ratio of the number of correctly classified pixels to the total number of existing pixels. The TPR is defined as the ratio of the number of correctly detected vessel pixels to the total number of vessel pixels existing in the ground truth images. The FPR, also defined as the ratio of the number of non-vessel pixels, was classified as vessels to the total number of existing non-vessel pixels. The hand-labeled images by the first human expert were used as ground truth in each database.

At first, to obtain the best values for the parameters of the proposed method, we applied it to images in the training set of the DRIVE database. The DRIVE database consists of 40 images along with manual segmentation of vessels. It has been divided into training and test sets, each of which contains 20 images. These images are captured in digital form using a Canon CR5-3CCD camera at 45° field of view (FOV). The size of images is 565 × 584 pixels and used 8 bits per each color channel. We used the multi-layer perceptron artificial neural network (MLP-ANN) with seven nodes in the hidden layer as a classifier. The MLP-ANN was trained using first five images of the training set of the DRIVE database. The output of MLP-ANN is in the range of 0–1. The values near 1 were related to the vessels and 0 to non-vessels. The proposed method was evaluated using different values for each parameter. At first, the effectiveness of the selected feature vector was evaluated. To this end, the accuracy of the proposed method was measured in two cases: when only the LBP values were used as feature vector and when the LBP values along with roughness values were used as feature vector. The obtained results for all images in the training set of the DRIVE dataset are shown in Fig. 4. From this figure, the proposed feature vector (the LBP values along with roughness values) shows better accuracy for all images and its average accuracy is 1.5% higher.

Fig. 4
figure 4

The obtained results for evaluating the effectiveness of the selected feature vector on training set of the DRIVE dataset

The best size of length filtering for each range of vessel width or sub-image was experimentally achieved. In this experiment, we used different values from 0 to 500 pixels for length filter. For each range, the best value was selected. The best values for sub-images obtained by applying top-hat transform with circular structuring elements of radii 2, 4, 10 and 12 are 60, 80, 220 and 240 pixels, respectively.

The last parameter of the system is the value of CDF-based threshold. This parameter was set to a value that was greater than 87.3% of the existing pixels. In real applications, these values can be set based on the imaging system parameters and expected values for TPR and FPR.

To evaluate the performance of the proposed method, we applied it to images in the test set of the DRIVE database. We also compared it with several state-of-the-art blood vessel detection methods. For this purpose, the methods proposed by Niemeijer et al. [18], Mendonca et al. [21], Zana et al. [22], Jiang et al. [23], Chaudhuri et al. [24], Zhang et al. [25], Delibasis et al. [28], Palomera-Perez et al. [31], Martinez-Perez et al. [32], Soares et al. [34] and Staal et al. [35] are used for comparison. We also implemented the proposed method using the LBPriu2 operator. The average values of ACC, TPR and FPR along with their standard deviations are presented in Table 4.

Table 4 The obtained vessel extraction performance of all methods on the DRIVE database

The receiver operating characteristic (ROC) curve is also used as a measure for evaluating the performance of the proposed method. The ROC is constructed with the true positive rate (TPR) as the vertical axis and the false positive rate (FPR) as the horizontal axis. The closer the ROC curve approaches the top left corner, the better is the performance of the method. The ROC curves of the proposed method and some state-of-the-art methods are shown in Fig. 5. The methods proposed by Niemeijer et al. [18], Zana et al. [22], Jiang et al. [23], Chaudhuri et al. [24] and Martinez-Perez et al. [32] are used for comparison. The proposed method yields the best curve compared to the others. The proposed method is completely superior the other methods and has the nearest (FPR, TPR) values to the human observer.

Fig. 5
figure 5

The ROC curves obtained by the proposed method and some state-of-the-art methods on the complete DRIVE database. The star indicates the true and false positive rates of the second human observer given in the database

From the obtained results, it is clear that the proposed LBP (LBPGRI) operator is better than traditional LBP (LBPriu2) based on all measures. The TPR of the proposed method is at least 3% higher than that of other methods. Niemeijer’s method has the lowest FPR. It is about 1.75% better than our method, but its TPR is too low and the TPR of the proposed method is more than 8.5% higher. Also, the accuracy of the proposed method is one of the highest. Furthermore, the proposed method has the lowest standard deviations in all three measures. The obtained results on the image 19 of the DRIVE database for the proposed method and some state-of-the-art methods are shown in Fig. 6.

Fig. 6
figure 6

The results of different methods on the image 19 from the database DRIVE. a Original image. b Reference vessel image. c The results of the methods of Chaudhuri et al. [24], d Niemeijer et al. [18], e Zana et al. [22], f Jiang et al. [23], g Staal et al. [34], h Martinez-Perez et al. [32] and i the proposed method

The proposed method was also compared on the STARE database with some state-of-the-art methods. The STARE database consists of 20 images, 10 of which contain pathology. These images are captured in digital form using a TopCon TRV-50 fundus camera at 35° field of view (FOV). The size of the images is 700 × 605 pixels and used 8 bits per each color channel. Two observers manually segmented all the images. The performance of all methods was compared with first observer for ground truth. The previously trained MLP-ANN was used again. In this experiment, the methods proposed by Hoover et al. [16], Mendonca et al. [21], Chaudhuri et al. [24], Zhang et al. [25] and Soares et al. [34] were used for comparison. The obtained results on the normal and abnormal cases are separately presented in Table 5. The obtained results on two normal images and two abnormal images of the STARE database for the proposed method are shown in Figs. 7 and 8, respectively.

Table 5 The obtained vessel extraction performance of all methods on the normal and abnormal images of the SATRE database
Fig. 7
figure 7

The obtained results of two normal images of the STARE database. Left the original images. Center the reference images. Right the obtained results of the proposed method

Fig. 8
figure 8

The obtained results on two abnormal images of the STARE database. Left the original images. Center the reference images. Right the obtained results of the proposed method

In the obtained results, the TPR value of other methods only in the normal cases were high, but in the proposed method the TPR values in both normal and abnormal cases were high. The accuracy and FPR values of all methods were the same. Since in this experiment, the training and test sets are really independent, the obtained results show the robustness of the proposed method. The ROC curves of the proposed method on the normal and abnormal images of the STARE database are also illustrated in Fig. 9. From this figure, the proposed method has a high ROC curve for both normal and abnormal images, especially for abnormal cases.

Fig. 9
figure 9

The ROC curves obtained by the proposed method on the normal and abnormal images of the STARE database. The star indicates the true and false positive rates of the second human observer given in the abnormal set of STARE database

The full comparison of the proposed method with the methods proposed by Mendonca et al. [21], Chaudhuri et al. [24], Zhang et al. [25], Palomera-Perez et al. [31], Martinez-Perez et al. [32], Soares et al. [34] and Staal et al. [35] on both DRIVE and STARE databases are given in Table 6.

Table 6 An overall vessel extraction performance of all methods obtained on both the SATRE and the DRIVE databases

The proposed method is competitive with, or better than, other state-of-the-art methods when using both the DRIVE and STARE databases. It is strong in all three performance measures. While the FPR value of the proposed method is 3.85%, its TPR value is greater than 75% and at least 2.5% higher than the others. The accuracy value of the proposed method is similar to that of the others.

Finally, the running time of our method along with some state-of-the-art methods is given in Table 7, where the running times of the methods of Lam et al. [20], Mendonça et al. [21], Palomera-Perez et al. [31], Soares et al. [34] and Staal et al. [35] are obtained from their papers. The proposed method requires low computational cost and competes with existing fast methods. Without optimization of its MATLAB code, it will take about 3.5 min to process one image in the DRIVE database on a PC with a Pentium-IV 3.2 GHz CPU and 2.0 GB RAM. Most of the time is spent on extracting normalized feature vectors using the LBP operator. In real applications, the computation time can be significantly reduced by implementing the algorithm in C/C++ programming.

Table 7 The running times of different methods on the DRIVE database

5 Conclusion

The LBP operator is a powerful texture descriptor for image analysis. This operator can extract structural texture primitives effectively. The traditional \( {\text{LBP}}_{P,R}^{\text{riu2}} \) only uses uniform patterns and merges all non-uniform patterns into one class, which discards much useful information of these patterns. In this paper, we present a general extension of the LBP operator to extract all uniform and non-uniform micro-texture structures by using suitable rotation-invariant labeling scheme. We combined the proposed LBP with artificial neural networks (ANN) to present a new supervised technique for automatic blood vessel segmentation. In the proposed method, the thin and thick blood vessels are extracted separately by applying top-hat transform and simple thresholding along with length filtering. The final vessels are obtained by combining the thin and thick vessels using logical OR function.

Experiments on different test images from the DRIVE and STARE databases were conducted to assess the performance of the proposed method in comparison with some of the best state-of-the-art methods. The proposed method is competitive with, or better than, other state-of-the-art methods. While the FPR value is 3.85%, its TPR value is greater than 75% on both DRIVE and STARE databases. The overall accuracy of the proposed method is greater than 94.4% and also the running time of the proposed method is equal to or better than other state-of-the-art methods. It can process one image in 3.5 min.