Multiscale Joint Optimization Strategy for Retinal Vascular Segmentation

The accurate segmentation of retinal vascular is of great significance for the diagnosis of diseases such as diabetes, hypertension, microaneurysms and arteriosclerosis. In order to segment more deep and small blood vessels and provide more information to doctors, a multi-scale joint optimization strategy for retinal vascular segmentation is presented in this paper. Firstly, the Multi-Scale Retinex (MSR) algorithm is used to improve the uneven illumination of fundus images. Then, the multi-scale Gaussian matched filtering method is used to enhance the contrast of the retinal images. Optimized by the Particle Swarm Optimization (PSO) algorithm, Otsu algorithm (OTSU) multi-threshold segmentation is utilized to segment the retinal image extracted by the multi-scale matched filtering method. Finally, the image is post-processed, including binarization, morphological operation and edge-contour removal. The test experiments are implemented on the DRIVE and STARE datasets to evaluate the effectiveness and practicability of the proposed method. Compared with other existing methods, it can be concluded that the proposed method can segment more small blood vessels while ensuring the integrity of vascular structure and has a higher performance. The proposed method has more obvious targets, a higher contrast, more plentiful detailed information, and local features. The qualitative and quantitative analysis results show that the presented method is superior to the other advanced methods.


Introduction
Retinal vascular image segmentation is an important topic in medical image research, which can effectively assist doctors in the clinical diagnosis and treatment of rapid cardiovascular diseases, diabetes and other diseases. In recent years, many scholars have studied retinal vascular image segmentation and achieved some results. However, due to the complexity of retinal images and the influence of noise and light factors in the image acquisition process, accurate retinal vascular image segmentation is still a challenging task [1][2][3]. Two-dimensional color fundus images and 3D Optical Coherence Tomography (OCT) images are the commonly used images for ophthalmic diseases. OCT technology can provide high-resolution retinal images. However, OCT is expensive, images are difficult to acquire, and images need to be registered for vessel segmentation. Color fundus copy is a non-invasive and painless image of the inner wall of the eye taken at different angles using a fundus camera. More importantly, it allows direct visualization of retinal vascular lesions and other lesions such as microaneurysms, hemorrhages, neovascularization, hard exudates, and absorbent cotton spots. Therefore, we choose color fundus images for retinal vessels segmentation studies [4][5][6].
At present, retinal vascular segmentation methods are mainly divided into supervised learning and unsupervised methods. Among the supervised segmentation methods, deep The flow chart of the algorithm for blood vessel segmentation in this paper is shown in Figure 1. As shown in Figure 1, a retinal segmentation method based on multi-scale joint optimization strategy is mainly divided into four stages: image pre-processing, vascular feature extraction, image multi-threshold segmentation, and image post-processing. Firstly, we use MSR to adjust the brightness of the image and reduce noise, and the green channel is extracted as the original image for subsequent processing. Secondly, the Multi-scale Gaussian matched filtering method is proposed to enhance the contrast of the images and extract the features of the blood. Then, PSO is used to optimize OTSU three thresholds for image segmentation. Finally, the binarized image is processed by breakpoints connection, denoising and edge contour removal. To illustrate the various steps of the algorithm in detail, Figure 2 shows the amplification images of all the output images in important steps. explained and the results of each step are shown. Section 3 shows the experimental results and analysis. Section 4 summarizes the paper.

Overview
The flow chart of the algorithm for blood vessel segmentation in this paper is shown in Figure 1. As shown in Figure 1, a retinal segmentation method based on multi-scale joint optimization strategy is mainly divided into four stages: image pre-processing, vascular feature extraction, image multi-threshold segmentation, and image post-processing. Firstly, we use MSR to adjust the brightness of the image and reduce noise, and the green channel is extracted as the original image for subsequent processing. Secondly, the Multiscale Gaussian matched filtering method is proposed to enhance the contrast of the images and extract the features of the blood. Then, PSO is used to optimize OTSU three thresholds for image segmentation. Finally, the binarized image is processed by breakpoints connection, denoising and edge contour removal. To illustrate the various steps of the algorithm in detail, Figure 2 shows the amplification images of all the output images in important steps.   Postprocessing  explained and the results of each step are shown. Section 3 shows the experimental results and analysis. Section 4 summarizes the paper.

