# Fovea and Optic Disc Detection in Retinal Images with Visible Lesions

José Pinão, Carlos Manta Oliveira

► To cite this version:

José Pinão, Carlos Manta Oliveira. Fovea and Optic Disc Detection in Retinal Images with Visible Lesions. 3rd Doctoral Conference on Computing, Electrical and Industrial Systems (DoCEIS), Feb 2012, Costa de Caparica, Portugal. pp.543-552, 10.1007/978-3-642-28255-3_60. hal-01365775

HAL Id: hal-01365775

https://inria.hal.science/hal-01365775

Submitted on 13 Sep 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Fovea and Optic Disc Detection in Retinal Images with Visible Lesions

José Pinão¹, Carlos Manta Oliveira²

¹University of Coimbra, Palácio dos Grilos, Rua da Ilha, 3000-214 Coimbra, Portugal

²Critical Health, Parque Industrial de Taveiro, Lote 48, 3045-504 Coimbra, Portugal
{jm-pinao, carlos.a.oliveira}@critical-health.com

**Abstract.** The work herein presented aims at improving the detection of the fovea and optic disk anatomical structures in color fundus photographs from patients with visible lesions. The detection algorithm consists of five steps: selection of an area in the image where the optic disk is located using Sobel operator, extraction of optic disk boundaries applying the Hough transform to detect center and diameter of optic disk, detection of the ROI (region of interest) where the fovea is located based on the optic disk center and its diameter, detection of the fovea within the ROI. The proposed improvement adds an additional mask based on an estimation of the vessels present so that lesions that lie away from the vessels do not influence the Sobel operator result. The developed algorithm has been tested in public datasets such as STARE and also on proprietary dataset with 1464 images (ground truth generated by experts).

**Keywords:** Biomedical image processing, Digital images, Filtering, Image segmentation, Anatomical structure.

## 1 Introduction

Image analysis of eye fundus photographs is a common procedure in diagnosis and treatment of several eye diseases such as glaucoma and diabetic retinopathy [1], [2], [3]. The work herein presented details an improved algorithm to detect the optic disc and fovea anatomical regions. This improvement aims at increasing performance in images where lesions are present, without compromising performance in images without pathology. On one hand, the detection of the optic disc can work as a landmark to detect other structures present in the retinal image [1] such as the fovea. Some processing algorithms can have their performance improved by masking the optic disk since it is one of the brightest regions in retinal images causing a high variance of the gradient. The foveal region is responsible for high acuity color vision. The ability to assess the location of lesions relative to the fovea is an additional important factor to diagnosis [2]. The proposed method uses some anatomic features to do the detection in field 1 (centered in optic disk) and field 2 (centered in fovea) color fundus photographs, namely: vertical orientation of vessels near the optic disc; optic disk being a bright region with a circular or slightly elliptical shape; location of
vessels; darkness of the fovea and the fact that the fovea is located in an approximate distance of two and a half optic disk diameters from its center [4].

## 2 Conceptual Model

This algorithm consists of an improvement over a previous implementation [5] that manifested low levels of detection for images with an advanced stages of pathology. The first step of this method is to smooth the image in order to homogenize the image of the eye fundus. This image is also resized to a processing size, by setting the height to 576 pixel, while keeping the aspect ratio. Applying then the Sobel operator (Equation 1) to the red channel enables one to get the horizontal derivative of the image for the purpose of defining a ROI where the optic disk is located:

$$G_y = \begin{bmatrix} 1 & 0 & -1 \\ 2 & 0 & -2 \\ 1 & 0 & -1 \end{bmatrix} * A \quad (1)$$

The peak response from this operator will occur where most vessels with vertical orientation are present. This is true in the vicinity of the optic disc, since there are vessels crossing which branch upwards and downwards, hence the Sobel operator will produce a higher amplitude response. In figure 1 it is observed that the Sobel operator response exhibits a peak in the optic disk region. This is due to vertical dark blood vessels crossing the bright optic disk and where there is a major response due to the presence of blood vessels. Additionally, this new version only considers the mentioned gradient calculated by the sobel operator in the vicinity of vessels, by applying a mask to the previous result.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Sobel operator derivation for 2 retinography</figcaption></figure>
This vessel mask is explained below and is used to estimate the blood vessel
location within the ROI as well. The ROI is defined where the response is higher as a
square image centered on the peak, with an area of 31,25% of the whole image. If the
source image is field 2, the optic disk is located near one of the margins. In these
cases, the ROI does not intercept the center of the image and will have an area of 25%
of the image size. Otherwise the ROI keeps a size of 31,25%.

