Method and apparatus for processing three-dimensional segmentation results, electronic device, computer-readable storage medium, and computer program product

By constructing an undirected graph and selecting candidate nodes and edges, the problem of connection at the interruption of the three-dimensional segmentation result is solved, and the continuous second and three-dimensional segmentation result is achieved, which improves the integrity and accuracy of the segmentation result.

CN119722715BActive Publication Date: 2025-06-13SHENZHEN WEIDE PRECISION MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510220436.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13
Estimated Expiration
2045-02-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively connect interruptions in the three-dimensional segmentation results, resulting in discontinuity of the three-dimensional segmentation results of the target object.

Method used

By constructing a target undirected graph based on the first three-dimensional segmentation result, select candidate nodes and determine the shortest edges, add these edges to the candidate edge set to connect to the interruption, and obtain the second three-dimensional segmentation result.

Benefits of technology

It is realized that the interruptions in the three-dimensional segmentation result are connected to obtain a continuous second and three-dimensional segmentation result, which improves the integrity and accuracy of the segmentation result.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119722715B_ABST
    Figure CN119722715B_ABST
Patent Text Reader

Abstract

The present application discloses a method and apparatus for processing a three-dimensional segmentation result, an electronic device, a computer-readable storage medium, and a computer program product. The method includes: obtaining a first three-dimensional segmentation result; constructing a target undirected graph based on the first three-dimensional segmentation result, where there is a first edge between any two nodes in the target undirected graph; arbitrarily selecting a node from the target undirected graph and adding it to a candidate node set; determining, from the first edges, the edges that contain the nodes in the candidate node set as second edges; adding the shortest second edge to a first candidate edge set; adding the nodes included in the shortest second edge to the candidate node set; when the nodes in the candidate node set are the same as the nodes in the target undirected graph, connecting the nodes in the candidate node set based on the edges in the first candidate edge set to obtain a second three-dimensional segmentation result. Based on this method, the discontinuous parts in the first three-dimensional segmentation result of the target object can be connected to obtain the second three-dimensional segmentation result of the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular, to a method and device for processing a three-dimensional segmentation result, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] By segmenting a target object in a three-dimensional image, a three-dimensional segmentation result of the target object can be obtained. However, there are discontinuities in the three-dimensional segmentation result of the target object obtained by the current method. Therefore, how to connect the discontinuities in the three-dimensional segmentation result is an urgent problem to be solved. Summary of the Invention

[0003] The present application provides a method and device for processing a three-dimensional segmentation result, an electronic device, a computer-readable storage medium, and a computer program product to connect the discontinuities in the first three-dimensional segmentation result of a target object to obtain the second three-dimensional segmentation result of the target object.

[0004] In a first aspect, a method for processing a three-dimensional segmentation result is provided. The method is used to connect the discontinuities in the first three-dimensional segmentation result of a target object to obtain the second three-dimensional segmentation result of the target object. The method includes:

[0005] Obtain the first three-dimensional segmentation result;

[0006] Based on the first three-dimensional segmentation result, construct a target undirected graph. The nodes in the target undirected graph are determined based on the voxels in the first three-dimensional segmentation result. There is a first edge between any two nodes in the target undirected graph, and the length of the first edge is determined based on the distance between the voxels in the first three-dimensional segmentation result;

[0007] Select any node from the target undirected graph and add it to the candidate node set;

[0008] Determine the edges containing the nodes in the candidate node set from the first edges as the second edges;

[0009] Add the shortest of the second edges to the first candidate edge set, and the edges in the first candidate edge set after adding the shortest of the second edges do not form a closed figure;

[0010] Add the nodes included in the shortest of the second edges to the candidate node set;

[0011] When the nodes in the candidate node set are the same as the nodes in the target undirected graph, connect the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result.

[0012] Combined with any embodiment of the present application, connecting the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result includes:

[0013] Obtain the first coordinates of the nodes in the candidate node set in the world coordinate system, the second coordinates of the edges in the first candidate edge set in the world coordinate system, and the target conversion relationship, where the target conversion relationship is used to convert the coordinates in the world coordinate system into the coordinates in the pixel coordinate system of the three-dimensional image;

[0014] Use the target conversion relationship to convert the first coordinates into the third coordinates in the pixel coordinate system;

[0015] Use the target conversion relationship to convert the second coordinates into the fourth coordinates in the pixel coordinate system;

[0016] Based on the third coordinates and the fourth coordinates, obtain the second three-dimensional segmentation result, where the coordinates of the voxels in the second three-dimensional segmentation result in the pixel coordinate system include the third coordinates and the fourth coordinates.

[0017] Combined with any embodiment of the present application, the shape of the target object in the first three-dimensional segmentation result includes a tube shape. Building a target undirected graph based on the first three-dimensional segmentation result includes:

[0018] Based on the first three-dimensional segmentation result, determine the linear segmentation result of the target object, where the shape of the target object in the linear segmentation result includes a linear shape, and the linear shape matches the tube shape;

[0019] Build the target undirected graph based on the linear segmentation result. The nodes in the target undirected graph correspond to the voxels in the linear segmentation result, and the length of the first edge is positively correlated with the distance between the voxels in the linear segmentation result.

[0020] Combined with any embodiment of the present application, after connecting the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result, the method further includes:

[0021] Dilate the second three-dimensional segmentation result so that the second three-dimensional segmentation result changes from a linear shape to a tube shape to obtain a third three-dimensional segmentation result.

[0022] Combined with any embodiment of the present application, after dilating the second three-dimensional segmentation result to obtain a third three-dimensional segmentation result, the method further includes:

[0023] Modify the shape of the third 3D segmentation result using the first 3D segmentation result to obtain a fourth 3D segmentation result.

[0024] Combined with any implementation manner of the present application, connecting the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second 3D segmentation result includes:

[0025] Determine a third edge in the first candidate edge set whose length is greater than or equal to a length threshold;

[0026] Remove the third edge in the first candidate edge set to obtain a second candidate edge set;

[0027] Connect the nodes in the candidate node set based on the edges in the second candidate edge set to obtain the second 3D segmentation result.

[0028] In a second aspect, a 3D segmentation result processing device is provided. The 3D segmentation result processing device is used to connect the discontinuities in the first 3D segmentation result of a target object to obtain the second 3D segmentation result of the target object. The 3D segmentation result processing device includes:

[0029] An acquisition unit for acquiring the first 3D segmentation result;

[0030] A construction unit for constructing a target undirected graph based on the first 3D segmentation result. The nodes in the target undirected graph are determined based on the voxels in the first 3D segmentation result. There is a first edge between any two nodes in the target undirected graph, and the length of the first edge is determined based on the distance between the voxels in the first 3D segmentation result;

[0031] An adding unit for arbitrarily selecting a node from the target undirected graph and adding it to the candidate node set;

[0032] A determining unit for determining an edge containing the nodes in the candidate node set from the first edges as second edges;

[0033] The adding unit is further configured to add the shortest second edge to the first candidate edge set, and the edges in the first candidate edge set after adding the shortest second edge do not form a closed figure;

