Automatic Detection of Exudates in Diabetic Retinop athy Images

Problem statement: Diabetic Retinopathy (DR) is globally the primary cause of visual impairment and blindness in diabetic patients. Reti nal image is essential and crucial for ophthalmolog ists to diagnose diseases. Many of technique can achieve good performance on retinal feature are clearly visible. Unfortunately, it is a normal situation th a the retinal images in Thailand are low-quality i mages. The existing algorithm cannot detect low-quality im age. Therefore, this study is part of a larger effo rt to develop a new method for detection of exudates in l ow quality retinal image. Approach: In this study, we presented a new method towards the development f or detecting exudates pathologies of DR. The color retinal images are segmented using Fuzzy C-Me ans (FCM) clustering and morphological methods and following key preprocessing step, i.e., color n rmalization, contrast enhancement, remove noise an d color space selection. This enables its difference i our methods compared to other approach and the algorithm can achieve good performance even on lowquality retinal images. Result/Conclusion: The result shows that accuracy values increase when the FCM clustering is combined with morphological methods techniques. If any applications need to det ect maximum number of exudates pixels or require execution speed, the FCM clustering technique could be used in isolation. However, if the applications require higher accuracy, the FCM clustering combine d with morphological methods should be chosen. This system intends to help ophthalmologists in DR screening process to detect symptoms faster and more easily. This is not a final result application but it can be a preliminary diagnosis tool or deci sion support system for ophthalmologists. Human ophthalm ologists are still needed for the cases where detection results are not very obvious.


INTRODUCTION
DR is a severe eye disease and a major cause of blindness. Exudates lipid leakages from blood vessels are visible signs of an early stage of retinal abnormality in DR. DR need regular screening because early detection of exudates could help prevent blindness. Unfortunately, it is a normal situation that the retinal images in Thailand are low-quality images. Thus, retinal image segmentation in low-quality images is difficult; take a long time and the expensive computational cost has become a bottleneck that limits clinical application. Many techniques have been employed to the exudates detection. The thresholding and region growing technique are widely used. Kavitha Kavitha and Shenbaga (2005) proposed median filtering and morphology operation for blood vessels detection.
Multilevel threshoding is used to extract bright regions assumed to be the optic disc or exudates. They detect the optic disc as the converging point of blood vessels and then classifiy the other bright regions as exudates. Li and Chutatape (2003) proposed exudates extraction technique by using a combination of region growing and edge detection techniques. Usher et al. (2004) detected the candidate exudates region using a combination of region growing and edge detection techniques. The system failed to detect small exudates and low quality images. Clustering has also been proposed as a possible solution to the exudates detection problem. Zhang and Chutatape (2005) used local contrast enhancement and Fuzzy C-Means (FCM) clustering in Luv color space to segment candidate bright lesion areas. Osareh et al. (2001) used FCM clustering to segment color retinal images into homogeneous regions, then train neural network and support vector machine to separate exudates and nonexudates areas. The system work well only on Luv color space but in the case of non-uniform illumination the detection accuracy is low. The main difficulty with clustering methods is determining is determining the number of cluster to use. A few other attempts are based on neural network, naïve Bayes, specialized features and morphological methods. Gardner et al. (1996) proposed an automatic detection of DR using back propagation neural network. Compared with the result of the ophthalmologist, the network achieved a sensitivity of 88.4% and a specificity of 83.5% for the detection of DR. The techniques did not work well on low contrast images.
From the above studies, the exudates detection can be broken down to two situations: low quality image and multimodal image (see Fig. 1). The existing algorithm can achieve good performance when these two situations are not combined together. For example, it is difficult to exudates detection an images taken at different times and different fields of view. To solve this problem, we proposed a new method for exudates detection using FCM and morphological method to detect and treat DR in an early stage.

