AN ALGORITHM TO DETECT THE RETINAL REGION OF INTEREST

Retina is one of the important layers of the eyes, which includes sensitive cells to colour and light and nerve fibers. Retina can be displayed by using some medical devices such as fundus camera, ophthalmoscope. Hence, some lesions like microaneurysm, haemorrhage, exudate with many diseases of the eye can be detected by looking at the images taken by devices. In computer vision and biomedical areas, studies to detect lesions of the eyes automatically have been done for a long time. In order to make automated detections, the concept of ROI may be utilized. ROI which stands for region of interest generally serves the purpose of focusing on particular targets. The main concentration of this paper is the algorithm to automatically detect retinal region of interest belonging to different retinal images on a software application. The algorithm consists of three stages such as pre-processing stage, detecting ROI on processed images and overlapping between input image and obtained ROI of the image.


INTRODUCTION
Retina is third layer of the eye and covers internal and back side of eyeball like wallpaper.Retina consists of millions optic and nerve cells.If there exist any damages in the retina, image may not be generated and if there exist any damages in the optic nerve, image may not be sent to brain.As a result, most probably people will lose their seeing abilities due to the damages.As a result, early treatment can save people's seeing abilities.There are some studies especially in biomedical area to find the retina and look into the lesions (i.e., microaneurysms and exudates) or diseases (i.e., hypertension and diabetes) inside it (Zhu, 2010).First of all, retinal region of interest should be detected before looking into problems on the retina.Since areas out of ROI affects the histogram, standard deviation, speed of the program and so on.Moreover, ledge of the retina is found and then, it is detected that the eye is correspond to either left or right side.

THE REGION OF INTEREST ALGORITHM
The proposed algorithm mainly contains three stages such as preprocessing, detecting ROI on processed image and overlapping between input image and obtained ROI of the image.

Pre-processing Stage
The aim of this stage is to obtain uniformity images so as to apply the algorithm for all types of images.Since there are many types of images, the algorithm cannot work successfully until preprocessing steps are done.Some images may have noises, some may have dark lights, and some may have bright lights and so on.In order to make an automatic detection for all types of images, uniformity images need to be obtained.For the proposed algorithm, processes can be seen in Figure 1.

Figure 1. Flow chart of the proposed algorithm
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLII-4/W6, 2017 4th International GeoAdvances Workshop, 14-15 October 2017, Safranbolu, Karabuk, Turkey Firstly, input image is converted to grayscale images which may lose contrasts, sharpness, shadow, and structure of the colour image for catching a standard of all images in order to be able to apply gamma correction process (Saravanan, 2011).The gamma correction is applied so as to improve the brightness and quality of the images (Cao, 2011).Median filter which is a non-linear filter used in image processing for impulse noise removal during morphological operations, image enhancement and other image processing operations is used to reduce or get rid of salt and pepper noises on the images (Jain, 2010).Applied pre-processing steps are shown in Figure 2.

Obtaining Borders Stage
The main concentration of this stage is to obtain coordinates of the borders of the images.The algorithm used in this stage is otsu thresholding method, region filling method, sobel edge detector algorithm, and then holding the coordinate information of the obtained borders.The basic idea of thresholding is to automatically select one or several optimal gray-level thresholds for separating objects of interest in an image from background based on their grey-level distribution.Thus, in order to obtain binary images, otsu thresholding method is applied (Zhu et al., 2009).Region filling method is used to get rid of black small areas and holes inside the retina.Therefore, region of interest is white and other regions are black.After that, sobel edge detector which is mainly applied to generate edge group scale space is used so as to obtain the border of the retina (Li, 2012).Finally, x and y coordinates of the borders are held in a variable to keep the information.The results are shown in the Figure 3.

Overlapping Stage
The aim of the stage is to combine with input image and the border which has been obtained at the last stage.By using the variable which has been defined to hold coordinates information, lines are drawn on the input images to specify the borders.As a result, ROI is obtained.Figure 4 shows the retinal ROI below.

RESULTS
This algorithm has been applied on images which have various shapes of retina.While some have expected circular shape of retina, some don't have complete retina shapes.Although images do not have a standard shape of retina, algorithm works very successfully for each image to find the retinal region of interest.
Retinal region of interest images are shown in Figure 5 below.

CONCLUSION
Eyes are significant sense organs for all people.If any lesions or diseases occur in the retina, they will directly influence the eyes.Unless early treatment is made, serious diseases in the eye may emerge.Moreover, it may result as blindness.In order to make early treatments in the retina, region of interest is found as a first step to look into retina in a detail manner.Thanks to the obtained ROI, lesions and diseases on the retina will be detected automatically.In this research, an algorithm has been proposed to obtain the retinal ROI successfully.Mainly, the algorithm consists of three stages such as preprocessing stage, obtaining border stage and overlapping stage.After smoothing the images, border of the retina has been tried to find.Finally, border found has been overlapped with input image to show the ROI on the original image.

Figure 2
Figure 2. a) The input image b) The grayscale image of input image c) The image after gamma correction process d) The image after median filter

Figure 3
Figure 3. a) The image after otsu thresholding b) The image after filling black regions c) The image after sobel edge detection process

Figure 5
Figure 5. a) A complete shape of retina b) Retina without top and bottom side c) Retina without top, bottom and left side d) A black and white retina