[0034] The adding unit is further configured to add the nodes included in the shortest second edge to the candidate node set;

[0035] A processing unit for, when the nodes in the candidate node set are the same as the nodes in the target undirected graph, connecting the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second 3D segmentation result.

[0036] Combined with any embodiment of the present application, the processing unit is further configured to:

[0037] Obtain the first coordinates of the nodes in the candidate node set in the world coordinate system, the second coordinates of the edges in the first candidate edge set in the world coordinate system, and a target conversion relationship, where the target conversion relationship is used to convert the coordinates in the world coordinate system into the coordinates in the pixel coordinate system of the three-dimensional image;

[0038] Use the target conversion relationship to convert the first coordinates into the third coordinates in the pixel coordinate system;

[0039] Use the target conversion relationship to convert the second coordinates into the fourth coordinates in the pixel coordinate system;

[0040] Based on the third coordinates and the fourth coordinates, obtain the second three-dimensional segmentation result, where the coordinates of the voxels in the second three-dimensional segmentation result in the pixel coordinate system include the third coordinates and the fourth coordinates.

[0041] Combined with any embodiment of the present application, the shape of the target object in the first three-dimensional segmentation result includes a tube shape, and the construction unit is further configured to:

[0042] Based on the first three-dimensional segmentation result, determine a linear segmentation result of the target object, where the shape of the target object in the linear segmentation result includes a linear shape, and the linear shape matches the tube shape;

[0043] Construct the target undirected graph based on the linear segmentation result, where the nodes in the target undirected graph correspond to the voxels in the linear segmentation result, and the length of the first edge is positively correlated with the distance between the voxels in the linear segmentation result.

[0044] Combined with any embodiment of the present application, the processing unit is further configured to:

[0045] Dilate the second three-dimensional segmentation result so that the second three-dimensional segmentation result changes from a linear shape to a tube shape, obtaining a third three-dimensional segmentation result.

[0046] Combined with any embodiment of the present application, the processing unit is further configured to:

[0047] Use the first three-dimensional segmentation result to correct the shape of the third three-dimensional segmentation result, obtaining a fourth three-dimensional segmentation result.

[0048] Combined with any embodiment of the present application, the processing unit is further configured to:

[0049] Determine a third edge from the first candidate edge set that has a length greater than or equal to a length threshold;

[0050] Remove the third edge from the first candidate edge set to obtain a second candidate edge set;

[0051] Based on the edges in the second candidate edge set, connect the nodes in the candidate node set to obtain the second 3D segmentation result.

[0052] In a third aspect, there is provided an electronic device, including: a processor and a memory, where the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method according to the first aspect and any one of its possible implementation manners as described above.

[0053] In a fourth aspect, there is provided another electronic device, including: a processor, a sending device, an input device, an output device, and a memory, where the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method according to the first aspect and any one of its possible implementation manners as described above.

[0054] In a fifth aspect, there is provided a computer-readable storage medium, in which a computer program is stored, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method according to the first aspect and any one of its possible implementation manners as described above.

[0055] In a sixth aspect, there is provided a computer program product, which includes a computer program or instructions. When the computer program or instructions run on a computer, the computer is caused to execute the method according to the first aspect and any one of its possible implementation manners as described above.

[0056] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit this application.

[0057] In the implementation of this application, after the processing device obtains the first three-dimensional segmentation result, it constructs a target undirected graph based on the first three-dimensional segmentation result. The nodes in the target undirected graph are determined based on the voxels in the first three-dimensional segmentation result. There is a first edge between any two nodes in the target undirected graph, and the length of the first edge is determined based on the distance between the voxels in the first three-dimensional segmentation result. Select any node from the target undirected graph and add it to the candidate node set. Determine the edges that contain the nodes in the candidate node set from the first edges as the second edges. Add the shortest second edge to the first candidate edge set, where the edges in the first candidate edge set after adding the shortest second edge do not form a closed figure. In this way, the edges in the first candidate edge set can be used to connect the discontinuities in the first three-dimensional segmentation result. Add the nodes included in the shortest second edge to the candidate node set, and when the nodes in the candidate node set are the same as the nodes in the target undirected graph, connect the nodes in the candidate node set based on the edges in the first candidate edge set, and the discontinuities in the first three-dimensional segmentation result can be connected to obtain the second three-dimensional segmentation result. Description of the Drawings

[0058] In order to more clearly illustrate the technical solutions in the embodiments of this application or the background art, the following will describe the drawings required to be used in the embodiments of this application or the background art.

[0059] The drawings here are incorporated into the specification and constitute a part of this specification. These drawings show the embodiments that comply with this application and are used together with the specification to illustrate the technical solutions of this application.

[0060] Figure 1 A schematic diagram of a first three-dimensional segmentation result provided by an embodiment of this application;

[0061] Figure 2 A flowchart of a method for processing a three-dimensional segmentation result provided by an embodiment of this application;

[0062] Figure 3 Another schematic diagram of a first three-dimensional segmentation result provided by an embodiment of this application;

[0063] Figure 4 A schematic diagram of a closed figure provided by an embodiment of this application;

[0064] Figure 5 A schematic diagram of a non-closed figure provided by an embodiment of this application;

[0065] Figure 6 A schematic diagram of a linear segmentation result provided by an embodiment of this application;

[0066] Figure 7 A flowchart of another method for processing a three-dimensional segmentation result provided by an embodiment of this application;

[0067] Figure 8 It is a schematic flowchart of another method for processing three-dimensional segmentation results provided by an embodiment of the present application;

[0068] Figure 9 It is a schematic structural diagram of a device for processing three-dimensional segmentation results provided by an embodiment of the present application;

[0069] Figure 10 It is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0070] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0071] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0072] Referring to "embodiment" in this article means that a specific feature, structure or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments. It should be understood that in the present application, "at least one (item)" means one or more, "a plurality" means two or more, and "at least two (items)" means two or three and more than three.

[0073] By segmenting the target object in the three-dimensional image, a first three-dimensional segmentation result of the target object can be obtained. However, there are discontinuities in the first three-dimensional segmentation result of the target object obtained by the current method. For example, when the target object is a blood vessel, the first three-dimensional segmentation result of the target object is the first three-dimensional segmentation result of the blood vessel. If there are discontinuities in the first three-dimensional segmentation result, then in the first three-dimensional segmentation result, the blood vessel is discontinuous. Please refer to Figure 1 , Figure 1 which is a schematic diagram of a first three-dimensional segmentation result provided by an embodiment of the present application. In Figure 1 , the target object is a blood vessel, and in the first three-dimensional segmentation result of the blood vessel, the blood vessel is discontinuous. Based on this, an embodiment of the present application provides a method for processing a three-dimensional segmentation result to connect the discontinuities in the first three-dimensional segmentation result of the target object to obtain a second three-dimensional segmentation result of the target object.