Within the ROI a binarization process is then applied. Frequently the optic disk
shape is slightly elliptic instead of circular. Hence, in order to obtain better results
with Circular Hough transform (detailed below), a binarization of the ROI is
performed only after applying a derivative Gaussian filter. By choosing an
appropriate standard deviation for the derivative Gaussian filtering kernel, one can
control the thickness of gradient change. The derivative Gaussian filter is applied to
each color channel individually, and the final filter response is chosen as the
maximum individual color response for each position. This increased thickness
enables the Hough (circle) transform to better detect the optic disk (a thinner
transition would weaken the Hough transform result). Initial testing showed that when
using a standard deviation of 2 for the derivative Gaussian filter kernel, a peak of
performance on the results of the Hough circle transform is achieved.

<figure><img src="image_3.png" /><figcaption>Fig. 2. Derivative Gaussian operator effect.</figcaption></figure>

After the normalisation of the Gaussian image with a sigmoid function the image is
binarized using the otsu's method. The normalization method was initially proposed
by Sinthanayothin et al [4].

With the aim of isolating the optic disk within the ROI, in a first step the vessels
are removed from the binary image. This is achieved using the following procedure.
The optic disk is the portion of the image where there is a higher contrast between
vessels (dark structures) and bright area in the vicinity. A median filter with a kernel
size larger than the blood vessels thickness masks vessels and renders the optic disk
more clearly isolated within the ROI. In images with a height of 576 pixels, a kernel
with size of 31 x 31 proved to be of efficacy. A subtraction is then performed between
the existing Optic disk ROI and the resulting image from processing with median
filter. After a normalization operation, a mask for the vessels is obtained. Finally a
subtraction operation between the obtained ROI image from the derivative Gaussian
filter operation with the mentioned vessels mask is performed (figure 3). A threshold based in the median of the output image is than applied to binarize it.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Vessels erased with median filter</figcaption></figure>

The last step will perform a quantitization of the ROI. Prior to this operation, the ROI image is normalized following the principle detailed in [4]. The optic disk ROI is then quantized in 32 levels. Distinct intensity levels, which in some images are present within the optic disk, can causes artificial boundaries to be detected by the Sobel operator. From studying test images it was found that the optic disk boundary typically has an intensity between 87,5% and 71% of the full scale value. Hence all the areas with a intensity the higher then 87,5% are set to zero. To keep the ROI as clean as possible additionally the pixels with intensity lower then 71% are also set to zero to remove some undesired noise. This step improves significantly the performance of the algorithm.

The Circular Hough transform allows the detection of shapes in images. In this case it is used to detect circular shapes within the ROI. Using this transform relevant information such as the optic disk center and diameter is obtained (figure 4).

<figure><img src="image_5.png" /><figcaption>Fig. 4. Optic disk detection with the Hough transform.</figcaption></figure>

With the information obtained concerning the optic disk center and diameter, it is possible to define a ROI for the fovea. Anatomically, the fovea is located approximately at 2.5 diameters from the optic disk center. Based on this information the image is masked and the darkest area in that ROI is searched for (figure 5).
<figure><img src="image_6.png" /><figcaption>(a) Anatomical distance of the fovea to the optic disk</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>(b) Mask applied in the image to detect the fovea</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Fig. 6. Flowchart for the algorithm</figcaption></figure>
The flowchart in Figure 6 is a graphical representation of the description of the algorithm herein described. The flowchart includes the indication in some cases the algorithm is not able to output valid results, and in those cases the images receive a classification of failed detection.

## 3 Analysis

