Keypoint detectors and texture analysis based comprehensive comparison in different color spaces for automatic detection of the optic disc in retinal fundus images

Detection of the optic disc which has similar brightness with the hard and soft exudate lesions seen in the early stage of diabetic retinopathy is very difficult due to different light conditions and contrast values. Automatic detection of these lesions by expert systems in the medical field is very important. In this context, we propose a new approach based on the analysis of color spaces, keypoint detectors, and texture for retinal fundus images. If the keypoint information is contained within the actual optic disc region, this is an important consideration for the automated detection of the optic disc. This study can be divided into five sections, respectively, image preprocessing, image processing, keypoint detection, texture analysis, and performance evaluation. The analyses of patch images compatible with the keypoints obtained from the Red–Green–Blue (RGB) image and its color channels were carried out. The performance of the study was validated on the Digital Retinal Images for Vessel Extraction public dataset. According to the results, Local Binary Pattern texture analysis performed in region of interest around keypoints detected by different keypoint detectors presented good performance in RGB and green channel images. Optic disc detection is an important prerequisite for the diagnosis of retinal diseases. Accurate detection of the optic disc is very difficult because of eye diseases, light, and noise. Keypoints play an important role in order to detect optic disc in the retinal fundus image. Optic disc detection is an important prerequisite for the diagnosis of retinal diseases. Accurate detection of the optic disc is very difficult because of eye diseases, light, and noise. Keypoints play an important role in order to detect optic disc in the retinal fundus image.


Introduction
The optic disc (OD) is the main region in retinal images. The coordinates of this region are need detected in order to determine other retinal structures such as macula and blood vessels [1]. OD is similar to hard and soft exudates with respect to color and brightness features [2]. Therefore, the detection of this region in the retinal images with the anomaly is particularly difficult. OD is the exit point of all vessels that spread to the retinal fundus image and this region is different from other bright regions. The characteristics of an optic disc region are generally as follows [3]: (c) Brightness value usually higher than the rest of the retinal image (d) A region less than 1/7 of the entire retinal image Accurate detection of the OD is very difficult because of eye diseases, light, and noise [4]. Retinal structure deteriorations cause difficulty in the automatic detection of the optic disc. For example, it is seen that two retinal fundus images have different brightness values in Fig. 1. Therefore, the fail predictions or detections are inevitable.
Well-done segmentation of this region is a very important and necessary step in order to analyze and diagnose many eye-related diseases in computer-aided diagnosis systems [2,5]. The detection of glaucoma eye disease is related to tracing the changes in the optic cup. This region must be detected in the retinal image [6] due to it enables ophthalmologists to mitigate the effects of these diseases [7].
The motivation of this study is to propose a model that helps detect the optic disc region This paper presents new research for the detection of the optic disc in the retinal fundus image. With this aim, this study consists of the steps below performed on the Red-Green-Blue (RGB) image and its color spaces: (a) Pre-processing the retinal fundus image (b) Detecting keypoints (c) Comparing and evaluating the patch images by utilizing Local Binary Pattern (LBP).
It is noted that Akyol et al. [8] carried out the OD detection by using keypoint detection, texture analysis, and visual dictionary methods only on the RGB images in their study. The study of [8] promotes the use of keypoint for detecting of the optic disc. In light of the [8]'s study that encourages the use of the keypoint for better perception of the optic disc, a comprehensive comparison based on keypoint detection algorithms and texture analysis in different color spaces was carried out in the proposed study. In here, the Local Binary Pattern texture analyses of patch images compatible with the keypoints detected with Oriented FAST and rotated BRIEF (ORB) [9], Scale-Invariant Feature Transform (SIFT) [10], and Speeded up robust features (SURF) [11] keypoint detection algorithms on the RGB image and its color channels were carried out.
(a) Distinctly from the study of [8]; (b) In this study, wavelet denoising was applied in the image preprocessing process. (c) Experiments were carried out with different color spaces. (d) Experiments were conducted on the different keypoint detection algorithms. (e) While the Local Binary Pattern similarity score was used, and the most similar patch image was detected in this study, the Random Forest classifier was used in [8]'s study.
Hence, this study differs from the [8] within the frame of the workflow steps.
The rest of this paper is structured as follows: Sect. 2 presents the literature review. Section 3 describes the materials and methods. Sections 4 and 5 present the experiments and results, respectively. Section 7 discusses the proposed approach and other studies. Finally, a conclusion is drawn in Sect. 7.

