A method for calculating tortuosity based on heuristic vessel segmentation

By employing heuristic vessel segmentation and constant curvature sign segments, the problems of main vessel breakage and curvature error in retinal vessel curvature calculation were solved, achieving efficient and accurate retinal vessel morphology quantification and supporting clinical diagnosis.

CN120526460BActive Publication Date: 2026-06-19NANKAI UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANKAI UNIV
Filing Date
2025-05-15
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as main vessel rupture and curvature calculation errors when calculating retinal vessel curvature, resulting in inaccurate assessment results. Furthermore, the manual annotation process is cumbersome and easily affected by subjective factors.

Method used

We employ a heuristic-based vascular segmentation technique, combining the AADG algorithm and the Zhang-Suen thinning algorithm for vascular segmentation and skeleton extraction. We design a curvature calculation method based on constant curvature sign segments to maintain the connectivity and integrity of blood vessels, and optimize the segmentation process through curvature fitting and hysteresis thresholding methods.

Benefits of technology

It achieves fully automated, accurate, and stable calculation of retinal vessel curvature, improves the connectivity and integrity of vessel segmentation, enhances the accuracy and consistency of curvature calculation, and supports the provision of quantitative data for clinical diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120526460B_ABST
    Figure CN120526460B_ABST
Patent Text Reader

Abstract

This invention provides a heuristic-based method for calculating retinal vessel tortuosity based on vascular segmentation, belonging to the field of medical image processing technology. It utilizes a deep learning model to extract a high-precision retinal vessel segmentation mask from a color fundus image. The Zhang-Suen algorithm is used to skeletonize the segmentation mask, generating a single-pixel-width vascular skeleton. Based on heuristic rules, the vascular skeleton is divided into independent vascular branches, overcoming the problems of main vessel fracture and branch adhesion, ensuring the consistency and accuracy of the segmentation results. Within the segmented vascular branches, tortuosity parameters of each branch are calculated by detecting segments with constant curvature signs, improving the accuracy of tortuosity calculation in digital scenarios. This invention integrates deep learning and morphological algorithms, solving the error accumulation problem in traditional methods, and realizing a fully automated process from raw color fundus images to quantified vascular morphology parameters, providing efficient and reliable technical support for clinical vascular lesion analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing technology, and specifically relates to a method for calculating the curvature of blood vessels based on heuristic segmentation. Background Technology

[0002] Torque is one of the earliest changes in vascular morphology, referring to the degree of tortuosity of blood vessels in space. Studies have shown that the tortuosity of retinal vessels is considered one of the earliest medical indicators of vascular diseases such as diabetic retinopathy, hypertensive retinopathy, and retinopathy of prematurity. However, clinical manual assessment methods have not reached a consensus on a universal definition of tortuosity, resulting in highly subjective assessment results and unreliable qualitative analysis. Therefore, there is an urgent need to develop an objective, accurate, and clinically significant tortuosity calculation method to quantitatively assess the degree of tortuosity of retinal vessels in order to evaluate how tortuosity changes over time.

[0003] Many methods for calculating tortuosity have been widely used, including those based on the ratio of chord length to arc length, methods based on curvature, and methods based on the angle of change in vessel direction. However, these methods all employ semi-automated processes and typically require manual vessel annotation beforehand. Manual annotation is both tedious and time-consuming, and the density and location of the annotations are easily affected by subjective factors, leading to inaccurate fitted vessel morphology and thus impacting the accuracy of the results.

[0004] Automated methods for calculating tortuosity face two main challenges. First, current vessel segmentation methods typically rely on morphological filtering to identify vessel intersections and disconnect all connected vessels at these intersections. However, main vessels often branch into multiple subordinate vessels that connect to the main vessel at intersections. Disconnecting all connections at intersections results in the main vessel being segmented into discontinuous segments. Since tortuosity calculations are usually performed within connected vessel segments, the breakage of the main vessel causes tortuosity to be calculated separately for each discontinuous segment, rather than across the entire vessel. Second, current tortuosity calculation methods are largely based on virtual continuous vessel models fitted from manually labeled vessel points. However, vessels in digital images are composed of discrete pixels, which differs significantly from continuous curve models. Particularly when using curvature-related methods, curvature calculations in continuous curve models are typically performed using the first and second derivatives at that point. In digital images, derivatives are calculated using the finite difference method, which introduces significant errors, affecting the curvature calculation results and leading to inaccuracies in tortuosity calculations.

