1 Introduction

Retinal vascular structures of human plays an important role in the detection and diagnosis of several eye diseases. Some diseases such as glaucoma, macular generation, vein occlusion, neovascularization and diabetic retinopathy are extremely severe and if they are not diagnosed in time and may lead to blindness. Hence retinal vessel extraction is essential for the detection of retinal diseases. The information such as vessel length, width, branching pattern and tortuosity helps the ophthalmologists to grade the severity of the diseases as well as to automatically diagnose the disease [2]. Initially manual segmentation of retinal blood vessel is done for the detection of retinal diseases. As the blood vessels present in the retinal images are of low contrast and complex, the manual segmentation of retinal vessels is more difficult and is prone to human error. Therefore, manual segmentation of retinal blood vessels is tedious. Hence an automatic and reliable method is needed for extracting and measuring the blood vessels in retinal images. Recently, several methods for extracting retinal structures such as blood vessels have been developed. The template based method initially proposed by Chaudhuri et al. [3] based on matched filter approach for extraction of retinal blood vessel is widely used. Later, several retinal vessel segmentation algorithm were employed which includes matched filtering methods [4, 18], model based approached [1, 8, 12, 24], rule based approaches [14] and supervised learning methods [11, 13, 19, 22]. On the other hand, the acquisition of fundus images under several condition of resolution, illumination, overlapping tissue and field of view causes degradation of automated extraction of retinal vascular structure. Therefore, it is necessary for a reliable and efficient retinal vessel extraction method which preserves the various vessels in retinal images. In addition to the above various approached have been used to extract the vascular structures in retinal images which includes pixel based and tracking based approach. Various pixel based approach of vessel extraction are reported in [6, 16, 21, 27]. In these approaches the pixel based segmentation is done in two phases. In the first phase the appearance of the vessel is enhanced using adaptive filtering and morphological preprocessing. The second phase is to classify the pixels in the retinal images as background or vessels using branch point operations or thinning algorithms. The tracking based approach included either a semi automated tracking or a fully automated tracking approach. The semi automated tracking approach starts with a manual selection of an initial seed point in the vessel and can be efficiently applied for a coronary vessel extraction. A fully automated tracking algorithm is employed effectively for retinal vessel extraction, performing the operation of detection of the vascular structures in a single pass. In this the seed point is selected automatically by the algorithm and using continuity property of the vessel the rest of the blood vessel is tracked [5, 15, 26]. Both the pixel and tracking based approaches have their own advantages and disadvantages. The pixel based technique provides a complete vascular structure extraction but it is computationally expensive when dealt with large datasets. But tracking based approach is computationally efficient but while processing some of the vessel pixels is left unnoticed as the segmentation depends on the neighborhood pixels which results in lack of extraction of complete vascular structure. Yet another method is proposed based on graph cut method to extract the retinal blood vessels [20]. To provide better segmentation results the retinal images have undergone preprocessing using adaptive histogram equalization and distance transformation.

2 Blood vessel extraction

Retinal blood vessels are thin elongated structures. In order to extract retinal blood vessels in fundus images a new automated approach is implemented. Figure 1 describes the architecture of the proposed system. The proposed approach is classified into two phases: preprocessing and the extraction of retinal blood vessels using probabilistic modeling which is optimized by maximum entropy based expectation maximization algorithm by using maximum entropy uniform distribution as the initial condition. Initially a preprocessing is done to improve the robustness and correctness of segmentation in retinal blood vessels. Figure 2 shows the various methods adopted for the extraction of the vascular structure of retinal images.

Fig. 1
figure 1

Overall System Architecture

Fig. 2
figure 2

Flowchart of the proposed system

2.1 Preprocessing

The acquisition of fundus image under different condition of illumination results in intensity inhomogeneity. The proposed approach takes the first step of preprocessing as bias correction to overcome the problem of intensity inhomogeneity. A contract enhancement is applied to the green channel as in the work done in [25]. The intensity of the image is corrected and the equalization of the illumination is done. Then the resulted image is enhanced using adaptive histogram equalization technique. The noise free retinal image v(x) can be defines as [23] is given in eq. (1)

$$ v(x)=v\hbox{'}(x)+f\hbox{'}(x) $$
(1)

where v(x)the uncorrupted image and f(x)is the bias field. v ' (x) = log(x)and f ' (x) = log f(x).

Equation (2) derives the total bias field estimate:

$$ f{(x)^e}_n=\sum \limits_{i=1}^nf{(x)^i}_r $$
(2)