MATERIALS AND METHODS
Data preparation: We put our data through four preprocessing steps before commencing the detection of exudates. The retinal color in different patients is variable being strongly correlated to skin pigmentation and iris color. Thus, the first step is to normalize the color of the retinal images across the data set. We selected a retinal image as a reference and then applied histogram specification to modify the values of each image in the database such that its frequency histogram matched the reference image distribution. The contrast of retinal images is not sufficient due to the intrinsic attributes of lesions and decreasing color saturation, especially in the periphery. Consequently, in the second preprocessing step, the contrast between the exudates and the retinal background is enhanced using a local contrast enhancement method to facilitate later segmentation. While the contrast enhancement improves the contrast of exudates, it may also enhance the contrast of some non-exudates background pixels. Therefore, a median filtering operation is applied in third preprocessing step. Finally, is to choose an appropriate representation using color space definition. We have experimented with various color spaces such as RGB, YIQ, HIS, HSL, Lab and Luv color space model. The reasons for the features selection and their details are explained below.
Retinal color normalization: One of the main obstacles for detection of retinal exudates is the wide variability in the color of retinal image from different patients. These variations are strongly correlated to skin pigmentation and iris color. Thus, the color of exudates in some region of an image may appear dimmer than the background color of other regions. As a result, the exudates can wrongly be classified as the background. In fact, without some type of color normalization the larger variation in the natural retinal pigmentation across the patient dataset can hinder discrimination of the relatively small variations between the different lesion types. The three methods tested were grey-world (Vanrell et al., 2001), histogram equalization (Finlaysona et al., 2004) and histogram specification (Osareh et al., 2002). The result of each technique is shown in (Fig. 3A-D). We found that the histogram specification to be most appropriate for the restoration of the retinal image. Therefore, we selected a retinal image as a reference and applied the described histogram specification technique to modify the values of each image in the dataset such that its frequency histogram matched the reference image distribution. The histogram specification technique was independently applied to each individual RGB channel to match the shapes of three specific histograms of the reference image. Here, the reference histograms were taken from an image, which represents a frequent retinal pigmentation color among our image dataset. This image was chosen in agreement with the expert ophthalmologist. The color normalization process improves the clustering ability of the different lesion types and removes the variation due to the retinal pigmentation differences between individuals. The results of retinal color normalize is illustrated in (Fig. 3E-G).

Contrast enhancement:
The retinal images taken at standard examinations are sometimes poorly contrasted and contain artifacts. The retinal image contrast is decreased as the distance of a pixel from the center of the image increased. Moreover, non-uniformity of illumination raises the intensity levels in some regions of an image, while other regions farther away from the optic disc may suffer from a reduction of brightness. Thus, the exudates or similar lesions in such regions are not distinguishable from the background color near the disc. The retinal image quality has a great impact on the features of retinal lesions, especially exudates. Consequently, preprocessing techniques are necessary to improve the contrast of these images. Since histogram specification does not provide an efficient scheme, we apply local contrast enhancement (Chang We, 1998) to a transformation of the values inside small windows in the image in a way that all values are distributed around the mean and show all possible intensities. The techniques of local contrast enhancement are described below. Given each f in the initial image and a small M×M running window w, then the image is filtered to produce the new image pixel f(i, j) Eq. 1: where, the ψ is defined as: And f max and f min are the maximum and minimum intensity values in the whole image, while <f> w and σ w indicate the local window mean and standard deviation which are defined as Eq. 3 and 4: where, (k, l) represents the location of each pixel within window w. The size of window M should be chosen to be large enough to contain a statistically representative distribution of the local variations of pixels. On the other hand, it must be small enough to not be influenced by the gradual variation of the contrast between the retinal image center and the periphery. Here, the window size was empirically set to 69×69 for our processing, although the other values may be also appropriate. The local contrast enhancement depends on the mean and variance of the intensity values within the considered local region. The exponential function (Eq. 2) produces significant enhancement when the contrast is low (σ w is small), while it provides less enhancement if the contrast is already high (σ w is large). The examples of color retinal images after the contrast enhancement (Fig. 3H). Remove noise: While the contrast enhancement improves the contrast of exudates, it may also enhance the contrast of some non-exudates background pixels (e.g., noise), so that these pixels can wrongly be identified as exudates. Here, after to contrast enhancement, there are several ways to remove or reduce noise in an image such as linear filtering, adaptive filtering, median filtering. Median filtering is better able to remove these outliers without reducing the sharpness of the image. The benefit of median filter is simultaneously reducing noise and preserving edges. Therefore, a median filtering operation is applied in this preprocessing step.
Color space selection: The first task in image processing is to choose an appropriate representation using a color space definition. There are several different color spaces in the literature and each has its own advantages. Indeed, there is no color spaces that better than the others and suitable for all kinds of images. To select the most appropriate color space, we conduct a quantitative analysis and utilize the evaluation function value J = trace (S b /S w ) as a measure of color space efficiency (Fukunaga, 1990). This function estimates the class separate of our exudates and non-exudates pixels classes in different color space and was measured using within-class and beteween class scatter matrices. The within-class scatter matrix (S w ) indicates the distribution of sample points around their respective mean vectors and (S b ) represents the scatter of samples around the mean vector of class mixture. In fact the numerator of function J represents the overall color difference of exudates and non-exudates sample points, while the denominator denotes the variations of the color distribution for these two classes. A higher value of J shows that the classes are more separated, while the numbers within each class are closer to each other. We have experimented with various color spaces such as RGB, YIQ, HIS, HSL, Lab and Luv color space, it is obvious that Luv color space (Xiang et al., 2009) the most appropriate space for our segmentation (Table 1).
Optic localization: Optic Disc (OD) localization is indispensable in our automatic exudates detection approach, since it illustrates similar attributes to the exudates in terms of color, brightness and contrast. By detecting it we can remove it from the exudates classification process. To locate OD in this study, two techniques are combine Morphological Reconstruction (MR) and Otsu algorithms are presented. The implementation steps of using a MR methods and Otsu algorithm to detect the OD boundary is as follows. Step 1 Conversion to gray-scale image: The OD is the exit point of retinal nerve fibers from the eye and exit point for retinal vascular. It is a regions inside the OD, but applying in Eq. 5 solves this problem and the result is much smoother image, which is depicted in Fig. 4A. In this step, we using gray-scale closing operator (Ø) applied to the intensity or lightness channel (C I ). The difinitions for closing operation by structuring element B are defined as: where, B 1 is the morphological structuring element. This stage, a flat disc shaped structuring element with a fixed redius of eight is used. It is evident that this approach produces a more homogeneous region while preserving the OD edges.
Step 2 Binary segmentation: The examples above illustrate the used of grayscale reconstruction in OD analysis tasks. However, it is probably for binary segmentation that this operation is most useful. Therefore, a threshold is applied to binary segmentation and threshold image was then used as a mask. The resulting image is binarized by thresholding shown in Fig. 4B and the thresholded image is then used as a mask. All the pixels in the mask are inverted before they are overlaid on the original image to remove candidate bright regions. The result, OD 3 , is shown in Fig. 4C. The MR by dilation, R, is then applied on the previous overlaid image using Eq. 6.
Step 3 Maker image: The dilation of maker image (OD 2 ) under masker image (C I ) are repeated until the contour of image maker image fits under the mask image. The reconstructed image is shown in Fig. 4D.
Step 4 Appling ostu's algorithm: The different between the original image and the reconstructed image is thresholded at grey level α 2 using Eq. 7. The value of α 2 is different from image to image depending on automated selection using the Otsu's algorithm. As a result, high intensities are reconstructed while the rest is removed, as shown in Fig. 4E.