[0005] Therefore, this invention develops a novel automated process for calculating retinal vessel tortuosity, capable of directly extracting quantification parameters from color fundus images, thus solving the challenges of main vessel rupture and curvature calculation in digital images. This method can more efficiently, accurately, and stably quantify the full-size retinal vessel morphological features in fundus images. Specifically, this invention proposes a heuristic-based segmentation method for preserving retinal vessel slope, significantly improving the connectivity and integrity of vessel segmentation. By maintaining the continuity of vessel slope, this method optimizes the segmentation process, resulting in more reasonable and coherent segmentation results. Furthermore, this invention proposes a digital image vessel tortuosity calculation method based on constant curvature segments, more accurately reflecting the true morphological characteristics of vessels. Summary of the Invention

[0006] To avoid missegmentation of the main blood vessel during vascular curvature calculation and to address the lack of suitable curvature calculation models in digital image scenarios, this invention proposes a heuristic-based vascular segmentation technique to maintain the connectivity of the main blood vessel. Simultaneously, a digital image vascular curvature calculation method based on segments with constant curvature signs is designed, which can more accurately reflect the vascular curvature in digital images.

[0007] To solve the above problems, the present invention adopts the following technical solution:

[0008] A method for calculating the tortuosity of blood vessels based on heuristic segmentation, the method comprising the following steps:

[0009] S1: Use the AADG algorithm to perform joint segmentation of blood vessels and optic disc in the color fundus image, remove the optic disc part, and use a deep learning model to extract a high-precision retinal blood vessel segmentation mask from the color fundus image to obtain the optic disc-free blood vessel segmentation mask.

[0010] S2: Use the Zhang-Suen thinning algorithm to extract the vascular skeleton structure from the segmentation mask obtained in step S1 to obtain a vascular skeleton map;

[0011] S3: Design a heuristic-based vascular segmentation method to segment the vascular skeleton diagram in S2, dividing the vascular skeleton into independent vascular branches. Specifically, this includes the following steps:

[0012] S301: Identify vascular intersections through morphological manipulation and detect intersections using specific structural elements;

[0013] S302: Select a starting point from the eight adjacent points of the intersection to determine the starting point of the independent branch;

[0014] S303: Starting from the starting point, search for blood vessel branches step by step until an intersection or the end of the blood vessel is encountered, and determine the end point of the branch;

[0015] S304: Calculate the slope of the branch based on the origin and end points of the vascular branch;

[0016] S305: Based on the slope of the branches, vessels with similar orientations are considered to be main vessels, maintaining the connectivity of the main vessels and disconnecting other branches;

[0017] S4: Design a curvature calculation method based on a constant curvature sign segment, and use the calculation method to calculate the curvature of each blood vessel branch after segmentation in S3.

[0018] Furthermore, in S302, the adjacent points of each intersection point can correspond to the starting point of an independent branch. However, the foreground points that are four adjacent to each other generally belong to the same independent branch. Generally, the non-four adjacent points of the intersection point are selected as the starting point of the independent branch.

[0019] Furthermore, in S3, the heuristic method refers to selecting the next path point based on the adjacency and traversal conditions of adjacent points. Generally, a point in an independent branch path has only two adjacent points, so only the untraversed point needs to be selected as the next path point. For a path point with three adjacent points, the next path point cannot be correctly selected by simply visiting the adjacent points. Therefore, the restriction of the adjacency relationship is introduced. If there is an intersection between the two untraversed adjacent points, the point is directly selected, thereby reducing redundant judgments and quickly finding the nearest intersection. If there is no intersection, the four adjacent points are selected as the next path point to maintain the integrity of the path.

[0020] Furthermore, in S4, the method for calculating curvature based on a constant curvature sign segment specifically includes the following steps:

[0021] S401: Select three points with a certain pixel spacing on the blood vessel branch, and use the curvature fitting method to calculate the curvature of each discrete point in the digital image;

[0022] S402: Divide vascular branches according to the constant curvature segment and use the hysteresis threshold method to avoid over-segmentation due to curvature approaching zero.

[0023] S403: Calculate the total curvature by combining the number of segments and the curvature of each segment.

[0024] Furthermore, in S401, the curve fitting method refers to selecting two points (x1, y1) and (x3, y3) at certain pixel intervals in both directions before and after the branch to calculate the curvature of a pixel (x2, y2) on the blood vessel branch. It is assumed that these three points can determine a quadratic curve with the following parametric equation:

[0025]

[0026] Where t is a parameter of the curve, representing a point (x, y) on the curve. i ,y i The distance between (x1, y2) and (x2, y2) is calculated using the following formula:

[0027]

[0028] Using the known positional information of three points (x1, y1), (x2, y2), and (x3, y3), we can solve for the unknown coefficients (a1, a2, a3, b1, b2, b3) in the parametric equation, thus obtaining the parametric equation of the curve. The first and second derivatives of the curve can be calculated using the following formula:

[0029]

[0030] Substituting the calculated derivatives (x′,x″,y′,y″) into the curvature formula, we obtain the curvature formula related to the parameter t:

[0031]

[0032] Substituting t=0 into the above formula, we can obtain the curvature of the curve at (x2,y2) and use this value as the curvature estimate for this discrete point.

[0033] Furthermore, in S402, a relatively small threshold is selected, and its positive and negative values ​​are used as the hysteresis thresholds for segmentation. When traversing along the direction of the vascular skeleton, when the curvature successively crosses two thresholds with different signs (i.e., one positive and one negative), the midpoint of the two intersection points is used as the segmentation point. If the curvature successively crosses two thresholds with the same sign, it means that the sign of the curvature has not changed, or it only fluctuates near zero. In this case, we do not perform segmentation, thus avoiding over-segmentation caused by curvature fluctuations near zero. The resulting segmentation is as follows:

[0034] B = {S1,S2,S3,…,S} n}

[0035] Where S i The segment representing a constant curvature is composed of several ordered pixels, which are arranged according to the direction of the branch:

[0036]

[0037] in This represents the pixels in the segment.

[0038] Furthermore, in S403, the formula for calculating the total curvature is:

[0039]

[0040] Where n is the number of segments, Lc B The total length of the blood vessel branches. Indicates segment S i arc length, Indicates segment S i The chord length is calculated using the following formula:

[0041]

[0042]

[0043]

[0044] Where d(·) represents the distance between the two points.

[0045] Furthermore, in S403, the curvature calculation of the total tortuosity is performed by calculating the ratio of the arc length to the chord length of each segment to assess its tortuosity, and the tortuosity of all segments is summed to comprehensively consider the contribution of each segment. Since the more segments there are, the greater the overall tortuosity, and in order to ensure that smooth semicircular or parabolic vascular branches (i.e., the case with only one segment) have zero tortuosity, constraint conditions are introduced. In order to ensure the comparability of vascular branches of different lengths during the calculation, the results are normalized by dividing by the length of the vascular branch. Through the above constraints, the formula comprehensively considers the number of segments with constant curvature signs, the degree of curvature of each segment, and the influence of branch length.

[0046] Furthermore, in S1, the AADG algorithm is a domain-generalized segmentation framework that uses domain-generalized automatic enhancement technology on the basis of the segmentation network, which can effectively adapt to different image data domains without relying on specific imaging conditions.

[0047] Furthermore, in S2, the Zhang-Suen thinning algorithm is mainly used to thin the object contours in the binary image into a skeleton with a single pixel width. By iteratively processing the image, the boundaries of the object are gradually thinned, and finally a vascular skeleton with a topological structure is obtained. The vascular skeleton is a simplified structure extracted from the vascular network through image processing technology. It is usually represented as the thinned vascular centerline. It compresses the complex vascular morphology into a line with a single pixel width, which can effectively preserve the topological structure, branching relationship and connectivity of the blood vessels, while removing the width information of the blood vessels.

[0048] Advantages of this invention:

[0049] 1. This invention achieves a fully automated process from raw color fundus images to vascular curvature parameters by integrating the domain generalization segmentation framework (AADG algorithm), morphological skeleton extraction, and heuristic segmentation technology, providing highly reliable quantitative data support for clinical diagnosis.

[0050] 2. This invention proposes a segmented method for maintaining the slope of retinal vessels based on a heuristic approach, which solves the problem of easy breakage of the main vessel during the traditional vessel segmentation process, improves the continuity and integrity of independent vessel branches, and effectively supports the accuracy of subsequent curvature calculation.

[0051] This invention proposes a method for calculating the curvature of blood vessels in digital images based on a constant curvature sign segment, which solves the problem of the lack of a curvature calculation model in digital image scenes and improves the accuracy of the curvature calculation results. Attached Figure Description

