Detection of Hard Exudates in Retinal Fundus Images based on Important Features Obtained from Local ...

Kemal AKYOL, Şafak BAYIR, Baha ŞEN, Hasan B. ÇAKMAK

Journal of Computer Sciences and Applications

Detection of Hard Exudates in Retinal Fundus Images based on Important Features Obtained from Local Image Descriptors

Kemal AKYOL1,, Şafak BAYIR1, Baha ŞEN2, Hasan B. ÇAKMAK3

1Department of Computer Engineering, Faculty of Engineering, Karabuk University, Turkey

2Department of Computer Engineering, Faculty of Engineering and Natural Sciences, Yıldırım Beyazıt University, Turkey

3Department of Ophthalmology, Faculty of Medicine, Hacettepe University, Turkey


Diabetic retinopathy is one of the main complications of diabetes mellitus and it is a progressive ocular disease, the most significant factor contributing to blindness in the later stages of the disease. It has been a subject of many studies in the medical image processing field for a long time. Hard exudates are one of the primary signs of early stage diabetic retinopathy diagnosis. Immediately identifying hard exudates is of great importance for the blindness and coexistent retinal edema. There are various ways of achieving meaningful information from an image and one of them is key point extraction method. In this study, we presented a technique based on the acquisition of important information by utilizing the description information about the image within the framework of the learning approach in order to identify hard exudates. This technique includes the learning and testing processes of the system in order to make the right decisions in the analysis of new retinal fundus images. We performed experimental validation on DIARETDB1 dataset. The obtained results showed us the positive effects of machine learning technique suggested by us for the detection of hard exudates.

Cite this article:

  • Kemal AKYOL, Şafak BAYIR, Baha ŞEN, Hasan B. ÇAKMAK. Detection of Hard Exudates in Retinal Fundus Images based on Important Features Obtained from Local Image Descriptors. Journal of Computer Sciences and Applications. Vol. 4, No. 3, 2016, pp 59-66.
  • AKYOL, Kemal, et al. "Detection of Hard Exudates in Retinal Fundus Images based on Important Features Obtained from Local Image Descriptors." Journal of Computer Sciences and Applications 4.3 (2016): 59-66.
  • AKYOL, K. , BAYIR, Ş. , ŞEN, B. , & ÇAKMAK, H. B. (2016). Detection of Hard Exudates in Retinal Fundus Images based on Important Features Obtained from Local Image Descriptors. Journal of Computer Sciences and Applications, 4(3), 59-66.
  • AKYOL, Kemal, Şafak BAYIR, Baha ŞEN, and Hasan B. ÇAKMAK. "Detection of Hard Exudates in Retinal Fundus Images based on Important Features Obtained from Local Image Descriptors." Journal of Computer Sciences and Applications 4, no. 3 (2016): 59-66.

Import into BibTeX Import into EndNote Import into RefMan Import into RefWorks

At a glance: Figures

1. Introduction

A serious complication of diabetes mellitus results in diabetic retinopathy eye disease and vision loss. The development of the disease and prevention of blindness can be averted by early recognition and timely management [1, 2, 3, 4]. A specialist eye doctor examines the diagnosis of diabetic retinopathy (DR), which is carried out by means of visual analysis of retinal fundus images being hard exudate (HE), hemorrhage and microaneurysm. A visible sign of diabetic retinopathy and a marker for the existence of coexistent retinal edema are hard exudates which are one of the most common anomalies found in the eye fundus of patients suffering from diabetic retinopathy. These exudates lead to loss of eyesight or blindness for people with diabetic retinopathy [5, 6]. In this study, we presented a new approach that consists of image processing, key point extraction, feature extraction, important features and classifier stages in order to detect hard exudates from retinal fundus images. On the other hand, we benefited from digital image processing techniques during this study. We performed the experimental validation on a public image database, DIARETDB1 [7].

