## 2 Materials and Methods
### Feature selection  
We asked ophthalmologists how they identify exudates in an image so that our feature selection would reflex ophthalmologists' expertise. We found that color, shape and texture are among those top features they look at. To differentiate exudate pixels from non-exudates pixels, we attempt to mimic ophthalmologist expertise by extracting these relevant and significant features. Four features are empirically selected and used as input for FCM clustering. They are intensity value after pre-processing, standard deviation of intensity, hue and number of edge pixels from an edge image. The reasons for the features selection and their details are explained in this section. 1. Intensity image after pre-processing (_I\({}_{CLAHE}\)_) is selected as one of the classification features because exudate pixels can usually be distinguished from normal pixels by their intensity. Firstly, the Red, Green and Blue (RGB) space in the original image is transformed to Hue, Saturation and Intensity (HSI) space. A median filtering operation is then applied on the I (intensity) band to reduce noise before a Contrast-Limited Adaptive Histogram Equalization (CLAHE) is applied for contrast enhancement [23]. The original intensity band image and intensity band after preprocessing are shown in Figures 1A and 1B, respectively. 2. Standard deviation of _I\({}_{CLAHE}\)_ is also chosen as an input parameter because distribution measurement of the pixel values would differentiate exudate area from the others since standard deviation shows the main characterization of the closely distributed cluster of exudates. The standard deviation of the intensity bands after preprocessing is shown in Fig. 1C. Standard deviation is defined in Equation 6:  
\[Std(x)=\frac{1}{N-1}.\sum_{i\in W(x)}\left(I_{CLAHE}(i)-\mu_{I_{CLAHE}}(x) \right)^{2} \tag{6}\]  
where \(x\) is a set of all pixels in a sub-window _W(x)_, \(N\) is a number of pixels in _W(x)_, \(\mu_{CLAHE}(x)\) is mean value of _I\({}_{CLAHE}(i)\)_ and _i\(\in W(x)\)_. A window size of 15 x 15 pixels was used in this step. 3. Hue, also extracted from HSI space, is the third feature selected for input to FCM clustering because hue components make up chrominance or color information. From visual inspection, exudates appear differently in a yellowish or white color. Figure 1: Pre-processing result. (A) Original I band. (B) I band after pre-processing. (C) Standard deviation of (A). 4. Normally exudates gather together in small clusters so they tend to have many edge pixels around the area. A number of edge pixels is also selected as our last feature to FCM clustering. However, during this feature extraction, we remove some irrelevant edge pixels, as described:  
4.1 For fast edge detection, a Sobel edge operator with a mask size of 3x3 pixels is used to compute the gradient magnitude. 4.2 The result from the previous step is then thresholded by a fixed and low value in order to get most of the edge pixels. 4.3 However, some of the resulting edge pixels from the previous step do not represent the edge of the exudates. Some of them are part of vessel's edge and these vessel edge pixels need to be removed before proceeding to the next step. Quick and approximate blood vessel detection is achieved by using a decorrelation stretch on the Red band. The decorrelation stretching is a process used to enhance or stretch the color differences found in a color image. Contrast exaggeration is used to expand the range of intensities of highly correlated images [24, 25]. Blood vessels can be detected by thresholding this result and the detection result are shown in Fig. 2A. 4.4 Some exudates are soft exudates which cannot be detected by a strong edge. High-value red pixels selected from the decorrelation stretch image are chosen and added to the result from the previous step because the soft exudates normally appear red. However, red pixels which belong to the optic disc, which also appear red, have to be removed first. The optic disc is quickly detected by using an entropy feature on \(I_{CLAHE}\).