[0052] To more clearly illustrate the specific embodiments of the present invention, the accompanying drawings used in the description of the specific embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0053] Figure 1 This is an overall flowchart of the heuristic blood vessel segmentation-based tortuosity calculation method involved in the present invention;

[0054] Figure 2 The effect of quantifying blood vessel morphology parameters;

[0055] Figure 3 This is a schematic diagram of the morphological filtering structure elements used in this invention;

[0056] Figure 4 Example diagram of the selection of independent branch starting points in this invention;

[0057] Figure 5 This is an example diagram of the independent branch endpoint search process involved in the present invention;

[0058] Figure 6 This is a schematic diagram of the curvature fitting calculation involved in the present invention;

[0059] Figure 7 This is a schematic diagram of the segmentation using the hysteresis threshold method involved in the present invention;

[0060] Figure 8 This is an example diagram of the RET-TORT validation dataset involved in the present invention;

[0061] Figure 9 This is a comparison diagram of the effects of heuristic segmentation and traditional brute-force segmentation involved in this invention;

[0062] Figure 10 This is an example diagram illustrating interference with vascular microstructures as per the present invention;

[0063] Figure 11 This figure shows the implementation results of the heuristic blood vessel segmentation-based tortuosity calculation method involved in this invention. Detailed Implementation

[0064] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0065] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below. In order to enable those skilled in the art to better understand the technical solution of the invention, the invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0066] like Figure 1 , Figure 2 As shown, this invention discloses a method for calculating the tortuosity of blood vessels based on heuristic segmentation, the main steps of which are as follows:

[0067] S1: Use the AADG algorithm to perform joint segmentation of blood vessels and optic disc in the color fundus image, remove the optic disc part, and use a deep learning model to extract a high-precision retinal blood vessel segmentation mask from the color fundus image to obtain the optic disc-free blood vessel segmentation mask.

[0068] S2: Use the Zhang-Suen thinning algorithm to extract the vascular skeleton structure from the segmentation mask obtained in step S1 to obtain a vascular skeleton map;

[0069] S3: Design a heuristic-based vascular segmentation method to segment the vascular skeleton diagram in S2 and divide the vascular skeleton into independent vascular branches.

[0070] S4: Design a curvature calculation method based on a constant curvature sign segment, and use the calculation method to calculate the curvature of each blood vessel branch after segmentation in S3.

[0071] Example 1

[0072] As a preferred embodiment of the present invention, the calculation method specifically includes the following steps:

[0073] S1: The AADG algorithm is used to perform joint segmentation of blood vessels and optic disc in the color fundus image, the optic disc is removed, and a high-precision retinal blood vessel segmentation mask is extracted from the color fundus image using a deep learning model to obtain the optic disc-free blood vessel segmentation mask.

[0074] It should be noted that the AADG algorithm is a domain-generalized segmentation framework. It adopts domain-generalized automatic enhancement technology on the basis of the segmentation network, which can effectively adapt to different image data domains without relying on specific imaging conditions.

[0075] S2: Use the Zhang-Suen thinning algorithm to extract the vascular skeleton structure from the segmentation mask obtained in step S1 to obtain the vascular skeleton map.

[0076] The Zhang-Suen thinning algorithm is a skeleton extraction algorithm commonly used in image processing. It is mainly used to thin the outline of objects in binary images into skeletons with a width of one pixel. The algorithm iteratively processes the image, gradually thinning the boundaries of objects, and finally obtaining a skeleton with a topological structure.

[0077] like Figure 2 As shown, the vascular skeleton involved is a simplified structure extracted from the vascular network through image processing technology. It is usually represented as a thinned vascular centerline. It compresses the complex vascular morphology into a single pixel-width line, which can effectively preserve the topology, branching relationship and connectivity of the blood vessels, while removing the width information of the blood vessels. Compared with the vascular segmentation mask, the vascular skeleton can more clearly present the tortuosity of the blood vessels.

[0078] S3: Design a heuristic-based vascular segmentation method to segment the vascular skeleton diagram in S2, dividing the vascular skeleton into independent vascular branches. Specifically, this includes the following steps:

[0079] S301: Identify vascular intersections through morphological manipulation and detect intersections using specific structural elements.

[0080] like Figure 3 As shown, since intersections in digital images generally have morphological features that can divide the foreground points in their neighborhood into at least three independent branches, this embodiment designs a structural element to identify intersections.

