A Novel Threshold based Method for Vessel Intensity Detection and Extraction from Retinal Images

Retinal vessel segmentation is an active research area in medical image processing. Several research outcomes on retinal vessel segmentation have emerged in recent years. Each method has its own pros and cons, either in the vessel detection stage or in its extraction. Based on a detailed empirical investigation, a novel retinal vessel extraction architecture is proposed, which makes use of a couple of existing algorithms. In the proposed algorithm, vessel detection is carried out using a cumulative distribution function-based thresholding scheme. The resultant vessel intensities are extracted based on the hysteresis thresholding scheme. Experiments are carried out with retinal images from DRIVE and STARE databases. The results in terms of Sensitivity, Specificity, and Accuracy are compared with five standard methods. The proposed method outperforms all methods in terms of Sensitivity and Accuracy for the DRIVE data set, whereas for STARE, the performance is comparable with the best method. Keywords—Retinal images; blood vessel detection; and segmentation; segmentation; hysteresis thresholding; cumulative distribution function introduction


I. INTRODUCTION
Retinal images are the fundamental diagnostic element to identify various ophthalmic diseases for medical experts. It can be captured using a specialized camera, fundus camera, with low power light capable of simultaneously illuminating and capturing the interior part of the eye [1]. The image captured by a fundus camera includes the retina along with the optic disc, macula, fovea, posterior pole, etc. [2].
A critical component of the retina is the blood vessels which are broadly categorized to retinal arteries and veins. The retinal artery carries oxygen and nutrients. It is through the optic nerve that the retinal artery enters the eye and then splits to superior and inferior branches [3]. The abnormalities in the structure of blood vessels lead to several ophthalmic diseases. In general, the abnormalities are due to the variations that occur in blood vessel attributes such as its tortuosity, vessel width, diameter, bifurcation, etc. These abnormalities are identified by the ophthalmologist using a detailed analysis of vessel color, shape, and contrast [2], [4].
When Intra Ocular Pressure (IOP) is higher than normal, it leads to ocular hypertension. As a consequence of this situation, the retinal artery narrows considerably and may cause the bursting of blood vessels [5]. When a blockage occurs to the arteries carrying oxygen to the nerve cells, it leads to retinal artery occlusion, which may cause vision loss [6]. Changes in the structure of blood vessels may lead to bleeding or leakage of fluid and vision distortion. This situation, diabetic retinopathy, arises in the retinal vessels due to diabetes [7]. The obstruction of blood flow occurs when blockages are present in arteries or veins of the retina and lead to the narrowing of blood vessels or blood clots. This is normally known as eye stroke in ophthalmology [8].
In the early days, ophthalmologists faced difficulties in diagnosing these ophthalmic diseases as manual extraction may contain a human error. Also, the entire process of vessel extraction is time-consuming. Hence, blood vessel segmentation using medical image processing techniques has become significant for an ophthalmologist for accurate diagnostics.
Several blood-vessel segmentation algorithms for retinal images have been developed in recent years [2], [9]- [12]. The segmentation algorithms can be broadly categorized into algorithms which comes under pattern recognition techniques [10], [12], vessel tracking approaches [13], [14], model-based approaches [15], [16], hardware implementation [17], [18] and hybrid approaches [19], [20]. Further sub-classification is possible for pattern recognition (PR) techniques and modelbased methods. The model-based methods can be categorized into region-based models and edge-based models [2]. On the other hand, PR techniques are divided into supervised and unsupervised algorithms based on the classification 546 | P a g e www.ijacsa.thesai.org methodology [2]. In supervised learning, prior model has to be trained using a set of reference images whereas in unsupervised learning, there is no need of prior training of samples. In the last decade, researchers proposed several deep learning models, specifically convolutional Neural Network models, for the segmentation of blood vessels. Compared to classical machine learning approaches, these methods are resource demanding.
A comprehensive review of the topic reveals the limitations of existing models in terms of recognition accuracy and algorithm complexity. This motivated the authors to explore the area. In this paper, a novel retinal vessel segmentation framework based on unsupervised learning is proposed to accurately extract blood vessels from fundus images. Vessel extraction is achieved by combining different segmentation steps from well-established unsupervised algorithms. The vessel detection step is constructed from an unsupervised coarse-to fine vessel segmentation method developed by Câmara Neto et al. using an adaptive threshold [20]. The threshold is based on the cumulative distribution function of vessel intensity values [10]. The vessel extraction is carried out using the hysteresis thresholding technique [11]. The proposed vessel segmentation framework is compared with a set of state-of-the-art methods and is found to have the edge over them.
The paper is articulated as follows. Section 2 gives a comprehensive review of blood vessel segmentation algorithms developed in recent years. Section 3 describes the proposed methodology followed by experimental results discussed in section 4. Section 5 concludes the paper.