Key point detectors are mathematical methods that allow us to achieve necessary information to distinguish images. Many studies which are practiced with key point detectors and their descriptors have already been proposed in the literature (e.g. [8, 9, 10, 11, 12]). We built our study by making use of key point detector and descriptor algorithms called SURF (Speeded-Up Robust Features) and ORB (Oriented FAST and Rotated BRIEF) were introduced in [13, 14] respectively with the insights gained from these previous work.

Feature vector, obtained by descriptor algorithms, does not always indicate exact information and this leads to noisy, over fitting and slowing down training/testing data in negative situations. We planned to develop an effective and consistent method to overcome these negative situations emerged as data space grows. For this purpose, we obtained important features with Recursive Feature Elimination (RFE) method which reveals the best compatible features from features space as inputs dynamically.

We tested Random Forest (RF) and Back Propagation Neural Network (BPNN) classifier algorithms performance by using these important features. In this process, we modeled the system by choosing classifier algorithm that provides better performance within the framework of speed and accuracy criteria.

The rest of this paper is organized as follows: In Section 2, related studies are examined. In Section 3, the reason why RFE method has been used is given in a detailed way. In Section 4, classifier algorithms are given. In Section 5, modeling process and experimental results are demonstrated. Finally, conclusions are presented in Section 6.

2. Literature Review

There are many studies focusing on hard exudates with various methods and techniques in automatic retina analysis. In [6], a referral system was presented for the hard exudates by combining different techniques; Scale Invariant Feature Transform, K-means Clustering, Visual Dictionaries and Support Vector Machine. HE candidate regions were extracted by combining histogram segmentation and morphological operations. Next, classification was performed based on significant features that defined each candidate region [15]. HEs were detected automatically with features that identify differences between hard exudates and the retinal background regions excellently using logistic regression [16]. Various image processing techniques such as median filtering, image thresholding were used for detecting HEs [17]. A technique based on morphological image processing and a fuzzy logic for detecting HEs was proposed in [18]. HEs were detected by incorporating contextual information in retinal images. The context was described by means of high-level contextual-based features based on the spatial relation with surrounding anatomical landmarks and similar lesions [19]. HEs were segmented, using mathematical morphology and then achieving features. Afterwards, these features were classified by using the support vector machine [20]. A novel method was proposed to identify hard exudates, using feature combination of stationary wavelet transform and grey level co-occurrence matrix. These features were classified by using an optimized Support Vector Machine with Gaussian Radial Basis Function [21]. A fast, reliable and efficient method which consists of segmentation of blood vessels, extraction of brighter regions and determination of optic disc among brighter regions for detecting the optic disc and exudates was presented in [22]. In [23], a state-of-art image processing techniques and then the contrast-limited adaptive histogram equalization as preprocessing stage, contextual clustering algorithms were used for segmenting the exudates. Afterwards, the key features were extracted and fed as inputs into Echo State Neural Network to discriminate between the normal and pathological image. In [24], a set of optimally adjusted morphological operators were investigated and proposed to be used for the exudates detection on diabetic retinopathy disease. A new unsupervised approach based on the ant colony optimization algorithm, which performs better than the traditional Kirsch filter in detecting exudates was presented in [25].

3. Recursive Feature Elimination

The problem of feature selection is well known in machine learning. Because of effectiveness and ease of verification of the relevance of selected features, a small subset of features can be selected in order to build diagnostic tests. For performing the feature selection, feature-ranking techniques which are particularly effective and a threshold which can be set on the ranking criterion, are used. The features which individually classify the training data best are selected by feature selection methods including correlation methods and expression ratio methods. The useless features are eliminated by these methods since they do not yield precise feature sets. We can evaluate how well an individual feature separates to pathological (hard exudate lesion) or not with the help of a simple feature ranking. A variety of correlation coefficients is used as in equation (1) for this ranking criterion [26].


where µi and σi are the mean and standard deviation of the feature expression values of feature i for all the patients with class (+) or class (−), i = 1 ... n. High negative wi values indicate strong correlation with class (−) whereas high positive wi values indicate strong correlation with class (+). A way of using feature ranking is to design a class predictor which is based on weighted voting of the features proportionally. The weighted voting scheme yields a particular linear discriminant classifier as in equation (2) [26]:


where w is defined in equation (1) and µ is defined in equation (3).


where µ is mean vector over all training patterns. We denote by X (+) and X (−) the training sets of class (+) and (−). The ranking features with the magnitude of the weights of a linear discriminant classifier is a primary step. Because of convenience and efficiency, a cost function computed on training examples only replaces this ideal objective for the training. Thus, removing a given feature or, equivalently, by bringing its weight to zero leads to the change in cost function. The effect of removing one feature at a time on the objective function is predicted by the criteria. When it comes to removing several features at a time, the good features become very sub-optimal and they are necessary for obtain a small feature subset. With the help of the following iterative procedure called RFE, this problem can be overcome [26]:

a) Train the classifier (optimize the weights wi with respect to cost function).

b) Compute the ranking criterion for all features.

c) Remove the feature with the smallest ranking criterion.

We cannot count the features top ranked as necessary the ones which are individually most relevant. As the ranking criterion is computed with information about a single feature, that RFE has no effect on correlation methods should be in mind [26].

4. Classifier Algorithms

Classification, which is performed through learning models based on machine learning techniques, is the process of determining which class the sample data belong to.

The RF multi-way classifier consists of a number of trees, each of which is grown, using some form of randomization. Estimates of the posterior distribution over the image classes are utilized for the leaf nodes of each tree to be labeled. Each internal node includes a test which best splits the space of data to be classified. By sending it down every tree and aggregating the reached leaf distributions, an image is categorized. Randomness can be injected at two points that include the sub-sampling of training data so that each tree is grown using a different subset and selecting the node tests during training [27].

The BPNN, which is one of the most widely applied neural network model, is a multi-layer feed forward network trained in accordance with error back propagation algorithm. The BPNN algorithm may be utilized for a great deal of mapping relations of input-output model to be used [28].

5. Modeling Process and Experimental Results

As seen in Figure 1, we can say roughly that the algorithm consists of two phases. We designed models in the first phase and then we realized analysis of new retinal fundus images based on these models in the second phase.

5.1. Dataset

We worked on the publicly available DIARETDB1 color fundus image database, all of the same size (1500 × 1152). The database consists of 89 color fundus images which are captured using the same 50 degree field-of-view digital fundus camera. The marking of pathologies was performed by four ophthalmologists on this database [29].

5.2. Pre-processing Image and Finding Optic Disc Region

Firstly, we achieved key point list with SURF key point algorithm from image that results from applying bright region extraction algorithm on image in RGB space.

Point information from the optic disc is also in this list. Therefore, it is inevitable that optic disc region is introduced into process such as a texture analysis for detection of hard exudate in key point-based computer-aided design systems. This is because the brightness value of hard exudate and optic disc regions are approximately the same. This situation is undesirable in the detection of the disease.

In other words, optic disc information should not be included in region and description information which will be used in system modeling and analysis of new retinal fundus images. For this, we sought to answer the question: “Which one of the regions we demonstrated in the red circles in Figure 2 is the optic disc region?” by processing key points that we achieved. We acquired the region, corresponding to the key point, from RGB space. Afterwards, we determined the optic disc region by carrying out the textural analysis using structural similarity and Gabor features and we saved this information into the system.

5.3. Feature Extraction Process

In the next step as seen in the flowchart in Figure 4, we obtained (160x32) and (160x64) feature vectors based on key point and description information which we achieved with ORB and SURF key point detector and descriptor algorithms respectively.

5.4. Achieving Important Features

In the next step, as seen in Figure 3(a) and Figure 3(b), we obtained the important features data bank which is necessary and important for the modeling of the system by getting 11 and 13 features from the datasets which we created with the ORB and SURF respectively, with RFE method dynamically.

5.5. Classification Process and Building Model

