Automatic Segmentation of the Retinal
Vasculature using a Large-Scale SVM
Aliaa A. A. Youssif, Atef Z. Ghalwash, and Amr S. Ghoneim*
. Moreover, diabetic population is expected to have a 25
Abstract—Retinal vasculature (RV) segmentation is the basic times greater risk of going blind than non-diabetic .
foundation while developing retinal screening systems, since the Due to the growing number of patients, and with
RV acts as the main landmark for further analysis. Recently, insufficient ophthalmologists to screen them all, automatic
supervised classification proved to be more efficient and accurate
for the segmentation process. Moreover, novel features have been
screening can reduce the threat of blindness by 50% ,
used in literature methods, showing high separability between provide considerable cost savings, and decrease the pressure
vessels/non-vessels classes. This paper utilizes the large-scale on available infrastructures and resources . Retinal
support vector machine for automatic segmentation of RV, using photography is significantly more effective than direct
for the pixel features a mixture of the 2D-Gabor wavelet, Top- ophthalmoscopy in detecting DR . Digital fundus images
hat, and Hessian-based enhancements. The presented method do not require injecting the body by fluorescein or
noticeably reduces the number of training pixels since 2000
instead of 1 million pixels, as presented in recent literature
indocyanine green dye, thus not requiring a trained personnel.
studies, are only needed for training. As a result, the average Detecting retinal landmarks (the vasculature, optic disc,
training time drops to 3.75 seconds instead of the 9 hours that and macula) give a framework from which automated analysis
was previously recorded in literature. For classifying an image, and human interpretation of the retina proceed . And
30 seconds were only needed. Small training sets and efficient therefore, it will highly aid the future detection and hence
training time are critical for systems that always need quantification of diseases in the mentioned regions. In
readjustment and tuning with various datasets. The publicly
addition, recognizing main components can be used for
available benchmark DRIVE dataset was used for evaluating the
performance of the presented method. Experiments reveal that criteria that allow the discarding of images that have a too bad
the area under the receiver operating characteristic curve (AUC) quality for assessment of retinopathy , .
reached a value 0.9537 which is highly comparable to previously Segmenting the retinal vasculature (RV) is a key step in DR
reported AUCs that range from 0.7878 to 0.9614. screening systems., since the RV serves as a landmark for
other features, such as the OD –. In addition, RV
Index Terms— Biomedical image processing, computational segmentation is required to stop the curvilinear shapes from
intelligence, fundus image analysis, vessels segmentation, retinal
interfering with later analysis of DR lesions , and to assist
ophthalmologists by parameters such as vessel tortuosity.
Moreover, RV can possibly be used as an indicator of the state
I. INTRODUCTION of the cerebral vasculature, thus assisting the detection of
diseases such as vascular dementia and stroke . Classical
D iabetes is a disease that affects about 5.5% of the global
population . In Egypt, nearly 9 million (over 13% of
the population ≥ 20 years) will have diabetes by the year
RV segmentation methods included matched filters ,
morphological operators , and tracking . Supervised
methods proved to be more improved and accurate, recording
2025, while recent surveys from Oman and Pakistan suggest
higher performances in terms of receiver operating
that this may be a regional phenomenon . Consequently,
characteristic (ROC) analysis , , and .
about 10% of all diabetic patients have diabetic retinopathy
This study, inspired by the work of Soares et al. ,
(DR); one of the most prevalent complications of diabetes and
presents a method for the segmentation of the RV using the
which is the primary cause of blindness in the Western World
2D-Gabor wavelet as the main feature. The pixel features are
, and this is likely to be true in Hong Kong , and Egypt
further improved by adding both Top-hat and Hessian-based
enhancements. And finally, a large-scale support vector
Manuscript published March 1, 2007. Asterisk indicates corresponding machine is used as the supervised classifier. More to the point,
author. this study is concerned with developing fast (computationally
Aliaa A. A. Youssif and Atef Z. Ghalwash are with the Department of
efficient) methods while achieving high accuracy. Supervised
Computer Science, the Faculty of Computers & Information, Helwan
University, Cairo, The Arab Republic of Egypt. (e-mail: methods requiring small suitable pre-labeled training datasets
firstname.lastname@example.org, email@example.com). and with efficient training time can be easily adjusted to new
*Amr S. Ghoneim is with the Department of Computer Science, the populations.
Faculty of Computers & Information, Helwan University, Cairo, The Arab
Republic of Egypt (phone: +20-10-184-6288; fax: +202-2554-7975; e-mail: This work is organized as follows. In the next section, the
firstname.lastname@example.org). main methodologies for feature extraction, and the
segmentation of the RV are presented, besides, the material
used for tests is described. Section III presents our
experiments, results, and performance evaluation. Discussion
and conclusion are in Sections IV and V respectively.
II. METHODOLOGIES AND MATERIALS
A significant percentage of fundus images are of poor
quality that hinders further analysis due to many factors,
therefore preprocessing steps are applied in order to wilt or
Figure 1. A typical digital fundus image from the DRIVE (left) and the
even remove the mentioned interferences. In order to simply corresponding inverted green-channel padded using  (right).
enhance the contrast of the retinal images, the red and blue
components are commonly discarded, and only the green band The Top-hat vessel map (Figure 2(e)) was the most separable
is extensively used in the processing as it displays the best single vessel map, followed by the Hessian-based
vessels/background contrast . The green band is then enhancement .
inverted, so that the vasculature appears brighter than the 3) Hessian-based Enhancement: The Hessian matrix is the
background. The images are finally padded (Figure 1) in order matrix of second partial derivatives of a function, thus if
to reduce the false detection of the region-of-interest (ROI) applied to an image, it describes the second order structure of
border. Padding is done by determining the background pixels the intensity variations in the neighborhood of each pixel.
near the exterior ROI border, and replacing each one with the Analyzing the Hessian matrix can be used in detecting line
mean value of its neighbors . This process is done structures; dark lengthy tubular structures on 2D bright
repeatedly to expand the ROI to the required extent. backgrounds (i.e. vessels) are reflected by a Hessian Matrix
having a large positive eigenvalue and a small eigenvalue of
B. Pixel Features
whatever sign , . Again, to decrease the variance
1) 2D-Gabor Wavelet: A typical way to find a suitable within the vessels class, Condurache and Aach  enhanced
representation (features) of data that will assist further all vessels regardless to their size by calculating the highest
analysis is to transform the signal using a set of basis eigenvalue of the Hessian matrix at 3 different scales of the
functions. Wavelets process data at different scales Top-hat vessel map. Condurache and Aach  made their
(resolutions); therefore they have advantages over traditional vessel segmentation tool available at ; the tool can
Fourier transforms in analyzing signals. Soares et al.  generate both Top-hat and Hessian-based vessel maps. Instead
employed a continuous wavelet transform Tψ(b, θ, a), where b, of applying the Hessian enhancement to the Top-hat output,
θ, and a are respectively the time-shift (translation), rotation, we propose applying it directly to the green-band to achieve
and dilation (scale) parameters. The mother analyzing wavelet smaller intra-vessels class variance (Figure 2(f)).
ψb,θ,a was chosen to be a 2D-Gabor wavelet defined as:
C. Large-Scale Support Vector Machine
1 Support Vector Machines (SVMs) are statistical learning
ψ ( x) = exp( jk o x) exp(− | Ax | 2 ) (1)
2 tools that rely on mapping the data from two categories to a
sufficiently high dimension where they can always be
where A = diag[Є-1/2, 1], ε ≥ 1 is a 2×2 matrix defining the separated by a hyperplane . ‘While there may exist many
elongation in any direction. The value of the ε is set to 4, hyperplanes that separate the two classes, the SVM classifier
while ko = [0, 3]. The wavelet transform was implemented is based on the hyperplane that maximizes the separating
using the fast Fourier transform, and the implementation is margin between the two classes’. The training examples
publicly available as open source MATLAB® scripts . The defining this hyperplane (i.e. the borderline training
final set of features used by  for classification included the examples) are called the support vectors; they are the most
inverted green channel and its maximum 2D-Gabor transform difficult patterns to classify, yet they are the most informative
response for scales 'a' = 2, 3, 4, and 5 pixels, and θ spanning in the classification task . Though the dimensionality of
from 0° up to 170° at steps of 10° (Figure 2(a)-(d)). These the transformed space in a SVM is typically much higher than
scales 'a' were chosen to detect vessels of all possible widths. the original feature space, the complexity of the classifier is
2) Top-hat Transfrom: In , and in order to segment the mainly described by the number of support vectors. Also,
vasculature, 5 methods (vessel maps) were used to enhance SVM-based approaches are able to significantly outperform
the separability between vessels and non-vessels. The Top-hat competing methods in many applications –.
filter simply defined as the difference between an image and Training a SVM (i.e. the process of finding the optimal
its morphologically closed version was used to equalize the hyperplane) leads to a quadratic optimization problem which
background. Therefore, it decreased both the intra-background depends on the number of training examples. Therefore, and
and the intra-vessel classes' variances. in order to deal with large training sets, Large-Scale SVMs
decompose the problem into a series of smaller tasks so as to A manually thresholded FOV is included for each image
have a tractable solution . In our work, we used the beside a manual segmentation of the RV for the training set,
publicly available MATLAB® toolbox for SVM and kernel and two manual segmentations for the test set .
methods ; the Large-Scale SVM class was used with a
Gaussian mapping function. III. EXPERIMENTAL EVALUATION AND RESULTS
D. Materials To evaluate the performance of the presented method, we
Our method was evaluated using the publicly available trained the Large-Scale SVM using sets of pixels randomly
DRIVE dataset , established to facilitate comparative selected from the 20 images in the training set. The available
studies on RV segmentation , . The dataset consists of a manual segmentation served as our ground truth, and the
total of 40 color fundus photographs used for making actual available FOV masks were shrunk by 3 pixels in order to
clinical diagnoses, and divided into 2 equal sets (training and discard any border effect. Initially, for computational reasons,
test), where 33 photographs do not show any sign of diabetic only 50 thousands pixels from the 20 images were randomly
retinopathy and 7 show signs of mild early diabetic selected for training. For the selected pixels, four experiments
retinopathy. The – 24 bits, 768 by 584 pixels – color images we done using different feature sets in order to determine the
are in compressed JPEG-format, commonly used in screening. final features vector. The Large-Scale SVM was trained
They were acquired using a Canon CR5 non-mydriatic 3CCD initially using the inverted green-band and the 2D-Gabor
camera with a 45 degree field-of-view (FOV). responses at four scales (i.e. the training set used by ).
Then the Top-hat enhancement was added to the previous set.
In the third experiment, we added the Top-hat Hessian-based
enhancement (i.e. the Hessian enhancement applied to the
Top-hat response as proposed by ). Finally, beside the
inverted green-band, 2D-Gabor, and Top-Hat responses, we
added the Hessian-based enhancement applied to the green-
band image. The final features set reported the highest area
under the ROC curve (AUC) as shown in Table I.
Another set of experiments were made to determine the
effective size for the training set (i.e. number of pixels) in
terms of computational time and accuracy. The initial 50
thousands pixels set was divided into five sets (each of 10
thousands), and then each of the new five sets was further
divided into 5 new sets (each of only 2 thousands pixels).
Each of the new 30 sets was used individually to train the
Large-Scale SVM, and the average AUC and computational
time among equal sets was calculated. Table I shows a
dramatic drop in both training and classification (Figure 3)
time as the training set decreased, while the AUC slightly
increased (Figure 4). The experiments were carried out using a
(2-MHz Intel® Centrino® 1.7 CPU and 512 Mb RAM Laptop),
while the results of Staal et al.  and Soares et al.  were
obtained using “a Pentium-III PC, running at 1.0 GHz with 1-
GB memory”, and “an AMD Athlon XP 2700+ PC (2167
MHz clock) with 1-GB memory” respectively.
Figure 2. The pixels’ features of Figure 1 (right). (a) – (d) The maximum Figure 3. The ground-truth manual segemntation for the image in Figure 1
2D-Gabor wavelet response for scales ‘a’ = 2, 3, 4, and 5 pixels respectively. (right) and the corresponding result of the large-scale SVM classifier trained
Top-hat (e) and Hessian-based (f) enhancements. using 2000 pixels with the final set of features (left).
TABLE I. RESULTS FOR THE PERFORMANCE EVALUATION EXPERIMENTS MADE FOR OUR PRESENTED METHOD, AND COMPARED TO DIFFERENT
LITERATURE SEGMENTATION METHODS (FOR THE DRIVE DATASET)
Size of training Average
set (Number of Average Maximum classification
Segmentation methods Pixels features vector of sets training
pixels for AUC AUC time (per
Inverted green-band, & 2D-
50 thousands 1 - 0.9329
Inverted green-band, 2D-
50 thousands 1 - 0.9374
Gabor & Top-hat responses
2 hours 10 min.
Large-Scale SVM ‡ Inverted green-band, 2D-
(our presented method) 50 thousands Gabor, Top-hat, & Top-hat 1 - 0.9374
50 thousands Inverted green-band, 2D- 1 - 0.9449
10 thousands Gabor, Top-hat, & Green- 5 0.9481 0.9503 1.75 min. 2.39 min.
2 thousands band Hessian responses 25 0.9505 0.9537 3.75 sec. 30 sec.
Convex set regions based
Staal et al.  - - - 0.9520 - ≈15 min.
on ridge detection
Inverted green-band, & 2D-
Soares et al.  1 million - - 0.9614 9 hours 10 sec.
Chaudhuri et al. * Not a supervised method (2D-Gaussian Matched Filters) 0.7878 - -
Zana and Klein * Not a supervised method (Mathematical Morphology) 0.8984 - -
*The results of both methods were obtained from , and they result from applying both corresponding methods to the DRIVE test-set only.
‡ In all the large-scale SVM experiments, the training sets are equally divided between both vessels/non-vessels classes.
Though the method proposed by Soares et al.  reported
slightly higher AUC than the presented method, Table I shows
that Large-Scale SVM significantly lowered the training
(about 4 sec. compared to the 9 hours). In addition, Large-
Scale SVMs can be trained using only 2000 training pixels
instead of the 1 million pixels used by Soares et al. .
Therefore, the presented method is more suitable when
systems need to be adapted for new datasets. Also, Large-
Scale SVMs tend to perform well when applied to data outside
the training set (i.e. generalize).
The results show that the method presented in this paper is
more computationally efficient in classification time (per
image) than the method proposed by Staal et al. , and
comparable to Soares et al. . Regarding the features set,
Table I shows that adding both the Top-hat and Hessian-based
enhancements to the set of features selected by Soares et al.
 improved the performance, thus the AUC increases from
0.9329 to 0.9449. In addition, applying the Hessian-based
enhancement to the Top-hat response as proposed by 
Figure 4. ROC curve for classification on the DRIVE dataset using the large- reported no improvement in classification results. Conversely,
scale SVM classifier trained using 2000 pixels with the final set of features. applying the Hessian-based enhancement to the green-band
images enhanced the AUC from 0.9374 to 0.9449.
V. CONCLUSION AND FUTURE WORK  A. Hoover and M. Goldbaum, “Locating the optic nerve in a retinal
image using the fuzzy convergence of the blood vessels,” IEEE Trans.
Although supervised segmentation becomes the method of Med. Imag., vol. 22, no. 8, pp. 951-958, 2003.
choice for segmenting the RV, the need for manual  F. ter Haar, “Automatic localization of the optic disc in digital colour
images of the human retina,” M.S. Thesis, Utrecht University, 2005.
segmentations takes 2 hours in average for a single image. In
 M. Foracchia, E. Grisan, and A. Ruggeri, “Detection of Optic Disc in
this paper we presented a RV segmentation method employing Retinal Images by Means of a Geometrical Model of Vessel Structure,”
a large-scale SVM as a supervised classifier. The classifier IEEE Trans. Med. Imag., vol. 23, no. 10, pp. 1189-1195, Oct. 2004.
was trained with only 2000 pixels instead of 1 million pixels  A. Fleming , K. Goatman , S. Philip , J. Olson , P. Sharp, "Automatic
that were previously needed. The features vector for each detection of retinal anatomy to assist diabetic retinopathy screening,"
Physics in Medicine and Biology, Vol. 52, No. 2, pp. 331-345, 2007.
pixel included the inverted green-band intensity value, the 2D-
 N. Patton, T. Aslam, T. MacGillivray, A. Pattie, I. Deary, and B.
Gabor wavelet response at four different scales, the Top-hat Dhillon, “Retinal vascular image analysis as a potential screening tool
transform response, and the Hessian-based response when for cerebrovascular disease: a rationale based on homology between
cerebral and retinal microvasculatures,” J. Anat., vol. 206, no. 4, pp.
applied to the green-band image. Using the DRIVE dataset, 319-348, 2005.
the proposed classifier with the set of features achieved an  S. Chaudhuri, S. Chatterjee, N. Katz, M. Nelson, and M. Goldbaum,
AUC of 0.9537. The recorded results are comparable to those “Detection of blood vessels in retinal images using two-dimensional
found in literature. Moreover, the presented method proved to matched filters,” IEEE Trans. Med. Imag., vol. 8, pp. 263–269, 1989.
 F. Zana and J. C. Klein, “Segmentation of vessel-like patterns using
be computationally more efficient since it recorded about 4 mathematical morphology and curvature evaluation,” IEEE Trans.
sec average training time. An extension for this study could be Image Processing, vol. 10, no. 7, pp. 1010–1019, 2001.
investigating other feature sets, and testing Large Scale SVMs  E. Grisan, A. Pesce, A. Giani, M. Foracchia, A. Ruggeri, “A new
with different parameters. In addition, more comprehensive tracking system for the robust extraction of retinal vessel structure,” in
Proc. 26th Annual Int. Conf. of the IEEE Engineering in Medicine and
results can be achieved by evaluating the performance using Biology Society (EMBC), San Francisco (CA, USA), Sept. 2004.
other datasets and evaluation criteria.  João V. B. Soares, Jorge J. G. Leandro, Roberto M. Cesar Jr., Herbert F.
Jelinek, and Michael J. Cree, “Retinal Vessel Segmentation Using the 2-
ACKNOWLEDGMENT D Gabor Wavelet and Supervised Classification,” IEEE Trans. Med.
Imag., vol. 25, no. 9, pp. 1214-1222, Sept. 2006.
The authors wish to thank their fellow authors of references  M. Niemeijer, J. Staal, B. van Ginneken, M. Loog, and M. D. Abràmoff,
, , , , and  for their support in acquiring the “Comparative study of retinal vessel segmentation methods on a new
publicly available database,” in SPIE Medical Imaging, vol. 5370, pp.
materials and resources needed to conduct the presented 648-656, 2004.
study.  Aliaa A. A. Youssif, Atef Z. Ghalwash, and Amr S. Ghoneim,
“Comparative Study of Contrast Enhancement and Illumination
REFERENCES Equalization Methods for Retinal Vasculature Segmentation,” Proc.
Cairo Int. Biomedical Engineering Conf. (CIBEC'06), Dec. 2006.
 J. Staal, M. D. Abràmoff, M. Niemeijer, M. A. Viergever, and B. van-  Human-machine integration for vessel segmentation project [Online].
Ginneken, “Ridge-based vessel segmentation in color images of the Available: http://retina.iv.fapesp.br
retina,” IEEE Trans. Med. Imag., vol. 23, no. 4, pp. 501-509, 2004.
 A. P. Condurache, and T. Aach, “Vessel Segmentation in 2D-Projection
 W. Herman, R. Aubert, M. Ali, E. S. Sous, and A. Badran, “Diabetes Images Using a Supervised Linear Hysteresis Classifier,” Proc. 18th Int.
mellitus in Egypt: risk factors, prevalence and future burden,” Eastern Conf. on Pattern Recog., pp. 343-346, Hong Kong-China, 2006.
Mediterranean Health J., vol. 3, Issue 1, pp. 144-148, 1997.
 Alejandro F. Frangi, Wiro J. Niessen, Koen L. Vincken, and Max A.
 S. Siu, T. Ko, K. Wong, and W. Chan, “Effectiveness of non-mydriatic Viergever, “Multiscale vessel enhancement filtering,” Lecture Notes in
retinal photography and direct ophthalmoscopy in detecting diabetic Computer Science, vol. 1496 – Springer-Verlag, pp.130-137, 1998.
retinopathy,” Hong Kong Med. J., vol. 4, no. 4, pp. 367-370, Dec. 1998.
 C. Lorenz, I.-C. Carlsen, T. M. Buzug, C. Fassnacht, and J. Weese,
 M. El-Shazly, M. Zeid, and A. Osman, “Risk factors for eye “Multi-scale line segmentation with automatic estimation of width,
complications in patients with diabetes mellitus: development and contrast, and tangential direction in 2D and 3D medical images,” Lecture
progression,” Eastern Mediterranean Health J., vol. 6, Issue 2/3, pp. Notes in Computer Science, vol. 1205, pp. 233-242, 1997.
 Vessel segmentation and analysis (VegSeg) software tool [Online].
 A. Osareh, “Automated Identification of Diabetic Retinal Exudates and Available: http://www.isip.uni-luebeck.de/index.php?id=57
the Optic Disc,” Ph.D. Thesis, Faculty of Eng., Dept. of Computer
Science, University of Bristol, Jan. 2004.  R. O. Duda, P. E. Hart, and D. G. Stork, Pattern Classification, 2nd
Edition, Wiley, 2000.
 C. Sinthanayothin, “Image analysis for automatic diagnosis of diabetic
retinopathy,” Ph.D. Thesis, University of London (King's College  Issam El-Naqa, Yongyi Yang, Miles N. Wernick, Nikolas P. Galatsanos,
London), September 1999. and Robert M. Nishikawa, “A Support Vector Machine Approach for
Detection of Microcalcifications,” IEEE Trans. Med. Imag., vol. 21, no.
 C. Sinthanayothin, J. Boyce, T. Williamson, H. Cook, E. Mensah, S. Lal, 12, pp. 1552-1563, Dec. 2002.
and D. Usher, “Automated detection of diabetic retinopathy on digital
fundus images,” Diabetes UK – Diabetic Medicine, vol. 19, pp. 105-112,  X. Zhang, X. Xiao, J. Tian, J. Liu, and G. Xu, “Application of support
2002. vector machines in classification of magnetic resonance images,” Int. J.
of Computers and Applications, vol. 28, no. 2, pp. 122-128, April 2006.
 T. Teng, M. Lefley, and D. Claremont, “Progress towards automated
diabetic ocular screening: a review of image analysis and intelligent  N. Piliouras, I. Kalatzis, N. Dimitropoulos, and D. Cavouras,
systems for diabetic retinopathy,” Medical & Biological Engineering & “Development of the cubic least squares mapping linear-kernel support
Computing, vol. 40, pp. 2–13, 2002. vector machine classifier for improving the characterization of breast
lesions on ultrasound,” Computerized Medical Imaging and Graphics,
 Alan D. Fleming, Sam Philip, Keith A. Goatman, John A. Olson, and vol. 28, no. 5, pp. 247-255, July 2004.
Peter F. Sharp, “Automated assessment of diabetic retinal image quality
based on clarity and field definition,” Investigative Ophthalmology and  T. Joachims, “Making Large-Scale Support Vector Machine Learning
Visual Science, vol. 47, no. 3, pp. 1120-1125, March 2006. Practical,” Advances in Kernel Methods: Support Vector Learning, MIT
Press, pp. 169-184, 1999.
 S. Canu, Y. Grandvalet, V. Guigue, and A. Rakotomamonjy, “SVM and
Kernel Methods Matlab Toolbox,” Perception Systèmes et Information,
INSA de Rouen, Rouen-France, 2005 [Online]. Available:
 University Medical Center Utrecht, Image Sciences Institute, Research
section, Digital Retinal Image for Vessel Extraction (DRIVE) database,
[Online]. Available: http://www.isi.uu.nl/Research/Databases/DRIVE