## 3 Results and Discussion  
In our experiment, 60 fundus images taken mainly from the online databases of STARE and DIARETDB were used as test images for the proposed technique. All images showed improvements in luminosity and contrast throughout their ROIs. The improvements can be verified visually and quantitatively even in the areas that are occluded by reflectance. Figure 6 shows seven random samples that were improved with the proposed method using the three filters. As observed, the effect of reflectance around the boundary of the ROI is almost eliminated by the process. Via observation, the performances of the IDF and AF appear identical. The MF is good at removing boundary reflectance, but it also removes a lot of foreground objects. The means and standard deviations (stds) of the green channels of the images were measured before and after the filtering process. Table 1 lists the means and stds of the seven samples before and after filtering. The means of the images approach 128 after filtering, as intentionally obtained by design. On average, the std seems to decrease after filtering, implying that there is less luminosity variation in the filtered images after the reflectance is removed. This is because, in the absence of reflectance, there are less high-intensity pixels near the ROI boundary. Consequently, the std of the ROI drops. It is noticed that the contrast is not always related to the std of an image. In the presence of a strong boundary reflectance, the std increases but contrast decreases since the reflectance obscures the foreground and background of the image. Basically, std is the spread of the intensities about the mean, while contrast is related to how well the foreground objects are distinguished from the background. The objective of this work was to reduce the std of the ROI by removing the boundary reflectance while preserving its contrast. The average std of the MF images is a bit lower than the IDF and AF images since median filtering also removes part of the exudates if they are big. This is evident in sample 6. The luminosity of images can be calculated by transforming them from RGB to L*a*b space, where L represents luminance or luminosity. The average luminosity of the images was calculated before and after filtering to estimate the improvement introduced with the proposed method. We used Equation (3) to estimate the average (avg) luminosity gain of the images. This is simply the average luminance of the filtered images minus the average luminance of the unfiltered images divided by the average luminance of the unfiltered images. Figure 5: The corrected color images of sample in Figure 1 generated using the three filters. Figure 6: Seven samples of fundus images that were selected randomly and improved using the three filters. \[\text{Luminosity Gain}=\frac{\text{Avg Filtered Luminance }-\text{Avg Unfiltered Luminance}}{\text{Avg Unfiltered Luminance}}\ast 100\% \tag{3}\]  
For measuring the contrast of the images, the metric introduced by [PERSON] et al. was utilized [22]. It is implemented in perceptual luminance space at different resolutions. It is the average of the absolute differences between a pixel and its nearest neighbors. The procedure starts by converting a greyscale image into the perceptual luminance space and calculating the first local contrast. Then, the size of the image is halved by down-sampling it before the second local contrast is computed. The next step is repeated a few times to generate more local contrasts as the size of the image becomes smaller and smaller. The overall or global contrast factor (GCF) for the image is the sum of all local contrasts multiplied by some weightings. This contrast metric is similar to the gradient of an image as it aggregates absolute differences in four or eight directions. In our experiments, it was calculated in eight directions at only three resolutions. The GCF is the sum of the 3 local contrasts at the 3 resolutions, multiplied by 3 weightings of 0.12, 0.142 and 0.154, respectively.