To detect lesions, the feature vector of input and the feature vector of data bank are compared. For this, we practiced the RF and the BPNN as classifiers to classify whether it is pathological or not. We reserved the 60% portion for training, the other the 40% portion for test in all datasets. We investigated these classifier algorithms performances on both important features and all features and then we demonstrated the results that we obtained in Table 1 and Figure 5.

Table 1. Classification evaluation results

The accuracy is the proportion of true results in data analysis and it is calculated by using (4) [30].


TP = Number of hard exudate region found as hard exudate,

TN = Number of normal region found as normal,

FP = Number of normal region found as hard exudate,

FN = Number of hard exudate region found as normal.

Since the output variable has two categorical values as Non-Ex and Exudate, the confusion matrix is represented as 2x2 square matrix and it contains observed values (represented in rows) and actual values (represented in columns). The overall accuracy of each classifier is presented at the bottom of the last columns in its own section for each classifier. As can be seen when Table 1 is examined, for example, the correct classification ratio (accuracy) is 92.19% with RF classifier and important features obtained from SURF descriptors. Also, the number of pathological region is 40 and the number of non-pathological region is 24 in the analysis. Besides, the correct classification ratio is 90.63% with the RF classifier in which all features set is used as input. On the other hand, the correct classification ratio is 85.94% with RF classifier and important features which obtained from ORB features. Besides, the correct classification ratio is 81.25% with all features set and RF classifier.

We achieved better success with the RF classifier in terms of both correct classification ratio and rapidness. In addition, we demonstrated total running times of algorithms in Figure 6. When the data is taken into consideration in Figure 6 and Table 1, we can say that the RF classifier’s performance is satisfactory and our proposed approach is successful.

We modeled the system taking advantage of both SURF descriptors’ important features and RF algorithms in the light of this information. And thus, this system decides whether there are hard exudate lesions or not in retinal image.

5.6. Analysis of Retinal Fundus Images

We determined the optic disc area and saved this information into the system by practicing work process mentioned in step b with the models we designed (We did not mention here to avoid repetitive statements). In Figure 7(1), key points, obtained from the SURF, appear as red points and optic disc region is appear in yellow circled. Upon being seen in Figure 7(1) and Figurr 7(3) examined carefully, we did not process key points in optic disc region. Figure 7(2) demonstrates regions as red frames which are compatible with key point algorithms. Figure 7(3) demonstrates positive diagnosis regions in classification test. In addition markings of pathologies were re-checked and confirmed by an ophthalmologist, a member of our research team and an experienced specialist in retinal disorders. In Figure 8 results of algorithm applied on various fundus retinal images are shown.

Figure 7. Obtained results with SURF key point extraction: (1) Key points obtained with SURF, (2) Regions corresponding to key points based on SURF algorithm, (3) Diseased regions
Figure 8. Column 1: Retinal fundus image, Column 2: Keypoint extraction, Column 3: Detection of hard exudate lesions and marked in red with cross on it

6. Conclusion

Automatic detection of the hard exudates which formed in the early stages of DR disease is very important in terms of preventing this disease and eye health.

In this study, we obtained feature vectors, which are obtained with key point and their descriptor algorithms and belong to different images in commonly accepted and used DIARETDB1 dataset. And then, we pointed out the importance of features through RFE method. We tested the performances of RF and BPNN classifier algorithms on all feature vectors. As a result of experimental studies, we can say that we achieved better performance by utilizing SURF descriptors’ important features and RF classifier algorithm. In this respect, we designed the detection system which is a fast and efficiently detects lesions called hard exudate. Afterwards we analyzed new retinal images by using this system. Working with more data will improve stability of the system. But it is clear that it causes increases in the time of calculation and process as the size of the dataset grows. The significance of working with important features emerges once again to overcome this. On the other hand, there are different algorithms representing patch images which are compatible with key points and features space obtained by these algorithms may be greater.

In our future studies, we aim to design a system which records the patient information including symptoms of early stage DR such as hard exudate, hemorrhage and microaneurysm in regular intervals.


We thank the DIARETDB1 project for making their images publicly available.


