Blood vessel segmentation method and device based on image registration and medium
By performing image registration and maximum and minimum threshold segmentation in CT images, combined with vector calculation, accurate category recognition of blood vessel images is achieved, solving the problems of low efficiency and high misjudgment rate of traditional methods.
Patent Information
- Application Number
- CN202311694650.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2025-06-13
AI Technical Summary
The traditional classification of vascular image categories depends on the doctor's naked eye judgment, is inefficient and requires high technical requirements for the doctor, making it prone to misjudgment.
The vascular segmentation method based on image registration is adopted, and the reference image and floating image registration are selected from the CT images at different stages, combined with the maximum and minimum threshold segmentation and vector calculation, accurate category recognition of the vascular image is achieved.
It improves the accuracy of category recognition of vascular images, reduces dependence on physicians' technical level, improves efficiency and reduces the rate of misjudgment.
Smart Images

Figure CN120147371A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence, and particularly relates to a method, device and medium for blood vessel segmentation based on image registration. Background Art
[0002] Abdominal enhanced CT is often used for collecting blood vessel images in the liver. The blood vessels in the liver include hepatic veins and portal veins, and there are arteries and veins outside the liver. Therefore, the collected images can be divided into arterial images, hepatic vein images, portal vein images, and venous images. Traditional image category classification is judged by experienced physicians with the naked eye, which is not only inefficient, requires a high technical level of physicians, but also often results in misjudgment. Summary of the Invention
[0003] The purpose of the present invention is to provide a method, device and medium for blood vessel segmentation based on image registration, which can achieve accurate category recognition of blood vessel images.
[0004] To achieve the above purpose, in the first aspect, the present invention provides a method for blood vessel segmentation based on image registration, the method comprising:
[0005] Select an image as a reference image from CT images at different stages, and the rest as floating images, register the floating images with the reference image to obtain registered images;
[0006] Select a subset of the registered images, and perform segmentation in the subset according to the maximum and minimum thresholds respectively to obtain binary segmentation images of the subset;
[0007] Merge the foreground regions of the respective segmentation images in the subset, and the merged region is used as the blood vessel segmentation image;
[0008] Extract the coordinates of all foreground pixels in the blood vessel segmentation image, obtain the corresponding pixel values in each registered image according to the coordinates, and form a vector with all the obtained pixel values;
[0009] Compare the vector with a plurality of preset reference vectors B of different categories i Calculate the cosine similarity, and use the category with the maximum cosine similarity as the category of the pixel. After traversing all the pixels of the blood vessel segmentation image, the category of the blood vessel is obtained.
[0010] To achieve the above purpose, in the second aspect, the present invention further provides a device for blood vessel segmentation based on image registration, the device comprising:
[0011] A registration module, configured to select an image as a reference image from CT images at different stages, and the rest as floating images, register the floating images with the reference image to obtain registered images;
[0012] A binarization module, which is used to select a subset of the registered images, and perform segmentation on the subset according to the maximum and minimum thresholds respectively to obtain the binarized segmentation images of the subset;
[0013] A merging module, which is used to merge the foreground regions of the respective segmentation images in the subset, and the merged region serves as the blood vessel segmentation image;
[0014] A vector acquisition module, which is used to extract the coordinates of all foreground pixels in the blood vessel segmentation image, obtain the corresponding pixel values in the respective registered images according to the coordinates, and form a vector with all the obtained pixel values;
[0015] A category determination module, which is used to calculate the cosine similarity between the vector and the reference vectors B of multiple preset categories, and take the category with the maximum cosine similarity as the category of the pixel. After traversing all the pixels of the blood vessel segmentation image, the category of the blood vessel is obtained. i Calculate the cosine similarity, take the category with the maximum cosine similarity as the category of the pixel, and after traversing all the pixels of the blood vessel segmentation image, the category of the blood vessel is obtained.
[0016] To achieve the above object, in a third aspect, the present invention also provides an electronic device, and the electronic device includes: a processor, a memory, and a communication bus;
[0017] The processor is used to execute one or more programs stored in the memory to implement the steps of the blood vessel segmentation method based on image registration as described above.
[0018] To achieve the above object, in a fourth aspect, the present invention also provides a computer-readable storage medium, and the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the blood vessel segmentation method based on image registration as described above.
[0019] The method provided by the embodiments of the present invention first registers the blood vessel images in different stages, then performs image binarization based on the maximum and minimum thresholds, then merges the foreground regions in the respective registered images, and then extracts the pixel values of the foreground pixels in the images at each stage to form a vector, calculates the similarity between the vector and the reference vector, takes the most similar category as the category of the pixel, and finally traverses the categories of all pixels to obtain the category of the blood vessel image, realizing the accurate recognition of the blood vessel category. Description of the Drawings
[0020] Figure 1 It is a flowchart of the blood vessel segmentation method based on image registration provided by the embodiments of the present invention;
[0021] Figure 2 It is a flowchart of the blood vessel segmentation method based on image registration provided by the embodiments of the present invention;
[0022] Figure 3Flowchart of image registration provided by an embodiment of the present invention;
[0023] Figure 4 Flowchart of image registration provided by an embodiment of the present invention;
[0024] Figure 5 Flowchart of a vascular segmentation method based on image registration provided by an embodiment of the present invention;
[0025] Figure 6 Structural diagram of a vascular segmentation device based on image registration provided by an embodiment of the present invention;
[0026] Figure 7 Structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0027] To make the objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.
[0028] Figure 1 Shows the process of a vascular segmentation method based on image registration provided by an embodiment of the present invention. Refer to Figure 1 , the vascular segmentation method based on image registration includes the following steps:
[0029] S11, select one image from CT images at different stages as the reference image, and the rest as floating images, register the floating images with the reference image to obtain registered images.
[0030] S12, select a subset of the registered images, and perform segmentation in the subset according to the maximum and minimum thresholds respectively to obtain a binary segmentation image of the subset.
[0031] S13, merge the foreground regions of the segmentation images in the subset, and the merged region is used as the vascular segmentation image.
[0032] S14, extract the coordinates of all foreground pixels in the vascular segmentation image, obtain the corresponding pixel values in each registered image according to the coordinates, and form a vector with all the obtained pixel values.
[0033] S15, calculate the cosine similarity between the vector and a plurality of preset reference vectors B of different categories, and use the category with the maximum cosine similarity as the category of the pixel. After traversing all the pixels of the vascular segmentation image, the category of the blood vessel is obtained. i Calculate the cosine similarity, and use the category with the maximum cosine similarity as the category of the pixel. After traversing all the pixels of the vascular segmentation image, the category of the blood vessel is obtained.
[0034] It is understandable that the patient will form CT images at different stages during the treatment. During the execution of the method provided in the embodiment of the present invention, first, one of the CT images at different stages is selected as a reference image, and the other images are registered. The image to be registered is called a floating image.
[0035] The purpose of performing the above registration operation is to make all the pixels on the images formed at different times completely aligned.
[0036] Next, the segmentation operation of the image is performed. Or, the segmentation operation can also be called a binarization operation.
[0037] The above segmentation operation is carried out according to the maximum and minimum thresholds. The specific process is as shown in formula (1).
[0038]
[0039] That is to say, as long as the value of the pixel in the original image is between a maximum threshold max and a minimum threshold min, then this pixel is regarded as a foreground pixel and is assigned a value of 1. If the value of a pixel in the original image is not within the above interval, then this pixel is regarded as a background pixel and is assigned a value of 0.
[0040] Next, the merging of each segmented image is performed. In the merging operation, as long as the value of a pixel is a foreground pixel in any one of the segmented images in the subset, then in the merged image, that is, the blood vessel segmentation image, this pixel is a foreground pixel. And a pixel must be a background pixel in all segmented images for it to become a background pixel in the blood vessel segmentation image.
[0041] Then, a vector is extracted from the blood vessel segmentation image. This vector is composed of the pixel values of the pixels at the same position in different registered images. Taking the case where there are always four phases of images as an example, the extracted vector should be a four-dimensional vector.
[0042] Finally, the cosine similarity between the extracted vector and a reference vector B i is calculated. The cosine similarity is given by formula (2):
[0043]
[0044] where A is the extracted vector, and B i is the reference vector, and n is the preset number of vectors.
[0045] If in the calculation result, the similarity between A and B i is the highest, then this pixel belongs to the category corresponding to B i
[0046] Calculate the categories of all pixels in the foreground area in this way. Count the categories of all pixels in the foreground area, and the category with the largest number of pixels belongs is the category of the blood vessel image.
[0047] Figure 2 The flowchart of the blood vessel segmentation method based on image registration provided by the embodiment of the present invention is shown. Refer to Figure 2 , the blood vessel segmentation method based on image registration includes the following steps:
[0048] S21, Take the second, third, and fourth phase images as floating images respectively, register them with the first phase image, and obtain the registered images of the second, third, and fourth phase images.
[0049] S22, Select two from the registered images, and perform segmentation according to the corresponding maximum and minimum thresholds respectively to obtain two binary segmentation images.
[0050] S23, Merge the foreground areas of the two segmentation images, and the merged area is used as the segmentation image of the blood vessels.
[0051] S24, Extract the coordinates of all foreground pixels in the processed blood vessel segmentation image, and obtain a vector composed of four corresponding pixel values in the four registered phase images according to the coordinates.
[0052] S25, Calculate the cosine similarity between the vector and the preset benchmark vectors B of multiple categories, and use the category with the largest cosine similarity as the category of the pixel. After traversing all the pixels of the blood vessel segmentation image, the category of the blood vessels is obtained. i Calculate the cosine similarity, and use the category with the largest cosine similarity as the category of the pixel. After traversing all the pixels of the blood vessel segmentation image, the category of the blood vessels is obtained.
[0053] In Figure 2 The embodiment shown, the CT image contains a total of four phase images. Moreover, in the process of image merging, two images are merged to obtain the segmentation image.
[0054] Since there are a total of four phase images, the extracted vector is a four-dimensional vector.
[0055] That is to say, Figure 2 In the embodiment shown, accurate category recognition of the blood vessel image is achieved based on the four phase images.
[0056] Figure 3 The flowchart of the image registration provided by the embodiment of the present invention is shown. Refer to Figure 3 , taking the second, third, and fourth phase images as floating images respectively, and registering them with the first phase image to obtain the registered images of the second, third, and fourth phase images includes the following steps:
[0057] S31, Perform image interpolation on the floating image, and calculate the similarity between the interpolated image and the reference image.
[0058] S32. Determine whether the current similarity is optimal.
[0059] S33. If it is not optimal yet, optimize and perform a spatial transformation on the interpolated floating image until the similarity reaches the optimal value.
[0060] In Figure 3 In the illustrated embodiment, an optimal registration method is adopted. That is, first interpolate the floating image, then calculate the similarity between the interpolated image and the reference image, and determine whether the similarity reaches the optimal value. If it does not reach the optimal value, optimize and perform a spatial transformation on the floating image. Repeat this process until the similarity reaches the optimal value.
[0061] By Figure 3 In the illustrated embodiment, the registration between the floating image and the reference image is achieved through a cyclic optimization method.
[0062] Figure 4 Illustrates the process of image registration provided by the embodiment of the present invention. Refer to Figure 4 , to obtain the registered images of the second, third, and fourth phase images by using the second, third, and fourth phase images as floating images respectively and registering them with the first phase image, the following steps are included:
[0063] S41. Input the floating image and the reference image into a pre-trained neural network model respectively to obtain the deformation field of the images.
[0064] S42. Perform a spatial transformation on the deformation field to obtain the registered image corresponding to the floating image.
[0065] Different from the embodiment illustrated by Figure 3 , the embodiment illustrated by Figure 4 adopts the method of a neural network model. Moreover, in Figure 4 the illustrated embodiment, the registration process does not need to be executed cyclically between each step. Only need to perform a spatial transformation on the output of the neural network model to obtain the target registered image.
[0066] Figure 5 Illustrates the process of the blood vessel segmentation method based on image registration provided by the embodiment of the present invention. Refer to Figure 5 , in Figure 5 the illustrated embodiment, first register the second, third, and fourth phase images by using the first phase image. Then, select the second registered image and the third registered image for image segmentation. The image segmentation performed is based on the maximum and minimum threshold image segmentation.
[0067] The result of the image segmentation is two segmented images. Merge these two segmented images to obtain the blood vessel segmentation image.
[0068] Next is the process of vector extraction. In the vector extraction process, vectors are extracted from the pixels of a foreground region. The vector is composed of the pixel values at the same positions in the four-phase registered images.
[0069] Then, calculate the similarity with the reference vector. Select the one with the largest value in the similarity calculation results as the category to which the pixel belongs. Finally, traverse the categories of all pixels to obtain the category of the blood vessel image.
[0070] Figure 6 The structural diagram of the blood vessel segmentation device based on image registration provided by the embodiment of the present invention is shown. Refer to Figure 6 , the blood vessel segmentation device based on image registration includes: a registration module 601, a binarization module 602, a merging module 603, a vector acquisition module 604, and a category determination module 605.
[0071] The registration module 601 is used to select one image as the reference image from the CT images at different stages, and the rest as the floating images, and register the floating images with the reference image to obtain the registered images.
[0072] The binarization module 602 is used to select a subset of the registered images, and perform segmentation according to the maximum and minimum thresholds respectively in the subset to obtain the binarized segmentation images of the subset.
[0073] The merging module 603 is used to merge the foreground regions of the respective segmentation images in the subset, and the merged region is used as the blood vessel segmentation image.
[0074] The vector acquisition module 604 is used to extract the coordinates of all foreground pixels in the blood vessel segmentation image, obtain the corresponding pixel values in each registered image according to the coordinates, and form vectors with all the obtained pixel values.
[0075] The category determination module 605 is used to calculate the cosine similarity between the vector and the reference vectors Bi of multiple preset categories, and use the category with the largest cosine similarity as the category of the pixel. After traversing all the pixels of the blood vessel segmentation image, the category of the blood vessel is obtained.
[0076] In some embodiments, the registration module 601 is specifically used for:
[0077] Take the second, third, and fourth phase images as floating images respectively, and register them with the first phase image to obtain the registered images of the second, third, and fourth phase images.
[0078] In some embodiments, taking the second, third, and fourth phase images as floating images respectively, and registering them with the first phase image to obtain the registered images of the second, third, and fourth phase images includes:
[0079] Perform image interpolation on the floating image, and calculate the similarity between the interpolated image and the reference image;
[0080] Determine whether the current similarity is optimal;
[0081] If it is not optimal yet, optimize and perform a spatial transformation on the interpolated floating image until the similarity reaches the optimal value.
[0082] In some embodiments, the second, third, and fourth phase images are respectively used as floating images and registered with the first phase image to obtain the registered images of the second, third, and fourth phase images, including:
[0083] Input the floating image and the reference image into a pre-trained neural network model respectively to obtain the deformation field of the images;
[0084] Perform a spatial transformation on the deformation field to obtain the registered image corresponding to the floating image.
[0085] In some embodiments, the binarization module 602 is specifically configured to:
[0086] Select two from the registered images and perform segmentation according to the corresponding maximum and minimum thresholds respectively to obtain two binarized segmented images.
[0087] In some embodiments, the merging module 603 is specifically configured to:
[0088] Merge the foreground regions of the two segmented images, and the merged region is used as the segmented image of the blood vessels.
[0089] In some embodiments, the vector acquisition module 604 is specifically configured to:
[0090] Extract the coordinates of all foreground pixels in the processed blood vessel segmented image, and obtain four corresponding pixel values from the four registered phase images according to the coordinates to form a vector.
[0091] An embodiment of the present invention provides an electronic device. Refer to Figure 7 As shown, it includes a processor 701, a memory 702, and a communication bus 703, where: the communication bus 703 is used to implement the connection and communication between the processor 701 and the memory 702; the processor 701 is used to execute one or more computer programs stored in the memory 702 to implement at least one step of the blood vessel segmentation method based on image registration in the first embodiment above.
[0092] This embodiment also provides a computer-readable storage medium, which includes a volatile or non-volatile, removable or non-removable medium implemented in any method or technology for storing information such as computer-readable instructions, data structures, computer program modules, or other data. The computer-readable storage medium includes, but is not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory, or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), digital versatile disc (DVD), or other optical disc storage, magnetic cassette, tape, magnetic disk storage, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0093] The computer-readable storage medium in this embodiment can be used to store one or more computer programs, and the one or more computer programs stored therein can be executed by a processor to implement at least one step of the method in the first embodiment above.
[0094] This embodiment also provides a computer program, which can be distributed on a computer-readable medium and executed by a computable device to implement at least one step of the method in the first embodiment above; and in some cases, at least one step shown or described can be executed in a different order from that described in the above embodiment.
[0095] This embodiment also provides a computer program product, including a computer-readable device, on which the computer program as shown above is stored. In this embodiment, the computer-readable device can include the computer-readable storage medium as shown above.
[0096] As can be seen, those skilled in the art should understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software (which can be realized by computer program codes executable by a computing device), firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be executed by the cooperation of several physical components. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit.
[0097] In addition, as is well known to those of ordinary skill in the art, a communication medium generally contains computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. Therefore, the present invention is not limited to any specific combination of hardware and software.
[0098] The above content is a further detailed description of the embodiments of the present invention in combination with specific implementation manners, and it cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention belongs, without departing from the concept of the present invention, several simple deductions or substitutions can still be made, and all should be regarded as belonging to the protection scope of the present invention.
Claims
1. A method for vascular segmentation based on image registration, including: Selecting one image from CT images at different stages as the reference image, and the rest as floating images, registering the floating images with the reference image to obtain registered images; Selecting a subset of the registered images, and respectively performing segmentation according to the maximum and minimum thresholds in the subset to obtain binary segmentation images of the subset; Merging the foreground regions of the respective segmentation images in the subset, and taking the merged region as the vascular segmentation image; Extracting the coordinates of all foreground pixels in the vascular segmentation image, obtaining the corresponding pixel values in each registered image according to the coordinates, and forming a vector with all the obtained pixel values; Calculating the cosine similarity between the vector and the preset benchmark vectors Bi of multiple categories, taking the category with the maximum cosine similarity as the category of the pixel, and obtaining the category of the blood vessel after traversing all the pixels of the vascular segmentation image.
2. The method according to claim 1, characterized in that, selecting one image from CT images at different stages as the reference image, and the rest as floating images, registering the floating images with the reference image to obtain registered images, including: Taking the images of the second, third, and fourth phases as floating images respectively, registering them with the image of the first phase, and obtaining the registered images of the second, third, and fourth phases.
3. The method according to claim 2, characterized in that, taking the images of the second, third, and fourth phases as floating images respectively, registering them with the image of the first phase, and obtaining the registered images of the second, third, and fourth phases, including: Performing image interpolation on the floating image, and calculating the similarity between the interpolated image and the reference image; Judging whether the current similarity is optimal; If it is not optimal yet, optimizing and performing spatial transformation on the interpolated floating image until the similarity reaches the optimal.
4. The method according to claim 2, characterized in that, taking the images of the second, third, and fourth phases as floating images respectively, registering them with the image of the first phase, and obtaining the registered images of the second, third, and fourth phases, including: Inputting the floating image and the reference image into a pre-trained neural network model respectively to obtain the deformation field of the images; Performing spatial transformation on the deformation field to obtain the registered image corresponding to the floating image.
5. The method according to claim 1, characterized in that, selecting a subset of the registered images, and respectively performing segmentation according to the maximum and minimum thresholds in the subset to obtain binary segmentation images of the subset, including: Selecting two from the registered images, and respectively performing segmentation according to the corresponding maximum and minimum thresholds to obtain two binary segmentation images.
6. The method according to claim 1, characterized in that, merging the foreground regions of the respective segmentation images in the subset, and taking the merged region as the vascular segmentation image, including: Merging the foreground regions of the two segmentation images, and taking the merged region as the segmentation image of the blood vessel.
7. The method according to claim 1, characterized in that, extracting the coordinates of all foreground pixels in the vascular segmentation image, obtaining the corresponding pixel values in each registered image according to the coordinates, and forming a vector with all the obtained pixel values, including: Extract the coordinates of all foreground pixels in the processed vascular segmentation image, and obtain four corresponding pixel values in the four-phase images after registration according to the coordinates to form a vector.
8. A vascular segmentation device based on image registration, comprising: A registration module, configured to select one image as a reference image from CT images at different stages, and the remaining images as floating images, and register the floating images with the reference image to obtain registered images; A binarization module, configured to select a subset of the registered images, and perform segmentation according to the maximum and minimum thresholds respectively in the subset to obtain a binarized segmentation image of the subset; A merging module, configured to merge the foreground regions of the respective segmentation images in the subset, and the merged region is used as the vascular segmentation image; A vector acquisition module, configured to extract the coordinates of all foreground pixels in the vascular segmentation image, obtain the corresponding pixel values in each registered image according to the coordinates, and form a vector from all the obtained pixel values; A category determination module, configured to calculate the cosine similarity between the vector and the reference vectors Bi of multiple preset categories, and use the category with the maximum cosine similarity as the category of the pixel. After traversing all the pixels of the vascular segmentation image, the category of the blood vessel is obtained.
9. An electronic device, comprising: A processor, a memory, and a communication bus; The processor is configured to execute one or more programs stored in the memory to implement the steps of the vascular segmentation method based on image registration according to any one of claims 1 to 7.
10. A computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the vascular segmentation method based on image registration according to any one of claims 1 to 7.