[0074] The execution subject of the embodiment of the present application is a three-dimensional segmentation result processing device (hereinafter referred to as the processing device for short). Among them, the processing device can be any electronic device that can execute the technical solution disclosed in the method embodiment of the present application. Optionally, the processing device can be one of the following: mobile phone, computer, tablet computer, wearable intelligent device.

[0075] It should be understood that the method embodiment of the present application can also be implemented by a processor executing computer program code. The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a method for processing a three-dimensional segmentation result provided by an embodiment of the present application.

[0076] 201. Obtain the first three-dimensional segmentation result.

[0077] In the embodiment of the present application, the first three-dimensional segmentation result is the three-dimensional segmentation result of the target object. By segmenting the three-dimensional image containing the target object, the first three-dimensional segmentation result can be obtained. There are discontinuities in the first three-dimensional segmentation result, that is, the target object is discontinuous. In a possible implementation scenario, the target object is a blood vessel, and the first three-dimensional segmentation result is obtained by segmenting a three-dimensional computed tomography (CT) image containing the blood vessel. For example, the first three-dimensional segmentation result is as Figure 1 shown.

[0078] Optionally, the shape of the target object is not closed. For example, when the target object is a blood vessel, Figure 1 the shape of the blood vessel shown is not closed.

[0079] In an implementation of obtaining a first three-dimensional segmentation result, a processing device receives the first three-dimensional segmentation result input by a user through an input component. The above input component includes: a keyboard, a mouse, a touch screen, a touchpad, and an audio input device.

[0080] In another implementation of obtaining a first three-dimensional segmentation result, the processing device receives the first three-dimensional segmentation result sent by a terminal. Optionally, the terminal can be any one of the following: a mobile phone, a computer, a tablet computer, a server, a wearable device.

[0081] 202. Construct a target undirected graph based on the first three-dimensional segmentation result, where the nodes in the target undirected graph are determined based on the voxels in the first three-dimensional segmentation result, and there is a first edge between any two nodes in the target undirected graph, and the length of the first edge is determined based on the distance between the voxels in the first three-dimensional segmentation result.

[0082] In the embodiments of the present application, an undirected graph is a data structure composed of multiple nodes and first edges connecting these nodes. Among them, there is a first edge between any two nodes in the target undirected graph, and the first edge has no direction. The nodes in the target undirected graph are determined based on the voxels in the first three-dimensional segmentation result. Optionally, the nodes in the target undirected graph correspond one-to-one with the voxels in the first three-dimensional segmentation result.

[0083] For the convenience of representation, hereinafter, the voxels in the first three-dimensional segmentation result are divided into discontinuous voxels, end-point continuous voxels, and non-end-point continuous voxels. The nodes in the target undirected graph corresponding to the discontinuous voxels are called discontinuous nodes, the nodes in the target undirected graph corresponding to the end-point continuous voxels are called end-point continuous nodes, and the nodes in the target undirected graph corresponding to the non-end-point continuous voxels are called non-end-point continuous nodes. Among them, the discontinuous voxels are the voxels at the discontinuity, the end-point continuous voxels are the continuous voxels at the end points, and the non-end-point continuous voxels are the continuous voxels at non-end points. The continuous voxels include the voxels other than the voxels at the discontinuity. For example, Figure 3 is a schematic diagram of another first three-dimensional segmentation result provided by the embodiments of the present application. As Figure 3As shown, there are discontinuities in the first three-dimensional segmentation result. Specifically, there is a discontinuity between voxel 1 and voxel 2, and it is continuous except for the discontinuity between voxel 1 and voxel 2. Therefore, both voxel 1 and voxel 2 are discontinuous voxels, and the voxels other than voxel 1 and voxel 2 are continuous voxels. Among the continuous voxels, voxel 3, voxel 4, and voxel 5 are all at the endpoints, and voxel 6 and voxel 7 are all at the endpoints. Therefore, voxel 3, voxel 4, and voxel 5 are all endpoint continuous voxels, and voxel 6 and voxel 7 are non-endpoint continuous voxels. Correspondingly, in the target undirected graph, the nodes corresponding to voxel 1 and the nodes corresponding to voxel 2 are both discontinuous nodes, the nodes corresponding to voxel 3, the nodes corresponding to voxel 4, and the nodes corresponding to voxel 5 are all endpoint continuous nodes, and the nodes corresponding to voxel 6 and the nodes corresponding to voxel 7 are all non-endpoint continuous nodes.

[0084] It should be understood that in the target undirected graph, there is a first edge between any two nodes, that is, there is also a first edge between the nodes corresponding to two non-connected voxels in the first three-dimensional segmentation result. For example, the target undirected graph includes node 1 corresponding to voxel 1, node 2 corresponding to voxel 2, node 3 corresponding to voxel 3, node 4 corresponding to voxel 4, node 5 corresponding to voxel 5, node 6 corresponding to voxel 6, and node 7 corresponding to voxel 7. Then there is a first edge between any two of the nodes 1, 2, 3, 4, 5, 6, and 7.

[0085] Optionally, the length of the first edge is positively correlated with the distance between the two voxels corresponding to the two nodes included in the first edge in the first three-dimensional segmentation result. For example, for Figure 3 the first three-dimensional segmentation result in, the greater the distance between voxel 1 and voxel 2, the longer the length of the first edge between node 1 and node 2.

[0086] Optionally, the relative position relationship between the nodes in the target undirected graph is the same as the relative position relationship between the voxels in the first three-dimensional segmentation result.

[0087] 203. Select an arbitrary node from the target undirected graph and add it to the candidate node set.

[0088] In step 203, the processing device can select an arbitrary node from the target undirected graph and add it to the candidate node set, so that the node selected from the target undirected graph is a node in the candidate node set. For example, the target undirected graph includes node 1, and by adding node 1 to the candidate node set, the processing device can make node 1 a node in the candidate node set. Optionally, before the processing device executes step 203, there are no nodes in the candidate node set.

[0089] 204. Determine the edges that contain the nodes in the candidate node set from the first edges as the second edges.

[0090] For example, if the target undirected graph includes Node 1, Node 2, and Node 3, and the node in the candidate node set is Node 1, then the first edges including Node 1 include the first edge between Node 1 and Node 2 and the first edge between Node 1 and Node 3. Correspondingly, the second edges include the first edge between Node 1 and Node 2 and the first edge between Node 1 and Node 3.

[0091] 205. Add the shortest second edge to the first candidate edge set, and the edges in the first candidate edge set after adding the shortest second edge do not form a closed figure.

[0092] In step 205, when the edges in the first candidate edge set meet the condition of not forming a closed figure, the processing device adds the second edge with the shortest length to the first candidate edge set. Correspondingly, the edges in the first candidate edge set after adding the shortest second edge also need to meet the requirement of not forming a closed figure. For example, Figure 4 This is a schematic diagram of a closed figure provided by an embodiment of the present application. As Figure 4 shown, the first edge between Node 1 and Node 2, the first edge between Node 2 and Node 3, and the first edge between Node 3 and Node 1 form a closed figure. Another example, Figure 5 This is a schematic diagram of a non-closed figure provided by an embodiment of the present application. As Figure 5 shown, the first edge between Node 1 and Node 2 and the first edge between Node 2 and Node 3 do not form a closed figure, that is, Figure 5 the figure shown is a non-closed figure.