[1]  R. Singh, K. Ramasamy, C. Abraham, V. Gupta, A. Gupta, “Diabetic retinopathy: An update,” Indian J Ophthalmol, vol. 56, no. 3, pp. 179-188, 2008.
In article      View Article  PubMed
[2]  J. A. Olson, F. M. Strachan, J. H. Hipwell, K. A. Goatman, K. C. McHardy, J. V. Forrester, P. F. Sharp, “A comparative evaluation of digital imaging, retinal photography and optometrist examination in screening for diabetic retinopathy,” Diabet Med, vol. 20, no. 7, pp. 528-534, 2003.
In article      View Article  PubMed
[3]  Q. Mohamed, M. C. Gillies, T. Y. Wong, “Management of diabetic retinopathy: A systematic review,” JAMA, vol. 298, no. 8, pp. 902-916, 2007.
In article      View Article  PubMed
[4]  R. Venkatesan, P. Chandakkar, B. Li, H. K. Li, “Classification of diabetic retinopathy images using multi-class multiple-instance learning based on color correlogram features,” in Conf Proc IEEE Eng Med Biol Soc, San Diego, pp. 1462-1465, 2012.
In article      View Article
[5]  A. Osareh, M. Mirmehdi, B. Thomas, R. Markham, “Automated identification of diabetic retinal exudates in digital color images,” Br J Ophthalmol, vol. 87, no. 10, pp. 1220-1223, 2003.
In article      View Article  PubMed
[6]  S. A. Naqvi, M. F. Zafar, I. U. Haq, “Referral system for hard exudates in eye fundus,” Comput Biol Med, vol. 64, pp. 217-235, 2015.
In article      View Article  PubMed
[7]  T. Kauppi, V. Kalesnykiene, J. K. Kamarainen, L. Lensu, I. Sorri, A. Raninen, R. Voutilainen, H. Uusitalo, H. Kalviainen, J. Pietila, “Diaretdb1 diabetic retinopathy database and evaluation protocol,” in Proc. of the British Machine Vision Conference, University of Warwick, UK, pp. 252-261, 2007.
In article      View Article
[8]  K. Mikolajczyk, C. Schmid, “A performance evaluation of local descriptors,” in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 27, no. 10, pp. 1615-1630, Oct. 2005.
In article      View Article  PubMed
[9]  Y. G. Jiang, C. W. Ngo, J. Yang, “Towards optimal bag-of-features for object categorization and semantic video retrieval,” in Proc. of the 6th ACM International Conference on Image and Video Retrieval, New York, 2007, pp. 494-501.
In article      View Article
[10]  S. Lazebnik, C. Schmid, J. Ponce, “Beyond bags of features: Spatial pyramid matching for recognizing natural scene categories,” in Proc. of 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2006, pp. 2169-2178.
In article      View Article
[11]  F. F. Li, P. Perona, “A bayesian hierarchical model for learning natural scene categories,” in Proc. of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2005, pp. 524-531.
In article      PubMed
[12]  J. Sivic, A. Zisserman, “Video google: A text retrieval approach to object matching in videos,” in Proc. of 9th IEEE International Conference on Computer Vision, Nice, 2003, pp. 1470-1477.
In article      View Article
[13]  H. Bay, A. Ess, T. Tuytelaars, L.V. Gool, “SURF: Speeded-up robust features,” Comput Vis Image Und vol. 110, no. 3, pp. 346-359. 2008.
In article      View Article
[14]  E. Rublee, V. Rabaud, K. Konolige, G. Bradski, “ORB: an efficient alternative to SIFT or SURF,” in IEEE International Conference on Computer Vision (ICCV), pp. 2564-2571, 6-13 Nov 2011.
In article      View Article
[15]  X. Chen, W. Bu, X. Wu, B. Dai, Y. Teng, “A novel method for automatic hard exudates detection in color retinal images,” in IEEE International Conference on Machine Learning and Cybernetics, pp. 1175-1181, Jul. 2012.
In article      
[16]  M. Garcia, C. Valverde, M. I. Lopez, J. Poza, R. Hornero, “Comparison of logistic regression and neural network classifiers in the detection of hard exudates in retinal images,” in IEEE International Conference on Engineering in Medicine and Biology Society, pp. 5891-5894, Jul. 2013.
In article      View Article
[17]  D. Kayal, S. Banerjee, “A new dynamic thresholding based technique for detection of hard exudates in digital retinal fundus image,” in IEEE International Conference on Signal Processing and Integrated Networks, pp. 141-144, Feb. 2014.
In article      View Article
[18]  N. G. Ranamuka, R. G. N. Meegama, “Detection of hard exudates from diabetic retinopathy images using fuzzy logic,” IET Image Process, vol. 7, no. 2, pp. 121-130, 2013.
In article      View Article
[19]  C. I. Sanchez, M. Niemeijer, M. S. A. Suttorp Schulten, M. Abramoff, B. Van Ginneken, “Improving hard exudate detection in retinal images through a combination of local and contextual information,” in IEEE International Symposium on Biomedical Imaging: From Nano to Macro, Rotterdam, 2010, pp. 5-8.
In article      View Article
[20]  H. Tjandrasa, R. E. Putra, A. Y. Wijaya, I. Arieshanti, “Classification of non-proliferative diabetic retinopathy based on hard exudates using soft margin SVM,” in IEEE International Conference on Control System, Computing and Engineering, pp. 376-380, Dec. 2013.
In article      View Article
[21]  L. Xu, S. Luo, “Support vector machine based method for identifying hard exudates in retinal images,” in IEEE Youth Conference on Information Computing and Telecommunication, pp. 138-141, Sept. 2009.
In article      
[22]  D. Kavitha, S. Shenbaga Devi, “Automatic detection of optic disc and exudates in retinal images,” in Proc. of 2005 International Conference on Intelligent Sensing and Information Processing, 2005, pp. 501-506.
In article      View Article
[23]  C. JayaKumari, R. Maruthi, “Detection of hard exudates in color fundus images of the human retina,” Procedia Engineering, vol. 30, pp. 297-302, 2011.
In article      
[24]  A. Sopharak, B. Uyyanonvara, S. Barman, T. H. Williamson, “Automatic detection of diabetic retinopathy exudates from non-dilated retinal images using mathematical morphology methods,” Computerized Medical Imaging and Graphics, vol. 32, no. 8, pp. 720–727, 2008.
In article      View Article  PubMed
[25]  C. Pereira, L. Gonçalves, M. Ferreira, “Exudate segmentation in fundus images using an ant colony optimization approach,” Information Sciences, vol. 296, pp. 14-24, 2015.
In article      View Article
[26]  I. Guyon, J. Weston, S. Barnhill, V. Vapnik, “Gene selection for cancer classification using support vector machines,” Mach Learn, vol. 46, no. 1-3, pp. 389-422, 2002.
In article      View Article
[27]  A. Bosch, A. Zisserman, X. Muoz, “Image classification using random forests and ferns,” in IEEE 11th International Conference on Computer Vision, pp. 1-8, Oct. 2007.
In article      View Article
[28]  J. Li, J. Cheng, J. Shi, F. Huang, “Brief introduction of back propagation (BP) neural network algorithm and its improvement,” Advances in Computer Science and Information Engineering, vol. 169 of the series Advances in Intelligent and Soft Computing, pp. 553-558, 2012.
In article      View Article
[29]  “Diabetic retinopathy database and evaluation protocol (DIARETDB1),” Electronic material (Online).
In article      
[30]  P. Eusebi, “Diagnostic Accuracy Measures,” Cerebrovasc Dis, vol. 36, no. 4, pp. 267-272, 2013.
In article      View Article  PubMed
  • CiteULikeCiteULike
  • MendeleyMendeley
  • StumbleUponStumbleUpon
  • Add to DeliciousDelicious
  • FacebookFacebook
  • TwitterTwitter
  • LinkedInLinkedIn