Open Journal of Medical Imaging
Vol.05 No.04(2015), Article ID:61762,10 pages

An Improved Method for Automatic Retinal Blood Vessel Vascular Segmentation Using Gabor Filter

Nalan Karunanayake1*, Nihal D. Kodikara2

1Department of Electrical and Computer Engineering, Sri Lanka Institute of Information Technology, Malabe, Sri Lanka

2Department of Computer Science, University of Colombo School of Computing, Colombo, Sri Lanka

Copyright © 2015 by authors and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY).

Received 27 September 2015; accepted 5 December 2015; published 8 December 2015


Early detection of Non-Proliferative Diabetic Retinopathy (NDPR) is currently a highly interested research area in biomedical imaging. Ophthalmologists discover NDPR by observing the configuration of the vessel vascular network deliberately. Therefore, a computerized automatic system for the segmentation of vessel system will be an assist for ophthalmologists in order to detect an early stage of retinopathy. In this research, region based retinal vascular segmentation approach is suggested. In the steps of processing, the illumination variation of the fundus image is adjusted by using the point operators. Then, the edge features of the vessels are enhanced by applying the Gabor Filter. Finally, the region growing method with automatic seed point selection is used to extract the vessel network from the image background. The experiments of the proposed algorithm are conducted on DRIVE dataset, which is an open access dataset. Results obtain an accuracy of 94.9% over the dataset that has been used.


Diabetic Retinopathy, Blood Vessel Segmentaion, Retinul Fundus Image, Gabor Filter, Region Growing, Point Operators, Illumination Variation

1. Introduction

The blood vessel system of the human retina is a complex network. The initial phase of diseases such as diabetic retinopathy, hypertension, arteriosclerosis, cardiovascular disease and retinopathy of prematurity (ROP), can be diagnosed by monitoring the retinal vessel structure from time to time [1] -[3] . Among those diseases, diabetic retinopathy is the elementary cause of blindness, since 5.5% of the world population influence of diabetics and 10% among them are having diabetic retinopathy [4] . Diabetic retinopathy is a disease that occurs due to a complication of diabetic, which usually results in severe vision loss or permanent blindness. It occurs when high blood sugar levels damage the tiny blood vessels that nourish the retina. “Non-Proliferative Diabetic Retinopathy” (NDPR) is the early phase of the disease [5] . During this period, tiny bulges occur in the vessel walls. In order to observe the initial stage of retinopathy or “NDPR”, ophthalmologists need to closely monitor the blood vessel network in the retina. A methodical medicine of diabetic retinopathy can prevent 98% of serious vision loss. However, the patient has to go through a systematic eye screening process [6] . In the screening process, plenty of retinal images are inspected by the physician. The manual retinal blood vessel segmentation is intricate, expensive and time consuming, and irreproachable level of the segmentation will depend on the aptitude of the ophthalmologist [4] [7] . Therefore, reliable automated computerized vessel segmentation system is an essential which can accommodate to the clinicians during the screening process [8] .

There are various methods which have been used for segmentation of the vessels to date including rule based methods, vessel tracking methods, filter based methods and supervised methods [5] [6] [9] . In the automatic segmentation process, it is difficult to attain accurate results of the segmented vessels due to the uneven intensity variation of the retina (uneven background illumination) [1] [4] [5] [10] . Therefore, thin vessels are impassable to distinguish from the retinal background. In this paper, a new approach based on point operator is used to mitigate the uneven illumination in order to enhance the vessel network and to adjust it preferably providing for segmentation process.

The green channel of the original fundus image has been used to obtain the traces of blood vessels and morphological operations followed with enhancement and background exclusion. Thresholding has been used to extract the vessels in the approach taken by S. Joshi and P. T. Karule [11] . In “Vessel Segmentation in Retinal Images Using Graph-Theoretical Vessel Tracking”, a vessel tracking technique based on seed points is used to extract the vessel system out of the retinal image [12] . Otsu thresholding and Medial Axis Skeletonization based method followed by pruning have been used in the research done by L. Sukkaew et al. [13] . Next a complex Gabor filter is used to enhance the vessels and the result is further purified by using entropic thresholding in the research done by P. C. Siddalingaswamy and K. G. Prabhu [14] . D. onkaew and B. uyyanonvara in “Automatic Extraction of Retinal Vessels Based on Gradient Orientation Analysis” [15] has used a gradient orientation method to separate the vessel system. Applying matched filter and 2-D Gabor wavelet to the inverted image of the green channel and the vessels of the enhanced image is segmented using multilayered thresholding and adaptive thresholding methods with an accuracy of 94.85% are conducted by M. Usman and S. A. Khan [16] .