Literature review
As can be seen in literature, there is a considerable number of studies for the detection of the OD region. Muhammed presented different optic disc localization algorithms based on the assumption of optic disc area which has rich information, so its entropy value is more significant in this area. The entropy of different patch images obtained by the sliding window technique was analyzed using recursive steps in their study [6]. Allam et al. focused on this subject with three categories: (a) using the size, color, and brightness characteristics (b) forecasting the convergence point of the vessels (c) template matching [7]. Lalonde detected OD by template matching based on pyramidal decomposition and Hausdorff in low-resolution fundus images [12]. Park et al. (2006) used simple image processing algorithms including threshold, detection of object roundness, and circle detection by Hough transformation in order to automatically detect outline the optic disc [13]. Mahfouz and Fahmy proposed a study on determining the OD region by using image features on the publicly available datasets such as STARE and DRIVE [14]. Zhu et al. automatically located the optic nerve head by using edge detection and circle detection. They utilized Sobel operators and Hough transform for edge detection and circle detection, respectively [15]. Whardana and Suciati [16] used the combination of two techniques which consist of morphological operators and k-means clustering. Abdullah et al. presented a study including morphological operations, circular Hough transform, and grow-cut algorithm. First, they focused on the optic disc region by applying morphological operators. Then, they calculated the optic disc center using the circular Hough transform approximately. Lastly, they used the grow-cut algorithm in order to precisely detect the optic disc boundary [17].
Hamednejad and Pourghassem applied the masking procedure on the image in order to determine candidate ROIs. Then, they used combinational filtering and converted the region of interest image to the L*a*b* color space. After that, they used density-based spatial clustering applications for OD segmentation and recognition [18]. Ichim and Popescu [19] extracted some features by utilizing adaptive local texture analysis and classified them. Roychowdhury et al. applied morphological operations on the green channel image in order to extract bright regions. After, they classified these regions as OD and non-OD using six region-based features and a Gaussian mixture classifier [20]. Park et al. (2017) presented an automated technique in order to detect optic disc region by utilizing a set of image and geometric processing techniques. Experiments in their study were performed on several public fundus images. Their proposed algorithm was successful on the fundus images of healthy patients [21]. Sharma et al. presented a study in order to detect the optic nerve head by using many image features. This study was evaluated on the six public datasets consisting of normal and diseased retinal images [22]. Sudhan et al. presented a study on the heuristic algorithm assisted multi-level thresholding and level set-based segmentation of OD on the RIM-ONE retinal image dataset [23]. Zahoor and Fraz localized OD fastly and accurately by using morphological operations and circular Hough transform. Also, they obtained OD boundary information using a novel polar transform-based adaptive thresholding [24]. In [25], the authors handled out this subject by three categories. a) shape and template matching b) using the active contours and different energies in the image c) extracting the features and using the machine and deep learning algorithms.

Material
The performance of the study was tested on the Digital Retinal Images for Vessel Extraction (DRIVE) public dataset. The dataset is set of 40 retinal fundus images with size of [565 × 584] pixels obtained from a diabetic retinopathy monitoring program [33].

Image processing
The work steps performed on each image for more successful detections are as follows: a. Wavelet denoising b. Image channels extraction (obtained Red, Green and Blue channels). c. Contrast-limited adaptive histogram equalization (CLAHE) [34] and Gamma correction [35] methods respectively to RGB image and its color channels. d. Applying keypoint detection algorithm on the result images obtained from previous step. e. Texture analyze based on local binary pattern computation.

Keypoint detection and texture analysis
Keypoints represent the significant points on the image. Keypoint detection algorithms detect the keypoints which represent the information for the patch images. With the think that keypoints may occur on the optic disc region, this study was performed. LBP texture analysis firstly introduced by Ojala et al. [36] was performed in this study. The performance of the study was validated on the DRIVE public dataset.

Evaluation
In this study, the Error Distance (ED) and the Jaccard Index (JI) metrics were used in order to compare the detected and the manually determined optic disc region. ED is the distance calculation between the predicted OD center and the OD ground-truth center. Euclid formula as given in Eq. 1 is used widely for this calculation.
where GT and P are the center coordinates of the actual optic disc region and predicted optic disc region, respectively. x and y represent the pixel coordinates. The JI metric named as similarity index is used for evaluating the performance of the proposed method. JI is a coefficient resulting in the ratio of similarity of two samples compared. A higher value of JI indicates that the estimated and real values look more alike to each other. When these two results are equal to each other, the JI value is 1, and when the two results haven't any common features, it is 0. In other words, the JI has a value between 0 and 1. The JI is given in Eq. 2. In this equation, A ∩ B indicates the region of intersection and A ∪ B indicates the region of union between two sets A and B [37]. Based on this equation, Pseudocode 1 was used in the experiments for the JI calculation.