Fig. 4: (A) Intensity image after closing, (B) thresholded image, (C) maker image, (D) reconstructed image, (E) thresholded result of difference image, (F) OD area localized
Step 5 identification of OD: Typically, the OD can be seen brighter than the surrounding area. Despite its brightness, an accurate localization is not an easy task as some part are obscured by crossing blood vessels and in some case, such as the affected of bright the lesions. However, the shape of OD is round; therefore the OD region selection process needs to be made specific to the largest one among the regions and compactness whose shapes are circular. The compactness of OD regions is defined by the value of V, as defined using Eq. 8.
where, A is the number of pixels in the region and P is the total number of pixels around the boundary of each region. The selected result, OD 5 , is dilated with a binary dilation operator (δ) in Eq. 9 to ensure that all pixels in the OD area are covered. This step, a flat disc-shaped structuring element with a fixed radius of six (M 2 ) is used. All OD area in original image is masked out using the previous output. The result is illustrated in Fig. 4F.

Coarse segmentation using FCM clustering:
The FCM is a data clustering algorithm in which each data point belongs to a cluster, to a degree specified by a membership grade. Cannon et al. (1986) originally introduced this technique. FCM partitions a collection of n vectors, c j , j = 1,…,n, into c fuzzy groups and finds a cluster center in each group, such that a cost function based on a distance function is minimized. Because of the fuzzy partition, a given data point can belong to several groups with a degree of membership specified by a grade between 0 and 1, such that the constrains in Eq. 10 are statisfied. These values are collected in a membership matrix, U. However, imposing normalization stipulates that the summation of degrees of memberships for a data set must always be equal to unity: where, m is an exponential weighting function that controls the fuzziness of the membership function, N is number of features, 5 for our case. C is number of cluster (In our case, experimentally vary from 2-8), u ij is the degree of membership of x i in the cluster j, x i is the ith of d-dimensional measured data, c j is the d-dimension center of the cluster and ||·|| is the Euclidean distance between the ith cluster and the jth data point. The squared distance between ith and jth shown in Eq.11 is computed in A-norm via Eq.12.
With these observations, we can decompose J m into its basic elements to see what property of the points (x i ) is measures Eq. 13a-13d: Fuzzy partitioning is carried out through an iterative optimization of the objective function shown above, with the update of membership u ij and the cluster centers c j by using Eq. 14 and 15, respectively: This iteration will stop when Eq. 16 is satisfied: where, T is a termination criterion, K is the iteration number. This procedure converges to a local minimum or a saddle point of J. The input to the FCM algorithm is a set of feature. The number of cluster is required at the beginning and the algorithm is composed of the following step: Step 1: Initialize the fuzzy partition matrix U = (u ij )(U (0) ) by generating random numbers in the range 0-1 subject to Eq. 17. Step 2: At k-step; calculate the centers vectors C (k) = (c j ) with (U (k) ) according to Eq. 15.
Step 3: Update the fuzzy partition matrix U (k) , U (k+1) by the new computed u ij according to Eq. 14.
Step 4: Compute the objective function according to Eq.
11. If the difference between adjacent values of the objective function is less than Termination criterion (T) the stop the iteration; otherwise return to step 2.