This study is framed into four sectors. The proposed methodology explicated in order to provide necessary details for blood vessel segmentation is presented in Sector 2. In Sector 3, the experimental results and assessments of the algorithm using the DRIVE [17] database are explained and results are compared with the prior studies [18] -[22] . Finally, conclusion and reference are given in Sector 4.

2. Methodology

The proposed algorithm can be split into five stages.

2.1. Resizing the Fundus Images

Several distinct sizes of color fundus images are brought to one common 600 × 600 size in order to bring them in a common dimension to generalize the algorithm for all the images.

2.2. Correcting Intensity Variation

In the retinal images, there is an intensity variation due to the manifold illumination. Many research works has been experimented to restrain this issue [23] -[26] . The intensity variation of the red channel, which is the major factor causal to the illumination variation of the fundus images in Figure 1.

The contrast variation of the red channel is adjusted by applying the logarithmic point operator. All the pixel values of the red channel were transformed by replacing each pixel value with its logarithmic value. Since the low intensity pixel values are increased, the intensity variation is abate [27] . Next, the enhanced red channel is

(a) (b) (c)

Figure 1. Extraction of RGB Image: (a) Red channel component; (b) Green channel component; (c) Blue channel component.

combined with green and blue channels in order to obtain a color image with less non-uniform illumination Figure 2(b).

The logarithmic point operator function is given by:


where, Q(i,j) is the adjusted image and the P(i,j) is the input image. Furthermore, “c” is the scaling factor as follows:


where R is the maximum pixel value of the input image P(i,j).

2.3. Pre Processing

The blood vessels appear a higher contrast in the green channel than the red or blue channels in the enhanced retinal image. Only the filtered green channel of the retinal image will be more over processed [28] . A 2-D median filter with 3-by-3 neighborhood size is applied to obtain a clear image with a minimum extent of the noise of the green channel (Figure 3).

2.4. Apply 2-D Gabor Filter

The 2-D Gabor filter is a linear filter, that has been widely used for low level oriented edge detection and extraction of texture features for discrimination purposes in image processing and computer vision fields. Frequency representation and orientation representation of the Gabor filter are identical to the human vision system. In the spatial domain, a 2-D Gabor filter is a Gaussian kernel function modulated by a sinusoidal plane wave [29] . Enhancement of the pixels of the blood vessels oriented along the various dimensions can be done due to the factor of directional selectivity of the Gabor filter. The response of the Gabor filter is a complex number with real and imaginary parts that are orthogonal and act as low level oriented edge discriminators [30] [31] . The equalized image is complimented (inverted) and Gabor filter is applied to highlight the blood vessel vascular system, by ignoring the background noise. The filter has a real component as well as imaginary component expressing orthogonal directions. The two components of a real part and imaginary part can be formed into a complex number represented by:


Individually the real component represented by:


(a) (b)

Figure 2. Non illuminated image processed as an equaly distributed illuminated image: (a) Original image; (b) After adjusting the illumination variaton.

Figure 3. Filtered green channel image.

The imaginary component is given as:





The Gabor filter depends on few parameters. The parameter θ exemplify the orientation of the filter. λ represents wavelength of the sinusoidal function and ψ is the phase offset. σ is the variance of the Gaussian envelope. When σ changes, Gabor filter with above parameters does not scale uniformly. Thus, it is better to use

parameter instead of λ. Where, is the spatial aspect ratio, which specifies the ellipticity of the sup-

port of the Gabor function by selectively changing the above parameters whilst a clear response of vessels could be obtained.

2.5. Segmentation of Vessels

The processed image after applying the Gabor filter, an adequate thresholding technique is required to extract the blood vessels from the image background. In this phase, global thresholding techniques cannot be applied due to the various gray levels in different areas in the image and noisy unconnected regions appeared as false vessels. The processed image is a matrix with M rows and N columns. Then the window concept is used to convert the processed image into the binary scale.

The region growing method is used to extract the vessel vascular system in the proposed methodology. The region growing segmentation method can be divided into two partitions as general purpose and knowledge based [32] . The region growing segmentation used to analyze of an image into connected regions based on a certain similar characteristic of the pixels within them [33] .