Overview
The flow chart of the algorithm for blood vessel segmentation in this paper is shown in Figure 1. As shown in Figure 1, a retinal segmentation method based on multi-scale joint optimization strategy is mainly divided into four stages: image pre-processing, vascular feature extraction, image multi-threshold segmentation, and image post-processing. Firstly, we use MSR to adjust the brightness of the image and reduce noise, and the green channel is extracted as the original image for subsequent processing. Secondly, the Multiscale Gaussian matched filtering method is proposed to enhance the contrast of the images and extract the features of the blood. Then, PSO is used to optimize OTSU three thresholds for image segmentation. Finally, the binarized image is processed by breakpoints connection, denoising and edge contour removal. To illustrate the various steps of the algorithm in detail, Figure 2 shows the amplification images of all the output images in important steps.

MSR Algorithm
The basic idea of Retinex [24] is that the object color perceived by the human visual system is determined by the reflection properties of the object surface and which has a slight relationship with the incident light information. Assuming the original image is S (x, y), then, S(x, y) = i(x, y) * R(x, y) where i(x, y) represents the illumination image. R(x, y) represents the reflectivity image. When i is removed from S, the remaining R is an image that eliminates the impact of light, as human visual systems perceive.
As shown in Figure 1, the low contrast between the target blood vessels and the background is not beneficial for the later segmentation. Thus, we use the MSR algorithm to adjust the brightness and enhance the contrast of the retinal image. The MSR algorithm is proposed by Jobson D J et al. [25], and is defined as shown in Equation (2). F n is the nth Gaussian function. N is the number of scales (to ensure that the MSR al-gorithm has the advantages of both high and low scales, the value of N is generally selected as 3).
ω n is the weight of Gaussian convolution at the nth scale. The red-green-blue three-channel extraction experiment is carried out on the images processed by MSR, and it can be found that the contrast between the target and the background of the red channel is low and the noise of the blue channel is large. The green channel image has a balanced brightness, high contrast and uniform gray distribution. Therefore, the green channel image is selected for subsequent processing.