Fine segmentation using MR:
The result from the FCM clustering was a rough estimation of the exudates. In order to get a better, a fine segmentation using MR was applied in this step. The MR is a part of morphological image processing. MR is based on dilation on two images, a maker and a mask. The resulting image from coarse segmentation was used as a maker while original intensity image (f I ) was used as a mask. All the pixels in the marker were inverted before they were overlaid on original image. The MR by dilation, R, was then applied on the previous overlaid image using Eq. 18. The dilations of marker image under mask image were repeated until the contour of maker image fits under the mask image: Using Eq. 19, the final result is obtained by applying a threshold operation at automatically selected grey level α 1 to the difference between the original image (f I ) and the reconstructed image (rx 2 ): Performance measurement: (1) Clinical performance indices, performance of all algorithm is measure by four values, namely, True Positive (TP, is a number of exudates pixels correctly detected), False Positive (FP, is a number of non-exudates pixels wrongly detected as exudates pixels), True Negative (TN, is a number of non-exudates pixels which are correctly identified as non-exudates pixels) and False Negative (FN, is a number of exudates pixels that are not detected). To evaluate classifier performance, we use Sensitivity (SE), Specificity (SP) and Accuracy (AC) on a perpixels basis. (Satisfying, SE = TP/TP+FN, SE is percentage of the actual exudates pixel are detected, SP = TN/TN+FP, SP is percentage of non-exudates pixels that are correctly classified as non-exudates pixels and AC = TP+TN/TP+FP+FN+TN, AC is overall per-pixel success rate of the classifier).
(2) We evaluate performance on the test set quantitatively by comparing the classifier's result to ground truth. In order to facilitate the experts to produce a ground-truth image, a first draft of ground-truth image is created by us. Then, this first draft image is shown to ophthalmologists together with the original image. The ophthalmologists then made some changes by adding some missing exudates pixels and/or removing some misunderstood non-exudates pixels until it is accepted by experts.

RESULTS AND DISCUSSION
The result from the FCM algorithm is list of cluster centers and n membership-grades for each pixel, where n is the number of desired clusters. A pixel will be assigned to the cluster with highest membership-grade.
However, the problem of using the FCM clustering technique is that the numbers of desired clusters, n, has to be specified beforehand. To determine the suitable value of n, we tried values ranging from 2-8. The SE, SP and AC of exudates detection that we received from of data are 96.7, 71.4 and 79%, respectively. The results for images using n = 8 are shown in Fig. 5.
The result from the FCM clustering coarse segmentation is used as input to the fine segmentation using MR. After fine segmentation, most of the classified exudates regions are true exudates pixels, which give a smaller TP value; however, it also reduces the FP value because misclassification of non-exudates pixels is also lower.  Using FCM clustering followed by MR, gives higher AC with a lower FP value. Comparing with baseline algorithm, the results indicate that the FCM clustering followed by MR performs better in accuracy. The comparison of exudates detection from the FCM clustering from the eight clusters resulting from coarse segmentation and result of FCM clustering followed by MR and ground-truth image are displays in Fig. 6.

CONCLUSION
In this study, we have investigated and proposed methods to automatically detect exudates from low quality images and multimodal images taken from DR with non-dilated pupils. The study is based on the FCM clustering segmentation and morphological techniques. Five input features based on the characteristics of exudates, namely, retinal color normalization, local contrast enhancement, median filtering, RGB color space was transformed to Luv space and OD localization, are selected. The performance of algorithm is measured against ophthalmologist hand-drawn ground-truth. The SE, SP and AC are also used to evaluate the system. The result shows that accuracy values increase when the FCM clustering is combined with MR techniques. If any applications need to detect maximum number of exudates pixels or require execution speed, the FCM clustering technique could be used in isolation. However, if the applications require higher accuracy, the FCM clustering combined with MR should be chosen.
Overall, our experimental results show that careful preprocessing step, feature selection and appropriate classifier together provide exudates detection performance even on low quality images and multimodal images. This system intends to help ophthalmologists in DR screening process to detect symptoms faster and more easily. This is not a final result application but it can be a preliminary diagnosis tool or decision support system for ophthalmologists. Human ophthalmologists are still needed for the cases where detection results are not very obvious.