The enhanced image after applying the Gabor filter is divided into 100 × 100 pixel blocks in order to apply the region growing segmentation method. Applying region growing method to blocks of the image is more appropriate than applying to the overall image to segment the vessel network due to their intensity variations and complexity. It is essential to choose a starting point (seed point), to initiate the segmentation process. The selection of the seed point is pivotal to the overall success of the segmentation depends on that point [34] . In the proposed research work, an automatic seed placement method is used according to the intensity variation of the pixels of the appertinent block. The block’s seed point value is calculated by using the maximum and the minimum pixel values of each block as follows:


where, Imax is the maximum pixel value and Imin is the minimum pixel value of each block.

Then the seed point is determined by the nearest available pixel value to the P(i,j) in the block. The region is iteratively grown by comparing all unallocated neighboring pixels. It is necessary to remove the noise after the binarization process. Unconnected pixel areas smaller than in size of 30 are removed in order to obtain a clear response (Figure 4).

3. Experimental Results

The proposed algorithm was tested on open source data set named DRIVE [17] . This database contains 20 fundus images in the size of 565 × 584 pixels. The results were obtained using the images which are corrected illumination variation as seen in Figure 2. The thin vessels, which are mostly near the boundary of the retinal image were not clearly visible due to the illumination variation of the background. After adjusting the intensity variation of the fundus images the thinnest vessels are mostly visible clearly than the original images. Therefore the Gabor filter function produces more accurate results as shown in Figure 5. In the segmentation process produce veritable results, withal there are still misclassified vessels which are very thin with meagre edges and two vessels appeared as a one in the area near to the optic disc due to the high intensity pixels in that area (Figure 6).

(a) (b)

Figure 4. Image window binarization (a) Gabor filter response; (b) Binarized response.

Figure 7(a) shows four retinal images from DRIVE dataset and Figure 7(b) shows the images that illumination variation is corrected, Figure 7(c) and Figure 7(d) shows the manual segmentation of the vessel system and the results of the proposed algorithm. The proposed algorithm denotes proper results than the formerly efforts [18] -[22] . The performance of the medical imaging algorithms are characterized by the statistical metrics such as sensitivity, specificity, positive predictive value, negative predictive value and accuracy [6] . The quantitative statistical data, such as sensitivity (Se), specificity (Sp), positive predictive value (Ppv), negative predictive value (Npv), and accuracy (Acc) based on the ground truth data available in the DRIVE dataset. The four metric values for Se, Sp, Ppv, Npv, and Acc are given as follows:

Ø True Positive (TP)-Sum of pixels identified as vessels similar to the ground truth image;

Ø False Negative (FN)-Sum of pixels which are vessels in the ground truth image but identified as background;

Ø True Negative (TN)-Sum of pixels which is identified as background just as in the ground truth image;

Ø False Positive (FP)-Sum of pixels which are background in the ground truth image but identified as vessels.

The calculations are done according to the following formulas:



(a) (b)

Figure 5. Apply 2-D Gabor filter (a) Inverted input image; (b) Gabor response image.

Figure 6. Segmented blood vessels.

(a) (b) (c) (d)

Figure 7. Retinal vessel segmentationprocess and results (a) Images from DRIVE dataset; (b) Images with adjusted illumination variation; (c) Manual segmentation; (d) Proposed method results.




The obtained results are compared with [18] -[22] . The statistical results of [18] -[22] and the proposed algorithm are represented in Table 1 and Table 2.

The computerized automatic blood vessel segmentation has been attempted many times by researchers. However, a couple of them are shown better results compared to the proposed methodology that stated in the literature review. There are few studies which have attempted to adjust the illumination variation of the fundus images [1] [4] [5] [10] . The proposed methodology has the highest sensitivity and the accuracy when comparing the statistical data with the previous approaches [18] -[22] . The sensitivity, which indicates the percentage of correctly classified pixels compared to the ground truth image, is 81.63% and accuracy (portion of correctly categorized pixels) is 94.90% of the proposed algorithm. The specificity value, which indicates the ratio of the correctly classified background pixels is higher than prior studies [18] -[20] . The positive predictive value, which indicates the portion of the pixels that are correctly classified as vessel pixels is greater than the research works

Table 1. Statistical results of proposed algorithm for test images 1 to 20 from DRIVE dataset, Se = percentage of correctly classified pixels compared to the ground truth image, Sp = percentage of the correctly classified background pixels, Ppv = percentage of the pixels that are correctly classified as vessel pixels, Npv = percentage of the pixels that are correctly classified as background pixels, Acc = percentage of correctly categorized pixels.