Vascular Feature Extraction
In this paper, we use Gaussian matching filter to extract the features of the retinal blood vessel. The Gaussian matching filter was first proposed by Chaudhuri et al. [12]. The Gaussian kernel function used in [12] was described as below.
K(x, y) = − exp(−x 2 /2σ 2 ), |y| < L/2 (3) where L is the length of the Gaussian kernel, which indicates the length of blood vessels that can be detected by the filter, we set L to 9, σ is the scale of Gaussian kernel, which represents the vascular cross-sectional extension area that can be detected by the filter. For the vessels at different orientations, the Gaussian kernel should be rotated accordingly. The Gaussian kernel rotates once every 15 degrees from 0 to 180 degrees (θ = 0, 15,..., 180.), and a total of 12 directions are constructed to retain the maximum filtering response of each pixel. The rotation matrix is given by Suppose p = [x, y] is a discrete point in the kernel function, θ i (0 ≤ θ i ≤ π) is the angle of the i th kernel function, then the coordinate value of p after rotation is p i = (u, v) = pr T i , then the i th template kernel function is where Z is the template field and the value range is: Z = {(u, v), |u| ≤ 3σ, |v| ≤ L/2 . When the vessel length is less than the filter length, the vessel segment is approximately regarded as a straight line. If the vessel width matches the scale of the Gaussian kernel, the output value of the filter is maximum. The filtered image is obtained by convolution of the input image with the twodimensional Gaussian kernel. The mathematical expressions are as follows: where G represents the filtered image and R represents the input image.

Multi-Scale Matching Filtering
Because the length, width, branch and angle of retinal blood vessels are different, it is difficult to accurately extract the vascular feature information in a single scale. Therefore, this paper selects a multi-scale matching filter to extract the characteristics of vascular images. When the macroscale image is selected for filtering, the coarsest blood vessel is mainly extracted. When the small scale is selected to filter the image, the smallest blood vessel is extracted. After many experiments, when σ 1 = 1.9, the main contour feature of the blood vessel can be effectively extracted. When σ 3 = 0.13, the details of the blood vessel can be effectively extracted. By adding an intermediate scale to filter the image, the following effects can be achieved: (1) denoising while enhancing the extraction of small vessels. (2) The width of smaller vessels will not be overestimated. (3) There is a reasonable filtering response to the blood vessels. When σ 2 = 0.5, images including main contour features and partial details can be obtained.
The effect of vascular information extraction at scales σ of 1.9, 0.5 and 0.13 is shown in Figure 3. As shown in Figure 3, the most features of the retinal blood vessels are extracted, which are beneficial for the subsequent image processing.
is a discrete point in the kernel function, (0 ≤ ≤ ) i angle of the i kernel function, then the coordinate value of after rotation is (u, v) = pr , then the i template kernel function is is the template field and the value range is: Z = {(u，v), |u| ≤ 3σ, |v| ≤ When the vessel length is less than the filter length, the vessel segment is approxim regarded as a straight line. If the vessel width matches the scale of the Gaussian ke the output value of the filter is maximum.
The filtered image is obtained by convolution of the input image with the tw mensional Gaussian kernel. The mathematical expressions are as follows: where G represents the filtered image and R represents the input image.

Multi-Scale Matching Filtering
Because the length, width, branch and angle of retinal blood vessels are differe is difficult to accurately extract the vascular feature information in a single scale. T fore, this paper selects a multi-scale matching filter to extract the characteristics of vas images. When the macroscale image is selected for filtering, the coarsest blood ves mainly extracted. When the small scale is selected to filter the image, the smallest b vessel is extracted. After many experiments, when = 1.9, the main contour featu the blood vessel can be effectively extracted. When = 0.13, the details of the blood sel can be effectively extracted. By adding an intermediate scale to filter the image following effects can be achieved: (1) denoising while enhancing the extraction of s vessels. (2) The width of smaller vessels will not be overestimated. (3) There is a reas ble filtering response to the blood vessels. When = 0.5, images including main con features and partial details can be obtained.
The effect of vascular information extraction at scales σ of 1.9, 0.5 and 0.13 is sh in Figure 3. As shown in Figure 3, the most features of the retinal blood vessels ar tracted, which are beneficial for the subsequent image processing.

Information Fusion of Vascular Characteristics
Multi-scale matched filtering can obtain most of retinal vascular information fea information at different scales. In order to effectively enhance the contrast between target blood vessel and the background and obtain better retinal vascular images, th sults of each scale matched filtering are fused. The fusion calculation is given as follo

Information Fusion of Vascular Characteristics
Multi-scale matched filtering can obtain most of retinal vascular information features information at different scales. In order to effectively enhance the contrast between the target blood vessel and the background and obtain better retinal vascular images, the results of each scale matched filtering are fused. The fusion calculation is given as follows: where G is the fused image. G 1 G 2 G 3 are the vascular feature image at σ 1 = 1.9 σ 2 = 0.5 and σ 3 = 0.13. ω is the weight of each scale superposition.
The fusion results are shown in Figure 4. Figure 4b shows the extraction result of the large scale at σ 1 = 1.9. Figure 4d displays the extraction result of the small scale σ 3 = 0.13. Figure 4f shows the three-scale extraction result. Meanwhile, in order to show fully the comparison effects of the single and three-scale extraction methods, we magnify the details of the red region respectively. It can be seen from Figure 4 that the extraction effect of the single scale is often not good. The fusion results are shown in Figure 4. Figure 4b shows the extraction result of the large scale at = 1.9. Figure 4d displays the extraction result of the small scale = 0.13. Figure 4f shows the three-scale extraction result. Meanwhile, in order to show fully the comparison effects of the single and three-scale extraction methods, we magnify the details of the red region respectively. It can be seen from Figure 4 that the extraction effect of the single scale is often not good. When we use the large scale of = 1.9 to process the image, a lot of small and some main vessels are lost. The vascular structure of the extraction image is incomplete. When we adopt the small scale of = 0.13 to process the image, the extraction result has vascular ruptures, poor vascular connectivity and strong noise. Compared with the singlescale filtering, the multi-scale matched filtering method can preserve vascular integrity, effectively extract more small vessels, and reduce the effects of noise.

OTSU Algorithm
The OTSU algorithm was first proposed in 1979 [26]; it selects the optimal threshold by maximizing the class variance of the segmented class. The pixels of a given image have L gray levels [1,2. . . L]. The number of pixels in level i is n , and the total number of pixels is N = n + n + ⋯ n .The probability of pixels with gray value i is denoted as p : The given image is divided into and regions by the threshold t. represents the pixel level [1, . . . , ], represents the pixel level [ + 1, . . . , ]. The probability and average gray value of the region are given by Equations (9) and (10) respectively, and the total mean level of the original image is given by Equation (11). When we use the large scale of σ 1 = 1.9 to process the image, a lot of small and some main vessels are lost. The vascular structure of the extraction image is incomplete. When we adopt the small scale of σ 3 = 0.13 to process the image, the extraction result has vascular ruptures, poor vascular connectivity and strong noise. Compared with the singlescale filtering, the multi-scale matched filtering method can preserve vascular integrity, effectively extract more small vessels, and reduce the effects of noise.

OTSU Algorithm
The OTSU algorithm was first proposed in 1979 [26]; it selects the optimal threshold by maximizing the class variance of the segmented class. The pixels of a given image have L gray levels [1, 2 . . . L]. The number of pixels in level i is n i , and the total number of pixels is N = n 1 + n 2 + . . . n L .The probability of pixels with gray value i is denoted as p i : The given image is divided into C 0 and C 1 regions by the threshold t. C 0 represents the pixel level [1, . . . , k], C 1 represents the pixel level [k + 1, . . . , L]. The probability and average gray value of the region are given by Equations (9) and (10) respectively, and the total mean level u T of the original image is given by Equation (11).
The following two relationships expressed by Equation (12) can be easily verified: The objective function of the OTSU method can be defined as When σ 2 B(t) = Argmaxσ 2 B , t obtains the optimal value. Extending the OTSU single threshold to multiple thresholds with interclass variances: we can obtain the best threshold combination (t 1 , t 2 , ... t m ) when the maximum is obtained. The specific calculation can be described as below:  [27] is a swarm intelligence algorithm proposed by simulating bird swarm foraging, which is used to find the solution that makes the objective function obtain maximum or minimum. In the PSO algorithm, the bird swarm is assumed to be a particle with no mass and volume in N-dimensional space, and each particle i is a candidate solution. Each particle passes through speed and position to find the best in the workspace. Each particle moves around by its own 'speed' in the search space, and the speed is the distance travelled by the particle from one position to the current position. Each particle is affected by its individual best realization position pbest and the group global best position gbest (solution of the problem). The initialization of PSO algorithm is a group of random particles, namely random solution. The speed and position of particle i in d-dimensional search space update according to Equations (15) and (16), the specific parameter settings are shown in Table 1.

Parameter Value PSO
Population size (N ) 40 Inertia weight (w ) 0.5 Learning constants c 1 = c 2 = 2 Max.Iteration (M ) 20 Initial Pulse rate (r 1 , r 2 ) X X: Not parameter value v K id is the d-dimensional component of the velocity of i particle in iteration k. x K id is the d-dimensional component of the position of i particle in iteration k. c 1 and c 2 are acceleration constants, which are used to adjust the learning step size. r 1 and r 2 are two random functions with the range of values [0, 1] to increase the search randomness.
ω is the inertia weight factor used to adjust the search range of solution space.

OTSU Image Segmentation Based on PSO (OTSU-PSO Algorithm)
The background, target and noise of the pre-processed image are at different gray levels. In order to obtain the best segmentation effects, we use multi-threshold to segment the image, and the image can be divided into multiple regions with a multi-gray level. However, it would take too much time to search an optimal threshold combination in the full gray range. To simplify the calculation and improve the operation speed, we used the PSO algorithm to search the optimal threshold combination. It was found experimentally that when the number of the segmentation threshold combination is 3, a better segmentation effects can be achieved. Since the expert segmentation results in the retinal image data set are all binary images, in order to ensure the accuracy of the evaluation index calculation, it is necessary to use the OTSU single threshold to transform the retinal vascular image obtained after the OTSU-PSO algorithm into a binary image, and then the final result can be obtained after image post-processing (see Section 2.5 for details of post-processing). The final segmentation results of OTSU-PSO algorithm are shown in Figure 5. The specific steps of OTSU-PSO algorithm are shown in Table 2.
tion effects can be achieved. Since the expert segmentation results in the retinal image data set are all binary images, in order to ensure the accuracy of the evaluation index calculation, it is necessary to use the OTSU single threshold to transform the retinal vascular image obtained after the OTSU-PSO algorithm into a binary image, and then the final result can be obtained after image post-processing (see Section 2.5 for details of post-processing). The final segmentation results of OTSU-PSO algorithm are shown in Figure 5. The specific steps of OTSU-PSO algorithm are shown in Table 2.  Input: number of iterations , population size , dimension . Output: the optimal threshold combination ( _ position (i), is the threshold number).
Step 1: Initialize the velocity and position of particles, individual extremum and global extremum .
Step 2: Equation (14) is used to calculate the fitness value of each particle to update the individual extremum and the global extremum .
Step 3: Update the particle velocity and position of the particle according to the Equations (15)- (16).
Step 4: Determine if the iteration stop condition is satisfied, then the algorithm ends. Otherwise turn to Step 2, continue to iterative cycle, and finally find the optimal solution.

Image Post-Processing
The image obtained by the OTSU-PSO algorithm is re-segmented to get the segmented retinal vascular image. The segmented retinal vascular image has the following problems: (1) Some blood vessels are broken; (2) The field edge of fundus camera with false segmentation exists; (3) Noise is also enhanced when detailed features are extracted. In order to solve the problems and compare with the expert segmentation results of retinal image dataset, we post-process the image. The specific operation steps are as follows: (1). the median filter is used to denoise the image and connect the broken blood vessels. (2). the morphological processing is used to connect domain area and remove the large noise. (3). the mask image is extracted from the source retinal image, and the difference image between the source retinal image and the mask image is obtained. (4). The difference image is binarized by the OTSU algorithm, and then the binary image is expanded by the morphological processing.  Input: number of iterations M, population size N, dimension D. Output: the optimal threshold combination (gbest _ position (i), i is the threshold number).
Step 1: Initialize the velocity and position of particles, individual extremum pbesti and global extremum gbest.
Step 2: Equation (14) is used to calculate the fitness value of each particle to update the individual extremum pbesti and the global extremum gbest.
Step 3: Update the particle velocity and position of the particle according to the Equations (15)- (16).
Step 4: Determine if the iteration stop condition is satisfied, then the algorithm ends. Otherwise turn to Step 2, continue to iterative cycle, and finally find the optimal solution.

Image Post-Processing
The image obtained by the OTSU-PSO algorithm is re-segmented to get the segmented retinal vascular image. The segmented retinal vascular image has the following problems: (1) Some blood vessels are broken; (2) The field edge of fundus camera with false segmentation exists; (3) Noise is also enhanced when detailed features are extracted. In order to solve the problems and compare with the expert segmentation results of retinal image dataset, we post-process the image. The specific operation steps are as follows: (1). the median filter is used to denoise the image and connect the broken blood vessels. (2). the morphological processing is used to connect domain area and remove the large noise. (3). the mask image is extracted from the source retinal image, and the difference image between the source retinal image and the mask image is obtained. (4). The difference image is binarized by the OTSU algorithm, and then the binary image is expanded by the morphological processing. (5). The segmented vascular image is subtracted from the expanded edge image to get the final output image.
Randomly selected images on the Drive dataset are used to test the PSO-based OTSU three-threshold segmentation results. The effects of the multi-threshold and singlethreshold segmentation methods are shown in Figure 5. As shown in Figure 5, there are more small blood vessels lost in the single-threshold segmentation image, and the main blood vessels have structural fracture. Compared with the single-threshold segmentation method, a three-threshold segmentation image has more small blood vessels and better connectivity.

Experimental Environment and Datasets
All the experiments are implemented in Matlab2016a (Mathworks, Natick, MA, USA) on 2.30 GHz processor with 3.8 GB RAM. We use two publicly available datasets, DRIVE dataset [2] and STARE dataset [28] to evaluate the performance of the proposed method. The DRIVE dataset contains a total of 40 color retinal images with a resolution of 565 × 585. It is divided into two sets: a testing set and a training set, and each set contains 20 images. The training set includes an artificial split set that is completed by one expert. The testing set includes two manual segmentation sets completed by two experts. The STARE dataset contains 20 color retinal images with the resolution of 700 × 605. The STARE dataset contains two sets of images manually segmented by two experts. There is no separate training and test set available for this dataset.

Segmentation Evaluation Index
In order to better judge the segmentation effect of the model, it is necessary to compare the segmentation results with the ground truths manually marked by experts. Three most common evaluation metrics, Accuracy (Acc), Sensitivity (Se) and Specificity (Sp) are used to evaluate the segmentation results. Acc represents the ratio of the number of correctly segmented pixels to the total pixels. Se represents the ratio of the number of correctly segmented vascular points to total pixels. Sp represents the ratio of the number of correctly segmented background points to the total pixels. The higher the value, the higher the success. The three-evaluation index can be described as where TP (true-positive) is the number of points correctly segmented into blood vessels. FP (false-positive) is the number of vascular points that are incorrectly segmented. TN (true-negative) is the number of points correctly segmented as background. FN (false-negative) represents the number of background points that are wrongly segmented.
The above three measures metrics are based on a subset of the following four basic quantities: TP,TN, FP and FN. The measure methods assume that the pixels are independent of each other. Hence, they may cause dependency flaw. Thus, we also adopt Structure Similarity Measure (SSIM) proposed by Wang [29] and Structural Measure(S-measure) proposed by Deng [30] to evaluate the segmentation results.

Experimental Results and Analysis
The segmentation comparison results on DRIVE and STARE datasets are shown in Figures 6 and 7 and Tables 3 and 4.
Structure Similarity Measure (SSIM) proposed by Wang [29] and Structural Mea measure) proposed by Deng [30] to evaluate the segmentation results.

Experimental Results and Analysis
The segmentation comparison results on DRIVE and STARE datasets are sh Figures 6 and 7 and Tables 3 and 4.  Figures 6c and 7c are the results made by the first expert, which are displa green. Figures 6d and 7d are the results made by the second expert, which are dis Structure Similarity Measure (SSIM) proposed by Wang [29] and Structural Mea measure) proposed by Deng [30] to evaluate the segmentation results.