II. LITERATURE REVIEW
In this section, descriptions of prominent retinal vessel segmentation algorithms using conventional and Convolutional Neural Network (CNN) based approaches are discussed, highlighting their methodologies and merits.
Coye developed a novel vessel segmentation algorithm for retinal images in 2015 [21]. RGB retinal images are converted into LAB color space and enhanced using the CLAHE algorithm in the proposed algorithm. Background exclusion is carried out using an average filter followed by thresholding using the IsoData algorithm on the improved image. Further, isolated pixels are removed using morphological operations.
A retinal vessel segmentation algorithm from color fundus images using an ensemble classifier is developed by Zhu et al.in 2016 [22]. They have used a 36-dimensional feature vector for each pixel. These feature vectors are then given as input to the Classifier and Regression Tree (CART) classifier. Ultimately, an AdaBoost classifier is constructed by iterative training for vessel extraction. The authors have experimented with their algorithm on the Digital Retinal Images for Vessel Extraction (DRIVE) database, and average values of accuracy, sensitivity, and specificity of 0.9535, 0.8319, and 0.9607, respectively, are reported [22].
Orlando et al., in 2017, developed a segmentation algorithm for retinal blood vessels via a discriminatively trained fully connected conditional random field model. A structured output support vector machine is used to automatically learn the parameters. The authors carried out their experiments on images from DRIVE, Structured Analysis of Retina (STARE), Child Heart and Health Study in England (CHASE_DB1), and High-Resolution Fundus (HRF) databases and claimed that the proposed method outperforms other existing methods based on sensitivity, F1-score, G-mean, and Matthews correlation coefficient [12].
A simple retinal vessel segmentation algorithm was developed by Dash et al. (2017) [23]. The extracted green channel from the retinal image is initially enhanced using the CLAHE algorithm in this algorithm. The enhanced image is then segmented using mean-c thresholding. Morphological cleaning is carried out on the segmented image to obtain the final segmented blood vessels. The authors carried out their experiments on DRIVE as well as CHASE_DB1 databases and claimed 0.9555 and 0.9540 accuracy, respectively. Jiang et al. (2017) proposed a retinal vessel segmentation algorithm that mainly comprised of capillary detection and venules detection [9]. In this algorithm, the input retinal image is converted to gray scale by extracting its green channel. A morphological top-hat operation is performed on the extracted image to obtain characteristic features for the classification of vessels and non-vessels, followed by empirical intensity thresholding. This leads to venules detection. For capillary detection, centerline candidate pixels are highlighted using the first-order derivative of the Gaussian filter by rotating it at different angles with a variation of 180. In their work, instead of rotating the filter, the image itself is rotated in order to avoid the loss of image information. After applying the filter, a connectivity check is performed to remove low connective components. Finally, the extracted venules and capillaries are combined and denoised using morphological erosion. The authors obtained an accuracy of 95.88% for single database tests and 95.27% for cross-database tests on experiments carried out with images from DRIVE and STARE databases.
A coarse-to-fine algorithm for vessel segmentation was developed by Câmara Neto et al. (2017) [10]. In this method, a vessel segmentation algorithm is proposed in which coarse vessels are detected using intensity thresholding, and vessel refinement is carried out using the principal curvature method. In the coarse vessel segmentation stage, the preprocessed retinal image is divided into two categories-tissue intensities and vessel intensities using an intensity threshold which is obtained by maximizing the distance between the extreme intensity values of an image and its cumulative distribution function (CDF). Further, an adaptive threshold is used for the final segmentation of vessels which are refined using curvature analysis and vessel reconstruction. Balanced accuracies of 0.7819 and 0.8702 are reported by the authors for images from DRIVE and STARE databases.
In 2018, Oliveira et al. proposed a retinal vessel segmentation algorithm by combining multi-scale analysis provided by stationary wavelets and multi-scale fully convolutional neural network [24]. This method used rotation operation for data augmentation as well as prediction. The authors carried out their experiments on DRIVE, STARE, and CHASE_DB1 databases and reported accuracies of 0.9576, 0.9694, and 0.9653, respectively.