Table 2. Statistical average results of previous work for test images 1 to 20 from DRIVE dataset.

[18] -[20] and the negative predictive value, which indicates the ratio of the pixels that are correctly classified as background pixels is better than previous studies [20] [21] .

The proposed algorithm is executed using MATLAB R2014a installed computer with a 2.53 GHz processor with 4 GB RAM. The computational runtime of the program is about 38 seconds.

4. Conclusion

The configuration of retinal blood vessels performs a responsible preface in diagnosis of diabetic retinopathy. A method based on point operators, Gabor filter and region growing method to extract the retinal vessels in fundus images are represented by the proposed method. The performance of the proposed methodology is evaluated on the DRIVE database. The proposed algorithm segments the retinal vessels with a greater accuracy as compared to the previous attempts. There are two major problems with retinal fundus images. Whereas the illumination variation of certain areas in the fundus images and visibility of the vascular network is not clear of thin vessels and then an enhancement for retinal image is necessary to obtain better results of vessel segmentation. The illumination variation is adjusted using point operators and vessels are enhanced using a 2-D Gabor filter. Finally, vessel segmentation is done using region growing with automatic seed point selection. The proposed algorithm will help ophthalmologists in screening process of blood vessels to detect early stage of diabetic retinopathy.

Cite this paper

