# Retinal Vessel Segmentation Using Math-Inspired Metaheuristic Algorithms
## 2 Materials and Methods  
In retinal image segmentation, the images should first be enhanced in terms of their contrast by applying pre-processing operations. The most commonly used pre-processing operations in the relevant literature are band selection, bottom-hat transformation, and brightness correction. Retinal images consist of Red (R), Green (G), and Blue (B) layers, and the most effective layer (i.e., that which will provide the highest clustering performance) can be determined using band selection. After the most appropriate layer is determined, the contrast of the relevant layer is further increased via bottom-hat transformation and brightness correction pre-processing. The retinal images obtained as a result of these pre-processing operations, with higher contrast, are then subjected to clustering-based segmentation through the use of metaheuristic algorithms.  
Figures 1a and 1b shows healthy and diseased retinal images, respectively, taken from the Digital Retinal Images for Vessel Extraction (DRIVE) database [54]. Similarly, healthy and diseased retinal images taken from the Structured Analysis of the Retina (STARE) database [55] are shown in Figures 2a and 2b, respectively.  
Figure 1: Retinal images from the DRIVE database: (**a**) healthy retinal image; (**b**) diseased retinal image.  
Figure 2: Retinal images from the STARE database: (**a**) healthy retinal image; (**b**) diseased retinal image.  
The green layer of RGB retinal images is frequently able to produce better clustering performance due to its higher illuminance, contrast, and brightness levels. After applying band selection, the G layers of the DRIVE and STARE retinal images were obtained, as shown in Figures 3a and 3c and Figures 4a and 4c, respectively. Afterward, bottom-hat transformation and brightness correction were applied consecutively to increase the contrast of the retinal images. The enhanced retinal images are shown in Figure 3b,d for DRIVE images and in Figure 4b,d for STARE images.  
In this study, field of view (FOV) mask images were also used to analyze the performance of the algorithms in detail. The FOV mask images include only the vessel pixels; namely, all other pixels except the vessel pixels were removed from the image. For both the DRIVE and STARE databases, pixel-based comparisons were carried out between the segmented images and the relevant mask images to analyze the performance of the algorithms.  
Figure 4: _Cont._  
Figure 3: Enhanced retinal images from the DRIVE database: (**a,c**) are the G layers obtained as a result of band selection; (**b,d**) are the corresponding retinal images obtained as a result of the bottom-hat filtering and brightness correction.  
Math-inspired metaheuristic algorithms provide robust approaches for optimization problems, reflecting the effectiveness of basic mathematical laws. These algorithms especially stand out due to their lower computational costs and simple algorithmic structures. In this work, the most recent math-inspired metaheuristic algorithms in the literature were applied for retinal vessel segmentation, after which their performances were compared in detail. The math-inspired metaheuristic algorithms were improved using MATLAB R2019a software. Furthermore, the mathematical and statistical analyses were also carried out using the same software.