where n represents the nth iteration.

As a second step of preprocessing, adaptive equalization is done on the bias corrected image. The enhanced image using adaptive histogram equalization is defined in eq. (3)

$$ {I}_{enhanced}={\left(\sum \limits_{p^{\prime}\in R(p)}\frac{s\left(I(p)-I\left({p}^{\prime}\right)\right)}{h^2}\right)}^r.M $$
(3)

Where I represents the green channel of the fundus image, p represents a pixel in the image and p’ represents the neighborhood pixel to p and p '  ∈ R(p)represents the neighborhood square window of length h.

The level of contrast between the vessel and the background is denoted by the value of r. The value of contrast between the vessel pixel as the background increases as r increases. s(d) = 1 if d > 0. Maximum intensity value in the image is set as the values of M = 255. To eliminate the non vessel pixels in the fundus image a morphological open operation is performed. By using a distance transform model a distance map of the image is created in the pruned image. Finally a complete vascular structure of the retinal image is extracted using a probabilistic model by using the maximum entropy based EM algorithm.

2.2 Probabilistic model

The blood vessel extraction is modeled by sing a probabilistic variable model [10]. The process determines the component from which the pixel originates. A binary vector \( {U}_k={\left({U}_{k0},{U}_{k1}\right)}_{k=1}^K \)having a 1of K representation in which only one of the two elements in Uk is equal to 1 and all other elements are equal to 0. A pixel in the retinal image can be precisely assigned to the k clusters if Uk1 = 1. Otherwise the value of Uk0 = 1. Equation (4) defines a prior probability distribution over Uk:

$$ P\left({U}_k\right)=\prod \limits_{k=1}^K{\left({\pi}_k\right)}^{U_k} $$
(4)

where the probability values must satisfy the condition 0 ≤ πk ≤ 1and \( \sum \limits_{k=1}^K{\pi}_k=1 \).

The posterior probability of Xi for a given value of Uk is defined as in eq. (5).

$$ P\left({X}_i\left|{U}_k=1,{\theta}_k\right.\right)=\prod N{\left({X}_{i_i}\left|{\mu}_k,{\sum}_k\right.\right)}^{U_k} $$
(5)

Equation (6) derives the joint probability which is derived from the product of eq. (4) and (5).

$$ P\left({X}_i,{U}_k\left|{\theta}_k\right.\right)=\prod \limits_{k=1}^K{\left({\pi}_kN\left({X}_i\left|{\mu}_k,{\sum}_k\right.\right)\right)}^{U_k} $$
(6)

The maximum likelihood function is defined in eq. (7)

$$ P(X)=\sum \limits_{k=1}^K\left({\pi}_kN\left({X}_i\left|{\mu}_k,{\sum}_k\right.\right)\right) $$
(7)
figure d

2.3 Maximum Entropy based EM Algorithm (MEEM Algorithm)

The Expectation Maximization algorithm is used as a powerful tool for determining the maximum likelihood of latent variables. In conventional EM algorithm parameter λ of Gaussian Mixture Model is used as initial condition. The EM algorithm of proposed work has a realization of uniform distribution which has maximum entropy as the initial condition. The EM algorithm is used to extract the vessel pixels from the non-vessel pixels. The output of EM algorithm is iterated in two steps. The E-step is used to compute the expected value of the likelihood function and the M-step is used to maximize the value defined by the likelihood function until convergence. Figure 3 represents the flowchart of the Maximum Entropy based EM algorithm. The parameters specified in the flowchart are defined as follows: variable w represents the weight distribution and is initialized with maximum entropy; N represents the number of Pixels; h represents the histogram with feature Xi; q is the simplified form of posterior distribution, λ and λ’ are the simplified for of parameters before and after estimation which means ⌊Pi, Mi, ∑i⌋, where i = 1,2,….,C and C represents the components of Gaussian. Pi represents the prior probability; Mi represents the Mean Vector and ∑irepresents the covariance matrix.

Fig. 3
figure 3

Flowchart of Maximum Entropy based EM Algorithm

figure e

3 Experimental results