[0081] S302: Select a starting point from the eight adjacent points of the intersection to determine the starting point of the independent branch.

[0082] Since the intersection point is the meeting point of independent branches, the foreground points adjacent to it can be used as the starting points of independent branches, but if... Figure 4As shown, foreground points that are four adjacent to each other generally belong to the same independent branch. We usually choose the non-four adjacent points of the intersection as the starting point of the independent branch.

[0083] S303: Starting from the starting point, search for vascular branches step by step until you encounter an intersection or the end of a vascular vessel, and determine the end point of the branch.

[0084] The heuristic method works as follows: starting from the starting point, search for unvisited foreground points within the 8-neighborhood of the current point as the next path point, until an intersection or the end of a blood vessel is found, thus completing the traversal of that independent branch. The last pixel of the path is the end point of that branch.

[0085] like Figure 5 As shown in the example, generally as Figure 5 As shown in (a), a point within an independent branch path has only two adjacent points, so we only need to select the untraversed point as the next path point; as Figure 5 As shown in (b), some path points may have three adjacent points, which is a normal phenomenon of image pixelation and does not conform to the characteristics of intersection points. For such points, it is impossible to correctly select the next path point by simply visiting them. Therefore, we introduce the constraint of adjacency relationship. If there is an intersection between two untraversed adjacent points, we directly select that point to reduce redundant judgments and quickly find the nearest intersection point. If there is no intersection point, we select the 4 adjacent points as the next path point to maintain the integrity of the path.

[0086] S304: Calculate the slope of the branch based on the origin and end points of the vascular branch.

[0087] S305: Based on the slope of the branches, vessels with similar orientations are considered to be main vessels. Maintain the connectivity of the main vessels and disconnect other branches.

[0088] In digital images, we use the slope of different independent branches to represent the direction of the branch. Similar slope values ​​and signs indicate similar directions. When segmenting blood vessels at the bifurcation point, we consider the two independent branches with the most similar slopes as the main blood vessel, and the other branches as the subordinate blood vessels branching off from the main blood vessel at the bifurcation point. Therefore, we choose to maintain the connectivity of the two independent branches belonging to the main blood vessel and disconnect the other branches to complete the blood vessel segmentation at the bifurcation point.

[0089] S4: Design a curvature calculation method based on a constant curvature sign segment, and use the calculation method to calculate the curvature of each blood vessel branch after segmentation in S3.

[0090] S401: Select three points with a certain pixel spacing on the blood vessel branch, and use the curvature fitting method to calculate the curvature of each discrete point in the digital image.

[0091] like Figure 6 As shown, this embodiment uses a curve fitting method to calculate the curvature of discrete points. To calculate the curvature of a pixel (denoted as (x2, y2)) on a blood vessel branch, we select two points (x1, y1) and (x3, y3) at certain pixel intervals in both directions before and after the branch. Assuming that these three points can determine a quadratic curve, its parametric equation can be expressed as:

[0092]

[0093] Where t is a parameter of the curve, representing a point (x, y) on the curve. i ,y i The distance between (x1, y2) and (x2, y2) is calculated using the following formula:

[0094]

[0095] Using the known positional information of three points (x1, y1), (x2, y2), and (x3, y3), we can solve for the unknown coefficients (a1, a2, a3, b1, b2, b3) in the parametric equation, thus obtaining the parametric equation of the curve. Then, we can calculate the first and second derivatives of the curve using the following formulas:

[0096]

[0097] Substituting the calculated derivatives (x′,x″,y′,y″) into the curvature formula, we obtain the curvature formula related to the parameter t:

[0098]

[0099] Substituting t=0 into the above formula, we can obtain the curvature of the curve at (x2,y2) and use this value as the curvature estimate for this discrete point.

[0100] S402: Divide vascular branches according to the constant curvature segment and use the hysteresis threshold method to avoid over-segmentation due to curvature approaching zero.

[0101] like Figure 7As shown, the hysteresis threshold method aims to avoid small segments with tortuosity approaching zero caused by directly using the intersection of the curvature curve and the zero value as segmentation points. These small segments lead to an underestimation of the final curvature calculation result. The method involves selecting a small threshold and using its positive and negative values ​​as the hysteresis threshold for segmentation. When traversing along the vascular skeleton, when the curvature successively crosses two thresholds with different signs (one positive and one negative), the midpoint of the two intersections is used as the segmentation point. If the curvature successively crosses two thresholds with the same sign, it indicates that the sign of the curvature has not changed, or it only fluctuates near zero. In this case, we do not segment, thus avoiding over-segmentation caused by curvature fluctuations near the zero value. The resulting segmentation result is as follows:

[0102] B = {S1,S2,S3,…,S} n}

[0103] Where S i The segment representing a constant curvature is composed of several ordered pixels, which are arranged according to the direction of the branch:

[0104]

[0105] in This represents the pixels in the segment.

[0106] S403: Calculate the total curvature by combining the number of segments and the curvature of each segment.

[0107] The curvature formula based on the constant curvature sign of the segment is:

[0108]

[0109] Where n is the number of segments, Lc B The total length of the blood vessel branches. Indicates segment S i arc length, Indicates segment S i The chord length is calculated using the following formula:

[0110]

[0111]

[0112]

[0113] Where d(·) represents the distance between the two points.

[0114] The degree of tortuosity is assessed by calculating the ratio of arc length to chord length for each segment, and the tortuosity of all segments is summed to comprehensively consider the contribution of each segment. Since the greater the number of segments, the greater the overall curvature, and to ensure that smooth semicircular or parabolic vascular branches (i.e., those with only one segment) have zero curvature, we introduce constraints. To ensure comparability of vascular branches of different lengths during calculation, we normalize the results by dividing them by the branch length. This constraint allows the formula to comprehensively consider the number of segments with constant curvature, the degree of curvature in each segment, and the influence of branch length.

[0115] Example 2

[0116] To validate the proposed vessel segmentation and curvature calculation methods, we used two retinal image datasets: DRIVE and RET-TORT.

[0117] The DRIVE dataset is widely used in the research and development of retinal vessel segmentation algorithms. It originated from the Dutch Diabetic Retinopathy Screening Project and contains 40 retinal images, divided into a training set and a test set of 20 images each. Each image is accompanied by a vessel segmentation mask manually annotated by experts. We extracted the vessel skeleton and segmented the segmentation masks of the 20 images in the test set, and evaluated the accuracy of the segmentation results manually.

[0118] The RET-TORT dataset, established by the University of Padua, contains retinal vessel images of 30 arteries and 30 veins, manually annotated single vessel coordinate sequences, and expert-ranked tortuosity based on these annotations. Fundus images in the dataset include... Figure 8 As shown, in addition to the single blood vessel used for sorting, other blood vessels are also included. If we directly segment these images and calculate the curvature based on this segmentation, the presence of other blood vessels will obviously interfere with the calculation results. Therefore, we adopt an alternative method to directly generate a digital skeleton image of a single blood vessel. Specifically, we interpolate the coordinates of the labeled blood vessels and take the integer coordinate position of the interpolation result to simulate the digitization process of the image. The skeleton image generated in this way can accurately reflect the morphology of a single blood vessel and has discretized features, similar to the skeleton extracted from fundus images through processes such as segmentation and thinning. Therefore, this method is more suitable for the application scenario of automated curvature calculation, and the evaluation of digital image curvature calculation based on this skeleton image is more convincing.

[0119] Figure 9This paper compares the overall effectiveness of vascular segmentation using the brute force segmentation method and the slope-preserving segmentation method. As shown in the figure, the brute force method breaks all branches at the intersection, causing the main vessel to break into many small branches. Our method effectively alleviates this problem by only breaking the shunt vessels at the intersection while maintaining the connectivity of the main vessel branches. This achieves more accurate and coherent vascular segmentation, demonstrating that the slope-preserving segmentation method has a significant advantage in maintaining the integrity of the vascular structure, thus providing a more reliable basis for subsequent vascular analysis and medical diagnosis.

[0120] like Figure 10 As shown in (a), the skeletonization algorithm is highly sensitive to minute structural changes, and may generate unnecessary protrusions during the blood vessel refinement process, such as... Figure 10 As shown in (b), these protrusions lead to a large number of redundant intersections. Since the independent branches corresponding to these redundant intersections are usually very short, consisting of only a few pixels, and in some cases, there may even be loops within the independent branches, these segmentation errors caused by the thinning process are irrelevant to our segmentation method. Considering that these redundant intersections do not represent the actual vascular structure, it is meaningless to evaluate these intersections when assessing the accuracy of the segmentation method.

