A Novel Way to Detect Hard Exudates Using Dynamic Thresholding Technique in Digital Retinal Fundus Image

Diabetic retinopathy is considered to be one of the major causes of blindness among diabetes mellitus patients. Due to diabetic retinopathy blood vessels of retina gets damaged and fat, lipoprotein substances gets leaked out of the damaged blood vessels and are deposited in the intra retinal space. These substances are viewed as yellowish or whitish in color and are termed as exudates. They are the most important visible sign of the presence of diabetic retinopathy. Exudates are of two types, (a) hard exudates and (b) soft exudates. If the disease is not detected in early stages then it may lead to complete loss of vision to the diabetes patients. Detection of exudates is extremely difficult to detect by visual inspection due to small inner diameter of retina and inadequate lighting conditions. An efficient image analysis program can detect the presence effectively. In this paper we have proposed an automatic method for detection of hard exudates. The proposed method exhibits a sensitivity of 97.60% and specificity of 93% and accuracy of 95.70%.


INTRODUCTION
Computerized analysis of medical images is gaining importance day by day, as it often produces higher sensitivity irrespective of experience of the analyst. For this reason various image analysis techniques are used for automatic detection of various diseases. The retina is the innermost and most important layer of eye, where the earliest pathological changes can be observed. It is composed of several important anatomical structures, which can indicate many diseases such as hypertension, diabetes and other various diseases of eye. The most effective way to detect these diseases is to regular screening of retinal fundus image. Diabetic retinopathy is one of the most serious complications of diabetes mellitus and a major cause of blindness. It is a progressive disease classified according to the presence of various clinical abnormalities. It is the most common cause of blindness among people aged 30-69 years [1]. One-fifth of patients of diabetes type II, have retinopathy at the time of diagnosis. In type I diabetes, diabetic retinopathy never occurs after diagnosis. But after 15 years all most of all patients with type I and two-third of those with type II diabetes have background of diabetic retinopathy [1]. In case of diabetic retinopathy blood vessels get damaged and protein and fat based particles gets leaked out of the damaged blood vessels beside blood flow to the retina decreases. These particles are referred to as exudates. Various methods have been developed for detection of exudates. These include thresholding and edge detection based techniques by Sagar et. al. [2], FCM based approach by Li et. al. [3], gray level variation based approach by Osrach et. al. [4], multilayer perceptron based approach by Walter [5]. Apart from these Welfer et. al. [6], Garcia et. al. [7], Niemeijer et. al. [8], Ravishankar et. al. [9], Kumar et. al. [10] contributed significantly to solve this problem. In this paper we have proposed a method which dynamically calculates an optimal thresholding value to detect hard exudates in fundus images. This paper is organized into following four sections. Section 1 gives an introduction. Section 2 is consists of the details of the proposed method,while section 3 and section 4 describes results and testing methodologies and conclusion respectively.

PROPOSED METHOD
In the proposed method we have applied median filtering onto the input image directly if it is in grayscale, otherwise we have to convert the input image into grayscale before applying median filtering. In the next step we have subtracted the median filtered image from input image (grayscale). We have found that the optic disk is eliminated after the subtraction operation, which often has almost similar intensity as that of the hard exudates. We have calculated the thresholding value which is later used in thresholding step. Finally image addition is performed in between input image (grayscale) and thresholded image. We have given details of the proposed method in this section.

Median Filtering
Median filtering is one of the most important steps of the proposed method. Median filter is a kind of nonlinear spatial filter whose response is based on ordering the pixels contained in the image area encompassed by the filter, and the replacing the value o f the center pixel with the value determined by the ranking result. Median filter replaces the value of a pixel by the median of t he intensity values in the neighbourhood of that pixel. They have got excellent noise reduction capabilities with considerably less blurring than linear smoothing filter of similar size.
Let xi, i=1,2,….n be n observations, whose number n=2v + 1 is odd, can be ordered according to their magnitude as follows: xi denotes i-th order statistic. x(1), x(n) are the maximum and minimum observations respectively [11]. The observation x(v +1) lies in the middle and is called median of the observations [12]. It is also denoted by med(xi). By definition, the median lies in the middle of the observation data. It minimizes the L1 norm: According to (2) the median is the maximum likelihood estimate of the location for the Laplacian distribution: A two-dimensional median filter has the following definition Where Z2 = Z×Z denotes the digital image plane. The set A⊂Z2 defines the filter window. If the input image is of finite extent N × M, 0≤i ≤N -1, 0≤j ≤ M -1, definition (4) is valid only in the interior of the output image, that is, for those i,j for which is not valid at the border of the image. There are two approaches solve this problem. In the first one, the filter window A is truncated in such a way so that (5) is valid and definition (4) can be used again. In the second approach, the input sequence is appended with sufficient samples and (4) is applied for Median filter can remove additive white noise. They are very efficient in the removal of noise having long-tailed distribution. The median is a robust estimator of location also. Therefore a single outlier (e.g. impulse) can have no effect on its performance, even if its magnitude is very large or small. The median becomes unreliable only if more than 50% of the data are outlier. The robustness of median filter makes it very suitable for impulse noise filtering. This property of median filter can be used for this approach. As in the original input image exudates are bright areas with comparatively high contrast than that of its neighbouring region if we apply median filter on the input image (in grayscale format) we would obtain a filtered image in which the exudates are blurred to a great extent. Beside as the optic disk part has almost same brightness as that of exudates this part of retinal fundus image will also become blurred. Median filter has another interesting property of preserving sharpness of edges of the image. Preservation of edge information and its enhancement is a very important subjective feature of the performance of digital image filter. Median filters not only smoothes noise in homogenous image regions but tends to produce regions of constant intensity. All these properties make median filter ideal for this approach.