Dash and
Bhoi (2018) [25] reported a study on thresholding, founded on the variational minimax optimization 547 | P a g e www.ijacsa.thesai.org algorithm, to segment retinal blood vessels. In this algorithm, gamma correction is applied on the extracted green channel of the fundus image, which is then enhanced using the CLAHE algorithm. On this enhanced image, thresholding is carried out and followed by morphological cleaning to obtain the final segmented blood vessels. The authors claimed that the experiments carried out on DRIVE and CHASE_DB1 databases give an average accuracy of 0.957 and 0.952, respectively.
In 2018, Wang et al. proposed a vessel segmentation algorithm that used Hessian-based linear feature filtering at preprocessing stage followed by fuzzy entropic thresholding. The authors reported an F1 score of 66.15% for their proposed method [26].
A vessel segmentation algorithm that used Gray-level Hit or Miss Transform (GHMT) with multi-scale, iteratively rotated multi-structuring elements to extract blood vessels from retinal images was proposed by Pal et al. in (2019) [11]. The vessels extracted using GHMT are further post-processed using hysteresis thresholding. The authors claimed that their method gives an average accuracy of 94.31% for images from the DRIVE database.
Preity and Jayanthi introduced Multi-threshold along with morphological operations for vessel segmentation [27]. Preprocessing was carried out using AHE, CLAHE, and average filter, followed by segmentation using a variant of the Otsu method followed by post-processing using morphological operations. Average accuracy of 95.3% was obtained using the DRIVE database.
An adaptive segmentation algorithm was used to extract retinal blood vessels by Kabir (2020) [28]. Anisotropic diffusion was applied on grayscale fundus images, followed by top-hat transformation to enhance the image. Local-propertybased intensity transformation was introduced on sub-images, and finally, vessels were segmented using k-means clustering from all sub-images. 95.29% and 95.47% accuracies were obtained on DRIVE and STARE databases, respectively. Jadoon et al. (2020) proposed a vessel extraction algorithm in which the CLAHE algorithm is applied on the green channel of fundus images, followed by the top-hat operation [29]. Prominent vessels are obtained using Frangi as well as high boost filters. The entire vessels were obtained using Isodata thresholding. 95.32% and 94.98% accuracies on DRIVE and STARE databases are reported.
Alhussein et al. (2020) used hessian along with intensity transformation information for blood vessel segmentation from fundus images. On CLAHE enhanced image, Wiener and morphological filter were applied to denoise it [30]. Thick and thin vessel enhanced images were obtained separately by using Eigenvalues of the hessian matrix at two different scales. Otsu and Isodata thresholding were applied to extract thick and thin vessels from the respective enhanced images. Accuracies of 95.59% and 95.01% on DRIVE and CHASE_DB1 databases were respectively reported.
In [31], a multi-scale convolutional neural network for retinal vessel segmentation was proposed. The network consisted of two consecutive convolution structures. After each convolution layer, ReLU was used as the activation function.
Once features are extracted from convolutional layers, feature maps were added and connected with a fully connected layer. The proposed network consisted of three fully connected layers. Softmax function was used for classification and the loss function used was cross-entropy. The network was implemented using Anaconda and TensorFlow. The training process took about 18h to complete. The proposed methods were evaluated on DRIVE and STARE databases with sensitivity, specificity, accuracy, and AUC values of 0.843, 0.980, 0.951, 0.979 on DRIVE and 0.823, 0.978, 0.956, and 0.974 on STARE databases, respectively.
In [32], a novel multi-label classification scheme for retinal vessel segmentation by a local de-regression model (LODESS) designed for multi-labeling was proposed. CNN classifier was designed for multi-label classification and learning of multilabel neighborhood relations. The proposed CNN model consisted of an encoder with max-pooling layers and a decoder with upsampling and convolutional layers. A focal loss function was used to solve the imbalanced classification problem. The algorithm was built on the Keras library with NVIDIA Titan X Pascal GPU. The network was trained for 20 epochs, and a standard stochastic gradient descent optimizer was used for training. Experiments were conducted on DRIVE and STARE databases. Accuracy, sensitivity, specificity and F1 scores of 0.952, 0.776, 0.979 and 0.813 on DRIVE and 0.970, 0.812, 0.990 and 0.855 on STARE databases were reported.
In [33], retinal vessel segmentation using a cross-connected convolutional neural network (CcNet) was proposed. Features from different layers were fused using a cross-connected structure. There were primary and secondary paths in the network, with each convolutional layer in the primary path connected with all layers in the secondary path. Each crossconnection from the primary to the secondary path was processed by a convolution, ReLU, and max-pooling module (CRM) in order to reduce the network parameters. The outputs of the primary path concatenated with each output of the secondary path. ReLU is the activation function used for the last layer. Green channel images were given as input to the network, and a pre-training step was used to accelerate the convergence of the network. The parameters of these pre-trained modes were employed as the initial values of the final trained model. CcNet was trained using the ADAM optimization method. GeForce GTX 1070 was used to accelerate the computation using the Caffe toolkit. Retinal vessel segmentation by making use of deep supervision with historically nested edge detector (HED) and smoothness regularization from CRFs was proposed in [34]. The network, known as Deeply Supervised and Smoothly Regularized Network (DSSRN), was an end-to-end network for a pixel to pixel segmentation that combined FCN and CRF strengths. Five staged HED network was used, and the segmented results from each layer and the last fuse layer were connected to mean-field CRF. The learning rate was initially set to 10 -8 , momentum and weight decay parameters were set to 0.9 and 0.0002, respectively. The model was implemented on 548 | P a g e www.ijacsa.thesai.org NVIDIA GTX Titan X GPU using the Caffe framework. Training model on a single GPU took 12h for completion, whereas testing of one retinal image required only 0.3s. Accuracy and sensitivity values of 0.954, 0.763 on DRIVE, 0.960, 0.742 on STARE and 0.959, 0.782 on CHASE_DB1 databases were obtained respectively.
Based on the review, it is clear that even though various algorithms exist, the majority are computationally expensive. Moreover, the results obtained can be further enhanced. So, there is a requirement for a better method with maximum true positive values and minimal false negative values. This motivated the development of a new unsupervised framework for retinal vessel segmentation. The following section describes the proposal.