[0121] Therefore, in the quantitative evaluation of the vascular segmentation method, we first identified invalid crossover points caused by protrusions, and then evaluated the segmentation accuracy at the valid crossover points. We statistically analyzed the effectiveness of the crossover points and the segmentation accuracy. In the segmentation validation process of 20 images in the DRIVE test set, a total of 3339 crossover points were identified. After excluding redundant crossover points caused by thinning, the effective crossover points accounted for 82.5%. Among these effective crossover points, the segmentation accuracy reached 83.9%. This result proves that our method can achieve good results in different vascular network structures and demonstrates the robustness of the method.

[0122] Since the labels in the RET-TORT dataset only provide a ranking of ophthalmologists' curvature without specific numerical values, we calculate the curvature of each image and rank the images according to the calculation results. Then, we validate the effectiveness of our method by evaluating the correlation between the calculated ranking and the labeled ranking. For this purpose, we use the Spearman coefficient for correlation analysis; the Spearman coefficient is a non-parametric statistical method used to measure the monotonic relationship between two rankings. The closer the coefficient is to 1, the closer the calculated ranking is to the true ranking, thus indicating that our method performs better.

[0123] Based on this, we also calculated p-values ​​to further verify the significance of the correlation. The p-value is used to measure whether the observed correlation may be due to random factors. If the p-value is less than the set significance level (usually 0.05), it indicates that the correlation between the calculated results and the label ranking is significant, supporting the effectiveness of our method in the ranking task. Conversely, a large p-value indicates that the correlation is not significant, and further analysis of the data or method is needed. The Spearman correlation coefficients and their corresponding p-values ​​for ranking the tortuosity of arteries and veins on skeleton images digitized from a single vessel coordinate sequence in the RET-TORT dataset using different methods are shown in the table below:

[0124]

[0125] In comparison, the tortuosity calculation method of this invention achieves a Spearman correlation coefficient of 0.73 in arteries, an improvement of approximately 10% compared to other methods. Our method also performs excellently in veins. These experimental results fully demonstrate the effectiveness of our proposed tortuosity calculation method in digital image scenarios.

[0126] To evaluate the effectiveness of our automated tortuosity measurement workflow, we sequentially performed image segmentation, skeleton extraction, vascular segmentation, and tortuosity calculation on color fundus images to obtain the final tortuosity numerical results. Figure 11 The study presents two fundus images with significantly different curvatures, along with their skeletal images and curvature values. Both the original image and the vascular skeleton clearly show that the curvature of the upper image is greater than that of the lower image. The curvature results are consistent with the image representation, indicating that the overall process is applicable to the measurement of the overall curvature of fundus images.

[0127] The present invention has been described in detail above through embodiments, but the content is only a preferred embodiment of the present invention and should not be considered as limiting the scope of the present invention. All equivalent changes and improvements made in accordance with the scope of the present invention should still fall within the patent coverage of the present invention.

Claims

1. A method for calculating the tortuosity of blood vessels based on heuristic segmentation, characterized in that: The method includes the following steps: S1: Use the AADG algorithm to perform joint segmentation of blood vessels and optic disc in the color fundus image, remove the optic disc part, and use a deep learning model to extract a high-precision retinal blood vessel segmentation mask from the color fundus image to obtain the optic disc-free blood vessel segmentation mask. S2: Use the Zhang-Suen thinning algorithm to extract the vascular skeleton structure from the segmentation mask obtained in step S1 to obtain a vascular skeleton map; S3: Design a heuristic-based vascular segmentation method to segment the vascular skeleton diagram in S2, dividing the vascular skeleton into independent vascular branches. The heuristic method refers to selecting the next path point based on the adjacency and traversal conditions of adjacent points. For points within an independent branch path with only two adjacent points, only the untraversed point needs to be selected as the next path point. For path points with three adjacent points, simply using visit judgment cannot correctly select the next path point; therefore, an adjacency constraint is introduced. If there is an intersection between two untraversed adjacent points, that point is directly selected, thereby reducing redundant judgments and quickly finding the nearest intersection. If there is no intersection, four adjacent points are selected as the next path point to maintain the integrity of the path. Specifically, the following steps are included: S301: Identify vascular intersections through morphological manipulation and detect intersections using specific structural elements; S302: Select a starting point from the eight adjacent points of the intersection to determine the starting point of the independent branch; S303: Starting from the starting point, search for blood vessel branches step by step until an intersection or the end of the blood vessel is encountered, and determine the end point of the branch; S304: Calculate the slope of the branch based on the origin and end points of the vascular branch; S305: Based on the slope of the branches, vessels with similar orientations are considered to be main vessels, maintaining the connectivity of the main vessels and disconnecting other branches; S4: Design a method for calculating the curvature of a segment with a constant curvature sign, and use the method to calculate the curvature of each blood vessel branch after segmentation in S3. Specifically, this includes the following steps: S401: Select three points with a certain pixel spacing on the blood vessel branch, and use the curvature fitting method to calculate the curvature of each discrete point in the digital image; S402: Divide vascular branches according to the constant curvature segment and use the hysteresis threshold method to avoid over-segmentation due to curvature approaching zero. S403: Calculate the total curvature by combining the number of segments and the curvature of each segment.