Image subtraction
Next step of this approach is subtraction of median filtered image from input image (in case of the input image is in grayscale form) or subtraction of median filtered image from grayscale form on input image (in case of the input image is in RGB form). Image subtraction is used to find changes between two images of same scene. As per literature image subtraction can be mathematically denoted as follows [14]: c(m,n)=f(m,n)-g(m,n) As mentioned earlier median filtering makes the brighter regions (i.e. exudates) into blur, hence the result of subtraction gives us the output in which only regions with high brightness and contrast can be observed [14]. Subtraction is one of the most important step of this process as in this step the desired features of input retinal fundus image is extracted [14].

Dynamic thresholding
Thresholding is one of the most useful and easy to implement technique for image segmentation.If in an image consists of light objects on a dark background, in such a way that object and background pixels have intensity values grouped into dominant modes, then we can extract light objects from background usingthresholding operation. Then any point (x,y) in the image at which f (x,y) > T is called an object point, where T is known as threshold parameter. Otherwise the point is called abackground point. Thresholding operation can be defined as follows: g (x,y) = Success of the thresholding mechanism depends on the value of thresholding parameter (T). For the proposed method we have used dynamic thresholding technique [16], [2].The image is divided into blocks of 64x64 pixels each such that atleast 50% overlap between adjacentpairs is obtained. Histogram of each of these blocks is then computed. Ifthe histogram is found to be unimodal a higher threshold value is set,otherwise Otsu's thresholding algorithm [13] is used tofind the threshold for the block. Threshold values for allthe blocks are calculated and stored.
As 50% overlapping is achieved, then each pixel belongs to four blocks. The threshold value (T) of the candidate pixel is interpolated from the threshold values of the four blocks to which it belongs. Let c1(x1,y1), c2(x2,y1), c3(x2,y2), c4(x1,y2)represents the centers of four blocks whose thresholds are T1, T2, T3, T4 respectively. Then T is calculated as follows, A pixel is said to be the part of the exudate regions if and only if it's intensity value the greater than the thresholding value, i.e. T.

Image Addition
Image addition is one of the most well known techniques in image processing. Image addition is used to create double exposure of two images into one. If f(m,n) and g(m,n) represents two images then addition of these two images to get the resultant image is given by [14]. c(m,n) = f(m,n) + g(m,n) When multiple images of a given region are available for approximately the same data and if a part of one of the image has some noise then the noisy part can be compensated from other images using image addition [14].

RESULT
We have evaluated the proposed algorithm on DIARETDB0 [17], DIARETDB1 [18] image database. DIARETDB0 consists of total 130 images out of which 20 images are normal and 110 images are abnormal. DIARETDB1 consists of 89 images in total, out of which 43 are normal and 46 are abnormal. All the images of both DIARETDB0 and DIARETDB1 are of dimension 1500 × 1152, image format is PNG and captured using a 50 degree field-of-view digital fundus camera. For DIARETDB0 ground truth of 50 images are provided and ,for DIARETDB1 ground truth of all 89 images are provided. We have used only those images for which ground truth are available. So, we have used 139 images in total. For both the databases the areas are marked with confidence level that depends on the number of experts that marked it as exudates or not For evaluation purpose value of True Positive (TP), True Negative (TN), False Positive (FP) and False Negative (FN) parameters are determined for each image. A region is considered as TP if it is contained in the ground truth labeled, FP if the area is marked in a ground truth region where no label exists, TN if no marking appears in a non-labeled region in the ground truth image, and FN if there is no area marked in the ground truth. Sensitivity (SE), Specificity (SP) and Accuracy (AC)are used for the measurement of accuracy. Sensitivity, specificity and accuracy are defined as follows. The overall sensitivity,specificity and accuracy are found to be 97.60%, 93.00% and 95.70% respectively. In Table 1 we have shown a comparative with study of sensitivity and specificity between our proposed method with various other methods. One sample input image is shown with its corresponding output image in Fig 1 and Fig 2 respectively. We have presented confusion matrix in Table 2