III. PROPOSED METHODOLOGY
A novel blood vessel segmentation framework that combines a coarse-to-fine vessel extraction algorithm with hysteresis thresholding is proposed in this section.
Retinal vessel extraction, in general, is carried out in multiple steps. For thresholding-based methods, the last steps include thresholding for classification of pixels and postprocessing for fine-tuning/denoising. We have carried out an extensive experimental study of chosen retinal vessel segmentation algorithms [10], [11], [21], [23]. Based on the study, the proposed model is built.
The separation of vessel intensities from the tissue intensities as proposed in [10] is found to give a relatively good result. Also, the thresholding technique used by Pal et al. in their work [11] is simple, efficient, and convincing. The use of hysteresis thresholding ensures that final vessel segmentation is not based on a single threshold. Based on these observations, a novel retinal blood vessel segmentation framework is proposed by obtaining vessel intensities as described in [10], followed by the application of hysteresis thresholding [11].
The working of the proposed algorithm is as follows. Let, denote the green channel of the input retinal image. In order to make the vessels in brighter than their background nonvessels, is inverted.
where L is the number of possible intensity values.
is then smoothed using a Gaussian filter to remove noise and further enhanced using morphological top-hat operation.
where denotes the Gaussian smoothed image, the symbol ∘ denotes morphological opening operation, and , its structuring element, respectively.
The enhanced image, , further undergoes contrast enhancement such that the top and bottom 1% of all the pixel values in are saturated [10]. From this contrast-enhanced image, , vessels are extracted using a threshold defined based on the cumulative distribution function (CDF) of pixel intensities in . The idea behind the selection of CDF for threshold computation is that vessels constitute approximately 12% of total intensities in an image and the CDF becomes smoother when vessel pixels are reached [10].
From the CDF, the threshold is computed as follows.
The vessel intensity image is then extracted based on the threshold, , as follows: From this vessel intensity image, vessels are segmented using hysteresis thresholding. Unlike most of the thresholding schemes, which uses a single global threshold or local threshold, hysteresis thresholding uses two threshold values, say 1 and 2 . All the pixels in whose intensity values are greater than or equal to 1 have been considered as vessel pixels, and all the pixels whose intensity values are less than 2 , considered as non-vessel pixels. Also, for each pixel whose intensity values lies in between 1 and 2 , it is considered as a vessel pixel if at least one of the pixel in its 8-neighborhood has an intensity value greater than or equal to 1 [11]. The working of hysteresis thresholding for vessel segmentation is mathematically expressed as follows.
where ∅( , ) denotes the 8-neighborhood of pixel with coordinate positions (x,y). Fig. 1 depicts the working principle of the proposed methodology. The algorithm for the proposed framework is as follows.