[0093] The second edge includes a node in a candidate node set and a node in the target undirected graph other than the candidate node set. Therefore, the node in the target undirected graph other than the candidate node set included in the shortest second edge is the node in the target undirected graph that is closest to the node in the candidate node set. That is to say, the shortest second edge in step 205 is the edge that includes the node in the candidate node set and the node closest to the node in the candidate node set.

[0094] In the first three-dimensional segmentation result, the voxel closest to the discontinuous voxel can be a continuous voxel or a discontinuous voxel. Therefore, if the nodes in the candidate node set are discontinuous nodes, then among the nodes other than the candidate node set in the target undirected graph, the node closest to the discontinuous node can be a continuous node or a discontinuous node corresponding to a continuous voxel, where the continuous nodes include end-point continuous nodes and non-end-point continuous nodes. When the node closest to the discontinuous node is a continuous node corresponding to a continuous voxel, the shortest second edge added to the first candidate edge set is the edge between the discontinuous node and the continuous node. At this time, the shortest second edge can connect the discontinuous node and the continuous node. When the node closest to the discontinuous node is a discontinuous node, the shortest second edge added to the first candidate edge set is the edge between two discontinuous nodes. At this time, the shortest second edge can connect the two discontinuous nodes. Correspondingly, the discontinuous part in the first three-dimensional segmentation result can be connected through the shortest second edge.

[0095] In the first three-dimensional segmentation result, the voxel closest to the end-point continuous voxel can be a non-end-point continuous voxel connected to the end-point continuous voxel or a voxel not connected to the end-point continuous voxel. Therefore, if the nodes in the candidate node set are end-point continuous nodes, then among the nodes other than the candidate node set in the target undirected graph, the node closest to the end-point continuous node can be a non-end-point continuous node corresponding to a non-end-point continuous voxel connected to the end-point continuous voxel or a node corresponding to a voxel not connected to the end-point continuous voxel. When the node closest to the end-point continuous node is a non-end-point continuous node corresponding to a non-end-point continuous voxel connected to the end-point continuous voxel, the shortest second edge added to the first candidate edge set is the edge between the end-point continuous node and the non-end-point continuous node corresponding to the non-end-point continuous voxel connected to the end-point continuous voxel. At this time, the shortest second edge can connect the end-point continuous node and the non-end-point continuous node corresponding to the non-end-point continuous voxel connected to the end-point continuous voxel. When the node closest to the end-point continuous node is a node corresponding to a voxel not connected to the end-point continuous voxel, the shortest second edge is the edge between the end-point continuous node and the node corresponding to the voxel not connected to the end-point continuous voxel. At this time, if the shortest second edge is added to the first candidate edge set, it will cause the edges in the first candidate edge set to form a closed figure. For example, the nodes in the candidate node set are Figure 3The end - point continuous node corresponding to voxel 3, and the node corresponding to voxel 6 is the node closest to the end - point continuous node among the nodes in the target undirected graph other than the candidate nodes. At this time, the shortest second - edge is the edge between the node corresponding to voxel 3 and the node corresponding to voxel 6. If the shortest second - edge is added to the first candidate edge set, the edges in the first candidate edge set will form a closed figure. Therefore, when the node closest to the discontinuous node is the node corresponding to the voxel not connected to the end - point continuous voxel, the processing device does not add the shortest second - edge to the first candidate edge set.

[0096] In the first three - dimensional segmentation result, the voxel closest to the non - end - point continuous voxel is a voxel connected continuously, and this voxel can be any one of the discontinuous voxel, the end - point continuous voxel, and the non - end - point continuous voxel. Therefore, if the nodes in the candidate node set are non - end - point continuous nodes, then the node closest to the non - end - point continuous node among the nodes in the target undirected graph other than the candidate node set is the node corresponding to the voxel connected to the non - end - point voxel. At this time, the shortest second - edge added to the first candidate edge set is the edge between the non - end - point continuous node and the node corresponding to the voxel connected to the non - end - point voxel, and the shortest second - edge can connect the non - end - point continuous node and the node corresponding to the voxel connected to the non - end - point voxel.

[0097] 206. Add the nodes included in the shortest second - edge to the candidate node set.

[0098] In step 205, the shortest second - edge includes nodes other than the nodes in the candidate node set. By executing step 206, the processing device can add the nodes other than the nodes in the candidate node set included in the shortest second - edge to the candidate node set. For example, the target undirected graph includes node 1, node 2, and node 3, the nodes in the candidate node set are node 1, and the second - edge includes the first edge between node 1 and node 2 and the first edge between node 1 and node 3. If the length of the first edge between node 1 and node 2 is shorter than the length of the first edge between node 1 and node 3, then in step 205, the shortest second - edge is the first edge between node 1 and node 2. At this time, the nodes included in the shortest second - edge include node 1 and node 2. By adding node 1 and node 2 to the candidate node set, the candidate node set can include node 1 and node 2.

[0099] 207. When the nodes in the candidate node set are the same as the nodes in the target undirected graph, connect the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three - dimensional segmentation result.

[0100] As described in step 205, the edges in the first candidate edge set can connect two discontinuous nodes, connect a discontinuous node to a continuous node, connect an end-point continuous node to a non-end-point continuous node corresponding to a non-end-point continuous voxel connected to the end-point continuous voxel, and connect a non-end-point continuous node to a node corresponding to a voxel connected to a non-end-point voxel. Since a discontinuous node is a node corresponding to a discontinuous voxel, by connecting two discontinuous nodes, the nodes corresponding to two discontinuous voxels can be connected. At this time, based on the edges in the first candidate edge set, two discontinuous voxels in the first three-dimensional segmentation result can be connected, and then the discontinuous part in the first three-dimensional segmentation result can be connected. For example, based on the edges in the first candidate edge set, the discontinuous part between voxel 1 and voxel 2 in Figure 3 can be connected.

[0101] Since a continuous node is a node corresponding to a continuous voxel, an end-point node is a node corresponding to an end-point continuous voxel, and a non-end-point node is a node corresponding to a non-end-point continuous voxel, by connecting a discontinuous node to a continuous node, the node corresponding to the discontinuous voxel can be connected to the node corresponding to the continuous node. At this time, based on the edges in the first candidate edge set, the discontinuous voxel and the continuous voxel in the first three-dimensional segmentation result can be connected. Similarly, when the edges in the first candidate edge set can connect an end-point continuous node to a non-end-point continuous node corresponding to a non-end-point continuous voxel connected to the end-point continuous voxel, based on the edges in the first candidate edge set, the end-point continuous voxel and the non-end-point continuous voxel connected to the end-point continuous voxel in the first three-dimensional segmentation result can be connected. When the edges in the first candidate edge set can connect a non-end-point continuous node to a node corresponding to a voxel connected to a non-end-point voxel, based on the edges in the first candidate edge set, the non-end-point continuous voxel and the voxel connected to the non-end-point continuous voxel in the first three-dimensional segmentation result can be connected.

