Retinal Blood Vessel Classification Based on Color and Directional Features in Fundus Images
Golnoush Hamednejad Department of Electrical Engineering, Najafabad Branch, Islamic Azad University,
Najafabad, Isfahan, Iran.
Hossein Pourghassem Department of Electrical Engineering, Najafabad Branch, Islamic Azad University,
Najafabad, Isfahan, Iran.
[email protected] Abstract— The symptoms of some diseases such as high blood
pressure and diabetic retinopathy affect on the retinal vessels can be helpful to control the progress of these diseases. In this paper, our aim is to detect and classify the retinal vessels to arteries and veins. This algorithm achieves the vascular tree structure using a local entropy-based thresholding segmentation method. Next, several color and novel directional structural features are extracted. The structural features are based on wavelet, projection and profile of vessels. Then, Principal Components Analysis (PCA) algorithm is used for optimizing the extracted features. Finally, the vessels are classified by a neural network classifier. By using the results of our optimization algorithm in the feature selection, we achieved high sensitivity and specificity and generally, the accuracy rate of 92.9% was obtained on the test dataset.
Keywords- Vessel classification; artery; vein; PCA; directional structural features.
I. INTRODUCTION
Retina is a part of human vision system that the vessels are detected in a short time with simple instruments. Different kinds of images by several types of photography devices are taken from the retina that fundus is the most common image types. In the fundus images, the retina includes four parts such as macula, fovea, optic disk and vascular system. The macula is a spot that locate near center of the retina and has 5.5 mm diameters. The macula has the most sensitivity to the light and is in charge of the focusing direct vision. The macula is sub divided into the umbo, foveola, Foveal Avascular Zone (FAZ), fovea, parafovea, and perifovea areas. The fovea is the center of macula with 1.5 mm diameter that has the most density of eye cone cells. The optic disk is a bright spot that the retinal blood vessels start from it. The blood vessels are consisting of the arteries and veins. The arteries carry the blood that saturated with oxygen and the veins return the circulated blood back [1-3].
Study on the retina can diagnose some progress of the diseases such as high blood pressure, stroke, cerebral atrophy, cognitive decline, myocardial infract, diabetic retinopathy and retinopathy of prematurity, diagnosis area without macula vessel and help to automatic surgery on the eye [1-3]. The mentioned diseases have several affects on the retina such as changed the diameter of vessels. These diseases decrease the diameter of artery and increase the diameter of vein. It occurs in
long time and these variations can’t easily be visible by our eye. Therefore, the extraction of vessel diameter by an automatic image processing technique is necessary. For this purpose, Arteriolar-to-Venular diameter Ratio (AVR) is defined to assess the variations of vein and artery diameters. This measure is calculated from the retinal images by the image processing and pattern recognition techniques.
With assessment of performed researches in the AVR calculation, we can state that the AVR measurement process includes five steps: the preprocessing and optic disk detection [1, 4, 5], vessels segmentation [6-9], feature extraction [10-15], vessel classification [10-15] and finally the vessel width measurement [16, 17]. In the vessel segmentation stage, graph extraction [6, 7] or vessel tracking [8] are used. The graph extraction approach has a problem for the difference detection between the points of vessel branches and the crossover points of the arteries and veins. By means of the vessel classification, the artery and vein vessels are detected. There are two common approaches in the vessel classification, color feature-based algorithms and structural descriptor-based algorithms. In the color feature-based algorithm, the features are usually extracted using mean, variance or median of intensity in the color space of RGB, HSL or LAB [12-14]. In the structural feature-based algorithm, profile of the vessels is defined and used as a structural feature [15]. Moreover, the features can be extracted from whole image, a segmented part of vessel or a pixel of vessel. Finally, to determine the type of vessels different classifiers such as neural network, Linear Discriminant Analysis (LDA), Quadratic Discriminant Analysis (QDA), K- Nearest Neighbor (KNN) and Support Vector Machines (SVM) are employed.
In this paper, our main challenge is proposing the automatic detection algorithm for artery-vein recognition using a novel set of structural features. In this algorithm, wavelet modeling and projection modeling definitions are used for classifying all vessels to the arteries or veins and the final result can be easily used to determine the AVR in clinical practice. This paper is organized as follows: In section 2, the proposed algorithm is explained in several subsets. Then in section 3, the feature optimization is described. In section 4, the vessel classification and result comparison are presented. Finally, section 5 concludes the research.
22nd Iranian Conference on Biomedical Engineering(ICBME 2015), Iranian Research Organization for Science and Technology (IROST), Tehran, Iran, 25-27 November 2015
Figure 1. Block diagram of proposed algorithm for vessels classification.
II. PROPOSED CLASSIFICATION METHOD
Our classification algorithm consists of four steps, as shown in Fig. 1. At first, the fundus images are preprocessed for improving the quality of images and the background is removed for eliminating undesirable effects on the performance. Then, the vessels are segmented and some rings of these segmented vessels are cut. The vessels of each ring are labeled for calculating the features that have been extracted from a part of vessel. The PCA-based feature selection algorithm is used to optimize the extracted features. The final section is the vessel classification. A multi-layer Perceptron (MLP) neural network classifier is used for classifying the extracted features. The classifier is optimized on the number of hidden neurons based on Minimum Mean Square Error (MMSE) as fitness function. Ultimately, our images are being classified to the artery or vein vessels using MLP classifier.
The details of our proposed algorithm are described in the following.
A. Image Preprocessing
In this paper, the images of DRIVE database [18] have been used. It includes 40 color images that is equally divided to test and training samples. 33 images of this database don’t show any sign of diabetic retinopathy and 7 images of database have some signs. These images have been selected from 400 collected images from diabetic patients with age between 25-90 years. This database is publicly available for research and educational purpose.
1) Filtering and Background Removal
The fundus images have various contrast that affects to outcome of proposed algorithm and creates difficulty in diagnosis process. At first, our images are prepared by preprocessing algorithm. Then, histogram equalization is applied to improve
image quality. Moreover, the background has undesirable effects on precision of the features. So, the background is removed to improve the performance.
2) Vessel Segmentation
The segmentation methods are frequently applied with graph extraction [6, 7] or in vessel tracking scenarios [8].In this paper, the vessel segmentation algorithm is based on matched filter and local entropy-based thresholding [19, 20]. It can be used in optic disk recognition, vessel segmentation and lesions detection such as diabetic retinopathy. The Lesions cause error in the vessel extraction results and it is removed by post processing scenario. To achieve better results we can filtering and thresholding the input images. Totally the result of this algorithm is the same as hand labeled images. Some rings by different radius from optic disk center are cropped to extract the features on a part of vessel, this method is demonstrated in Fig. 2. In feature extraction scenario due to the optimal contrasts of the image plans, the green plan for the arteries and the veins in red plan are analyzed, Fig. 3 shows the pictorial presentation of this concept.
B. Feature Extraction
In this section, we propose a perfect set of features for classifying the vessels to the arteries or veins. This vessels have similarity in attribute such as dimension, size or color. They overlap each other. The arteries are brighter and thinner than the veins because they carry blood that has been saturated with oxygen and has more pressure than the blood in the veins. Our proposed features consist of the color features such as derivatives of intensity and standard division also several novel structural features. In our introduced structural features, wavelet transform, projection modeling and profile mapping are employed. Features are extracted from rings of vessels or full size image.
1) Color Features
Some color features are considered that have been introduced in the previous works [12-14]. The first feature is the mean value of intensity in the R, G and B spaces on the segmented rings of vessels. This feature is defined as:
1 1
1 M N
ij Img
i j
M I
MN = =
=
∑∑
(1) where Iij is the element with i-th row and j-th column for M- by-N image matrix. Another feature is mean value of standard division in R, G and B plans, on the segmented rings of vessels. So, standard division of each image is defined as:2
1 1
1 ( Img)
M N
ij
i j
I M
σ MN
= =
=
∑∑
− (2) The last color feature is the mean value of maximum intensity in the R, G and B spaces, on the segmented rings of vessels.2) Structural Features
The structural features are presented based on wavelet decomposition [21, 22], projection and profile concepts. In the following, we describe them in detail.
a) Wavelet Entropy Feature
In this paper, we use Discrete Wavelet Transform (DWT) to define novel features. DWT decomposes the image to low frequency and high frequency sub bands. The wavelet decomposition is defined as:
0
[ ]
k k[ ]
jk jk[ ]
k j k
f i
∞c φ i
∞ ∞d i
=−∞ = =−∞
= ∑ + ∑ ∑ Ψ
(3)[ ] , [ ] [ ] [ ]
k k k
i
c = 〈 f i ϕ i 〉 = ∑ f i ϕ i
(4)[ ], [ ] [ ] [ ]
j k j k j k
i
d = 〈f i ψ i 〉 =
∑
f i ψ i (5) where φk[ ]i is scaling function, Ψjk[ ]i is wavelet function,ck is approximation coefficients and dj k is detail coefficients.
To decompose the image by wavelet transform, the operations are applied on the columns and rows of the image to assign low frequency and high frequency coefficients from decomposed image. We have used Daubechies 3 wavelets in two levels.
Maximum mean value of wavelet entropy in the approximation, horizontal, vertical and diagonal sub images in the second level is extracted as feature. These features are obtained from the full size image and the segmented rings of vessels. Power of the DWT coefficients in each sub image are determined by:
c k2
j i
P =
∑∑
c (6)d jk2
j i
P =
∑∑
d (7) where Pc is power of approximation wavelet coefficient and Pd is power of details wavelet coefficient. The entropy of wavelet in sub images are described as:Figure 2. Top images show the veins and bottom images show the arteries that are segmented in the rings.
Figure 3. Right image shows the veins vessels in the red channel and left image shows the arteries vessels in the green channel.
ij ij
c c
c
j i
P logP
E = −
∑∑
(8)ij ij
d d
d
j i
P logP
E = −
∑∑
(9) We use direction of wavelets to introduce another structural feature. A prototype of DWT results in four directions is illustrated in Fig. 4. In this paper, the Entropy of DWT coefficients in these four directions is named Directional Wavelet Entropy (DWE). The DWE for approximation, horizontal, vertical and diagonal sub images are estimated in the second level of DWT. Maximum mean value of the DWE in four directions for each sub image is defined as directional feature. These features are obtained from the full size image and the segmented rings of vessels.b) Projection Feature
The next feature is defined with considering the projection procedures. We calculate a vector as mapping the image on specific theta using projection technique. The projection is defined as:
ij ij ij
cos Sin projection P
Sinθ cosθ I
θ θ
⎛ − ⎞
= = ⎜ ⎟
⎝ ⎠ (10)
TABLE I. EXTRACTED FEATURES BASED ON THE COLOR AND STRUCTURAL ATTRIBUTES OF THE IMAGE.
Type of Features Explanation of our proposed Features
Mean value of intensity in the segmented rings of vessels.
Mean value of standard division in the segmented rings of vessels.
Color Features
Mean value of max intensity in the segmented rings of vessels.
Maximum mean value of wavelet entropy in the full size image and the segmented rings of vessels.
Maximum mean value of wavelet entropy in 4 directions in the full size image and the segmented rings of vessels.
Mean of difference between projection in 360° angle and 2 directions of the image and the segmented rings of vessels.
Structural Features
Mean value and number of peaks in vertical profile of the full size image.
where θ is the angle between the image and its projection plane. The projections of the image for angles of 0°-360° are obtained (Fig. 5). For vertical direction, it is defined as:
( )
90 1 , 2 ,...,ij j j Mj
P = ⎣⎡P P P ⎤⎦ (11) where M is the number of rows of the image. The Euclidean distance between the projection of image in each angel and
( )
90Pij is calculated by:
( ) ( )
( )
21
90
M
dist ij ij
i
P P θ P
=
=
∑
− (12) where Pdist is a vector with M values and mean of this vector is computed as projection feature. Euclidean distances for projections of image show which angle has greater number of vessel pixels in the vertical direction. Another feature is mean of Euclidean distance vector for projections of image in all angles and horizontal line that is defined as:( )
0[
1, 2,...,]
ij i i in
P = P P P (13) where N is the number of columns of the image. These two projection-based features are calculated on full size image and the segmented rings of vessels.
c) Profile Feature
To calculate this feature, a modified definition of profile on image is represented. The pixel intensity values across a line or a path are described by profile features. We consider a vertical line as shown in Fig. 6. In the retinal image, the vertical line crosses over the vessels, so we obtain mean and number of peaks as our profile features on the full size image.
III. FEATURE OPTIMIZATION ALGORITHM
In the previous section, several color and structural features have been extracted from the vessels, as shown in Table I. To improve the classification algorithm an optimization procedure is applied on our extracted attributes as a feature selection approach. The Principal Components Analysis (PCA) algorithm is used to select the optimal features. In this procedure, our feature space is mapped to the orthogonal space and the features with high eigenvalues as energy of this mapping are selected for enhancing the complexity of this space and feature dimensionality reduction. Feature vector has
Figure 4. An overview of wavelet entropy directions in horizental sub image.
Figure 5. Projection of image in different angles.
69 elements and after applying the PCA dimensionality reduction algorithm decreased to 28 more effective dimensions.
We can divide the features to four parts according to diagram that is shown in Fig. 7. The first part is included 1-9 features, the second part is included 10-28 features, third part is included 29-33 features and fourth part is included 34-69 features. The MLP neural network as a classifier with learning algorithm of back propagation is applied to train the net using the optimized features [23, 24]. The MLP algorithm has one hidden layer and the number of hidden neurons is selected with minimum mean
square error (MMSE) fitness function that defined according to:
^ 2
1
i i
i
MMSE Y Y
min⎛⎜N ⎛ ⎞ ⎞⎟
= ⎜⎝
∑
⎜⎝ − ⎟⎠ ⎟⎠ (14) where Yi is the desired values of pixels, Y^i is the values of the classification result and N is the number of observation. The least MSE is searched and finally the number of hidden neurons that have the MMSE is selected to optimized classifier.IV. EXPERIMENTAL RESULTS
In this section, the parameters of our algorithm are tuned.
To explain system performance, accuracy measure is defined as:
TA TR Accuracy ACC
TA FR TR FA
= = +
+ + + (15) where TA is True Accept, TR is True Reject, FA is False Accept and FR is False Reject. Also these parameters are used to determine the reliability of proposed system. Sensitivity (True Positive Rate) and specificity (True Negative Rate) are computed by:
Sensitivity TPR TA
TA FR
= =
+ (16) Specificity TNR TR
TR FA
= =
+ (17) where the sensitivity is used to evaluate the effect of the true items that are identified true and the specificity is used to evaluate the effect of the false items that are identified false.
A. Parameter Setting of PCA Algorithm
The diagram of Fig. 7 shows eigenvalue variations in terms of feature index. The first nine features have the most variability. So, we conclude that these nine features have the most information and energy among the other features. With regard to Fig. 7 the slope of the graph is changed based upon the different eigenvalues. In order to evaluate the efficiency of the features, our graph is separated to four sections. Each of these feature groups are applied to the final classifier and results are compared in Table II.
B. Comparison of Classification Results
According to the shown diagram in Fig 7, the feature space is divided to four groups. These four groups are included the features with eigenvalues from (1-9), (10-28), (29-33) and (34- 69). The first group feature is more effective. The classification procedure is carried out with each group of features and the results of classifications are compared in Table II. As shown, in the first group of features sensitivity, specificity and accuracy rate of 97.2%, 94.4% and 95.8% are obtained, respectively.
MSE of 0.0396 is attained. In the second, third and fourth group of features the accuracy rate of 90.3%, 86.1% and 77.8%
are computed, respectively. So, we have the best classification result using optimal features that are contained color features, wavelet-based and projection-based features.
Figure 6. Vertical profile of a sample image.
Figure 7. Eigenvalue in terms of feature index.
C. Automatic Detection Algorithm
Our aim in this study is determination of arteries or veins on the fundus images. For this purpose, the input image is preprocessed and segmented by segmentation algorithm [17, 18], some rings are cut from segmented image and vessels are labeled. So, the color-based features and the structural features using wavelet, projection and profile are extracted from the labeled vessels. The dimension of the feature space is reduced by our proposed PCA-based method. The optimal number of hidden neurons is selected based on MMSE. At last, the vessels are classified by the neural network. Our algorithm is evaluated on validation dataset by optimal features and accuracy rate of 85.7% is obtained.
V. CONCLUSION
In this paper, a semi-automatic system was presented that classified the retinal vessels to the artery and vein. The vessels were segmented with the segmentation algorithm. The color and structural features were extracted from segmented vessels.
Then, the features were optimized by using the PCA-based algorithm and applied to the neural network classifier. The classifier was optimized by MMSE fitness function. The high accuracy of our result shows that this system can be used to calculate AVR.
1-9 10-28 29-33 34-69
TABLE II. FINAL RESULTS OF PROPOSED ALGORITHM FOR VESSELS CLASSIFICATION.
REFERENCES
[1] S. Shahbeig and H. Pourghassem, “A fast and automatic algorithm for optic disc extraction in retinal images using PCA-based pre- processing and Curvelet transform,” Journal of the Optical Society of America A, vol. 30,no. 1, pp.13-21, January 2013.
[2] M. Khakzar and H. Pourghassem, “Human Authentication Algorithm using Spectral Feature of Retinal Fundus Image,” International Journal of Tomography and Simulation, vol. 28, no. 3, pp. 23-38, 2015.
[3] M. Khakzar and H. Pourghassem, “A Rotation Invariant Retina Identification Algorithm using Tessellation-based Spectral Feature,”
the 21st Iranian Conference on Biomedical Engineering (ICBM 2014), pp. 309-314, Tehran, Iran, November 2014.
[4] S. Shahbeig, H. Pourghassem, and H. Mahdavi-Nasab, “Automatic Optic Disc and Macula Extraction in Retinal Images Using Curvelet Transform-based Enhancement and Multi-Directional Functors,”
International Journal of Tomography and Statistics, vol. 19, pp. 81- 96, March 2012.
[5] N. Nourmohamadi and H. Pourghassem, “Optical Disc and Diabetic Retinopathy Detection in Retinal Images Using Morphological Operation and Region Growing,” International Review on Computers and Software (I.RE.CO.S.), vol 7, no. 4, pp.1463-1469, July 2012.
[6] D. Calvo, M. Ortega, M. G. Penedo, and J. Rouco, “Automatic detection and characterisation of retinal vessel tree bifurcations and crossovers in eye fundus images,” Journal of Computer Methods and Programs in Biomedicine, vol. 103, no. 1, pp. 28-38, July 2011.
[7] K. Rothaus, X. Jiang, and P. Rhiem, “Separation of the retinal vascular graph in arteries and veins based upon structural knowledge,” Journal of Image and Vision Computing, vol. 27, no. 7, pp. 864-875, June 2009.
[8] P. Nazari and H. Pourghassem, “An Automated Vessel Segmentation Algorithm in Retinal Images Using 2D Gabor Wavelet,” 8th Iranian Conference on Machine Vision and Image Processing (MVIP2013), pp. 145-149, Zanjan, Iran, September 2013.
[9] E. Ricci and R. Perfetti, “Retinal blood vessel segmentation using line operators and support vector classification,” IEEE Transactions on Medical Imaging, vol. 26, no. 10, pp. 1357-1365, October 2007.
[10] M. Saez, S. Gonzalez-Vazquez, M. Gonzalez-Penedo, M. Antonia Barcelo, M. Pena-Seijod, G. Coll de Tuerob, and et al, “Development of an automated system to classify retinal vessels into arteries and veins,” Journal of Computer Methods and Programs in Biomedicine, vol. 108, no. 1, pp. 367-376, October 2012.
[11] C. Muramatsu, Y. Hatanakab, T. Iwasea, T. Haraa, and H. Fujita,
“Automated selection of major arteries and veins for measurement of arteriolar-to-venular diameter ratio on retinal fundus images,” Journal of Computerized Medical Imaging and Graphics, vol. 35, no. 6, pp.
472-480, September 2011.
[12] B. Dashtbozorg, M. Mendonça, and A. Campilho, “An Automatic Graph-Based Approach for Artery/Vein Classification in Retinal Images,” IEEE Transactions on Image Processing, vol. 23, no. 3, pp.
1073-1083, March 2014.
[13] M. Niemeijer, X. Xu, A. V. Dumitrescu, P. Gupta, B. Ginneken, J. C.
Folk, and et al, “Automated Measurement of the Arteriolar-to- Venular Width Ratio in Digital Color Fundus Photographs,” IEEE Transactions on Medical Imaging, vol. 30, no. 11, pp. 1941-1950, November 2011.
[14] Q. Mirsharif, F. Tajeripour, and H. Pourreza, “Automated characterization of blood vessels as arteries and veins in retinal images,” Journal of Computerized Medical Imaging and Graphics, vol. 37, no. 7-8, pp. 607-617, October-December 2013.
[15] H. Narasimha-Iyer, J. M. Beach, B. Khoobehi, and B. Roysam,
“Automatic identification of retinal arteries and veins from dual- wavelength images using structural and functional features,” IEEE Transactions on Biomedical Engineering, vol. 54, no. 8, pp. 1427- 1435, August 2007.
[16] J. Lowell, A. Hunter, D. Steel, A. Basu, R. Ryder, and R. L. Kennedy,
“Measurement of Retinal Vessel Widths From Fundus Images Based on 2-D Modeling,” IEEE Transactions on Medical Imaging, vol. 23, no. 10, pp. 1196-1204, October 2004.
[17] A. Bhuiyan, R. Kawasaki, E. Lamoureux, K. Ramamohanarao, and T.
Yin Wong, “Retinal artery–vein caliber grading using color fundus imaging,” Journal of Computer Methods and Programs in Biomedicine, vol. 111, no. 1, pp. 104–114, July 2013.
[18] Image database,http:// www.isi.uu.nl/Research/Databases/DRIVE.
[19] T.Chanwimaluang and G. fan, “An Efficient Algorithm for Extraction of Anatomical Structures in Retinal Images,” IEEE International conference on Image Processing, Barcelona, spain, vol. 1, pp. 1093- 1096, September 2003.
[20] P. Siddalingaswamy and G. Prabhu, “Automated Detection of Anatomical Structures in Retinal Images,” International Conference on Computational Intelligence and Multimedia Applications, vol. 3, pp. 164-168, December 2007.
[21] M. Nejati, H. Pourghassem, “Multiresolution Image Registration in Digital X-Ray Angiography with Intensity Variation Modeling”, Journal of Medical Systems, Vol. 38, No. 2, pp. 1-10, Feb. 2014.
[22] S. Nasehi, H. Pourghassem, “A Novel Effective Feature Selection Algorithm based on S-PCA and Wavelet Transform Features in EEG Signal Classification”, 3rd IEEE International Conference on Communication Software and Networks (ICCSN), vol. 1, pp. 114- 117, 27-29 May, Xian, China 2011.
[23] M. Behnam and H. Pourghassem, “Periodogram Pattern Feature- based Seizure Detection Algorithm using Optimized Hybrid Model of MLP and Ant Colony,” 23rd Iranian Conference on Electrical Engineering (ICEE 2015), Tehran, Iran, pp. 32-37, May 2015.
[24] H. Pourghassem and S. Daneshvar, “A Framework for Medical Image Retrieval Using Merging-Based Classification with Dependency Probability-Based Relevance Feedback,” Turkish Journal of Electrical Engineering and Computer Science, vol. 21, no. 3, pp.882- 896, May 2013.
Parameters TA (%) TR
(%) FA (%) FR
(%) TNR (%) TPR
(%) ACC
(%) By using Features (1-9)
Training 51 47.1 2 0 96.3 100 98 Validation 42.9 42.9 0 14.3 100 75 85.7
Test 42.9 50 7.1 0 87.5 100 92.9 Total 48.6 47.2 2.8 1.4 94.4 97.2 95.8
By using Features (1-28)
Training 52.9 41.2 2 3.9 95.5 93.1 94.1 Validation 42.9 42.9 14.3 0 75 100 85.7
Test 28.6 50 21.4 0 70 100 78.6 Total 47.2 43.1 6.9 2.8 86.1 94.4 90.3
By using Features (1-33)
Training 35.3 56.9 0 7.8 100 81.8 92.2 Validation 28.6 57.1 0 14.3 100 66.7 85.7
Test 50 14.3 7.1 28.6 66.7 63.6 64.3 Total 37.5 48.6 1.4 12.5 97.2 75 86.1
By using All Features (1-69)
Training 41.2 52.9 0 5.9 100 87.5 94.1 Validation 14.3 28.6 28.6 28.6 50 33.3 42.9
Test 21.4 14.3 21.4 42.9 40 33.3 35.7 Total 34.7 43.1 6.9 15.3 86.1 69.4 77.8
Final results of automatic detection and vessel classification Mean of error
(%) Mean of TNR
(%) Mean of TPR
(%) Mean of
accuracy (%) 18.75 84.05 79.39 81.24