ROI DETECTION AND VESSEL SEGMENTATION IN RETINAL IMAGE

Diabetes disrupts work by affecting the structure of the eye and afterwards leads to loss of vision. Depending on the stage of disease that called diabetic retinopathy, there are sudden loss of vision and blurred vision problems. Automated detection of vessels in retinal images is a useful study to diagnose eye diseases, disease classification and other clinical trials. The shape and structure of the vessels give information about the severity of the disease and the stage of the disease. Automatic and fast detection of vessels allows for a quick diagnosis of the disease and the treatment process to start shortly. ROI detection and vessel extraction methods for retinal image are mentioned in this study. It is shown that the Frangi filter used in image processing can be successfully used in detection and extraction of vessels.


INTRODUCTION
Diabetes or diabetic retinopathy, also known as diabetic eye disease affects the structure of the eye, disrupting its functioning and causing visual impairment.Depending on the stage in this disease, there are sudden loss of vision and blurred vision problems.Diabetic retinopathy is more common in the elderly population, but it is one of the most important causes of visual impairment, which is also common among young people.Diabetic retinopathy may start with visual impairment and also progress with to blindness.Diabetic eye disease is the main cause of blindness and loss of vision in people of retirement age in developed countries (Dodson, 2007).Diabetes is considered as an epidemic with the patient population expected to rise to 380 million until 2025 and it is thought that approximately 4 million patients in the world, aged between 20 and 74, will lose their eyes of diabetic retinopathy (Tarr, 2013).
It is also important that the diagnosis of diabetic retinopathy is as quick and accurate as diagnosis of the disease.Automated detection of vessels in retinal images should be very useful to diagnosis of eye diseases for doctors' work, classification of diseases and in terms of other clinical trials (Tarr, 2013).The shape and structure of vessels give information about the severity of the disease well as the stage of the disease.Fast detection and extraction of retinal blood vessels allows the diagnosis of the disease to be established quickly and that the treatment process is started as soon as possible.Therefore, the detection vessels and analyzation structure of vessels in retinal images is of great importance to patient (Dodson, 2007).

ROI Detection
As a first step, the retina image is converted from RGB to grayscale then median filter is applied to grayscale image.After finding the gray level of image by using Otsu method the image converted to binary image according to Otsu method.Unnecessary fields in the image are cropped and detected Region Of Interest (ROI).

Preprocessing
After the detection of ROI in the retinal image the appropriate color space for vessel detection is determined.There is more contrast between vessels and the background of image in the green color space.The image is converted RGB to green channel (Gwetu, 2014).The open operator is applied on the image with small radius value.The open operator is applied because there are holes in the vessels in the image.It is aimed to eliminate these holes with opening operator.Then, Gauss Blur filter is applied on the image.With Gauss blur effect, it will be easier to separate and extract the vessels from the background of the image.Finally, a CLAHE (Contrast Limited Adaptive Histogram Equalization) operation is applied to the image (Chanwimaluang, 2003).

Applying Frangi Filter
Vessel enhancement filters are used for processes such as enhancement, more specifying and predicting the retinal vessels in the image.Frangi filter is used by using Hessian matrix kernel.Retinal vessels may have widely spaced radius.Frangi filter returns the scales at each pixel where the maximum response is obtained to detect the vessels in the image.The vessel diameter can also be estimated with the Frangi filter.Therefore, it has a common use to detect the vessels.In this study, it is used exclusively to detect vessels in retinal images.The feature vector generated by the Hessian matrix do not perform very well without distinguishing the edges of the objects or vessels in retinal image.So, if the vessels are not sufficiently separated from the background (not too much contrast ) or if the vessels don't have uniform border, the filter may not give good results.However, during the pre-processing step of the study, these deficiencies were corrected and the vessels were made evident.
The matrix containing the second-order partial derivative of any function f(x ,y, z, …) is called the Hessian matrix.The Hessian matrix is used to examine whether a function with more than one variable is minimum or maximum in given conditions.The Hessian matrix can be denoted by H(f), Hf or   for the function f (x, y, z, ...).The Hessian matrix for an f (x, y, z) function with x, y, z parameters is as follows; (1) The images used in the study are 2 dimensions.The structure of the Hessian matrix is briefly as follows; (3) The Hessian matrix is constructed by applying the derivation of the function.Create a kernel mathematical function using a single sigma value or multiple values (for example DGaussxx).The kernel matrix is applied to the input image as a filter.If the kernel is applied to input image, DGaussxx will take the place of Dxx in the Hessian matrix.In this way, Dxy, Dyy, Dyx values should be calculated.The resulting values can be adjusted arbitrarily according to the sigma value.The equation for the correction of Hessian matrix values is as follows; The  1 and  2 values are calculated by equating the determinate value of the matrix to zero.If the input image is 3 dimensions, the Hessian matrix will be 3x3, so the  3 value is additionally calculated.The  1 and  2 values obtained for the 2D image give information about the concavity in the region.This is mentioned above.The Frangi equation, which finds the optimum vessels structure in a two-dimensional input image, is as follows; and c are sensitivity parameters in equation-5.Appropriate values should be assigned to observe the results (Frangi, 1998).
The value   in equation ( 6) is calculated according to the above equation.
The value S in equation ( 7) is calculated according to the above equation (Carretero, 2013).

CONCLUSIONS
In this study, retinal main vessels and their branches (capillary vessels) were successfully detected.Unlike other studies, after applying the Frangi filter on the image, the errors that may occur in the vessels are also fixed afterwards.Thanks to this correction the vessels are clearly extracted.Also the retinal images are retrieved from the DRIVE database (DRIVE, 2007).This is the preliminary study of our next study in which the aim will be detecting vascular structures and exudate lesions accurately.Another problem is that, the branches of the vessels in the images may be too close or overlapped.Therefore, these vessels can mistakenly be perceived as a single vessel.The detection that these vessels are actually separate vessels will be one of the main goal of our future study.

Figure 4
Figure 4.a.Input image

Figure 5
Figure 5.a.Input image