2. The method of claim 1, wherein: In S302, the adjacent points of each intersection point correspond to the starting point of an independent branch. The foreground points that are four adjacent to each other belong to the same independent branch. The non-four adjacent points of the intersection point are selected as the starting point of the independent branch.

3. The method for calculating the tortuosity of blood vessels based on heuristic segmentation according to claim 1, characterized in that: In S401, curve fitting refers to the method used to calculate the value of a pixel on a blood vessel branch. The curvature of the curve is such that two points are selected at a certain pixel interval in both directions before and after the branch. and Suppose these three points define a quadratic curve with the following parametric equation: ; in The parameters of the curve represent points on the curve. and The distance is calculated using the following formula: ; Using the three known points Location information, solving for unknown coefficients in parametric equations Thus, the parametric equation of the curve is obtained. The following formulas are used to calculate the first and second derivatives of the curve: ; The calculated derivative Substituting into the curvature formula, we obtain the parameters. Relevant curvature formulas: ; Will Substituting into the above formula, we can obtain the curve at... The curvature at that point is calculated, and this value is used as an estimate of the curvature at that discrete point.

4. The method of claim 1, wherein: In S402, a relatively small threshold is selected, and its positive and negative values ​​are used as the hysteresis thresholds for segmentation. When traversing along the direction of the vascular skeleton, when the curvature successively crosses two thresholds with different signs (one positive and one negative), the midpoint of the two intersections is used as the segmentation point. If the curvature successively crosses two thresholds with the same sign, it means that the sign of the curvature has not changed, or it only fluctuates near zero, and no segmentation is performed. This avoids over-segmentation caused by curvature fluctuations near zero. The resulting segmentation is as follows: ; in A segment representing a constant curvature is composed of several ordered pixels, which are arranged according to the direction of the branch: ; wherein represents a pixel point in a segment.

5. The method for calculating the tortuosity of blood vessels based on heuristic segmentation according to claim 1, characterized in that: In S403, the formula for calculating the total curvature is: ; in For the number of segments, The total length of the blood vessel branches. Indicates a section arc length, Indicates a section The chord length is calculated using the following formula: ; wherein represents the distance between two points.

6. The method of claim 5, wherein: In S403, the curvature calculation of the total tortuosity is performed by calculating the ratio of the arc length to the chord length of each segment to assess its tortuosity, and then summing the tortuosity of all segments to comprehensively consider the contribution of each segment. Since the more segments there are, the greater the overall tortuosity, and in order to ensure that smooth semi-circular or parabolic vascular branches have zero tortuosity, constraint conditions are introduced. In order to ensure the comparability of vascular branches of different lengths during the calculation, the results are normalized by dividing by the length of the vascular branch. Through the above constraints, the formula comprehensively considers the number of segments with constant curvature signs, the degree of curvature of each segment, and the influence of branch length.

7. The method of claim 1-5, wherein: In S1, the AADG algorithm is a domain-generalized segmentation framework that uses domain-generalized automatic enhancement technology on the basis of the segmentation network, which can effectively adapt to different image data domains without relying on specific imaging conditions.

8. The method of claim 1, wherein: In S2, the Zhang-Suen thinning algorithm is mainly used to thin the outline of objects in a binary image into a skeleton with a single pixel width. By iteratively processing the image, the boundaries of the objects are gradually thinned, and finally a vascular skeleton with a topological structure is obtained. The vascular skeleton is a simplified structure extracted from the vascular network through image processing technology. It is usually represented as the thinned vascular centerline, which compresses the complex vascular morphology into a line with a single pixel width. It can effectively preserve the topological structure, branching relationship and connectivity of the blood vessels, while removing the width information of the blood vessels.