In this section, the proposed method called Hard Exudate Detection with Semi-circular Region Analysis (HED-SRA) is explained in details. As mentioned before, HED-SRA includes three main phases which are pre-processing, semi-circular region verification and post-processing. All phases are detailed in the following.
A. Pre-processing
Since the green channel of retinal fundus image has the highest contrast, firstly the green channel of image is considered for processing operations. Also, normalization process is applied on the image.
B. Semi-circular region verification
In this phase, the main operations for the determination of HEs are performed.
Firstly, the appearance features of HEs should be considered. It should be noted that HEs are light or yellowish regions in the retinal fundus images. Figure 1 presents a fundus image including HEs shown by black ellipses.
Firstly, all pixels are separately considered. Around each pixel, several semi-circular regions are considered. By “semi-circular region”, we mean a part of circle with certain radius centered at the pixel of interest. This part should cover a range of angles that is a subset of [0,2π]. The radius of such a circle is denoted by R. For simplicity, we consider 8 non-overlapping semi-circular regions in a whole circle. Let SCi denote the ith semi-circular region. The range of angle covered by SCi denoted by \({ϴ}_{i}\) is [\((i-1)\frac{\pi }{4}\),\(i\frac{\pi }{4}\)]. Figure 2 presents a schematic view for SC1 around pi,j. In this figure, a sample HE is shown with a yellowish oval. Red circles are the boundary points located on the boundary of HE.
For each semi-circular region, we consider several directions shown with green dashed lines in Fig. 2. In fact, the whole angle interval for each semi-circular region is equally divided. Let Dj,i denote the jth direction in SCi. Also, \({\phi }_{j,i}\) denotes the angle made between the x axis and Dj,i. Since HE is a region where sharp intensity changes are observed in its boundaries, it is reasonable to verify all the directions in each semi-circular region from this viewpoint. In fact, for all the existing directions in a semi-circular region, it is verified whether or not a significant intensity change is observed along the related directions. In order to do so, firstly we find all the pixels located in direction Dj,i. It is possible to consider several discrete values from a pre-defined range denoted by [\({r}_{0} {r}_{1}]\) for R and find the pixels using the cosine and sine values of \({\phi }_{j,i}\). Let \({px}_{j,i}^{n}\) denote the pixel located at \(({r}_{n},{\phi }_{j,i})\) polar coordinates. Let SETj,i denote the set of all pixels which are located on Dj,i. Then, for all \({px}_{j,i}^{n}\in {SET}_{j,i}\), we should compute the intensity difference between two consecutive pixels. Let \({df}_{j,i}^{n}\) denote the difference between nth and (n-1)th pixel located on Dj,i. It is computed through the following equation.
$${df}_{j,i}^{n}=X\left({px}_{j,i}^{n}\right)-X\left({px}_{j,i}^{(n-1)}\right)$$
1
Where in (1), \(X\left({px}_{j,i}^{n}\right)\) denotes the intensity value of \({px}_{j,i}^{n}\).
Then, we verify the values of \({df}_{j,i}^{n}\) in Dj,i and find \({px}_{j,i}^{n}\) such that the following conditions are true.
\({df}_{j,i}^{n}<0\) , \({abs(df}_{j,i}^{n})>{Th}_{1}\) (2)
It should be noted that abs() is the absolute operator and Th1 is a threshold value. If these conditions are true for Dj,i, this direction is considered as a non-constant direction. If the number of non-constant directions in SCi is more than a threshold denoted by (Th2), SCi is considered as an entrance area to a HE. It should be noted that the pixels which satisfy the above equation, are presented with red circles in Fig. 2. It can be observed that such pixels are not necessarily located at the same distances from the initial pixel, pi,j. Such a point leads to the identification of HEs with different shapes and sizes. Figure 3 presents several samples for HEs with different shapes which can be extracted by the proposed method. For each HE, SC1 is presented and its directions are shown with green dashed lines inside it. As mentioned before, red circles are the boundary points located on the boundary of HE. As obvious in the figure, the boundary points are not necessarily located in the same distance from the initial point, pi,j. The pseudo-code for semi-circular region verification phase is presented in Fig. 4.
C. Post-processing
In this phase, optic disc is detected and removed to reduce the number of false positive regions. The processing operations for finding optic disc are explained here.
At first, the noise of image is reduced using a noise reduction method like median filtering. Then, the boundary points are extracted using an edge detection method such as Sobel method. The main idea is to find objects like circles in the fundus image. Initially the dimensions of optic disc are manually computed in several images to specify the dimensions of circles which should be looked for. Next, for each pixel, a circle is considered which is centered at the pixel and the radius is equal to the radius of manually labeled optic disc. Figure 5 presents a circle centered at pi,j. This circle is divided to four quarters. Each quarter is divided into several circle sectors. Along each direction, it is verified whether or not a boundary pixel is found near the pre-determined radius. If the number of directions with such a characteristic is more than a threshold, the related quarter is considered as a candidate quarter. If all the four quarters of circle are candidate, the whole circle is considered as a candidate for optic disc. Since it may be possible to find several circles which are candidates for optic disc, the brightness conditions is additionally considered. For each candidate circle, the brightest direction is determined. In fact, the mean intensity of pixels which belong to each direction is computed. For each candidate circle, the direction with maximum mean value is determined. Then, among the candidate circles, the one with the highest mean value is labeled as optic disc.