In this session the experimental results obtained by the proposed system are presented. In order to evaluate the performance of the proposed system the results are compared with the manually segmented results hand labeled by experts as well as with of the work done by Odstrcilikb et al. [18] and Ana Salazar-Gonzalez et.al [20]. As the motivation of the proposed work is to extract blood vessels form retinal images, the testing is carried out in both normal and abnormal retinal images. Figure 4(a) and (b) shows the original normal and abnormal retinal images respectively. Figure 4(c), (d) and 4(e), (f) shows the results obtained by the manual segmentation of first expert and second expert respectively. From the results it is clear that the second expert has a more predictable view of the boundaries of the vessels with the ability to identify smaller vessels than the first expert. This shows that the results of vessel extraction depend on the experience of the experts.

Fig. 4
figure 4

Results of Normal and abnormal retinal images: a & b Original Image c & d manual segmentation by expert1 e & f manual segmentation by expert2

The proposed method is quantitatively validated with DRIVE [17, 22] and STARE [7] database with a total of 80 retinal images. The DRIVE database contains 40 fundus images which include 20 training retinal images and 20 testing retinal images. The images are captured at 45o field of view with a size of image as 565 × 584 pixels. The STARE database has 40 fundus images which include 20 healthy and 20 unhealthy retinal images. These images are captured at field of view of 35o with resolution of 700 × 605 pixels. The manually segmented image by second expert is adapted as ground truth image to evaluate the proposed technique.

Figures 5a and 6a represent the original image from DRIVE and STARE database. The series of output represent (b) green channel (c) bias corrected image (d) result of adaptive histogram equalization (e) segmented blood vessel (f) overlaid blood vessels (g) blood vessels removed from retinal image (h) segmented major vessels (i) segmented minor vessels.

Fig. 5
figure 5