Experimental Results and Analysis
The segmentation comparison results on DRIVE and STARE datasets are sh Figures 6 and 7 and Tables 3 and 4.     Figures 6 and 7, the yellow represents the vascular pixels that are correctly segmented. As demonstrated in Figures 6 and 7, the segmentation results on DRIVE and STARE datasets show that there are some red parts, indicating that the proposed method can segment more small blood vessels while ensuring the integrity of the main blood vessels.
In order to analyze the effectiveness of the method adopted in this paper, the quantitative results of this experiment on DRIVE dataset, STARE dataset are shown in Table 3. As shown in Table 3, we use the segmentation results of the first expert as the gold standard to calculate the evaluation index of DRIVE dataset, the average specificity, sensitivity and accuracy of the method are 0.9702, 0.7577 and 0.9514; we also use the segmentation results of the first expert as the gold standard to calculate the evaluation index of STARE dataset, the average specificity, sensitivity and accuracy of the method are 0.9699, 0.7763 and 0.9579.
In order to overcome the dependency flaw of the above three measure parameters, we also use the SSIM and S-measure to evaluate the effectiveness of the proposed method. The higher the values, the better performance. The performance of the proposed method on the two public datasets are listed in Table 4. We calculate the SSIM and S-measure between the segmentation results obtained by the proposed algorithm and the two ground-truth images from the two experts. In addition, for comparison, we compute the SSIM and S-measure between the two experts' segmentation results. It can be concluded that the proposed method can achieve higher values of SSIM and S-measure, and the segmentation results are better.