NalanKarunanayake,Nihal D.Kodikara, (2015) An Improved Method for Automatic Retinal Blood Vessel Vascular Segmentation Using Gabor Filter. Open Journal of Medical Imaging,05,204-213. doi: 10.4236/ojmi.2015.54026


  1. 1. Onkaew, D., Turior, R., et al. (2011) Automatic Extraction of Retinal Vessels Based on Gradient Orientation Analysis. 8th International Joint Conference on Computer Science and Software Engineering (JCSSE), Thailand, 5 November 2011, 102-107.

  2. 2. Rattathanapad, S., Uyyanonvara, B., et al. (2011) Vessel Segmentation in Retinal Images Using Graph Theoretical Vessel Tracking. Conference on Machine Vision Applications, Japan, 13-15 June 2011, 548-551.

  3. 3. Hou, Y. (2014) Automatic Segmentation of Retinal Blood Vessels Based on Improved Multiscale Line Detection. Journal of Computing Science and Engineering, 8, 119-128.

  4. 4. Jeyasri, K., Subathra, P., et al. (2013) Detection of Retinal Blood Vessels for Disease Diagnosis. International Journal of Advanced Research in Computer Science and Software Engineering, 3, 6-12.

  5. 5. Jahan, N. (2014) Detection and Segmentation Digital Retinal Blood Vessels Using Neural Network. International Journal of Engineering Research and Reviews, 2, 36-43.

  6. 6. Osareh, A. and Shadgar, B. (2009) Automatic Blood Vessel Segmentation in Color Images of Retina. Iranian Journal of Science and Technology, 33, 191-206.

  7. 7. Hamza, A., Taher, A., et al. (2013) An Improved Ant Colony System for Retinal Blood Vessel Segmentation. Federated Conference on Computer Science and Information Systems, Poland, 8-11 September 2013, 199-205.

  8. 8. Intriago, M., Uyaguari, F., et al. (2014) A Review of Algorithms for Retinal Vessel Segmentation. Latin American Journal of Computing, 1, 1140-1144.

  9. 9. Kharghanian, R. and Ahmadyfard, A. (2012) Retinal Blood Vessel Segmentation Using Gabor Wavelet and Line Operator. International Journal of Machine Learning and Computing, 2, 593-597.

  10. 10. Dey, N., Bardhan, A., et al. (2012) FCM Based Blood Vessel Segmentation Method for Retinal Images. International Journal of Computer Science and Network, 1.

  11. 11. Joshi, P.S. (2012) Retinal Blood Vessel Segmentation. International Journal of Engineering and Innovative Technology (IJEIT), 1, 175-178.

  12. 12. Rattathanapad, S., Uyyanonvara, B., et al. (2011) Vessel Segmentation in Retinal Images Using Graph-Theoretical Vessel Tracking. Proceedings of the Conference on Machine Vision Applications, Nara, 13-15 June 2011, 548-551.

  13. 13. Sukkaew, L., Uyyanonvara, B., et al. (2004) Automated Vessels Detection on Infant Retinal Images. Proceedings of the ICCAS, Bangkok, 25-27 August 2004, 321-325.

  14. 14. Siddalingaswamy, P.C. and Prabhu, K.G. (2010) Automatic Detection of Multiple Oriented Blood Vessels. Journal of Biomedical Science and Engineering, 3, 101-107.

  15. 15. Onkaew, D., Turior, R., et al. (2011) Automatic Extraction of Retinal Vessels Based on Gradient Orientation Analysis. Proceedings of the Eighth International Joint Conference on Computer Science and Software Engineering (JCSSE), Nakhon Pathom, 11-13 May 2011, 102-107.

  16. 16. Usman, M. and Khan, S.A. (2013) Multilayered Thresholding Based Blood Vessel Segmentation for Screening of Diabetic Retinopathy. Engineering with Computers, 29, 165-173.

  17. 17. Niemeijer, M. and Van Ginneken, B. (2002)

  18. 18. Dizdaroglu, B., Cansizoglu, E., et al. (2014) Structure-Based Level Set Method for Automatic Retinal Vasculature Segmentation. EURASIP Journal on Image and Video Processing, 2014, 39.

  19. 19. Lathen, G., Jonasson, J., et al. (2010) Blood Vessel Segmentation Using Multi-Scale Quadrature Filtering. Pattern Recognition Letters, 31, 762-767.

  20. 20. Budai, A., Bock, R., et al. (2013) Robust Vessel Segmentation in Fundus Images. International Journal of Biomedical Imaging, 2013, 1-11.

  21. 21. Marin, D., Aquino, A., et al. (2010) A New Supervised Method for Blood Vessel Segmentation in Retinal Images by Using Gray-Level and Moment Invariants-Based Features. IEEE Transactions on Medical Imaging, 30, 146-158.

  22. 22. Soares, J.V., Leandro, J.J., et al. (2006) Retinal Vessel Segmentation Using the 2-D Gabor Wavelet and Supervised Classification. IEEE Transactions on Medical Imaging, 25, 1214-1222.

  23. 23. Marin, D., Kevin, J.C., et al. (2010) A New Supervised Method for Blood Vessel Segmentation in Retinal Images by Using Gray-Level and Moment Invariants-Based Features. IEEE Transactions on Medical Imaging, 30, 146-158.

  24. 24. Walter, T. and Chutatape, O. (2002) A Contribution of Image Processing to the Diagnosis of Diabetic Retinopathy. IEEE Transactions on Image Processing, 21, 1236-1243.

  25. 25. Sinthanayothin, C., Boyce, J.F., Cook, H.L. and Williamson, T.H. (1999) Automated Localization of the Optic Disk, Fovea, and Retinal Blood Vessels from Digital Colour Fundus Images. British Journal of Ophthalmology, 83, 902-910.

  26. 26. Jiang, X. and Mojon, D. (2003) Adaptive Local Thresholding by Verification Based Multithreshold Probing with Application to Vessel Detection in Retinal Images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 25, 131-137.

  27. 27. Jain, A. (1989) Fundamentals of Digital Processing. Prentice Hall, New York.

  28. 28. Rossant, F., Badellino, M., et al. (2011) A Morphological Approach for Vessel Segmentation in Eye Fundus Images, with Quantitative Evaluation. Journal of Medical Imaging and Health Informatics, 1, 42-49.

  29. 29. Bhattacharya, D., Devi, J., et al. (2013) Brain Image Segmentation Technique Using Gabor Filter Parameter. American Journal of Engineering Research (AJER), 2, 127-132.

  30. 30. Yamani, L.S., Asif, K., et al. (2015) A Noval Method for Extraction of Retinal Blood Vessels Using Gabor Filter and Generalized Linear Model. Global Journal of Trends in Engineering, 2, 209-215.

  31. 31. Gwetu, M.V., Tapamo, J.-R., et al. (2014) Segmentation of Retinal Blood Vessels Using Normalized Gabor Filters and Automatic Thresholding. South African Computer Journal, 55, 12-24.

  32. 32. Kamdi, S. and Krishna, R.K. (2011) Image Segmentation and Region Growing Algorithm. International Journal of Computer Technology and Electronics Engineering, 2, 103-107.

  33. 33. Dougherty, G. (2009) Digital Image Processing for Medical Applications. Cambridge University Press, New Delhi.

  34. 34. Melouah, A. and Amirouche, R. (2014) Comparative Study of Automatic Seed Selection Methods for Medical Image Segmentation by Region Growing Technique. In: Recent Advances in Biology, Biomedicine and Bioengineering, InTech Publisher, Rijeka, 91-97.


*Corresponding author.