Proposed Algorithm
• Read input fundus image.
• Extract the green channel and invert it.
• Smooth the inverted image using a Gaussian filter.
• Enhance the smoothed image using morphological top-hat operation. • Apply contrast enhancement.

IV. EXPERIMENTAL SETUP
In this section, details of the data sets used, values of various parameters, and matrices for performance evaluation are described.

A. Data Sets 1) Digital Retinal Image for Vessel Extraction (DRIVE)
: DRIVE is a well-known publically available fundus image database used for comparative studies on retinal blood vessel segmentation algorithms [35]. The images in the database are obtained from a Diabetic Retinopathy (DR) screening program in the Netherlands with a population that comprised 400 subjects within the age group 25-90 years. From the photographs of these subjects, 40 images are randomly selected, among which 7 showed signs of mild early diabetic retinopathy, and the remaining had no signs of DR. Canon CR5 3CCD camera with a 45 o field of view (FOV) is used for capturing the images. Each image in the database has a size of 584x568. The database is divided into two sets -training and testing set. Both the sets contain 20 images each, along with a corresponding mask that describes the FOV. Vasculature's single manual segmentation is available for the training set, whereas the testing set contains two manual segmentationsone is used as gold standard/ ground truth and the other for comparison of an algorithm's performance with that of a human observer.

2) Structured Analysis of Retina (STARE):
The STARE database is based on the STARE project initiated by Michael Goldbaum, M.D. in 1975, at the University of California, San Diego, funded by the U.S. National Institutes of Health [36]. The project is contributed by more than 30 people from the field of medicine, science, and engineering. The dataset consists of 400 raw images of size 700x605. The images are captured using the TopCon TRV-50 fundus camera at 35 o FOV. For each image in the database, a list of diagnoses and diagnosis codes are also provided. Expert annotations of features visible in the database are also presented in a tabular format. For the blood vessel segmentation task, 20 images with manually segmented vasculature from two experts are provided. The database also contains artery/vein labeling of 10 images by two experts and 80 images with ground truth for optic nerve head detection.

B. Values for Various Parameters
The first parameter to be fixed is the sigma value for the Gaussian filter, used to remove noise from the inverted green channel image. The sigma value is fixed to 0.45, and a filter of size 3x3 is used as suggested in [10]. As far as the enhancement process is considered, the structuring element selected for the top hat filter is a disk with a radius of 6 [10]. For hysteresis thresholding, different combinations of threshold values are tried, and an optimum threshold value is fixed as 1 = 0.7 and 2 = 0.2 respectively. If the value of 1 is reduced, it may lead to an increase in false-positive values. On the other hand, if the value of 2 is increased, it may lead to decrease in true positive values.