Comparison with Other Methods
In order to intuitively compare the segmentation performance of retinal vessels, the results of this experiment are compared with those of the three methods of the twodimensional matching filter (M1), the linear tracking morphological (M2) and cap transformation (M3), as shown in Figure 8. In Figure 8, the images in the first and second rows are randomly selected in the Drive test set, and the images in the third and fourth rows are randomly selected in the STARE dataset. The comparison results show that our method is superior to other three methods, which can segment more small vessels while maintaining structural integrity. The segmentation results are comparable to expert manual segmentation results, which is beneficial for the disease diagnosis.

Comparison with Other Methods
In order to intuitively compare the segmentation performance of retinal vessels, the results of this experiment are compared with those of the three methods of the two-dimensional matching filter (M1), the linear tracking morphological (M2) and cap transformation (M3), as shown in Figure 8. In Figure 8, the images in the first and second rows are randomly selected in the Drive test set, and the images in the third and fourth rows are randomly selected in the STARE dataset. The comparison results show that our method is superior to other three methods, which can segment more small vessels while maintaining structural integrity. The segmentation results are comparable to expert manual segmentation results, which is beneficial for the disease diagnosis.  Table 5 gives the comparison results of the proposed method with those of state-ofthe-art methods for the two datasets. The comparison methods include five supervised based methods and five unsupervised based algorithms. Moreover, the results of the ten methods are from their paper. The value in bold represents the performance of the proposed method.
Compared with the unsupervised based methods, for DRIVE dataset, the of the presented method is 0.0224 lower than maximum value, the of the presented method is 0.0031 lower than maximum value, but the presented method can obtain the highest ; for STARE dataset our method achieves the highest and , while the is 0.0116 lower than maximum value. Compared with the results of the supervised based methods, for the DRIVE dataset, the of the presented method is 0.0114 lower than the maximum  Table 5 gives the comparison results of the proposed method with those of state-of-theart methods for the two datasets. The comparison methods include five supervised based methods and five unsupervised based algorithms. Moreover, the results of the ten methods are from their paper. The value in bold represents the performance of the proposed method.
Compared with the unsupervised based methods, for DRIVE dataset, the Sp of the presented method is 0.0224 lower than maximum value, the Acc of the presented method is 0.0031 lower than maximum value, but the presented method can obtain the highest Se; for STARE dataset our method achieves the highest Se and Acc, while the Sp is 0.0116 lower than maximum value. Compared with the results of the supervised based methods, for the DRIVE dataset, the Sp of the presented method is 0.0114 lower than the maximum value, the Acc of the presented method is 0.0048 lower than maximum value, the Se of the presented method is 0.0076 lower than maximum value; for the STARE dataset, the Se is the maximum, while the Acc and Sp are 0.0049 and 0.0147 lower than the maximum, respectively. In general, when jointly regarding the performance measures of Se, Sp and Acc, our approach outperforms state-of-the-art methods on the DRIVE and STARE datasets. Our method has less calculation, higher accuracy and a certain robustness.

