THE CLINICAL APPLICATIONS FOR AUTOMATIC DETECTION OF EXUDATES

Nowadays, the retinal imaging technology has been w idely used for segmenting and detecting the exudates in diabetic retinopathy patients. Unfortun a ely, the retinal images in Thailand are poorquality images. Therefore, detecting of exudates in a large number by screening programs, are very expensive in professional time and may cause human error. In this study, the clinical applications for detection of exudates from the poor quality retinal image are presented. An application incorporating function, including retinal color normalization, co ntrast enhancement, noise removal, color space selection and removal of the optic disc, was also d esigned to standardize the workflow of retinal analysis. Afterward, detection of exudate based on optimal global thresholding and improved adaptive Otsu’s algorithm was applied. Two experiments were conducted to validate the detection performance with local databases and a publicly available DIARE TDB1 database. The first experiment showed the average sensitivity, specificity and accuracy of 93 .8, 95.3 and 94.9%, respectively. The cross validation results of the second experiment, 60% (5 3) of the retinal images were used for training and 40% (36) for testing, the sensitivity, specificity and accuracy are 84.2, 85.9 and 85.2%, respectively . This result indicates the proposed clinical application provides an effective tool in the screening of exud ates.


INTRODUCTION
Exudate is the leading cause of blindness in the population around the world, especially in developing countries.Health care costs from exudates are also increasing around the world.Many patients are unaware of the problem before it diagnosed.With an automatic or semi-automatic application, the expert ophthalmologist demonstrates the existing problem to the patient, which make it faster and more easily.Therefore, the rapid increase of automatic application for detection of exudates has been presented.Sanchez et al., (2010) presented a method to detect of exudates by thresholding algorithm based on a global or dynamic gray level analysis.Sinthanayotin et al., (2002) describe a method based on a standard region growing to find the exudates, which is computationally expensive.A method based on template matching and edge detection was proposed by (Goldbaum, 1989;Goh et al., (2001) presented the minimum distance discriminant technique directly in Red, Green and Blue (RGB) color space to detect of exudates pixel.A number of attempts have been made to use machine learning to automatically locate manifestations of exudates.Some of unsupervised methods such as Principal Component Analysis (PCA) by (Li and Chutatape, 2004), k-means clustering by (Sopharak et al., 2010, Osareh et al., 2002) and Gaussian mixture models by (Sanchez et al., 2009).Example of supervised learning algorithms has also been attempted, including Neural Networks (NN) by (Osareh et al., 2009;Garcia et al., 2009), naive bayes Science Publications AJAS classifier by (Wang et al., 2000;Sopharak et al., 2012) and Support Vector Machines (SVM) by (Zhang and Chutatape, 2005;Chutatape et al., 2004).Wang et al., (2003) used Fuzzy C-Mean Clustering (FCMC) to segment retinal image and then used NN with a train dataset and then used SVM to separate exudates and non-exudates areas.The applications work well only Luv color space.For poor quality retinal image, the evaluation performance is low.Mathematical morphology has been used to detect contours typical of exudates (Walter et al., 2002).This technique achieved predictive and sensitivity values are 92.4 and 92.8% against a set of 15 abnormal retinal images.The Back Propagation Neural Network (BPNN) has been used for the segmentation of exudates (Gardner et al., 1996).Comparing the results of BPNN technique with the expert ophthalmologist, the technique achieved sensitivity and specificity for the detection of exudates are 88.4% and 83.5%, respectively.A drawback of this technique was that did not work well with a poor quality retinal image.Sanchez et al., (2004) combined color and shape edge features to detect of exudates.They found yellowish objects and then they found sharp edges using various rotated versions of Kirsch masks on the green component of the original image.These techniques are highly sensitive to image contrast.Vijaya and Suriya, (2010) used mathematical morphology for extraction of exudate, blood vessels and optic disc.The one main problem of mathematical morphology technique is the size of structuring element suitable for train image is not be suitable for another test image.Overall, most of these attempts have been performed for detection of exudates, but they have limitations.Quality of retinal images affects the result of exudates and non-exudates by using unsupervised learning, while supervised learning techniques require intensive computing power for training and segmentation process.Therefore, we proposed a novel method for the detection of exudates based on the combine of Optimal Global Thresholding (OGT) and Improved Adaptive Otsu's Thresholding (IAOT) algorithm.We train OGT algorithm to label individual pixels of the retinal image and then make an aggregate decision over the entire image based on the pixel level predictions by using IAOT algorithm.Our initial evaluation results are promising with regard to the prospect of developing a long term and robust algorithm.The rest of the paper is organized as follows: Section 2 provides a more thorough overview of the patient images, ground truth and their approach to tackling exudates.Section 3 explains an automatic detection of exudates and how it can be recognized.Section 4 describes our validation of exudates recognition.Section 5 and 6 describe the results and conclusions of our efforts.

PATIENT IMAGES AND GROUND TRUTH
A necessary tool for reliable evaluations of the algorithm is a database of high quality retinal images which are representative of the problem and have been verified by expert ophthalmologists.An accurate algorithm should take the retinal image as input and produce output, which is consistent with the ground truth.In the following, we describe the local databases and public database (Kalesnykiene et al., 2014) for benchmarking the performance algorithms.

Local Databases
The database consists of 1,220 digital retinal images of which 252 are non-exudates (normal) and 968 contain signs of the exudates (abnormal).The images were taken by the local hospital with single 45 degree Field Of View (FOV) digital retina camera and stored in JPEG format with lowest compression rates.Each image was captured using 24 bit per pixel at a resolution of 760×570 pixels.As can be seen, a normal image mainly consists of vascular, optic disc and the background (Fig. 1A), but the abnormal image indicates exudates components is shown in Fig. 1B.

DIARETDB1 Databases
The publicly available DIARETDB1 databases consist of 130 retinal images of which 108 contain signs of the exudate and 22 are non-exudate and it has the ground truth image collected from expert ophthalmologists.The image was taken in the Kuopio University Hospital with multiple 50 degree FOV digital retina camera with a varying imaging setting controlled by the system.The retinal images contain a varying amount of imaging noise, but the optical aberrations are the same.The images are Portable Network Graphics (PNG) format from where metadata and each retinal image in the database is accompanied by a text file that lists the diabetic lesion type in the image such as hard exudates, soft exudates, red small dots, neovascularisation and hemorrhages.

Ground Truth
For the medical image research, the more important to ensure that the automatically extracted exudate findings marked by expert ophthalmologists, that is, they appear at the same location in the image.Therefore, the ground truth is important to this study.To obtain a ground truth image, for each image, we used images processing software to hand label candidate exudates regions, then we asked the expert ophthalmologists to verify or reject each candidate of exudates region.Then, this first draft image is shown to experts ophthalmologists together with the original image.The expert then made some changes in adding some missing exudates pixels and/or removing some misunderstood non-exudates pixel until it is accepted by expert ophthalmologists.Examples of ground truth images of normal retinal images and retinal image containing exudates as shown in Fig. 1C-D.

AUTOMATIC DETECTION OF EXUDATES
Two main for proposed algorithm, its accuracy in comparison to ground truth and its speed performance of use a poor computer performance.The detection technique entails training based on OGT to recognize of exudate in retinal images.For training databases, 200 unlabeled images from local hospital.In addition, we labeled another 53 retinal images at the DIARETDB1 databases.Afterward, we focusing on the detection of exudate based on IAOT is presented.The positive value denotes the least one exudate in retinal images and a negative value denotes the lack of any exudates.

Pre-Processing of Color Retinal Images
Typically, one main problem in the detection of exudates is the wide variability in the color of retinal image from different patients and different time (Fig. 1A-B).To obtain a retinal image suitable, we put the original retinal image through four preprocessing stages before commencing the detection of exudates.

Histogram Warping (HW)
The color of exudates in some region of retinal image may appear dimmer than the background color of other regions.
Therefore, the color of exudates can wrongly be detected as the background color.In this stage, HW is used to alter the overall color scheme of an image.The HW (Grundland and Dodgson, 2005) is a new histogram matching technique for use in color imaging, it's the transformation of one histogram into another by remapping to the reference image distribution through HW algorithm.If the mapping T r (v) for observed image is computed similarly then the intensity value v can be mapped to the reference image and defined as Equation 1: where, v is a continuous random variable supposed to take values in [0, 1], P r (V) is the reference images probability density function with respect to an intensity value v then mapping T r (V) (Coltuc et al., 2006).Example of HW with retinal image is shown in Fig. 2.

Adaptive Local Mapping Algorithm (ALMA)
From the previous section, the retinal image quality has a great impact on the features of exudates.However, the contrast is decreasing as the distance of pixels from the center, especially in the periphery.In this stage, we applied ALMA (Zhang and Kamat, 2008) to show all possible intensities and transformed of the values inside small windows in the image in a way that all values are distributed around the local mean.The ALMA is defined by Equation 2: where, L out is the nonlinear output intensity image, L max and L min are the maximum and minimum values of intensity within the whole image.We set Ψ equal the average intensity of the image, can defined as Equation 3: Let L ave is the average of log encoded pixels, x, y represents the location of each pixel within window.The number of pixels in the intensity image, an order tern (x, y) of integers x, y is pixel within window, 0≤x <X and 0≤ y< Y.The size of window (M) should be chosen to be large enough to contain a statistically representative distribution of the local variation of pixels.In this study, the window size was empirically set to 69×69 for our image processing, although the other values may be also appropriate.After a local tone mapping, the class of center surround functions by Gaussian function (G) is used and expressed as Equation 4: where, σ 2 is the size of G and it is small when the contrast is already high, while if the fixed it σ 2 is large provide less increase enhancement in local contrast.In this stage, σ 2 is fixed as 0.05.Fig. 3 gives some cases of retinal images treated with ALMA.

Noise Removal
While the ALMA improves the contrast of exudates, it may also enhance the contrast of some non-exudates pixels (e.g., noise or artifact).These pixels can wrongly be detected as exudates.Therefore, after process the local mapping enhancement, Median Filtering (MF) is used to remove noise from images.
The benefit of median filtering is simultaneously at removing noise while preserving edges.The MF works by moving through the image pixel by pixel, replacing each value with the median value of neighboring pixels.The MF algorithm is defined as (5), which proposed by (Kirchnera and Fridrich, 2010) Equation 5: The median value (med(x)) is a set of random variables X, the order statistics X 1 ≤ X 2 ,…, ≤ X N are random variables, m = 2K+1 denotes the median rank.For a grayscale input image with intensity values x i, j , the 2D MF is expressed as Equation 6: where y i, j denotes the processed center pixel location, i refers to the vertical direction and j refers to the horizontal direction, W is a window over which the filter is applied.For the rest of this study, we assume symmetric square windows of size M×M with M = 2L+1.This is probably also the most widely used from of this filter.

Color Space Selection
The RGB color space is widely used throughout computer graphics.However, there are several different color spaces in the literature and each has its own advantages.To select the most suitable color space, a quantitative analysis and applied a metric J to evaluate the performance of various color spaces (Osareh et al., 2009).The metric J represents the overall color difference of exudates and non-exudates pixels can be obtained as Equation 7: where J is the overall color difference of exudates and non-exudates pixels, while the denominator denotes the variations of the color distribution for these two classes.A value of S w represents the within-class scatter matrix indicates the distribution of pixels around their respective mean vectors while S b represents the scatter of samples around the mean vector of class mixture.In this stage, 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 the most appropriate space for retinal image segmentation.Therefore, RBG color space was transformed into Luv space in this stage.

Removal of the Optic Disc
As in several previous works (Sopharak and Barman, 2009;Ravishankar and Jain, 2009) presented a method to remove the optic disc to detection of exudates, but they have limitations.Poor quality images have affected the result of detection of optic disc and require intensive computing power for detection.Therefore, to prevent the optic disc from interfering with exudates, a combine of morphology operator and Otsu' algorithm by our proposed is used (Wisaeng et al., 2014a), unlike previous attempts.

VALIDATION OF EXUDATES RECOGNITION
The performance of all algorithms is measured by sensitivity and specificity.Sensitivity and specificity of the test sets are calculated using discriminant analysis of exudates and non-exudates.These criteria quantify the algorithm performance according to the True Positive (TP, a number of exudates pixels that are correctly detected), False Positive (FP, a number of non-exudates pixels that are wrongly detected as exudates pixels), False Negative (FN, a number of exudates pixels which are not detected) and True Negative (TN, a number of non-exudates pixels that are correctly detected as non-exudates pixels).These two values are defined as Equation 8 and 9: So "SN" in this study is defined as percentage of exudates pixels correctly detected and "SP" is defined as percentage of non-exudates pixels correctly detected as non-exudates pixels.Also "AC" is overall per-pixel success rate of the algorithms.The accuracy value was derived using the following Equation 10: TP + TN Accuracy (AC) = TP + FP + FN + TN (10)

DETECTION OF EXUDATES
We analyzed the performance of several algorithms to select the one with the most accurate results to compare with the new proposed algorithm.We choose four algorithms from our previous work to detect of exudates, FCMC algorithm (Wisaeng et al., 2014b), FMM algorithm (Wisaeng et al., 2014a), an SVM classifier (Wisaeng et al., 2013) and naive bayes classifier to towards our detection of exudates task.To have a fair comparison between different algorithms, all feature in preprocessing of the retinal image stage are kept for all algorithms.
Science Publications

FCMC Algorithm
Six features from the image preprocessing stage are experimentally selected as input for FCMC algorithm.To determine the suitable number of clusters for FCMC algorithm, quantitative experiments with a parameter of a number of clusters varying from two to eight clusters are tested.The approximate time taken to running the whole process for each image with the number of clusters is 2, 3, 4, 5, 6, 7 and 8 are 0.4, 0.58, 1.41, 2.15, 3.01, 4.15 and 4.52 min, respectively.With the number of cluster equal 8, the SN, SP and AC are 96.70,71.40 and 79.00%, respectively.

FMM Algorithm
In this experiment, we combine both FCMC algorithm and Mathematical Morphology Operator (MMO) for detection of exudates.The retinal image is coarse segmented based on FCMC algorithm and then fine segmentation by using MMO is applied.The results from section 5.1 are selected as the input for segmentation of the exudates; a fine segmentation using MMO is used to get a better result.Each image takes approximates 4.52 min for FCMC algorithm and another 0.6 min for MMO.After fine segmentation, most of the detected of exudates regions are true exudates pixels.It found that FMM algorithm detects of exudates successfully with values of SN, SP and AC are 92.06,92.92 and 92.49%, respectively.

Naive Bayesian Classifier
We first estimate the model from a training set using all features, then evaluate the resulting classifier performance on a separate test set.The resulting classifier had an overall per-pixel SN, SP and AC of 97.20, 85.40 and 85.60%, respectively.

SVM Classifier
We use normalized images, enhance image with contrast, filter images for noise, remove the optic disc, extract local features describing pixels or regions and then classify those features using a model built from a training set.For the SVM classifier, after feature selection achieves an overall per pixel SE of 84.53%, SP of 94.19% and an overall AC of 91.86%.

Combination of OGT and IAOT
From the previous section, the advantages of FCMC and FMM algorithm are a straightforward implementation and the ability to model uncertainty within the data.However, one main weakness of the this algorithm is that required many features or predetermined parameters.While the disadvantage of naive bayes and SVM classifier is to take a time to training process.Therefore, we aim at developing a better knowledge base to deal with the number of clusters and reduce the computation time.This study proposes a new algorithm call the OGT and IAOT algorithm.The feature of the OGT and IAOT algorithm is illustrated using a part of Global Thresholding (GT) algorithm and Otsu's Thresholding (OT).Next, we review the theories in GT and OT algorithm and then studies in detail the speed of the OGT and IAOT for detecting of exudates.All the relation is very important in our study.

Recognition of Exudates Based on the GT
To classify the segmented pixels into non-exudates and exudates, the candidate regions of exudates were conducted using coarse segmentation based on the GT.The GT is used to extract a lesion from its background by assigning an intensity value (T) for each pixel such that each pixel is either classified an exudates point or a background point (Gonzales and Woods, 2002).A thresholding in a function of T is defined as an Equation 11: if T is a function of both f(x,y) and local properties p(x,y) Adaptive, if T depends on the coordinates (x, where f(x,y) is the gray level of point (x,y) and p(x,y) denotes some local property of this point.The simplest of all thresholding techniques is to partition the image histogram by using a single and multiple global threshold T, is displayed in Fig. 4.
Histogram shape can be useful in locating the threshold.However, it is not reliable for threshold selection when peaks are not clearly resolved.
Choosing a threshold in the valley between two overlapping peaks and some pixels will be incorrectly classified by the thresholding.One way to overcome the uneven illumination problem is to first estimate the uneven illumination and then correct it rectification.Upon correction, OGT can be employed and composed of the algorithm the following steps: T (t+1) now provides an updated background and exudates distinction • 4. If T (t+1) = T (t) , stop; otherwise return to step 2.
A simple program that uses the OGT is linked to below.Here, source images is initailly resized to fixed image size of 500×500 pixels.Resized image is Luv color space.Afterward, u color space is extracted from resized image because retinal images are almost always saturated in the L color space and have very poor contrast in the v color space.
Figure 5B shows the result of applying the global threshold to Fig. 5A.In OGT, a criterion function is devised that yields some measure of separation between regions.
A criterion function is calculated for each intensity and that which maximizes this function is chosen as the threshold.The OT chooses the threshold to minimize the intraclass variance of the threshold black and white pixels.

Seed Segmentation of Exudates Lesions Based on OT Algorithm
The OT algorithms involve iterating through all the possible threshold values and calculating a measure of spread for the pixel levels each side of the threshold, i.e., the pixels that fall in exudates or background.The aim is to find the threshold value where the sum of exudates and background spreads is at its minimum.The OT by dividing the image into small 36 blocks (6×6), which overlay the image without overlap.To simplify the explanation, Fig. 6 shows a 6 by 6 images divided into 36 blocks.
The OT is used to binary each block.The algorithm searches for the threshold that minimizes the within-class variance which is defined as the weighted sum of variances of the two classes (Deguchi et al., 2003).The Within-Class Variance (WCV) is computed as Equation 14: where, the function 2 w σ denotes the within-class variance, W B and W E are the weight of background and exudates, while 2 B σ and 2 E σ indicate the mean of background and exudates.The OT has proven that minimizing the withinclass variance is the same as maximizing between-class variance (Greensted, 2010).The calculate the Between-Class Variance (BCV) is computed as Equation 15: which is expressed in terms of class probabilities W i and class means µ i , which in turn can be updated iteratively.Equation ( 15) is simpler than Equation ( 14), therefore, we maximize Equation ( 15) to get the Adaptive Otsu's Threshold (AOT).The procedures of AOT can be composed the following steps: • Compute histogram and probabilities of each intensity value • Set the initial value of W i (0) and µ i (0) • Loop for all possible threshold (t) The binarization image f B is defined as Equation 16: Here 0 denotes black representing the exudates and 1 denotes white representing the background.The final value is the sum weighted variance in the threshold value.This same calculation needs to be performed for all the possible threshold values 0.3, 0.4 and 0.68.The Table 1 shows the results of these calculations.

IAOT Algorithm
The highlighted column shows the values for the threshold calculated above.It can be seen that for the threshold equal to 0.68, as well as being used for the example, also has the lowest sum of weighted variance.Therefore, this is the final selected threshold.Fig. 7 shows an example of retinal image segmentation based on IAOT algorithm.All pixels with a level less than 0.68 are background, all those with a level equal to or greater than 0.68 are exudates.Here are a number of examples of the AIOT algorithm in use, its work well with retinal images have those with two distinct regions.A simple program that uses the AIOT algorithm is linked to below.
where, function level (t) = graythresh (img_u), graythresh compute OGT using IAOT algorithm.Level is a normalized intensity value that lies in the range [0, 1].In this stage, a level (t) value of 0.68 is used to separate between exudates and background.σ is higher than a given threshold, the block is a normal block, otherwise is an adaptive block.After two hundred of the experiment, the threshold is determined as 0.68.The resulting of exudates detection with variety thresholding on DIARETDB1 databases is shown in Fig. 9. Figure 9 shows the inputs and output of the combination stage.These results indicate the algorithms achieves the best performances using a segmentation threshold of 0.68.Using this segmentation threshold by local hospital databases with 1,220 retinal images, the algorithm achieved an average sensitivity, specificity and accuracy of 93.80, 95.30 and 94.90%, respectively.In additional, the cross validation results of the second experiment on a DIARETDB1 database, the SE, SP and AC are 84.2,85.9 and 85.2%, respectively.Fig. 9A-D failures to find the exudates are shown.Failures to detect of the exudates are mostly caused by a complete failure to fit the model in the image.The problem within the initial coarse segmentation stage are usually to blame; the simulated GT gets low performance in image with the small lesion region.Fig. 9C illustrates a typical correct result.The feature selection procedure turned out to be very beneficial for application performance.Moreover, computation time decreased enormously.In the case of Fig. 9D this failure is probably caused by the fact that the image space optimization procedure tried to find the optimal location within the retinal image for t = 0.68, as these were detected inside the field of view after the fourth parameter optimization stage.An example images of exudates and the detected result on four retinal images were superimposed on the original image are shown in Fig. 10.

Comparative Study
According to experimental results, a fair comparison of our results against the other work is difficult.There is another difficulty in carrying out other people's algorithms due to lack of necessary details.Thus, to evaluate the accuracy of our method, we define two necessary assessment criteria, i.e., SE and SP.Here, we compare our results with the related works in the literature.These are the works by (Osareh et al., 2002;Wang et al., 2000;Zhang et al., 2004;Sinthanayothin, 1999;Li, 2003;Garcia et al., 2007).A comparison results with other literature is shown in Table 2.

CONCLUSION
In this study, we explore methods toward the development of a new method for automated detection of exudates in poor quality retinal images.Past works on the detection of exudates mainly relies on Grey-level information and were assessed of diagnostic accuracy on a small data set.The FCMC and FMM algorithm have been proposed as possible solutions to detect of exudates.However, one main weakness of these algorithms is that required many features or predetermined parameters.While the disadvantage of naive bayes and SVM classifier is to take a time to training process.To solve the problem, we have presented a combine of the OGT and IAOT algorithm, relies on the careful preprocessing stages could be used for detecting of exudates and non-exudates pixel on poor quality in retinal images.The performance of the algorithm is validated by against manually labeled ground truth produced by an expert ophthalmologist.Inaddition, SE, SP and AC value are used as the performance measurement of detection of exudates.On this difficult data set, our proposed algorithm can achieve accuracy with SE, SP and AC of 93.8%, 95.3% and 94.9% for the detection of exudates with local hospital databases and 84.2%, 85.9% and 85.2% with DIARETDB1 databases.The results will to be able to integrate the presented algorithm in a tool for detection of exudates symptoms faster and more easily.
However, the algorithm is not a final result, but it can be a preliminary diagnosis tool for decision support system for expert ophthalmologists.

Algorithm Limitations
Although, the proposed algorithm performs better than other techniques, but it needs image more enhancement for the better segmentation of exudates.So, in some case of the poor quality retinal image from developing countries, the evaluation performance may be low.

Future Work
Future work will address an issue of improving the accuracy by improving the results of other tasks, such as the detection of optic disc and also try to detection of small exudates with local databases and a publicly available DIARETDB1 database.The clinical application will be expand the detection system to recognize area being either a microaneurysms and haemorrhages.

ACKNOWLEDGMENTS
This study was supported by the commission on higher education, Mahasahakham University and in a part by King Mongkut's Institute of Technology Ladkrabang.We also would like to thank Mahasarakham Hospital for the retinal image used in this experiment.

AJASFig. 1 .
Fig. 1.Example of color retinal images, (A) a typical normal retinal image; (B) abnormal retinal image containing exudates; (C) ground truth image show healthy eyes; (D) ground truth image with containing exudates (white value denotes

Fig. 2 .Fig. 3 .
Fig. 2. Color normalization based on HW, (A) original image, (B) reference image histogram, (C) poor quality retinal image histogram, (D) normalized image histogram background and exudates, respectively, where segmentation into the background and exudates at step t is defined as Equation12:

Consider
Fig. 6(B) the calculations for finding the exudates or background WCV for a single thresholding explained below.In this case the threshold values are three: function M B denotes mean values in the background, while M E denotes mean values in the exudates.To calculate the WCV, the sum of two variances multiplied by their associated weights by Equation 17 and explained below.

Table 2 .
Compare results with other literature with local area databases.Note: NI denotes the number of retinal images and NIEX denotes the number of retinal