C. Performance Evaluation Measures
"Sensitivity," "specificity," and "accuracy" are three performance evaluation measures considered for the study. These are powerful measures generally used to evaluate segmentation results. Based on the manually segmented vessels and the one obtained by applying a segmentation scheme, the numbers of pixels classified as true positive (TP), true negative (TN), false positive (FP), and false-negative (FN) are computed. From these values, the following formulas are derived [37].
V. RESULTS AND DISCUSSION Twenty images each from the DRIVE and STARE databases are selected for the experiments. . The output of blood vessel segmentation is analyzed quantitatively using the performance evaluation measures -sensitivity, specificity, and accuracy.
In order to assess the merit of the proposed work, it is compared with the following algorithms: (i) Coye (2015): enhancement using CLAHE algorithm followed by segmentation using IsoData thresholding technique [21]; (ii) Jiang et al. (2017). : segmentation is carried out in two steps -venules detection and capillary detection [9]; (iii) segmentation technique which uses conditional random field model for discriminative feature extraction developed by Orlando et al. [12]; (iv) segmentation using mean-c thresholding [24] and (v) segmentation via variational minimax optimization thresholding [25].
Among the algorithms considered for implementation, each has its enhancement technique which precedes segmentation. These algorithms are applied on the green channel of color (RGB) retinal image and use the CLAHE algorithm for enhancement. The above algorithms are unsupervised methods except the one proposed by Orlando et al. [12], which is a supervised method. Table 1 gives the list of methods used for the experimentations. The average, best and worst performance of the segmentation algorithms given in Table 1, based on 550 | P a g e www.ijacsa.thesai.org sensitivity, specificity, and accuracy on images from the DRIVE database, is given in Table 2.
From Table 2, it is clear that based on both sensitivity and accuracy, the proposed method outperforms the other methods for images from the DRIVE database. Based on specificity, though the proposed framework performs well, the supervised method based on the conditional random field [12] gives the highest value. Table 2 reveals that when the best performance of each algorithm is considered, the proposed method dominates the existing methods based on accuracy.
For specificity, it performs closer to the method giving the best result. Also, it is evident that the worst performance of the proposed algorithm is more comparable to its average performance in terms of performance evaluation measures. The worst performance evaluation highlights the fact that for images where other methods fail to give a satisfactory result, the proposed method gives better results, which is a significant achievement.
In Table 3, the average, best and worst performances of the segmentation algorithms for images from the STARE database are given.
Methods that perform satisfactorily with the DRIVE dataset are found to give a poor performance with the STARE dataset. This is basically due to the difference in the quality of images.
From Table 3, it is clear that Method 1, which is a supervised method, shows good performance in identifying blood vessels with accuracy (high sensitivity and accuracy). The proposed method is better in terms of specificity, and overall performance is very close to Method 1. The performance of the other four methods is relatively poor.
Analysis of best and worst performance highlights the fact that variation of the performance of the proposed method with respect to images is low, which is a preferred quality.
From Table 3, it is clear that Method 1, which is a supervised method, shows good performance in identifying blood vessels with accuracy (high sensitivity and accuracy). The proposed method is better in terms of specificity, and overall performance is very close to Method 1.
The performance of the other four methods is relatively poor. Analysis of best and worst performance highlights the fact that variation of the performance of the proposed method with respect to images is low, which is a preferred quality. Table 4 gives a comparison of the proposed method with other state-of-the-art retinal vessel segmentation algorithms in terms of sensitivity, specificity, and accuracy on images from the DRIVE database. From Table 4, it is evident that the proposed method produces better results compared to other state-of-the-art methods. Fig. 3 show the segmented vessels obtained using each algorithm for sample images from DRIVE and STARE databases, respectively.

Fig. 2 and
The proposed framework fuses the merits of different works and is tested based on images from standard test databases. A possible challenge that may affect the algorithm is the quality of real-time input fundus images. We can correlate image statistics with input parameters by mapping image statistics with the parameters in such cases. It requires extensive experimentation and theoretical modeling and is not considered in the present study.

VI. CONCLUSION
In this paper, a novel retinal vessel segmentation algorithm by performing vessel detection using an adaptive thresholding technique followed by hysteresis thresholding for final vessel segmentation is proposed. Vessel detection is carried out with an adaptive threshold that depends on the cumulative distribution function of image intensity values. This method is capable of detecting almost all vessel intensities within a retinal image. The detected vessel intensities are then extracted using hysteresis thresholding. The combination of the detection and extraction stage using the two approaches led to the development of an innovative idea for the extraction of retinal blood vessels.
Experiments carried out with the DRIVE and the state databases establish the merit of the proposed algorithm. The algorithm extends help to the ophthalmologist in an easy diagnosis of retinal diseases as the extracted vessels can identify changes in normal vessel structures and indicate the presence of abnormalities, if any. This opens scope for further research for a better segmentation algorithm. The present study can be further extended by incorporating the influence of image quality on the algorithm and making it suitable for all types of images.