[0102] By connecting the discontinuous voxels and the continuous voxels in the first three-dimensional segmentation result, connecting the end-point continuous voxels and the non-end-point continuous voxels connected to the end-point continuous voxels in the first three-dimensional segmentation result, and connecting the non-end-point continuous voxels and the voxels connected to the non-end-point continuous voxels in the first three-dimensional segmentation result, the first three-dimensional segmentation result can be restored. For example, based on the first candidate edge set, connecting the discontinuous voxels and the continuous voxels in the first three-dimensional segmentation result, connecting the end-point continuous voxels and the non-end-point continuous voxels connected to the end-point continuous voxels in the first three-dimensional segmentation result, and connecting the non-end-point continuous voxels and the voxels connected to the non-end-point continuous voxels in the first three-dimensional segmentation result, can restore, as in Figure 3The first three-dimensional segmentation result shown. At the same time, by connecting the discontinuities in the first three-dimensional segmentation result, it is possible to connect the discontinuities in the first three-dimensional segmentation result on the basis of the first three-dimensional segmentation result. And the nodes in the candidate node set are the same as the nodes in the target undirected graph, indicating that all the nodes in the target undirected graph have been added to the candidate node set. Therefore, by executing step 207, the processing device can connect the discontinuities in the first three-dimensional segmentation result to obtain the second three-dimensional segmentation result.

[0103] Optionally, when the nodes in the candidate node set are different from the nodes in the target undirected graph, the processing device iteratively executes step 204, step 205, and step 206 until the nodes in the candidate node set are the same as the nodes in the target undirected graph. Based on the edges in the first candidate edge set, the nodes in the candidate node set are connected to obtain the second three-dimensional segmentation result.

[0104] In the implementation of this application, after obtaining the first three-dimensional segmentation result, the processing device constructs a target undirected graph based on the first three-dimensional segmentation result. The nodes in the target undirected graph are determined based on the voxels in the first three-dimensional segmentation result. There is a first edge between any two nodes in the target undirected graph, and the length of the first edge is determined based on the distance between the voxels in the first three-dimensional segmentation result. Select an arbitrary node from the target undirected graph and add it to the candidate node set. Determine the edges that contain the nodes in the candidate node set from the first edges as the second edges. Add the shortest second edge to the first candidate edge set, where the edges in the first candidate edge set after adding the shortest second edge do not form a closed figure. In this way, the edges in the first candidate edge set can be used to connect the discontinuities in the first three-dimensional segmentation result. Add the nodes included in the shortest second edge to the candidate node set, and when the nodes in the candidate node set are the same as the nodes in the target undirected graph, based on the edges in the first candidate edge set, connect the nodes in the candidate node set, and the discontinuities in the first three-dimensional segmentation result can be connected to obtain the second three-dimensional segmentation result.

[0105] As an optional implementation manner, the processing device executes the following steps during the execution of step 207:

[0106] 301. Obtain the first coordinates of the nodes in the candidate node set in the world coordinate system, the second coordinates of the edges in the first candidate edge set in the world coordinate system, and the target conversion relationship, where the target conversion relationship is used to convert the coordinates in the world coordinate system into the pixel coordinate system of the three-dimensional image.

[0107] In the implementation of this application, the first coordinate is used to represent the position of a node in the candidate node set in the world coordinate system. In a possible implementation manner, the first three-dimensional segmentation result is obtained by segmenting the target object in the three-dimensional image. By converting the coordinates of the voxels in the first three-dimensional segmentation result in the pixel coordinate system of the three-dimensional image to the world coordinate system, the first coordinate can be obtained.

[0108] In the implementation of this application, the second coordinate is used to represent the position of an edge in the first candidate edge set in the world coordinate system. Optionally, the second coordinate is the equation of the edge in the first candidate edge set in the world coordinate system. In a possible implementation manner, since the nodes included in the edges in the first candidate edge set are all nodes in the candidate node set, the processing device can determine the second coordinate of the edges in the first candidate edge set in the world coordinate system based on the first coordinates of the nodes in the candidate node set.

[0109] 302. Use the target conversion relationship to convert the first coordinate into a third coordinate in the pixel coordinate system.

[0110] 303. Use the target conversion relationship to convert the second coordinate into a fourth coordinate in the pixel coordinate system.

[0111] 304. Based on the third coordinate and the fourth coordinate, obtain the second three-dimensional segmentation result, where the coordinates of the voxels in the second three-dimensional segmentation result in the pixel coordinate system include the third coordinate and the fourth coordinate.

[0112] In step 304, the second three-dimensional segmentation result includes the voxels at the third coordinate and the voxels on the edge at the fourth coordinate.

[0113] In this implementation manner, after the processing device obtains the first coordinate, the second coordinate, and the target conversion relationship, it uses the target conversion relationship to convert the first coordinate into a third coordinate in the pixel coordinate system, and uses the target conversion relationship to convert the second coordinate into the third coordinate in the pixel coordinate system. In this way, based on the third coordinate and the fourth coordinate, the second three-dimensional segmentation result in the pixel coordinate system of the three-dimensional image can be obtained, and the second three-dimensional segmentation result is obtained by connecting the discontinuities in the first three-dimensional segmentation result.

[0114] As an optional implementation manner, the shape of the target object in the first three-dimensional segmentation result includes a tubular shape. For example, when the target object is a blood vessel, the shape of the blood vessel is tubular. At this time, the processing device performs the following steps during the execution of step 202:

[0115] 401. Based on the first three-dimensional segmentation result, determine the linear segmentation result of the target object.

[0116] In the embodiments of the present application, the shape of the target object in the linear segmentation result includes a line shape, and the line shape matches the tubular shape. For example, Figure 6 is a schematic diagram of a linear segmentation result provided by the embodiments of the present application. Specifically, Figure 6 the shown linear segmentation result is based on Figure 3 the first three-dimensional segmentation result shown.

[0117] In a possible implementation manner, the processing device determines the center line of the first three-dimensional segmentation result as the linear segmentation result of the target object. In another possible implementation manner, the processing device determines n tubular cross-sections of the first three-dimensional segmentation result. Determine the n centers of the n tubular cross-sections. Based on the n centers, determine the linear segmentation result of the target object.

[0118] 402. Construct a target undirected graph based on the linear segmentation result.

[0119] In this step, the nodes in the target undirected graph correspond to the voxels in the linear segmentation result. Optionally, the nodes in the target undirected graph correspond to the voxels in the linear segmentation result one by one. The length of the first edge is positively correlated with the distance between the voxels in the linear segmentation result.