Experiments
In this study, a comprehensive analysis of keypoint detectors and texture analysis on the retinal fundus image and its color channels for automated detection of the optic disc were carried out. As can be seen in Fig. 2, the proposed approach consists of image pre-processing, image processing, keypoint detection, texture analysis, and performance evaluation generally. These steps are explained in detail below.
To compare the detected and actual OD centers, first, the OD ground-truth center and the radius information in each retinal image were stored by the ophthalmologist Hasan Basri Çakmak with marking the circles manually using an application developed given in Fig. 3.
The processes involving all steps were given in Fig. 4, respectively.
(a) Image pre-processing techniques: a.1 Wavelet denoising was applied to all original images in order to remove the noise (Fig. 4a). Then, the red, green, and blue channels of all images were extracted by color space transformation and they were stored in the system (Fig. 4b). a.2 CLAHE method was applied to all images for improving the brightness and contrast (Fig. 4c). a.3 Gamma correction was implemented on all images obtained by the CLAHE method (Fig. 4d).
a.4 Otsu threshold algorithm was applied to all images obtained by Gamma correction for the binarization of the images. And so, the result images were obtained for performing keypoint detection.
(b) Detection of keypoints and analysis of candidate patch image: As seen in Fig. 4e and f, the SIFT, SURF, and ORB algorithms were applied to these result images; RGB image and its color channels. The region of interest (ROI) size around these keypoints was determined in accordance with its optic disc ground truth radius pixel value predefined by ophthalmologist considering the interface in Fig. 3 for each image. The answer to the question of "is the ROI patch image an optic disk region?" was queried for each ROI regarding keypoint by thorough LBP texture analysis.
As can be seen in Fig. 4g and h, the red circle shows the candidate OD region, and the blue circle shows the actual OD region. So, all patch images compatible with all keypoints were examined. Then the information of the region which has the best JI score and the least ED value was stored in the system in the dictionary structure.
With the result of comparing twenty optic disc and nonoptic disc patch images with equally in the system, optic disc labeling for the patch image was performed and the ED and JI measures were calculated. The best candidate optic disc region was tried to find by applying this process to all patch images compatible with keypoints. Pseudocode 2 and Pseudocode 3 present the processes essential for candidate optic disc detection and performance evaluation, respectively. The developed application first determines the candidate optical disc regions according to the LBP information and decides that one of them having the best JI similarity score and the smallest ED value is the optic disc.  terminates after all patch images were analyzed. Figure 5 demonstrates that some of the successful and unsuccessful OD detection results. Figure 5a demonstrates that the success achieved is very high. Figure 5b shows that a part of the optic disc detected. Figure 5c says that the optic disc detection isn't accurate because the ED between two centers measure is bigger than the radius value. Pseudocode 4 presents the calculation of the average success ratio of the proposed system. As seen here, one of the three values, Successful Detected, Failed Detected, Non-Detected, was assigned to any retinal image analyzed. The Successful Detected (positive) and Failed Detected (negative) were calculated using the ED and JI metrics. The number of ND is included for the calculation of the average success ratio for optic disc detection.

Fig. 5 Some optic disc detection results
One of the following three cases was assigned to each retinal image automatically in the proposed study.

(a) OD detected (b) OD detected partly (c) OD not detected
The OD position is accepted correctly detected if the estimated coordinates are inside the contour of the OD, i.e., within 60 pixels of its center, as manually identified for ground truth in [1,34]. In our study, differently from these studies in the literature, if the ED is equal to OD groundtruth radius or less than, the algorithm is considered successful for finding the optic disc. This process automatically algorithms, respectively on the RGB and green channel images. 47.5%, 37.5%, and 42.5% success ratios were achieved using the keypoints detected by ORB, SIFT, and SURF algorithms, respectively on the red channel images. 32.5%, 30.0%, and 30% success ratios were achieved using the keypoints detected by ORB, SIFT, and SURF algorithms, respectively on the blue channel images. According to the results, the proposed study was quite successful with the ORB, SIFT, and SURF keypoint detector algorithms on the RGB and green channel since 37 out of 40 optic disc regions detect successfully. So, we can say that noticeable results were obtained on the RGB and green channel. Figure 6 presents the sample results within the frame of three categories that are successful-detected, falsedetected and non-detected. In Fig. 6a, two sample images

