Vessel centerline extraction method and device, electronic equipment and storage medium
By converting the vascular mask image to a grayscale image and constructing a velocity function image, calculating the minimum energy map, and performing segmented search and merging of the centerline, the problem of low accuracy and efficiency in vascular centerline extraction in existing technologies is solved, achieving high-precision and high-efficiency vascular centerline extraction.
Patent Information
- Application Number
- CN202111138373.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2041-09-27
AI Technical Summary
In existing technologies, methods for extracting the centerline of blood vessels suffer from poor accuracy and low efficiency, especially for curved blood vessels and are greatly affected by image quality, failing to meet the requirements for high accuracy and high efficiency.
The vascular mask image is converted into a grayscale image. The distance from the pixel to the background is calculated using the distance transformation method. A velocity function image is constructed. The minimum energy map is calculated by solving the equation of process function using inverse difference. The minimum path between the termination seed point and the starting seed point is searched piecewise. The segmented centerlines are merged to obtain the complete centerline.
It improves the accuracy and efficiency of vascular centerline extraction, avoids offset caused by vascular shape and image quality, and realizes an end-to-end UAV interactive extraction process.
Smart Images

Figure CN115861158B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of medical image processing, and in particular to a blood vessel centerline extraction method and device, electronic equipment and a storage medium. BACKGROUND
[0002] In the application research of medical images, the aorta image provides a very valuable reference for clinical medicine and research. Therefore, accurately obtaining, processing and analyzing such images have a profound significance for prolonging human life and improving human quality of life. Especially, obtaining blood vessel shape information and quantitative analysis parameters (such as blood vessel diameter, length, volume) from blood vessel related images has important significance for disease diagnosis, preoperative planning, intraoperative operation, postoperative effect monitoring, etc.
[0003] The extraction of blood vessel centerline is often one of the important steps in obtaining blood vessel shape and quantitative analysis. In the prior art, the blood vessel centerline extraction method mainly has the following several methods:
[0004] (1) The blood vessel centerline extraction method based on slice binaryzation processing can usually be used only for extracting straight barrel-shaped blood vessels, and the accuracy of the blood vessel centerline extraction method is poor for curved blood vessels.
[0005] (2) The method for extracting blood vessel centerline based on the shortest path, the centerline based on the shortest path is not accurately located at the center of the object, but tends to be close to the inner wall of the object, and the length of the centerline is affected by the image quality to some extent.
[0006] (3) The blood vessel centerline extraction method by skeleton extraction method needs an iterative calculation process, is time-consuming, and is easily affected by the image quality, and the overeffect at the bifurcation point is poor.
[0007] Therefore, in view of the above defects in the prior art, how to provide a blood vessel centerline extraction method to improve the extraction accuracy and efficiency of the blood vessel centerline is one of the technical problems to be solved by those skilled in the art.
[0008] It should be noted that the information disclosed in the background section of the present application is only intended to deepen the understanding of the general background of the present application, and should not be regarded as acknowledging or implying in any form that the information constitutes prior art known to those skilled in the art. SUMMARY
[0009] The purpose of the present application is to provide a blood vessel centerline extraction method, device, electronic equipment and storage medium to improve the extraction accuracy and efficiency of the blood vessel centerline in view of the above defects in the prior art.
[0010] To achieve the above objectives, the present invention provides the following technical solution: a method for extracting the centerline of a blood vessel, comprising:
[0011] Convert the acquired blood vessel mask image into a grayscale image;
[0012] The grayscale image is normalized to obtain a velocity function image;
[0013] Based on the velocity function graph and the obtained starting seed point, calculate the minimum energy map of the starting seed point;
[0014] Based on the minimum energy map of the starting seed point and several obtained termination seed points, the minimum path between the termination seed point and the starting seed point is searched segment by segment to extract several segment center lines.
[0015] By merging several of the segmented centerlines, a complete centerline of the blood vessel to be extracted is obtained.
[0016] Optionally, the blood vessel mask image is a binary mask image; in the binary mask image, the area where the blood vessel to be extracted is located is the foreground image, and the remaining areas are the background image;
[0017] The step of converting the acquired vascular mask image into a grayscale image includes:
[0018] The distance transform method is used to convert the acquired blood vessel mask image into a grayscale image.
[0019] Optionally, the step of converting the acquired vascular mask image into a grayscale image using a distance transform method includes:
[0020] For each pixel in the blood vessel mask image, calculate the nearest distance between the pixel and a pixel in the background image;
[0021] The distance is used as the pixel value of the pixel in the grayscale image to obtain the grayscale image.
[0022] Optionally, the distance calculation method used in the distance transformation method includes Euclidean distance, chessboard distance, or urban distance.
[0023] Optionally, the normalization process of the grayscale image to obtain the velocity function image includes:
[0024] The velocity function of the velocity function image is constructed in the following manner:
[0025]
[0026] In the formula, speed is the speed value of each pixel in the grayscale image, max_distance is the maximum value in the distance transformation result, and distance_transform_graph_array is an array of the same size as the number of pixels obtained after the distance transformation of the blood vessel mask image.
[0027] Optionally, calculating the minimum energy map of the starting seed point based on the velocity function image and the acquired starting seed point includes:
[0028] The velocity function image is used as the travel velocity of each pixel;
[0029] The minimum arrival time from the starting seed point to each pixel point is calculated by solving the equation of process function using inverse difference.
[0030] The set of minimum arrival times is taken as the minimum energy map.
[0031] Optionally, the step of using inverse difference to solve the equation to calculate the minimum arrival time from the starting seed point to each pixel includes:
[0032] Starting from the initial seed point, the pixel with the shortest arrival time is taken as the currently visited pixel;
[0033] Repeat the following steps until the minimum arrival time of each pixel is obtained:
[0034] Update the minimum arrival time of the neighboring points of the currently reached pixel based on the minimum arrival time of the currently reached pixel.
[0035] Optionally, the step of searching for the minimum path between the starting seed point and the starting seed point in segments based on the minimum energy map of the starting seed point and several obtained ending seed points, and extracting several segment center lines, includes:
[0036] Step A1: Randomly select one termination seed point from the plurality of termination seed points;
[0037] Step A2: Based on the minimum energy graph of the starting seed point, start from the selected ending seed point and search backwards to the starting seed point to obtain the minimum path between the starting seed point and the ending seed point;
[0038] Step A3: Use the minimum path as the segment center line of the blood vessel between the starting seed point and the ending seed point; and determine whether the ending seed point is the last ending seed point. If not, proceed to step A4; if yes, proceed to step A5.
[0039] Step A4: Take all the pixels on the center line of the segment as starting seed points, use the fast traversal algorithm to solve the equation function, and obtain the minimum energy map of each starting seed point on the center line of the segment; and select a termination seed point from the remaining termination seed points, and execute step A2.
[0040] Step A5: Extract several segment center lines.
[0041] Optionally, the step of searching backwards from the selected termination seed point to the starting seed point based on the minimum energy map of the starting seed point includes:
[0042] Starting from the selected termination seed point, search in reverse along the direction where the minimum arrival time value decreases and the gradient changes the fastest, and search back to the starting seed point.
[0043] Optionally, obtaining the minimum path between the starting seed point and the ending seed point includes:
[0044] Step B1: Set the termination seed point as the current search point and set the loop flag to true;
[0045] Step B2: Determine if the loop flag is true: if yes, proceed to step B3; if no, proceed to step B4.
[0046] Step B3: Determine whether the starting seed point is a neighboring point of the current search point. If so, set the loop flag to false.
[0047] Obtain the neighborhood point of the minimum energy of the current search point, add the neighborhood point to the set of pixels on the minimum path between the starting seed point and the ending point, and use the neighborhood point as the current search point, then execute step B2;
[0048] Step B4: The path formed by the set of pixels on the minimum path between the starting seed point and the ending seed point is taken as the minimum path between the starting seed point and the ending seed point.
[0049] Optionally, the vascular mask image includes a mask image of the aorta, and the vascular centerline includes the aorta centerline.
[0050] To achieve the second objective of this invention, this invention also provides a vascular centerline extraction device, comprising:
[0051] The distance transformation module is configured to convert the acquired blood vessel mask image into a grayscale image;
[0052] The velocity function construction module is configured to normalize the grayscale image to obtain a velocity function image;
[0053] The minimum energy map acquisition module is configured to calculate the minimum energy map of the starting seed point based on the velocity function image and the acquired starting seed point;
[0054] The segmented centerline acquisition module is configured to search for the minimum path between the termination seed point and the starting seed point in segments based on the minimum energy map of the starting seed point and several acquired termination seed points, and extract several segmented centerlines.
[0055] The vessel centerline merging module is configured to merge the segmented centerlines extracted above to obtain the complete centerline of the vessel to be extracted.
[0056] To achieve a third objective of the present invention, the present invention also provides an electronic device, including a processor and a storage device, wherein the processor is adapted to implement various instructions, and the storage device is adapted to store multiple instructions, the instructions being adapted to be loaded by the processor and executed by any of the above-described methods for extracting the vascular centerline.
[0057] To achieve the fourth objective of the present invention, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the vascular centerline extraction method described in any of the preceding claims.
[0058] Compared with the prior art, the method, apparatus, electronic device and storage medium for extracting the vascular centerline provided by the present invention have the following beneficial effects:
[0059] The method for extracting the centerline of a blood vessel provided by this invention involves converting an acquired blood vessel mask image into a grayscale image; normalizing the grayscale image to obtain a velocity function image; calculating the minimum energy map of the starting seed point based on the velocity function image and the acquired starting seed point located on the centerline of the blood vessel; then, based on the minimum energy map of the starting seed point and several acquired ending seed points located on the centerline of the blood vessel, segmentally searching for the minimum path between the ending seed point and the starting seed point to extract several segmented centerlines; finally, merging several segmented centerlines to obtain the complete centerline of the blood vessel to be extracted. Therefore, the vascular centerline extraction method provided by this invention improves the velocity function used in the curve evolution process, ensuring that the algorithm for extracting the centerline based on the minimum path does not deviate significantly from the true centerline, resulting in higher accuracy and independence from the shape of the blood vessels and image quality. Furthermore, the vascular centerline extraction method provided by this invention, through the acquisition of a starting seed point and several ending seed points, can fully utilize prior knowledge, enabling faster generation of the centerline in the vascular region between the starting and ending seed points. Even further, the vascular centerline extraction method provided by this invention, based on the acquired vascular mask image, the acquired starting seed point, and several acquired ending seed points, eliminates the need for human-computer interaction throughout the extraction process, achieving an end-to-end extraction workflow and improving extraction efficiency.
[0060] Since the vascular centerline extraction device, electronic device and storage medium provided by this invention belong to the same inventive concept as the vascular centerline extraction method provided by this invention, they have at least the same beneficial effects, and will not be described in detail here. Attached Figure Description
[0061] Figure 1 A schematic diagram of the overall process of a method for extracting the centerline of a blood vessel according to an embodiment of the present invention;
[0062] Figure 2 A schematic diagram illustrating the process of converting an acquired vascular mask image into a grayscale image, as provided in one embodiment of the present invention;
[0063] Figure 3 A schematic cross-sectional view of a vascular mask image before transformation of a three-dimensional aortic image and a grayscale image obtained after distance transformation using the vascular centerline extraction method provided by this invention.
[0064] Figure 4 for Figure 1 A detailed flowchart of one embodiment of step S300;
[0065] Figure 5 for Figure 4A detailed flowchart illustrating one embodiment of step S320;
[0066] Figure 6 for Figure 4 A schematic diagram of pixel state in one embodiment of step S320;
[0067] Figure 7 for Figure 1 A detailed flowchart illustrating one embodiment of step S400;
[0068] Figure 8 A schematic diagram of the centerlines of the aorta extracted from each branch of the aorta using one embodiment of the vascular centerline extraction method provided by the present invention.
[0069] Figure 9 for Figure 8 Schematic diagram of the results of extracting the centerline of the middle aorta;
[0070] Figure 10 This is a schematic diagram of the structure of a vascular centerline extraction device provided in one embodiment of the present invention;
[0071] The reference numerals in the attached figures are explained as follows:
[0072] 100 - Distance Transformation Module, 200 - Velocity Function Construction Module, 300 - Minimum Energy Map Acquisition Module
[0073] 400-Segmented centerline acquisition module, 500-Vascular centerline merging module. Detailed Implementation
[0074] To make the objectives, advantages, and features of the present invention clearer, the method, apparatus, electronic device, and storage medium for extracting the vascular centerline proposed by the present invention are further described in detail below with reference to the accompanying drawings. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, used only to facilitate and clearly illustrate the objectives of the embodiments of the present invention. It should be understood that the accompanying drawings do not necessarily show the specific structure of the present invention to scale, and the illustrative features used to illustrate certain principles of the present invention in the accompanying drawings are also drawn in a slightly simplified manner. Specific design features of the present invention disclosed herein, including, for example, specific dimensions, orientations, positions, and shapes, will be determined in part by the specific application and environment in which they are used. Furthermore, in the embodiments described below, the same reference numerals are sometimes used across different drawings to denote the same parts or parts having the same function, and their repeated descriptions are omitted. In this specification, similar reference numerals and letters are used to denote similar items; therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0075] Where appropriate, these terms may be replaced. Similarly, if the methods described herein comprise a series of steps, and the order of these steps presented herein is not necessarily the only possible order in which these steps can be performed, and some of the described steps may be omitted and / or some other steps not described herein may be added to the method.
[0076] Specifically, one embodiment of the present invention provides a method for extracting the centerline of a blood vessel, see [link to relevant documentation]. Figure 1 , Figure 1 This is a flowchart illustrating the overall process of the vascular centerline extraction method provided in this embodiment. From... Figure 1 As can be seen, the method for extracting the vascular centerline provided in this embodiment includes the following steps:
[0077] S100: Convert the acquired blood vessel mask image into a grayscale image;
[0078] S200: Normalize the grayscale image to obtain a velocity function image;
[0079] S300: Calculate the minimum energy map of the starting seed point based on the velocity function graph and the obtained starting seed point;
[0080] S400: Based on the minimum energy map of the starting seed point and several obtained termination seed points, perform a segmented search for the minimum path between the termination seed point and the starting seed point, and extract several segmented center lines.
[0081] S500: Merge several of the segmented centerlines to obtain the complete centerline of the blood vessel to be extracted.
[0082] Therefore, the method for extracting the centerline of a blood vessel provided by the present invention involves converting a pre-acquired blood vessel mask image into a grayscale image; normalizing the grayscale image to obtain a velocity function image; calculating the minimum energy map of the starting seed point based on the velocity function image and the pre-acquired starting seed point located on the centerline of the blood vessel; then, based on the minimum energy map of the starting seed point and several acquired termination seed points, segmentally searching for the minimum path between the termination seed point and the starting seed point to extract several segmented centerlines; finally, merging several segmented centerlines to obtain the complete centerline of the blood vessel to be extracted. Therefore, the vascular centerline extraction method provided by this invention improves the velocity function used in the curve evolution process, ensuring that the algorithm for extracting the centerline based on the minimum path does not deviate significantly from the true centerline, resulting in higher accuracy and independence from the shape of the blood vessels and image quality. Furthermore, the vascular centerline extraction method provided by this invention, by acquiring a starting seed point and several ending seed points, can fully utilize prior knowledge, enabling faster generation of the centerline in the vascular region between the starting and ending seed points. Even further, the vascular centerline extraction method provided by this invention, based on a pre-acquired vascular mask image, pre-acquired starting seed points, and several pre-acquired ending seed points, eliminates the need for human-computer interaction throughout the extraction process, achieving an end-to-end extraction workflow and improving extraction efficiency.
[0083] Generally, the vessel centerline can be considered as the "skeleton" of the vessel, that is, an approximation of the vessel near its actual central axis. Under the premise of satisfying topological invariance and geometric constraints, the vessel is peeled away layer by layer by a thinning algorithm, ultimately becoming a single-pixel thin line near the centerline, while visually retaining the original topological structure of the vessel tree. Accordingly, those skilled in the art should understand that the starting seed and the ending seed points should be located on the cross-section of the vessel lumen; this invention does not limit the starting seed and the ending seed points to necessarily being located on the vessel centerline. Obviously, it is a preferred embodiment that the starting seed point and the ending seed point are located on or near the centerline of the vessel to be extracted, so as to more quickly obtain the vessel centerline located between the cross-section where the starting seed point and the cross-section where the ending seed point are located. Furthermore, this invention does not limit the specific method of obtaining the starting seed point and the ending seed point; they can be obtained manually based on experience or automatically through an algorithm. These will not be elaborated further here.
[0084] It is particularly important to note that, for ease of understanding of the vascular centerline extraction method provided by this invention, the exemplary embodiments described herein primarily use aortic vascular images as examples. Specifically, the vascular mask image described in each embodiment is a mask image of the aorta, and the extracted vascular centerline is the aortic vascular centerline. More specifically, the vascular image from which the centerline is to be extracted is a computed tomography (CT) image of the aorta (three-dimensional data). Based on the disclosure of the following embodiments of this invention, those skilled in the art will readily understand that the vascular image from which the centerline is to be extracted can also be an MRI image or a medical image acquired by other imaging devices. Furthermore, the vascular image from which the centerline is to be extracted can also be acquired by other image acquisition devices or collected through other means (such as the internet), and can also be obtained by scanning with a scanning device. The size of the vascular image from which the centerline is to be extracted can be set according to specific circumstances, and this invention does not limit this. Furthermore, those skilled in the art will readily understand that although the various embodiments described herein use the aorta as an example, the method for extracting the centerline of blood vessels provided by this invention does not limit the specific morphology of the blood vessels, including but not limited to the aorta, the left and right common carotid arteries, the subclavian artery, the thoracic aorta, the abdominal aorta, the left and right common iliac arteries, and the renal artery.
[0085] Specifically, in one exemplary embodiment, the vascular mask image is a binary mask image; in the binary mask image, the region containing the vascular image to be extracted is the foreground image, and the remaining regions are the background image. Taking the extraction of the center line of an aortic vascular image as an example: in the binary mask image, the image region containing the aortic vascular image is used as the foreground image, and the remaining regions of the non-aortic vascular image are used as the background image. Assume the pixel value of the foreground image is 1, i.e., white; and the pixel value of the background image is 0, i.e., black. See also Figure 2 , Figure 2 This is a schematic cross-sectional view of a vascular mask image before transformation of a three-dimensional aortic image and a grayscale image obtained after distance transformation using the vascular centerline extraction method provided by this invention.
[0086] Accordingly, in step S100, the acquired vascular mask image is converted into a grayscale image, including: using a distance transform method to convert the acquired vascular mask image into a grayscale image.
[0087] Specifically, in one exemplary embodiment, please refer to Figure 3 , Figure 3 This is a schematic diagram illustrating the process of converting an acquired vascular mask image into a grayscale image, as provided in one embodiment of the present invention. From Figure 3 As can be seen, the method of converting the acquired blood vessel mask image into a grayscale image using the distance transform method includes:
[0088] S110: For each pixel in the blood vessel mask image, calculate the nearest distance between the pixel and the pixel in the background image;
[0089] S120: The distance is used as the pixel value of the pixel in the grayscale image to obtain the grayscale image.
[0090] Please continue reading Figure 2 , Figure 2 This is a cross-sectional schematic diagram of a vascular mask image before transformation of a three-dimensional aortic image and a grayscale image obtained after distance transformation using the vascular centerline extraction method provided by this invention. From Figure 2 It is evident that in the grayscale image after distance transformation, the pixel with the largest pixel value is located on the center line of the aorta. Furthermore, the distance calculation methods employed in the distance transformation method include, but are not limited to, Euclidean distance, chessboard distance, or urban distance. For details regarding Euclidean distance, chessboard distance, and urban distance, please refer to existing technologies; they will not be elaborated upon here.
[0091] Those skilled in the art will readily understand that the core idea of the distance transformation in the blood vessel centerline extraction method provided by this invention is to calculate the distance from each pixel in the corresponding binary mask image to the nearest background pixel by identifying the distance between spatial points (foreground and background points). For example, the distance from a background pixel to its nearest background pixel is itself, which is 0. The set of points with the maximum pixel value in the grayscale image is the skeleton of the foreground image, that is, the set of pixels in the center part of the foreground image. The blood vessel centerline extraction method provided by this invention uses distance transformation to solve for the centerline. Based on the fact that the centerline of an object should be the set of points with the maximum distance from the object's internal points to the object's boundary, this configuration ensures that the blood vessel centerline extraction method provided by this invention is not affected by the shape of the blood vessel or the image quality, and can avoid serious deviation from the true centerline, thereby improving the extraction accuracy.
[0092] Preferably, in one embodiment, step S200, the normalization processing of the grayscale image to obtain the velocity function image, includes:
[0093] The velocity function of the velocity function image is constructed in the following manner:
[0094]
[0095] In the formula, speed is the speed value of each pixel in the grayscale image, max_distance is the maximum value in the distance transformation result, and distance_transform_graph_array is an array of the same size as the number of pixels obtained after the distance transformation of the blood vessel mask image.
[0096] With this configuration, the vascular centerline extraction method provided by this invention normalizes the distance transformation result through a velocity function, resulting in a velocity function with a large velocity term at the feature to be extracted. Therefore, for the vascular structure of interest, if the starting and ending points on the centerline can be obtained in advance, the centerline extraction problem can be effectively constrained; that is, the centerline extraction problem between two points can be reasonably transformed into a shortest path problem.
[0097] Preferably, in one exemplary embodiment, see Figure 4 , Figure 4 for Figure 1 A detailed flowchart illustrating one embodiment of step S300. From Figure 4 As can be seen, in step S300, the step of solving the equation of motion using the fast traversal algorithm based on the velocity function image and the pre-acquired starting seed point, and calculating the minimum energy map of the starting seed point, includes:
[0098] S310: Use the velocity function image as the travel velocity of each pixel.
[0099] S320: Solve the equation of the process function using inverse difference to calculate the minimum arrival time from the starting seed point to each of the pixels.
[0100] Specifically, in one preferred embodiment, please refer to Figure 5 , Figure 5 for Figure 4 A schematic diagram illustrating the specific process of one embodiment of step S320. From Figure 5 It can be seen that the step of using inverse difference to solve the equation and calculate the minimum arrival time from the starting seed point to each pixel includes:
[0101] S321: Starting from the initial seed point, the pixel with the shortest arrival time is taken as the currently visited pixel;
[0102] S322: Repeat the following steps until the minimum arrival time of each pixel is obtained:
[0103] S323: Update the minimum arrival time of the neighboring points of the currently reached pixel based on the minimum arrival time of the currently reached pixel.
[0104] Based on the above description, those skilled in the art will readily understand that the minimum energy here is represented by the minimum arrival time of the evolution curve to each pixel on the image, and the travel speed of the evolution curve at each pixel is the velocity function constructed above.
[0105] To facilitate understanding, let's first briefly introduce the general meaning of minimum energy here: Suppose we have two points A and B. By constructing a potential graph P, we can calculate the energy function between the paths of points A and B as: E=∫P(path(A,B))ds, where s represents the length of the AB path. The energy calculated by the shortest path(A,B) is the minimum energy. Therefore, the minimum energy of each pixel in the image is equal to the energy function value corresponding to the shortest path between this pixel and the starting point of the path.
[0106] To find the shortest path between A and B, we first need to find the minimum energy graph u corresponding to the starting point A, which can be represented as follows:
[0107]
[0108] The minimum energy graph u satisfies the following functional equation:
[0109]
[0110] The fast-moving algorithm is a numerical solution method for functional equations. First, let's transform the functional equations above: For ease of representation, the equation is equivalent to: Where x represents any pixel in the image. Let T(x) represent the velocity function constructed in step S200, where T(x) represents the minimum energy, which is the time it takes for the evolution curve to reach each pixel on the image. From the equation, it can be seen that the time gradient of the evolution curve reaching a pixel on the image is inversely proportional to the velocity at that point, and the arrival time at the starting point of the path is 0. The fast traversal algorithm uses the inverse difference method to solve the equation, as shown below:
[0111]
[0112] In the formula, i, j, k are the three-dimensional coordinates of the pixels on the image.
[0113] Furthermore, for ease of understanding, the following will be combined with... Figure 6 The following explains how the fast travel algorithm (taking the acquisition of a two-dimensional image as an example) calculates the minimum arrival time for each pixel.
[0114] I. Meaning of relevant terms used in the fast travel algorithm
[0115] Alive point: A point that has been reached, where the minimum energy value u is known and will not change;
[0116] Active point: The point that is about to be reached, the u value is unknown;
[0117] Faraway point: A point far from the destination, with an unknown arrival time;
[0118] N non-alive (x): Non-reached four neighbor points of pixel x;
[0119] N alive (x): The four neighboring points that pixel x has reached;
[0120] Q is the set of active points.
[0121] II. Example of the Fast Travel Algorithm
[0122] (1) Initialization: For each pixel in the image (except for the starting point A), set the initial u = +∞ and u(A) = 0, and mark the starting point A as the active point and add it to Q;
[0123] (2) Loop:
[0124] If Q is not an empty set:
[0125] Find the Active point xmin with the smallest u value and mark it as the Alive point;
[0126] For any x n ∈N non-active (xmin):
[0127] If x n It's an active point, updating x. n The value of u;
[0128] If x n It is a Faraway point; change its label to an Active point.
[0129] otherwise:
[0130] End the loop
[0131] Among them, update x n The method for obtaining the u value is as follows:
[0132] u1=min{u i-1,j ,u i+1,j}
[0133] u2=min{u i,j-1 ,u i,j+1}
[0134] if
[0135]
[0136] otherwise:
[0137]
[0138] In the formula, i,j,k are x n The coordinates.
[0139] In other words, during the rapid movement, the pixel with the minimum arrival time is taken as the current point, and the minimum arrival time of its four neighboring pixels is updated according to the minimum arrival time of that pixel. This process is repeated until the minimum arrival time of each pixel on the two-dimensional image is obtained.
[0140] Those skilled in the art will understand that a 3D image can simply be described by replacing the aforementioned four-neighborhood with a six-neighborhood.
[0141] S330: The set of minimum arrival times is taken as the minimum energy map.
[0142] Preferably, in one exemplary embodiment, see Figure 7 , Figure 7 for Figure 1 A detailed flowchart illustrating one embodiment of step S400. From Figure 7 As can be seen, in step S400, the step of segmentally searching for the minimum path between the starting seed point and the starting seed point based on the minimum energy map of the starting seed point and several obtained ending seed points, and extracting several segment center lines, includes:
[0143] Step A1: Randomly select one termination seed point from the plurality of termination seed points.
[0144] Step A2: Based on the minimum energy map of the starting seed point, start from the selected ending seed point and search backwards to the starting seed point to obtain the minimum path between the starting seed point and the ending seed point. Specifically, in one embodiment, the backward search to the starting seed point includes: starting from the selected ending seed point, searching in reverse along the direction where the minimum arrival time value decreases and the gradient change is fastest, and searching backwards to the starting seed point.
[0145] Step A3: Use the minimum path as the segment center line of the blood vessel between the starting seed point and the ending seed point; and determine whether the ending seed point is the last ending seed point. If not, proceed to step A4; if yes, proceed to step A5.
[0146] Step A4: Take all the pixels on the center line of the segment as starting seed points, use the fast traversal algorithm to solve the equation function, and obtain the minimum energy map of each starting seed point on the center line of the segment; and select a termination seed point from the remaining termination seed points, and execute step A2.
[0147] Step A5: Extract several segment center lines.
[0148] Specifically, please see Figure 8 , Figure 8 This is a schematic diagram showing the centerlines extracted from various branches of the aorta using one embodiment of the vascular centerline extraction method provided by the present invention. Figure 8 As can be seen from the example, in this embodiment, one starting seed point and five ending seed points were selected, resulting in a total of eight segmented center lines.
[0149] See Figure 9 , Figure 9 for Figure 8 Schematic diagram of the extraction results of the centerline of the middle aorta. From... Figure 9 It can be seen that the method for extracting the vascular centerline provided by the present invention is not affected by the shape of the blood vessel and the image quality, and the extracted aortic vascular centerline has high accuracy.
[0150] Those skilled in the art will understand that the above description is merely exemplary, and the present invention does not limit the method of obtaining the starting seed point and the ending seed point. They can be set manually or selected by machine. Alternatively, they can be selected from the set of pixels with the largest pixel value in the grayscale image obtained in step S100 of the vascular centerline extraction method provided by the present invention, or from the set of pixels with the largest pixel value in the velocity function image obtained in step S200. The present invention does not limit the specific selection location of the starting seed point and the ending seed point. However, it is understood that since the final vascular centerline is formed by combining multiple segmented centerlines, and each segmented centerline is located between the starting seed point and the ending seed point, the starting seed point and the ending seed point should be selected at the end of the vascular centerline of interest: for example, to obtain the complete centerline of the aorta, such as... Figure 8 As shown, the termination seed point should be selected at each end of the aorta; if only the centerline of the main aortic trunk is desired, the starting and termination seed points are preferably at the ends of the main aortic trunk. This principle applies further and will not be elaborated upon further.
[0151] Preferably, in one embodiment, obtaining the minimum path between the starting seed point and the ending seed point includes:
[0152] Step B1: Set the termination seed point as the current search point and set the loop flag to true;
[0153] Step B2: Determine if the loop flag is true: if yes, proceed to step B3; if no, proceed to step B4.
[0154] Step B3: Determine whether the starting seed point is a neighboring point of the current search point. If so, set the loop flag to false.
[0155] Obtain the neighborhood point of the minimum energy of the current search point, add the neighborhood point to the set of pixels on the minimum path between the starting seed point and the ending point, and use the neighborhood point as the current search point, then execute step B2;
[0156] Step B4: The path formed by the set of pixels on the minimum path between the starting seed point and the ending seed point is taken as the minimum path between the starting seed point and the ending seed point.
[0157] In other words, steps B1 to B4 above are: starting from the given endpoint, search along the direction where the minimum arrival time decreases and the gradient changes fastest, until the search returns to the starting point. Simultaneously, mark the image pixels located on the shortest path. This yields the shortest path between the starting and endpoint points, which is the centerline path. The formalized expression for finding the shortest path between two points through reverse search is as follows:
[0158] I. Explanation of Relevant Variables
[0159] Define A as the starting point on a given center line, and u as the minimum energy graph of A;
[0160] Define B as the given termination point and C as the current search point;
[0161] Define sign as a loop flag, N alive (x) represents the four neighboring points that pixel x has reached;
[0162] Define Path(A,B) as the set of unit points located on the shortest path between A and B.
[0163] II. A formulaic representation of finding the shortest path:
[0164] (1) Initialization:
[0165] C = B, sign is true;
[0166] (2) Loop:
[0167] When sign is true:
[0168] If A∈N alive (C), sign is false;
[0169] For x n ∈N alive (C), find u(x) n Find the minimum point xmin, set C = xmin, and add xmin to path(A, B).
[0170] The method for extracting the centerline of a blood vessel provided by this invention involves converting the acquired blood vessel mask image into a grayscale image using a distance transform method; normalizing the grayscale image to obtain a velocity function image; calculating the minimum energy map of the starting seed point based on the velocity function image and the acquired starting seed point located on the centerline of the blood vessel; then, based on the minimum energy map of the starting seed point and several acquired ending seed points located on the centerline of the blood vessel, segmentally searching for the minimum path between the ending seed point and the starting seed point to extract several segmented centerlines; finally, merging several segmented centerlines to obtain the complete centerline of the blood vessel to be extracted. Therefore, the vascular centerline extraction method provided by this invention improves the velocity function used in the curve evolution process, ensuring that the algorithm for extracting the centerline based on the minimum path does not deviate significantly from the true centerline, resulting in higher accuracy and independence from the shape of the blood vessels and image quality. Furthermore, the vascular centerline extraction method provided by this invention, by using pre-acquired starting seed points and several ending seed points located on the centerline, can fully utilize prior knowledge, enabling faster generation of the centerline in the vascular region between the starting and ending seed points. Even further, the vascular centerline extraction method provided by this invention, based on pre-acquired vascular mask images, pre-acquired starting seed points, and several pre-acquired ending seed points, eliminates the need for human-computer interaction throughout the extraction process, achieving an end-to-end extraction workflow and improving extraction efficiency.
[0171] Based on the same inventive concept, another embodiment of the present invention provides a vascular centerline extraction device. Please refer to [link to details]. Figure 10 , Figure 10 A schematic diagram of the vascular centerline extraction device provided for this embodiment. (From...) Figure 10 As can be seen, the vascular centerline extraction device provided in this embodiment includes: a distance transformation module 100, a velocity function construction module 200, a minimum energy map acquisition module 300, a segmented centerline acquisition module 400, and a vascular centerline merging module 500.
[0172] Specifically, the distance transformation module 100 is configured to convert the acquired vascular mask image into a grayscale image. The velocity function construction module 200 is configured to normalize the grayscale image to obtain a velocity function image. The minimum energy map acquisition module 300 is configured to calculate the minimum energy map of the starting seed point based on the velocity function image and the acquired starting seed point. The segmented centerline acquisition module 400 is configured to search for the minimum path between the ending seed point and the starting seed point segment by segment based on the minimum energy map of the starting seed point and several acquired ending seed points, and extract several segmented centerlines. The vascular centerline merging module 500 is configured to merge the segmented centerlines extracted above to obtain the complete centerline of the vascular vessel to be extracted. The starting seed point and the ending seed point are located on the vascular centerline.
[0173] As for the embodiment of the vascular centerline extraction device, since its basic principle is similar to the various implementations of the vascular centerline extraction method described above, the description is relatively simple. For relevant details, please refer to the description of the method embodiment. Furthermore, the vascular centerline extraction device should also have at least the same beneficial effects as the vascular centerline extraction method, which will not be elaborated here.
[0174] It should be noted that the systems and methods disclosed in the embodiments herein can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments herein. In this regard, each block in a flowchart or block diagram may represent a module, program, or part of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system to perform the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0175] In addition, the functional modules in the various embodiments of this article can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0176] Another embodiment of the present invention provides an electronic device including a processor and a storage device. The processor is adapted to implement various instructions, and the storage device is adapted to store multiple instructions, which are adapted to be loaded and executed by the processor to implement the vascular centerline extraction method described in any of the above embodiments.
[0177] It should be noted that the electronic devices provided in the embodiments of the present invention include, but are not limited to, personal computers, mobile terminals, etc., and the mobile terminal can be a hardware device with various operating systems, such as a mobile phone or a tablet computer.
[0178] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the blood vessel centerline extraction method described above.
[0179] The readable storage medium of embodiments of the present invention can be any combination of one or more computer-readable media. The readable medium can be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable computer hard disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device.
[0180] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0181] It should be noted that computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0182] The method for extracting the centerline of a blood vessel provided by this invention involves converting an acquired blood vessel mask image into a grayscale image; normalizing the grayscale image to obtain a velocity function image; calculating the minimum energy map of the starting seed point based on the velocity function image and the acquired starting seed point located on the centerline of the blood vessel; then, based on the minimum energy map of the starting seed point and several acquired ending seed points located on the centerline of the blood vessel, segmentally searching for the minimum path between the ending seed point and the starting seed point to extract several segmented centerlines; finally, merging several segmented centerlines to obtain the complete centerline of the blood vessel to be extracted. Therefore, the blood vessel centerline extraction method provided by this invention, based on the minimum path extraction algorithm, avoids severe deviation from the true centerline, achieving higher accuracy and being unaffected by blood vessel shape and image quality. Furthermore, by acquiring the starting seed point and several ending seed points located on the centerline, this method fully utilizes prior knowledge, enabling faster generation of the centerline from the blood vessel region between the starting and ending seed points. Even further, based on the acquired blood vessel mask image, the acquired starting seed point, and several acquired ending seed points, the entire extraction process requires no human-computer interaction, achieving an end-to-end extraction workflow and improving extraction efficiency.
[0183] Since the vascular centerline extraction device, electronic device and storage medium provided by this invention belong to the same inventive concept as the vascular centerline extraction method provided by this invention, they have at least the same beneficial effects, and will not be described in detail here.
[0184] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0185] In summary, the above embodiments have provided detailed descriptions of different configurations of the vascular centerline extraction method, apparatus, electronic device, and storage medium proposed in this invention. Of course, the above descriptions are only descriptions of preferred embodiments of this invention and are not intended to limit the scope of this invention in any way. This invention includes, but is not limited to, the configurations listed in the above embodiments. Those skilled in the art can draw inferences from the above embodiments. Any changes or modifications made by those skilled in the art based on the above disclosure are within the protection scope of the claims.
Claims
1. A method for extracting the centerline of a blood vessel, characterized in that, include: Convert the acquired blood vessel mask image into a grayscale image; The grayscale image is normalized to obtain a velocity function image; Based on the velocity function graph and the obtained starting seed point, calculate the minimum energy map of the starting seed point; Based on the minimum energy map of the starting seed point and several obtained termination seed points, the minimum path between the termination seed point and the starting seed point is searched segment by segment to extract several segment center lines. By merging several of the segmented centerlines, a complete centerline of the blood vessel to be extracted is obtained; The velocity function of the velocity function image is constructed in the following manner: In the formula, The velocity value of each pixel in the grayscale image. The maximum value in the distance transformation result. This is an array of the same size as the number of pixels obtained after distance transformation of the blood vessel mask image; Several methods for extracting the segment centerline include: Step A1: Randomly select one termination seed point from the plurality of termination seed points; Step A2: Based on the minimum energy graph of the starting seed point, start from the selected ending seed point and search backwards to the starting seed point to obtain the minimum path between the starting seed point and the ending seed point; Step A3: Use the minimum path as the segment center line of the blood vessel between the starting seed point and the ending seed point; and determine whether the ending seed point is the last ending seed point. If not, proceed to step A4; if yes, proceed to step A5. Step A4: Take all the pixels on the center line of the segment as starting seed points, use the fast traversal algorithm to solve the equation function, and obtain the minimum energy map of each starting seed point on the center line of the segment; and select a termination seed point from the remaining termination seed points, and execute step A2. Step A5: Extract several segment center lines.
2. The method for extracting the vascular centerline according to claim 1, characterized in that, The blood vessel mask image is a binary mask image; in the binary mask image, the area where the blood vessel to be extracted is located is the foreground image, and the remaining areas are the background image; The step of converting the acquired vascular mask image into a grayscale image includes: The distance transform method is used to convert the acquired blood vessel mask image into a grayscale image.
3. The method for extracting the vascular centerline according to claim 2, characterized in that, The step of converting the acquired vascular mask image into a grayscale image using a distance transform method includes: For each pixel in the blood vessel mask image, calculate the nearest distance between the pixel and a pixel in the background image; The nearest distance is used as the pixel value of the pixel in the grayscale image to obtain the grayscale image.
4. The method for extracting the vascular centerline according to claim 3, characterized in that, The distance transformation method employs distance calculation methods including Euclidean distance, chessboard distance, or urban distance.
5. The method for extracting the vascular centerline according to claim 1, characterized in that, The step of calculating the minimum energy map of the starting seed point based on the velocity function image and the obtained starting seed point includes: The velocity function image is used as the travel velocity of each pixel; The minimum arrival time from the starting seed point to each pixel point is calculated by solving the equation of process function using inverse difference. The set of minimum arrival times is taken as the minimum energy map.
6. The method for extracting the vascular centerline according to claim 5, characterized in that, The step of using inverse difference to solve the equation of process function and calculating the minimum arrival time from the starting seed point to each pixel includes: Starting from the initial seed point, the pixel with the shortest arrival time is taken as the currently visited pixel; Repeat the following steps until the minimum arrival time of each pixel is obtained: Update the minimum arrival time of the neighboring points of the currently reached pixel based on the minimum arrival time of the currently reached pixel.
7. The method for extracting the vascular centerline according to claim 1, characterized in that, The step of searching backwards from the selected termination seed point to the starting seed point based on the minimum energy map of the starting seed point includes: Starting from the selected termination seed point, search in reverse along the direction where the minimum arrival time value decreases and the gradient changes the fastest, and search back to the starting seed point.
8. The method for extracting the vascular centerline according to claim 1, characterized in that, Obtaining the minimum path between the starting seed point and the ending seed point includes: Step B1: Set the termination seed point as the current search point and set the loop flag to true; Step B2: Determine if the loop flag is true: if yes, proceed to step B3; if no, proceed to step B4. Step B3: Determine whether the starting seed point is a neighboring point of the current search point. If so, set the loop flag to false. Obtain the neighborhood point of the minimum energy of the current search point, add the neighborhood point to the set of pixels on the minimum path between the starting seed point and the ending seed point, and use the neighborhood point as the current search point, then execute step B2; Step B4: The path formed by the set of pixels on the minimum path between the starting seed point and the ending seed point is taken as the minimum path between the starting seed point and the ending seed point.
9. The method for extracting the vascular centerline according to any one of claims 1-8, characterized in that, The vascular mask image includes a mask image of the aorta, and the vascular centerline includes the aorta centerline.
10. A device for extracting the centerline of a blood vessel, characterized in that, include: The distance transformation module is configured to convert the acquired blood vessel mask image into a grayscale image; The velocity function construction module is configured to normalize the grayscale image to obtain a velocity function image; The minimum energy map acquisition module is configured to calculate the minimum energy map of the starting seed point based on the velocity function image and the acquired starting seed point; The segmented centerline acquisition module is configured to search for the minimum path between the termination seed point and the starting seed point in segments based on the minimum energy map of the starting seed point and several acquired termination seed points, and extract several segmented centerlines. The vessel centerline merging module is configured to merge the segmented centerlines extracted above to obtain the complete centerline of the vessel to be extracted. The velocity function construction module constructs the velocity function of the velocity function image in the following manner: In the formula, The velocity value of each pixel in the grayscale image. The maximum value in the distance transformation result. This is an array of the same size as the number of pixels obtained after distance transformation of the blood vessel mask image; The segment centerline acquisition module extracts several segment centerlines in the following manner: Step A1: Randomly select one termination seed point from the plurality of termination seed points; Step A2: Based on the minimum energy graph of the starting seed point, start from the selected ending seed point and search backwards to the starting seed point to obtain the minimum path between the starting seed point and the ending seed point; Step A3: Use the minimum path as the segment center line of the blood vessel between the starting seed point and the ending seed point; and determine whether the ending seed point is the last ending seed point. If not, proceed to step A4; if yes, proceed to step A5. Step A4: Take all the pixels on the center line of the segment as starting seed points, use the fast traversal algorithm to solve the equation function, and obtain the minimum energy map of each starting seed point on the center line of the segment; and select a termination seed point from the remaining termination seed points, and execute step A2. Step A5: Extract several segment center lines.
11. An electronic device, characterized in that, The method includes a processor and a storage device, the processor being adapted to implement various instructions, the storage device being adapted to store multiple instructions, the instructions being adapted to be loaded by the processor and executed as described in any one of claims 1 to 9, for the extraction of the vascular centerline.
12. A computer-readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, implements the method for extracting the vascular centerline as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Target blood vessel extraction method and device and computer readable storage medium
CN112652011A
Blood vessel center line extraction method and device, equipment and storage medium
CN113160189A