a Original image in DRIVE database (-i Exprimental results obtained using proposed approach

Fig. 6
figure 6

a Original image in STARE database b-i Exprimental results obtained using proposed approach

4 Performance evaluation and discussion

Figure 7 represents the evaluation method adapted for evaluating the performance of the proposed automatic segmentation algorithm against manual segmentation.

Fig. 7
figure 7

Shows the evaluation criteria of automatic segmentation against manual segmentation

First, some secondary metrics such as true positive, false positive, true negative and false negative are calculated. TP represent True Positive which denote vessel pixels are correctly identified as vessel, TN represent True Negative which denote non vessel pixels are correctly identified as back ground, FP represent False Positive and denote background pixels are incorrectly identified as vessel and FN represent False Negative which denotes vessel pixels are incorrectly identified as background. To quantify the accuracy of segmentation true positive rate and true negative rate are introduced and is shown in eq. (8) and (9). To measure the performance of the proposed work against the work done in [18, 20] four performance metrics are used as shown in eq. (10)–(13). The metrics are sensitivity, specificity, precision and accuracy.

$$ TPR=\frac{TrueNum}{Num_v} $$
(8)
$$ FPR=\frac{FalseNum}{Num_{nv}} $$
(9)

where TrueNum represent the sum of the pixels that are truly segmented as vessel, FalseNum represents the sum of the pixels that are falsely segmented as vessel, Numv represents the sum of the pixels marked as vessel in the ground truth image and Numnv represent the sum of pixels marked as non-vessel in the ground truth image. Finally, the accuracy is calculated.

$$ Sensitivity=\frac{TP}{TP- FN} $$
(10)
$$ Specificity=\frac{TN}{TN+ FP} $$
(11)
$$ \Pr ecision=\frac{TP}{TP+ FP} $$
(12)
$$ Accuracy=\frac{TP+ TN}{TP+ TN+ FP+ FN} $$
(13)

An accurate segmentation would produce a True Positive rate as 1 and False Positive rate as 0.

Parameter is set during the vessel extraction step. The only adjustable parameter is the p is the noise standard deviation σ. The value σ =1 is chosen for DRIVE database and σ = 2.5 is chosen for STARE database. To improve the performance assessment of the segmentation results obtained against the manual segmentation, two more performance metrics [9] are used: Area Overlap (AO) and False Discovery Rate (FDR). The metrics are calculated as follows:

$$ AO=\frac{C_1\cap {C}_2}{C_1\cup {C}_2} $$
(14)

where C1 represents the true vessel boundary segmented in ground truth image and C2 represents the vessel boundary segmented by the segmentation algorithms.

Finally, the False Discovery rate is calculated.

$$ FDR=\frac{FP}{TP+ FP} $$
(15)

The experimental results obtained using the proposed techniques are compared with other methodologies and the results are shown in Table 1. In Table 1, the segmentation results are measured using the performance metrics such as sensitivity, specificity and precision in DRIVE database and Table 2 defines the results of segmentation in STARE database. The results show a segmentation precision of 96.73% in DRIVE database and 97.68% inn STARE database.

Table 1 Comparison of segmentation results of proposed method with work in [18, 20] on DRIVE database
Table 2 Comparison of segmentation results of proposed method with work in [18, 20] on STARE database

The performance evaluation is carried out in the field of view and the area outside the field of view is not considered for evaluation. Table 1 and Table 2 shows the comparison of various performance metrics in DRIVE and STARE datasets respectively on a sample of 10 test data. The experiment results are evaluated on 20 test data each on DRIVE and STARE Datasets and produced an average sensitivity of 98.9% and with a specificity of 79% in DRIVE database and 99% of average sensitivity and 85% of average specificity in STARE database.

Table 3 shows the comparison of accuracy on a sample of 10 test data each from DRIVE and STARE databases. From the two databases, it is found that 25% of pixels are present outside the field of view. Considering the average accuracy as performance metric, the proposed approach produced better performance when compared to the work done in [18, 20] producing an average higher accuracy of 98.8%. The average accuracy in work [20] is 95.1% and work [18] is 93%.

Table 3 Comparison of segmentation results of proposed work with Work [20] and Work [18] on DRIVE and STARE database in terms of Accuracy

Table 4 shows that performance of segmentation results on average of 20 test data each from DRIVE and STARE databases with an average area overlap of 94.15% and false discovery rate of 2.62% and the proposed method attains better performance than the work done in [18, 20] with respect to average AO and FDR. Table 5 shows the performance of the proposed system in DRIVE and STARE databases. Table 6 shows the comparison of performance on normal and abnormal retinal images on STARE database. The experimental results show significant degradation in performance in abnormal images than in normal images. On the other hand, from the Table 6 it is evident that compared to the other methods, the proposed approach produced better results in terms of average Area Overlap, Accuracy and False Discovery rate.

Table 4 Performance evaluation of segmentation results of proposed method with work done in [18, 20]
Table 5 Performance comparison on different database using proposed approach
Table 6 Performance comparison on normal and abnormal retinal images in STARE Database

Figures 8 and 9 shows the Sensitivity and Specificity analysis respectively on an average on 10 test cases. The results show that the proposed system produces better results in terms of Sensitivity and Specificity. From an average of 20 datasets each from DRIVE and STARE database produced an average of 98.9% sensitivity and 83.74% specificity.

Fig. 8
figure 8

Average Sensitivity Analysis on DRIVE and STARE databases of proposed method compared with work [20] and work [18]

Fig. 9
figure 9

Average Specificity Analysis on DRIVE and STARE databases of proposed method compared with work [20] and work [18]

Figures 10 and 11 shows the graphical representation of performance measure in terms of Area Overlap, False Discovery rate and Accuracy in DRIVE and STARE Databases. From the graph it is clear that the proposed method provides better results in terms on AO, FDR and Accuracy. On average of the test conducted on 20 datasets each from DRIVE and STARE database produced 98.8% accuracy with a false discovery rate of 2.62%. The obtained experimental results show that less noisy image produce higher specificity. Hence several vessel enhancement filters can be applied to high light local features to produce better results. The results also showed that the parameter is tuned for different databases to produce better performance. The proposed method was implemented in Matlab tool. The method was evaluated in a personal computer with 3.3GHz processor and 4GB RAM. The processing time average is on an average of 6 s for one fundus image and hence is suitable for real time applications.

Fig. 10
figure 10

Comparison of Performance measures on DRIVE Database for proposed method, work [20] and work [18]

Fig. 11
figure 11

Comparison of Performance measures on STARE Database for proposed method, work [20] and work [18]

5 Conclusion

In this proposed approach an automatic segmentation method for the extraction of blood vessels in retinal images is presented. To overcome the problem intensity inhomogeneity and low contrast the green channel of the retinal is under gone various preprocessing steps to provide accurate vessel segmentation including smaller vessels. The proposed method is validated on retinal images in DRIVE and STARE database. From the experiments conducted qualitatively and quantitatively on normal and abnormal images it is evident that the proposed method is robust and has produced accurate segmentation results as the ground truth with higher accuracy of 98.65% in normal and 95.4% in abnormal retinal images. In addition, performance of the proposed method is compared with other methods and the results indicate the proposed approach outperforms with an average sensitivity of 98.9% and average area overlap of 94.16% on normal retinal images. In future research, these extracted retinal blood vessels can be used for the detection of lesions in retinal images.