Conclusions
In this paper, we present a multiscale joint optimization strategy for retinal vascular segmentation. The use of the multi-scale matching filtering method can enhance the contrast between the target blood vessels and the background. The optimization strategy utilized PSO can get the optimal segmentation threshold combination. In order to evaluate the effectiveness and applicability of the proposed method, the experiments are implemented on the DRIVE and STARE datasets. The qualitive and quantitative analysis demonstrates that the proposed method outperforms other existed methods and has strong robustness. The segmented images of the presented method have more small blood vessels and better integrity of vascular structure, which is beneficial for the diagnosis of diseases. The main purpose of retinal vessel segmentation proposed in this paper is to assist doctors in the diagnosis of cardiovascular and cerebrovascular diseases. In the future, we plan to classify fundus related diseases based on the segmented retinal vessels, such as glaucoma, senile macular edema and so on. Limited by the currently available datasets, in the future, we will build a new dataset that contains retinal images from patients of diabetic retinopathy, glaucoma and other ophthalmic diseases, and the new dataset can be used to evaluate the capability of the algorithms in handling pathological images.
Author Contributions: Conceptualization, T.X. and X.X.; methodology, M.Y. and X.X.; software, M.Y. and J.Z.; validation and investigation, C.L.; writing-review and editing, M.Y., J.Z. and X.X.; supervision, T.X.; project administration, X.X. All authors have read and agreed to the published version of the manuscript.