[0120] In this embodiment, the processing device first determines the linear segmentation result of the target object based on the first three-dimensional segmentation result, which can reduce the number of voxels while retaining the shape of the first three-dimensional segmentation result. Then, construct a target undirected graph based on the linear segmentation result, which can reduce the number of nodes in the target undirected graph. In this way, when obtaining the second three-dimensional segmentation result based on the target undirected graph subsequently, the data processing amount can be reduced. Moreover, the connection relationship between the voxels in the linear segmentation result is simpler than the connection relationship between the voxels in the shape of the first three-dimensional segmentation result. Therefore, constructing a target undirected graph based on the linear segmentation result can reduce the complexity of the connection relationship between the nodes in the target undirected graph. In this way, when obtaining the second three-dimensional segmentation result based on the target undirected graph subsequently, the complexity and the probability of errors can be reduced, and thus the accuracy of the second three-dimensional segmentation result can be improved.

[0121] As an optional embodiment, when the processing device constructs a target undirected graph by executing step 401 and step 402, after executing step 207, the following steps are further executed: Dilate the second three-dimensional segmentation result to make the second three-dimensional segmentation result change from a line shape to a tubular shape, and obtain a third three-dimensional segmentation result.

[0122] Since the shape of the target undirected graph constructed based on the linear segmentation result is also a line shape, and the shape of the second three-dimensional segmentation result determined based on the target undirected graph is also a line shape, the processing device can obtain a third three-dimensional segmentation result with a tubular shape by dilating the second three-dimensional segmentation result.

[0123] As an alternative implementation, after the processing device dilates the second 3D segmentation result to obtain a third 3D segmentation result, the following steps are further performed: The shape of the third 3D segmentation result is corrected using the first 3D segmentation result to obtain a fourth 3D segmentation result.

[0124] Since there are differences between the shape of the third 3D segmentation result and the shape of the first 3D segmentation result, the processing device corrects the shape of the third 3D segmentation result using the first 3D segmentation result so that the shape of the third 3D segmentation result matches the shape of the first 3D segmentation result, obtaining a fourth 3D segmentation result.

[0125] In a possible implementation, considering that the purpose of the processing device is to connect the discontinuous parts in the first 3D segmentation result, and the continuous parts other than the discontinuous parts in the first 3D segmentation result may not be optimized. Therefore, the processing device can correct the shape of the part in the third 3D segmentation result corresponding to the continuous part using the shape of the continuous part other than the discontinuous part in the first 3D segmentation result. In this way, in the fourth 3D segmentation result, the shape of the part corresponding to the discontinuous part in the first 3D segmentation result is determined based on the shape of the third 3D segmentation result, and the shape of the remaining parts is determined based on the shape of the first 3D segmentation result.

[0126] Optionally, the processing device replaces the part in the third 3D segmentation result corresponding to the continuous part with the continuous part other than the discontinuous part in the first 3D segmentation result to obtain a fourth 3D segmentation result.

[0127] Optionally, the processing device replaces the discontinuous part in the first 3D segmentation result with the part in the third 3D segmentation result corresponding to the discontinuous part in the first 3D segmentation result to obtain a fourth 3D segmentation result.

[0128] As an alternative implementation, the processing device realizes "connecting the nodes in the candidate node set based on the edges in the first candidate edge set to obtain a second 3D segmentation result" by performing the following steps:

[0129] 501. Determine a third edge in the first candidate edge set whose length is greater than or equal to a length threshold.

[0130] In the embodiments of the present application, the length threshold is the basis for judging whether the length of an edge is long or short. Specifically, if the length of an edge is greater than or equal to the length threshold, it means the length of the edge is long; conversely, if the length of the edge is less than the length threshold, it means the length of the edge is short. Therefore, by performing step 501, the processing device can determine a third edge with a long length from the first candidate edge set.

[0131] 502. Remove the third edge in the first candidate edge set to obtain a second candidate edge set.

[0132] Considering that at the continuous part in the three-dimensional segmentation result of the target object, the distance between two adjacent voxels and the distance between two discontinuous voxels are usually short, and the length of the edges in the first candidate edge set is positively correlated with the distance between the two voxels corresponding to the two nodes included in the edge. Therefore, the confidence of the third edge, which is the edge between two nodes corresponding to two adjacent voxels at the continuous part, is low. The processing device can remove the third edge with low confidence in the first candidate edge set by executing step 503 to obtain the second candidate edge set.

[0133] 503. Connect the nodes in the candidate node set based on the edges in the second candidate edge set to obtain the second three-dimensional segmentation result.

[0134] In this implementation manner, after the processing device determines the third edge with a length greater than or equal to the length threshold from the first candidate edge set, it removes the third edge in the first candidate edge set to obtain the second candidate edge set. Then, based on the edges in the second candidate edge set, it connects the nodes in the candidate node set to obtain the second three-dimensional segmentation result, which can improve the accuracy of the second three-dimensional segmentation result.

[0135] Please refer to Figure 7 , Figure 7 which is a schematic flowchart of another method for processing the three-dimensional segmentation result provided by the embodiment of the present application. In Figure 7 the shown method for processing the three-dimensional segmentation result, the target object is a blood vessel. Optionally, the blood vessel is a blood vessel of the kidney, and the first three-dimensional segmentation result is obtained by segmenting the blood vessels in the three-dimensional CT image including the kidney. As Figure 7 shown, after obtaining the first three-dimensional segmentation result, the linear segmentation result of the blood vessel can be determined based on the first three-dimensional segmentation result. Then, based on the coordinates of the voxels in the first three-dimensional segmentation result in the pixel coordinate system of the three-dimensional image, the coordinates of the voxels in the linear segmentation result in the pixel coordinate system are determined, and based on the coordinates of the voxels in the linear segmentation result in the pixel coordinate system, the distance between any two voxels in the linear segmentation result is determined to obtain the distance matrix. Based on the distance matrix and the linear segmentation result, a target undirected graph can be constructed. Then, based on the target undirected graph, the first candidate edge set and the candidate node set can be obtained (the specific implementation process can refer to step 203, step 204, and step 205). Among them, Figure 7 the shown first undirected graph is an undirected graph obtained by connecting the nodes in the candidate node set based on the edges in the first candidate edge set when the nodes in the candidate node set are the same as the nodes in the target undirected graph. In Figure 7Among them, the three-dimensional space where the first undirected graph is located is the three-dimensional space represented by the world coordinate system. Optionally, the processing device optimizes the target undirected graph based on the minimum spanning tree (MST) to obtain the first undirected graph. Then, a second candidate edge set can be obtained based on the first candidate edge set (for the specific implementation process, refer to step 501 and step 502). Among them, Figure 7 The second undirected graph shown is an undirected graph obtained by connecting the nodes in the candidate node set based on the edges in the second candidate edge set. In Figure 7 Among them, the three-dimensional space where the second undirected graph is located is the three-dimensional space represented by the world coordinate system. Then, based on the second undirected graph, a third three-dimensional segmentation result can be obtained. Specifically, first, obtain the first coordinates of the nodes in the second undirected graph in the world coordinate system, the fifth coordinates of the edges of the second undirected graph in the world coordinate system, and the target conversion relationship. Then, use the target conversion relationship to convert the first coordinates into the third coordinates in the pixel coordinate system, and use the target conversion relationship to convert the fifth coordinates into the sixth coordinates in the pixel coordinate system. Based on the fifth coordinates and the sixth coordinates, obtain the second three-dimensional segmentation result. Then, perform dilation on the second three-dimensional segmentation result to obtain the third three-dimensional segmentation result. Optionally, the processing device obtains the third three-dimensional segmentation result by performing dilation and denoising on the second three-dimensional segmentation result. Optionally, the denoising is implemented through multi-scale smoothing processing. Optionally, the multi-scale smoothing processing is implemented by filtering based on a Gaussian pyramid or filtering based on a Laplace pyramid. After obtaining the third three-dimensional segmentation result, the processing device corrects the shape of the third three-dimensional segmentation result using the first three-dimensional segmentation result to obtain the fourth three-dimensional segmentation result.

