Macular edema ensues when there is abnormal pile-up of fluid and results in swelling of the macula part of the retina. It is commonly associated with diabetes. It can be diagnosed by identifying exudates in the retinal images. In the proposed work, macular the retinal image is pre-processed, enhanced and segmented using morphological operations. The optic disc and macula are segmented. Various statistical features are extracted. Optimal features are selected using Haar wavelets. The selected features are classified using Random tree classifier to detect the severity of the disease in to three stages namely, normal, mild and critical. The accuracy obtained is 98.4%.
Diabetes mellitus is a chronic disorder which occurs when the pancreas do not produce adequate insulin in the body. According to the WHO global report  there were 1.5 million deaths in the world caused only due to diabetes. If the blood sugar levels are not controlled properly, the retina may get damaged, resulting in partial or total vision loss. Diabetic retinopathy (DR) is the injury to the retina caused due to the damaged blood vessels. Studies prove that the percentage of retinopathy in people with diabetes is s 35% . If DR is not detected at early stage, the aqueous fluid leaked by the blood vessels accumulates in the macula region of the retina. This causes the macula to swell and is referred as macular edema (ME). ME is the most common reason for vision loss among people with DR.
ME, if left untreated can result in serious vision loss and even blindness. The most simple and effective way of detecting ME is by checking for the presence of Exudates in the retinal region. Exudates occur when the capillaries leak lipids and plasma. The surplus collection results in the inflammation of the retina. The image with macular edema is given in Figure 1.
Macular edema usually doesn’t show any visible symptoms when it develops. Blurred vision and loss of sharp sight are the major symptoms once the disease starts progressing.
Motivation: Macular edema is a retinal bruise caused due to repercussion of DR. It may lead to vision loss, if not diagnosed at an early stage. Manual detection of this disease is not adaptable due to the shortage of experts or equipment in rural areas. A computerized ME detection system can overcome these limitations and refer only those cases which need immediate attention of a doctor.
Contribution: The proposed work takes the retinal input images as input, preprocesses, segments the exudates, extracts the required features, selects the relevant features and classifies them based on the severity as normal, mild or critical stages using the Random tree classifier.
The outline of the work is as follows. Earlier methods in the ME analysis is described in Section 2. Section 3 describes the architecture of the ME detection system. The next section discusses the results obtained and comparative study. The last section presents the conclusion and future enhancements.
J J Kumar and C G Ravichandran  developed a technique for identification and grading of ME from retinal images. Hard exudates are detected using extreme learning machine classifier. The severity of ME is assessed using the regional properties of hard exudates in the retinal image.
R S Rekhi et al.  developed a robust method to segment hard exudates from retinal fundus images. The geometrical shape and orientation features of exudates are considered for accurately segmenting exudates resulting in an overall accuracy of 91% for 189 fundus images from DIARETDB1 and MESSIDOR databases.
ME grading based on feature learning approach and deep neural networks was proposed by B. Al-Bander et al. . The algorithm was tested on MESSIDOR database and an accuracy of 88.8% was obtained using this method.
Lim et al.  presented an automated approach for classifying diabetic macular edema. The macula area is marked and fovea is localized based on ETDRS rule. “Marker controlled watershed transformation” is employed to separate exudates from the macula regions to classify as normal, stage 1 and stage 2 . An accuracy of 85.2% is obtained with this method for MESSIDOR data set.
S. Vasanthi and Wahida Banu  suggested a technique for automatic segmentation of hard exudates from retinal fundus images using “Adaptive Neuro Fuzzy Inference System” and “Extreme Learning Machine classifier”. They reported an accuracy of 96.49% for both the classifiers.
A hybrid classifier system was proposed by U. R. Acharya et al.  using discrete wavelet, Radon and discrete cosine transformations. Supervised hybrid classifiers are used to classify using significant features. The accuracy obtained for the MESSIDOR database is 97%.
Akram et al.  presented an intelligent system for detecting ME using a Gaussian mixture model and detailed feature set. A hybrid classifier using the combination of Gaussian mixture model and the SVM classifiers is proposed. They obtain an accuracy of 96.8% for the standard retinal image databases.
Periera et al.  proposed a method for segmenting exudates using “ant colony optimization” method. Performance was experimented with an online database and the authors have claimed that performance outweighs the result of Kirsch filter in exudates detection.
B. Harangi and A. Hajdu  developed an automated exudates detection method using a three stage approach which included candidate extraction, precise contour segmentation and candidate labeling. Naïve Bayes classifier combined with an adaptive boosting technique is used for classification.
Mishra and Ratha  inferred that attribute selection based random tree classifier can produce better accuracy of classification compared to random forest classifier. They had tested it on publicly available microarray datasets.
The Proposed System
Overview of the proposed system
The proposed system comprises of a data aggregation step where the input images are received from a standard retinal image database. The images are pre-processed to make it suitable for extracting the exudates by using various morphological functions. Exudates are segmented and macula region is isolated. Various statistical features are extracted from the grey scale image as well as exudates segmented image. Optimal features are selected using Haar wavelets. Classification is done using Random tree classifier. The architecture of this system is given in Figure 2.
The input images come from varying databases and are converted to a size of 373 X 565 pixels but the aspect ratio is maintained. The channels of the image namely, red, green and blue are extracted and analyzed. Green indexed image is chosen as it preserves contrast feature with the background. Histogram equalization is performed to improve the image contrast.
The regions of interest in the proposed system are exudates and macula. Macula is the darkest region in the retinal fundus image which helps in achieving sharp vision. The histogram equalized image is transformed to binary image. Any noise present in the image is removed using the median filter. This image is complemented to detect macula.
The optic disc is the brightest part of the retinal image and segmented by setting the threshold intensity of the image. The intensity of the detected regions is maximized and morphological functions are used to fill the gaps in the image. The closed image is converted to binary image to segment the optic disc.
The hard exudates are the yellow flecks found in the retinal image. Morphological close operation using octagon shaped structuring element is used. To highlight the edges of the retinal image, Sobel operator is used. Morphological close operation using a circular structuring element is used and median filter is used to remove the noise to segment exudates.
The exudates segmented image is considered and the number of exudates regions is counted. The area occupied by the exudates in each region is computed. The various statistical features are extracted using . The features extracted are kurtosis, entropy, mean, third moment and gray level co-occurrence matrix.
Optimal features have to be selected for accurate classification. The proposed work uses Discrete Wavelet Transform (DWT) using Haar wavelets . Haar wavelets have been extensively used in feature selection because of its low computing requirements . It is the easiest, faster than other methods .The features are converted to discrete wavelets and then fed to the Random tree classifier.
Classification using a Random tree classifier
Random tree is a classification algorithm based on supervised classification. They were developed by Leo Breiman and Adele Cutler. It uses the concept of bagging to build a decision tree for constructing a random set of data . This algorithm can handle both classification and regression types. Random trees are a collection of tree predictors. They are amalgamation of two important algorithms used extensively in machine learning namely, single model decision trees and random forest concept. Algorithm for random tree classification is described in Table 1.
|Input: feature vector V Output: class labels Step 1: Get the input feature vector from the feature set Step 2: Build N un-pruned random trees from the feature vector V Step 3: Randomly select p predictors at each node. From these select the best split Step 4: Save the tree Step 5: Classify each input attribute vector from V with every tree formed in the forest Step 6: Identify the class label that obtained maximum number of votes Step 7: output the class label that has maximum votes|
Generalized Algorithm for Random Tree Classifier
4.1 Results of Image Pre-Processing
Figure 3a shows the histogram equalized image and Figure 3b shows the macula detected image obtained as a result of methods explained in Section 32
The optic disc is obtained from the green channel image using various morphological operations described in section 3
2 The results are depicted in Figure 4 a and 4b respectively
The segmentation of hard exudates from histogram equalized image is depicted in Fig 5
Figure 5a shows the histogram equalized image and 5b represents the segmented exudates image respectively
Figure 5a. Histogram equalized image b. Segmented Exudates
4.2 Performance Analysis
Classification of the fundus images were performed using random tree classifier. A total of 600 images were randomly selected from the MESSIDOR dataset 
The proposed method classifies the given retinal images into one of the three classes namely, normal, mild or critical. Hence the confusion matrix is a 3X3 matrix as shown in Table 2.
Table 2. Confusion matrix for random forest classifier
42 %, 9695% and 100% respectively The overall accuracy for all the three classes is 9883% which is very high and stable
The proposed method showed outstanding results compared to earlier methods in terms of increased accuracy of detection. The graphical representation of the performance analysis is depicted in Figure 6.
Macular edema is the most common reason for vision impairment in people with uncontrolled sugar levels. This work proposes a method for severity identification of macular edema using random tree classifier. A total of 600 images are considered from MESSIDOR database. Various morphological operations are performed on the input fundus images to segment macula, optic disc and exudates. The statistical features are extracted and discrete wavelet transformation using Haar wavelets is used for better feature selection. The selected features are fed to the random tree classifier to partition the input images into normal, mild or critical stages. The proposed work resulted in an accuracy of 98.8% which outweighs the earlier methods for severity detection and classification in the literature.
As a future work, heterogeneous databases may be incorporated and better image pre-processing techniques could be used for handling varying image data sources.
- Automatic classification of diabetic macular edema in digital fundus images Lim ST, Zaki WMDW, Hussain A, Lim SL, Kusalavan S. 2011 IEEE Colloquium on Humanities, Science and Engineering.2011. Google Scholar
- Segmentation and Classification of Optic Disc in Retinal Images Vasanthi S, Banu RSDWahida. Research Journal of Applied Sciences, Engineering and Technology.2014-oct;:1563-1571. Google Scholar
- Automated detection of diabetic retinopathy in retinal images Valverde Carmen, Garcia Maria, Hornero Roberto, Lopez-Galvez MariaI. Indian Journal of Ophthalmology.2016. Google Scholar
- Automated diabetic macular edema (DME) grading system using DWT, DCT Features and maculopathy index Acharya URajendra, Mookiah MuthuRamaKrishnan, Koh JoelEW, Tan JenHong, Bhandary SulathaV, Rao AKrishna, Hagiwara Yuki, Chua ChuaKuang, Laude Augustinus. Computers in Biology and Medicine.2017-may;:59-68. Google Scholar
- Automated detection of exudates and macula for grading of diabetic macular edema Akram MUsman, Tariq Anam, Khan ShoabA, Javed MYounus. Computer Methods and Programs in Biomedicine.2014-apr;:141-152. Google Scholar
- Exudate segmentation in fundus images using an ant colony optimization approach Pereira Carla, Gonçalves Luís, Ferreira Manuel. Information Sciences.2015-mar;:14-24. Google Scholar
- Automatic exudate detection by fusing multiple active contours and regionwise classification Harangi Balazs, Hajdu Andras. Computers in Biology and Medicine.2014-nov;:156-171. Google Scholar
- Early detection of diabetic retinopathy from digital retinal fundus images Prasad DeepthiK, Vibha L, Venugopal KR. 2015 IEEE Recent Advances in Intelligent Computational Systems (RAICS).2015. Google Scholar
- The New Graphic Description of the Haar Wavelet Transform Porwik Piotr, Agnieszka Lisowska. Computational Science - ICCS 2004.2004;:1-8. Google Scholar
- Subramani Prabakaran, Sahu Rajendra, Verma Shekhar. BMC Bioinformatics.2006. Google Scholar
- Performance Analysis of Microarray Data Classification using Machine Learning Techniques Pani SubhenduKumar, Ratha BikramKesari, Mishra AjayKumar. International Journal of Knowledge Discovery in Bioinformatics.2015-jul;:43-54. Google Scholar
- FEEDBACK ON A PUBLICLY DISTRIBUTED IMAGE DATABASE: THE MESSIDOR DATABASE Decencière Etienne, Zhang Xiwei, Cazuguel Guy, Lay Bruno, Cochener Béatrice, Trone Caroline, Gain Philippe, Ordonez Richard, Massin Pascale, Erginay Ali, Charton Béatrice, Klein Jean-Claude. Image Analysis & Stereology.2014-aug. Google Scholar
- Closing the door on illicit tobacco trade, opens the way to better tobacco control Prasad Vinayak, Schwerdtfeger andUlrike, El-Awa Fatimah, Bettcher Douglas, Silva VeradaCostae, and Eastern Mediterranean Health Journal.2015-jun;:379-380. Google Scholar