The algorithm herein described was tested both with the public Stare dataset (www.perl.clemson.edu/stare/nerve) which contains mostly images with advanced stages of pathologies and also with four other datasets in which the majority of the images present is without signs of pathologies. Three of these datasets are public, namely the Messidor (http://messidor.crihan.fr/index-en.php), the ROC (http://roc.healthcare.uiowa.edu/) and Drive (http://www.isi.uu.nl/Research/). Additionally a proprietary dataset containing ground truth generated manually by two experienced ophthalmologists was also analyzed. Each ophthalmologist marked the fovea position, as well as 4 points for the optic disc: topmost, rightmost, bottommost and leftmost. This proprietary dataset has 1464 non-mydriatic anonymous images from a Diabetic Retinopathy Screening Programme in Portugal. Messidor is the most representative of the public datasets with 1200 retinal images followed by ROC with 100, Stare with 82 and Drive with 40. For the public datasets, due to the non existence of ground truth information, the optic disk was admitted as well detected when the center of the optic disk was detected inside the optic disk boundary. On the other hand, for the proprietary dataset the detection was considered correct when the optic disk center and fovea had at most an Euclidean distance of 20 pixels from the ground truth in images with size of 768 x 576. Regarding the optic disc radius, the ration between ground truth and detected radius was calculated. When this ratio belonged to an interval between 0.9 and 1.1 the detection was admitted as correct. The method herein described obtained the following results for the public datasets:

<table><caption>**Table 1.** Results for the public datasets</caption><thead><tr><th rowspan="3">Dataset</th><th rowspan="3">Images</th><th colspan="4">Optic disks detected</th></tr><tr><th colspan="2">New version</th><th colspan="2">Previous version</th></tr><tr><th>Images</th><th>%</th><th>Images</th><th>%</th></tr></thead><tbody><tr><td>Stare</td><td>82</td><td>61</td><td>74,1</td><td>47</td><td>58,02</td></tr><tr><td>Messidor</td><td>1200</td><td>1153</td><td>96,08</td><td>1156</td><td>96,33</td></tr><tr><td>ROC</td><td>100</td><td>98</td><td>98</td><td>98</td><td>98,00</td></tr><tr><td>Drive</td><td>40</td><td>39</td><td>97,50</td><td>39</td><td>97,50</td></tr></tbody></table>

Analyzing the results for the Stare dataset in table 1, the new algorithm improved significantly the detection of the optic disk in images with signals of advanced stage of pathologies. 14 of the 82 images of this dataset were recovered, compared to the previous implementation. The results are also interesting for the other datasets with the majority of the images without signals of pathology. The level of performance is quite similar between the algorithms. Stare is a dataset widely tested for the optic disk detection. The following table compares the results presents in the literature and the results reached by these algorithms.
<table><caption>**Table 2.** Results for the public datasets presented in the literature</caption><thead><tr><th>Optic disk detection methods</th><th>Stare dataset</th></tr></thead><tbody><tr><td>Highest average variation (Sinthanayothin et al. 1999)</td><td>42,0%</td></tr><tr><td>Largest brightest connected objects (Walter 2001)</td><td>58,0%</td></tr><tr><td>Average OD-images model - based (Osareh et al.)</td><td>58,0%</td></tr><tr><td><strong>Previous version</strong></td><td><strong>58,0%</strong></td></tr><tr><td>Resolution pyramid using a simple Haar-based discrete wavelet transform (ter Haar 2005)</td><td>70,4%</td></tr><tr><td>Hausdorff - based template matching, piramidal decomposition & confident assignment (Lalonde et al. 2001)</td><td>71,6%</td></tr><tr><td>Hough transform applied only to pixels close to the retinal vasculature (ter Haar 2005)</td><td>71,6%</td></tr><tr><td><strong>New developed version</strong></td><td><strong>74,1%</strong></td></tr><tr><td>Fuzzy convergence (Hoover and Goldbaum 2003)</td><td>89,0%</td></tr><tr><td>Fitting the vasculature orientation on a directional model (ter Haar 2005)</td><td>93,8%</td></tr><tr><td>A geometrical model of the vessel structure structure using 2 parabolas (Foracchia et al. 2004)</td><td>97,5%</td></tr><tr><td>Vessels direction matched filter (Youssif et al. 2008)</td><td>98,8%</td></tr></tbody></table>

For the proprietary dataset with 1464 images the results achieved for the two versions of the algorithm were the following:

<table><caption>**Table 3.** Results for the proprietary dataset.</caption><thead><tr><th rowspan="2">Count below the threshold</th><th colspan="2">New version</th><th colspan="2">Previous version</th></tr><tr><th>Images</th><th>%</th><th>Images</th><th>%</th></tr></thead><tbody><tr><td>Fovea mass center</td><td>1235</td><td>84,29</td><td>1259</td><td>86,00</td></tr><tr><td>Optic disc height ratio</td><td>901</td><td>61,64</td><td>912</td><td>62,30</td></tr><tr><td>Optic disc mass center</td><td>1204</td><td>82,24</td><td>1265</td><td>86,41</td></tr></tbody></table>

The performance of the new algorithm was slightly lower for the proprietary dataset. However, even if there is a decrease in performance, the difference is residual (at most 4 percentage points), which implies that the results still quite interesting. The average processing time by image for each algorithm was 11.2630 seconds for the new version of the algorithm and 10.9452 for the previous in a computer with 2 Quad CPU 2.85GHz, 1.98Gb of RAM.
## 4 Examples

In this section a sample of each dataset is presented. Each sample is representative of the quality of the images for each dataset and the respective detection achieved by the developed method. For the case of the Stare dataset (figure 7(a) and 7(b) are processed with the method which ROI is calculated with the mask of vessels and figure 7(c) and 7(d) without it.

<figure><img src="image_9.png" /><figcaption>Fig. 7. Images of the Stare dataset.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Fig. 8. Images of the proprietary dataset.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 9. Images of the Messidor dataset.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Fig. 10. Images of the Drive dataset.</figcaption></figure>
<figure><img src="image_13.png" /><figcaption>Fig. 11. Images of the ROC dataset.</figcaption></figure>

**5 Conclusions**

In this work an algorithm has been presented which successfully detects the fovea and optic disk in retinal images. It is an improvement over a previous algorithm, with the aim of increasing performance in images with advance stage of pathologies, without loss of performance in images without lesions. Lesions such as exudates have a color profile similar to the optic disc. When present in eye fundus photographs, they deteriorate performance of the algorithm.

This new approach avoids the adverse influence of the lesions present when calculating the ROI, by considering the gradient only in the vicinity of vessels. The performance for the Stare dataset was significantly improved with these changes, with the optic disc center detection rising from 58% to 74%. Only few algorithms in literature present better levels of performance for this dataset [6-9] (table 2). However, these approaches are based in estimating the position of the arcades, which is a computationally demanding task. Furthermore, these approaches only can detect the optic disk center, whereas the here proposed algorithm additionally detects the optic disc radius and the Fovea position.

**References**

1. Lalonde, M., Beaulieu, M., Gagnon, L.: Fast and robust optic disc detection using pyramidal decomposition and Hausdorff-based template matching. IEEE transactions on medical imaging. 20, 1193-200 (2001).

2. Singh, J., Sivaswamy, J.: Fundus Foveal Localization Based on Image Relative Subtraction-IReS Approach. cvit.iit.ac.in. (2008).

3. Chutatape, O.: Automatic location of optic disk in retinal images. Proceedings 2001 International Conference on Image Processing (Cat. No.01CH37205). 837-840.

4. Sinthanayothin, C., Boyce, J.F., Cook, H.L., Williamson, T.H.: Automated localisation of the optic disc, fovea, and retinal blood vessels from digital colour fundus images. The British journal of ophthalmology. 83, 902-10 (1999).
5. Pinão, J., Oliveira, C.M.: Fovea and Optic Disc Detection in Retinal Images. Computational Vision and Medical Image Processing - VIPIMAGE 2011. 149-153 (2011).

6. Youssif, a R., Ghalwash, a Z., Ghoneim, a R.: Optic disc detection from normalized digital fundus images by means of a vessels' direction matched filter. IEEE transactions on medical imaging. 27, 11-8 (2008).

7. Foracchia, M., Grisan, E., Ruggeri, A., Member. S.: Detection of Optic Disc in Retinal Images by Means of a Geometrical Model of Vessel Structure. IEEE Trans Med Imaging 2004. 23, 1189-1195 (2004).

8. Hoover, A., Goldbaum, M.: Locating the optic nerve in a retinal image using the fuzzy convergence of the blood vessels. Medical Imaging, IEEE Transactions on. 22, 951-958 (2003).

9. ter Haar, F.: Automatic localization of the optic disc in digital colour images of the human retina. Utrecht University. (2005).