[0136] Please refer to Figure 8 , Figure 8 which is a schematic flowchart of another method for processing a three-dimensional segmentation result provided by an embodiment of the present application. In Figure 8 In the method for processing the three-dimensional segmentation result shown, the target object is a blood vessel, and the length threshold is 8 millimeters. As Figure 8 shown, after inputting the first three-dimensional segmentation result and the length threshold into the processing device for the three-dimensional segmentation result, the processing device for the three-dimensional segmentation result processes the first three-dimensional segmentation result based on the method for processing the three-dimensional segmentation result described above and outputs the fourth three-dimensional segmentation result.

[0137] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.

[0138] If the technical solution of this application involves personal information, before the product applying the technical solution of this application processes personal information, it has clearly informed the personal information processing rules and obtained the individual's independent consent. If the technical solution of this application involves sensitive personal information, before the product applying the technical solution of this application processes sensitive personal information, it has obtained the individual's separate consent and at the same time meets the requirements of "express consent". For example, at a personal information collection device such as a camera, a clear and prominent sign is set to inform that the personal information collection range has been entered and personal information will be collected. If an individual voluntarily enters the collection range, it is regarded as consenting to the collection of their personal information; or on the device for personal information processing, when the personal information processing rules are informed by obvious signs / information, personal authorization is obtained through pop-up messages or by asking the individual to upload their personal information by themselves, etc.; among them, personal information processing may include information such as personal information processors, personal information processing purposes, processing methods, and types of personal information processed.

[0139] The method of the embodiment of this application is described in detail above, and the device of the embodiment of this application is provided below.

[0140] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of a processing device for three-dimensional segmentation results provided by an embodiment of this application. The processing device 1 for three-dimensional segmentation results is used to connect the discontinuities in the first three-dimensional segmentation result of the target object to obtain the second three-dimensional segmentation result of the target object. The processing device 1 for three-dimensional segmentation results includes: an acquisition unit 11, a construction unit 12, an addition unit 13, a determination unit 14, and a processing unit 15. Specifically:

[0141] The acquisition unit 11 is used to acquire the first three-dimensional segmentation result;

[0142] The construction unit 12 is used to construct a target undirected graph based on the first three-dimensional segmentation result. The nodes in the target undirected graph are determined based on the voxels in the first three-dimensional segmentation result. There is a first edge between any two nodes in the target undirected graph, and the length of the first edge is determined based on the distance between the voxels in the first three-dimensional segmentation result;

[0143] The addition unit 13 is used to select any node from the target undirected graph and add it to the candidate node set;

[0144] The determination unit 14 is used to determine the edges containing the nodes in the candidate node set from the first edges as the second edges;

[0145] The addition unit 13 is further used to add the shortest of the second edges to the first candidate edge set, and the edges in the first candidate edge set after adding the shortest of the second edges do not form a closed figure;

[0146] The adding unit 13 is further configured to add the nodes included in the shortest second side to the candidate node set;

[0147] The processing unit 15 is configured to, when the nodes in the candidate node set are the same as the nodes in the target undirected graph, connect the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result.

[0148] Combined with any embodiment of the present application, the processing unit 15 is further configured to:

[0149] Obtain a first coordinate of the nodes in the candidate node set in the world coordinate system, a second coordinate of the edges in the first candidate edge set in the world coordinate system, and a target conversion relationship, where the target conversion relationship is used to convert the coordinates in the world coordinate system into the coordinates in the pixel coordinate system of the three-dimensional image;

[0150] Use the target conversion relationship to convert the first coordinate into a third coordinate in the pixel coordinate system;

[0151] Use the target conversion relationship to convert the second coordinate into a fourth coordinate in the pixel coordinate system;

[0152] Based on the third coordinate and the fourth coordinate, obtain the second three-dimensional segmentation result, where the coordinates of the voxels in the second three-dimensional segmentation result in the pixel coordinate system include the third coordinate and the fourth coordinate.

[0153] Combined with any embodiment of the present application, the shape of the target object in the first three-dimensional segmentation result includes a tube shape, and the constructing unit 12 is further configured to:

[0154] Based on the first three-dimensional segmentation result, determine a linear segmentation result of the target object, where the shape of the target object in the linear segmentation result includes a linear shape, and the linear shape matches the tube shape;

[0155] Construct the target undirected graph based on the linear segmentation result, where the nodes in the target undirected graph correspond to the voxels in the linear segmentation result, and the length of the first edge is positively correlated with the distance between the voxels in the linear segmentation result.

[0156] Combined with any embodiment of the present application, the processing unit 15 is further configured to:

[0157] Dilate the second three-dimensional segmentation result so that the second three-dimensional segmentation result changes from a linear shape to a tube shape to obtain a third three-dimensional segmentation result.

[0158] In combination with any embodiment of the present application, the processing unit 15 is further configured to:

[0159] Use the first three-dimensional segmentation result to correct the shape of the third three-dimensional segmentation result to obtain a fourth three-dimensional segmentation result.

[0160] In combination with any embodiment of the present application, the processing unit 15 is further configured to:

[0161] Determine a third edge in the first candidate edge set whose length is greater than or equal to a length threshold;

[0162] Remove the third edge in the first candidate edge set to obtain a second candidate edge set;

[0163] Connect the nodes in the candidate node set based on the edges in the second candidate edge set to obtain the second three-dimensional segmentation result.

[0164] In the implementation of the present application, after obtaining the first three-dimensional segmentation result, the processing device constructs a target undirected graph based on the first three-dimensional segmentation result. The nodes in the target undirected graph are determined based on the voxels in the first three-dimensional segmentation result. There is a first edge between any two nodes in the target undirected graph, and the length of the first edge is determined based on the distance between the voxels in the first three-dimensional segmentation result. Select any node from the target undirected graph and add it to the candidate node set. Determine the edges that contain the nodes in the candidate node set from the first edges as the second edges. Add the shortest second edge to the first candidate edge set, where the edges in the first candidate edge set after adding the shortest second edge do not form a closed figure. In this way, the edges in the first candidate edge set can be used to connect the discontinuous parts in the first three-dimensional segmentation result. Add the nodes included in the shortest second edge to the candidate node set, and when the nodes in the candidate node set are the same as the nodes in the target undirected graph, connect the nodes in the candidate node set based on the edges in the first candidate edge set, and the discontinuous parts in the first three-dimensional segmentation result can be connected to obtain the second three-dimensional segmentation result.