Results
Experiments were carried out on the publicly available DRIVE retinal fundus image dataset, which is widely used by many researchers. The retinal images consist of a variety of complex backgrounds, some occlusion, and variations in lighting. If the ED value is lower than the radius value, the detection of the OD region is accepted as successful. Table 1 presents the experimental results. In this study, the effects of keypoint detection algorithms and color channels were evaluated. All image processing steps except the keypoint detection and color channel were the same for analysis of each retinal image. 92.5%, 92.5%, and 92.5% success ratios were achieved using the keypoints detected by ORB, SIFT, and SURF that were successfully detected in RGB and Green color spaces are given. In the two images in Fig. 6b, the optic disc region was detected incorrectly in the RGB and Green spaces as well as other color spaces. As can be seen in incorrectly detected images, it is thought that the distortions in the area of the optic disc caused this region to be detected incorrectly. Also, in these color spaces, no optic disc region was found in the image in Fig. 6c. The reason why the optic disc region cannot be detected in the image in Fig. 6c is thought to be due to the uncertainty of this region. Consequently, it can be concluded that image distortions and uncertainties make object detection difficult.

Discussion
For the sake of comparison, Table 2 summarizes the optic disc detection results achieved by our method and by other studies in the literature. As seen in this table, our proposed approach achieved an accuracy value of 92.5%   [6] Entropy and sliding window based techniques 95.0 Park et al. (2006) [9] Threshold, detection of object roundness and circle detection 90.25 Zhu et al. [11] Sobel operators and Hough transform 90 (distance < 40 pixels) 95 (distance < 60 pixels) Abdullah et al. [13] Circular Hough transform and grow-cut algorithm 78.60 Hamednejad and Pourghassem [14] DBSCAN clustering algorithm 78.18 Roychowdhury [16] Region-based features and supervised classification 99.10 Zahoor et al. [20] Polar on the publicly available DRIVE dataset and gave better performance than [9,13,14]. The studies of 9 and 13 are based on circle detection. The difference of our study from these studies is that it includes LBP texture analysis of a region around the identified keypoint. The study of 14 is a cluster-based study. But, the study of Convolution Neural Network [2], the study of entropy and sliding window techniques [6], the study of Sobel operators and Hough transform [11], the study of feature extraction and supervised classification [16] and the study of polar transform [20] presented slightly more successful than the texture analysis used in the proposed study. It can be stated that Convolution Neural Network, Entropy and sliding window, polar transform, and feature extraction and classification approaches are successful approaches to detect optic disc region. Although the performance of the proposed approach in this study is behind the studies of [2,6,11,16,20], the proposed study offers a high success ratio of 92.5% and is acceptable for optic disc detection.

Conclusion
OD detection is an important prerequisite for the diagnosis of retinal diseases, i.e. diabetic retinopathy. In other words, accurate detection of OD is crucial in terms of image analysis and computer-aided diagnosis. The detection of the optic disc in the diseased retina such as diabetic retinopathy is more difficult than a healthy retina. Because the regions in the retinal image are candidate for being exudate in computer vision and machine learning systems. Therefore, the detection of this region must be carried out.
The presented study introduced a texture analysis on the region of interest regarding detected keypoints on the different color spaces for detecting the best candidate optic disc region with validating performed using the ED and JI on the DRIVE dataset. The experiments show that (a) keypoint detection is successful because one or more of them is on the optic disc region, (b) evaluation process based on local binary pattern method is accepted. The results demonstrate that the proposed study is effective for the automatic detection of the optic disc. The best average success ratio with a value of 92.5% was obtained on the RGB and green channel. The limitation of this study is that the samples of patch images used in texture analysis are restricted. Providing domain adaptation by working with patch images from different sources for detecting the optic disc is among the goals. In addition, the performance of other keypoint algorithms on retinal images will be the subject of research. Another limitation of this study is that identifying the best candidate optic disc region for each key point requires repetitive execution of the same processes. It is a fact to be aware that if there are many key points, the time required to obtain the result will be increased.
In future work, by applying efficient image processing techniques and segmentation algorithms, the JI value will be tried to be maximized and ED will be tried to be minimized. Finally, the studies of logarithmic image processing with low complexity are widely used in the literature [38][39][40]. In this context, the experiments including logarithmic image processing approaches having low complexity for increasing OD segmentation accuracy are among the targeted studies. ers who published the DRIVE retinal image dataset. A special thank goes to ophthalmologist Hasan Basri Çakmak for his support and assistance in optic disc ground-truth bounding box coordinates in each retinal image.
Funding Authors declare that this study no funded.

Conflict of interest Authors declare no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.