[0165] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the methods described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0166] Figure 10Schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. The electronic device 2 includes a processor 21 and a memory 22. Optionally, the electronic device 2 further includes an input device 23 and an output device 24. The processor 21, the memory 22, the input device 23, and the output device 24 are coupled through a connector, which includes various interfaces, transmission lines, buses, etc., and the embodiments of the present application do not limit this. It should be understood that in various embodiments of the present application, coupling means being interconnected in a specific manner, including being directly connected or indirectly connected through other devices, for example, being connected through various interfaces, transmission lines, buses, etc.

[0167] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a single GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group composed of multiple GPUs, and multiple processors are coupled to each other through one or more buses. Optionally, the processor may also be other types of processors, etc., and the embodiments of the present application do not limit this.

[0168] The memory 22 can be used to store computer program instructions and various computer program codes including the program codes for executing the solution of the present application. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM), and this memory is used for relevant instructions and data.

[0169] The input device 23 is used to input data and / or signals, and the output device 24 is used to output data and / or signals. The input device 23 and the output device 24 may be independent devices or an integrated device.

[0170] It can be understood that in the embodiments of the present application, the memory 22 can not only be used to store relevant instructions but also to store relevant data. For example, the memory 22 can be used to store the first three-dimensional segmentation result obtained through the input device 23, or the memory 22 can also be used to store the second three-dimensional segmentation result obtained through the processor 21, etc. The embodiments of the present application do not limit the specific data stored in this memory.

[0171] It can be understood that Figure 10Only a simplified design of an electronic device is shown. In practical applications, the electronic device may also separately include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all electronic devices that can implement the embodiments of the present application are within the protection scope of the present application.

[0172] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0173] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein. Those skilled in the art can also clearly understand that each embodiment of the present application has different emphases. For the convenience and conciseness of description, the same or similar parts may not be elaborated in different embodiments. Therefore, the parts not described or not described in detail in a certain embodiment can refer to the descriptions in other embodiments.

[0174] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0175] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0176] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.

[0177] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital versatile disc (DVD)), or a semiconductor medium (e.g., solid state disk (SSD)), etc.

[0178] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware with a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The aforementioned storage medium includes various media that can store program codes, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

Claims

1. A method for processing three-dimensional segmentation results, characterized in that: The method is used to connect discontinuities in a first three-dimensional segmentation result of a target object to obtain a second three-dimensional segmentation result of the target object, and the method comprises: Obtaining the first three-dimensional segmentation result; constructing a target undirected graph based on the first three-dimensional segmentation result, wherein nodes in the target undirected graph are determined based on voxels in the first three-dimensional segmentation result, a first edge exists between any two nodes in the target undirected graph, and a length of the first edge is determined based on a distance between voxels in the first three-dimensional segmentation result; Selecting a node from the target undirected graph and adding it to the candidate node set; Determine, from the first edges, an edge including a node in the candidate node set as a second edge; Adding the shortest second edge to the first candidate edge set, wherein the edges in the first candidate edge set after adding the shortest second edge do not form a closed graph; Adding the nodes included in the shortest second edge to the candidate node set; When the nodes in the candidate node set are the same as the nodes in the target undirected graph, the nodes in the candidate node set are connected based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result.

2. The method according to claim 1, characterized in that The step of connecting nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result includes: Obtaining first coordinates of nodes in the candidate node set in a world coordinate system, second coordinates of edges in the first candidate edge set in the world coordinate system, and a target transformation relationship, wherein the target transformation relationship is used to transform the coordinates in the world coordinate system into coordinates in a pixel coordinate system of a three-dimensional image; Using the target conversion relationship, convert the first coordinate into a third coordinate in the pixel coordinate system; Using the target conversion relationship, convert the second coordinate into a fourth coordinate in the pixel coordinate system; The second three-dimensional segmentation result is obtained based on the third coordinate and the fourth coordinate, and the coordinates of the voxels in the second three-dimensional segmentation result in the pixel coordinate system include the third coordinate and the fourth coordinate.

3. The method according to claim 1, characterized in that The shape of the target object in the first three-dimensional segmentation result includes a tubular shape, and constructing a target undirected graph based on the first three-dimensional segmentation result includes: Based on the first three-dimensional segmentation result, determining a linear segmentation result of the target object, wherein the shape of the target object in the linear segmentation result includes a linear shape, and the shape of the linear shape matches the shape of the tube; The target undirected graph is constructed based on the linear segmentation result, the nodes in the target undirected graph correspond to the voxels in the linear segmentation result, and the length of the first side is positively correlated with the distance between the voxels in the linear segmentation result.

4. The method according to claim 3, characterized in that After the nodes in the candidate node set are connected based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result, the method further includes: The second three-dimensional segmentation result is expanded so that the second three-dimensional segmentation result changes from a linear shape to a tubular shape, thereby obtaining a third three-dimensional segmentation result.

5. The method according to claim 4, characterized in that After dilating the second three-dimensional segmentation result to obtain a third three-dimensional segmentation result, the method further includes: The shape of the third three-dimensional segmentation result is corrected using the first three-dimensional segmentation result to obtain a fourth three-dimensional segmentation result.

6. The method according to claim 1, characterized in that The step of connecting nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result includes: Determine a third edge whose length is greater than or equal to a length threshold from the first candidate edge set; Removing the third edge from the first candidate edge set to obtain a second candidate edge set; Based on the edges in the second candidate edge set, the nodes in the candidate node set are connected to obtain the second three-dimensional segmentation result.

7. A three-dimensional segmentation result processing device, characterized in that: The three-dimensional segmentation result processing device is used to connect the discontinuities in the first three-dimensional segmentation result of the target object to obtain a second three-dimensional segmentation result of the target object, and the three-dimensional segmentation result processing device includes: An acquisition unit, configured to acquire the first three-dimensional segmentation result; a construction unit, configured to construct a target undirected graph based on the first three-dimensional segmentation result, wherein nodes in the target undirected graph are determined based on voxels in the first three-dimensional segmentation result, a first edge exists between any two nodes in the target undirected graph, and a length of the first edge is determined based on a distance between voxels in the first three-dimensional segmentation result; An adding unit, used for selecting a node from the target undirected graph and adding it to the candidate node set; a determining unit, configured to determine, from the first edges, an edge including a node in the candidate node set as a second edge; The adding unit is further configured to add the shortest second edge to the first candidate edge set, and the edges in the first candidate edge set after adding the shortest second edge do not form a closed graph; The adding unit is further used to add the nodes included in the shortest second edge to the candidate node set; A processing unit is used to connect the nodes in the candidate node set based on the edges in the first candidate edge set to obtain the second three-dimensional segmentation result when the nodes in the candidate node set are the same as the nodes in the target undirected graph.

8. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is enabled to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product comprises a computer program; when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Computer-implemented method for efficient image segmentation using automated saddle-point detection

    WO2008002560A2

  • Image processing method and apparatus, and electronic device and computer-readable storage medium

    WO2023029969A1