Three-dimensional segmentation result processing method and device, electronic equipment, computer readable storage medium and computer program product
By constructing a target undirected graph and connecting nodes based on the shortest edge, the problem of connection at the interruption of the three-dimensional segmentation result is solved, and a continuous second and three-dimensional segmentation result is achieved.
Patent Information
- Application Number
- CN202510220436.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-27
AI Technical Summary
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.
By constructing a target undirected graph based on the first three-dimensional segmentation result, nodes in the candidate node set are selected, and these nodes are connected based on the shortest edge to form the second three-dimensional segmentation result.
The interruptions in the first three-dimensional segmentation result were successfully connected to obtain a continuous second three-dimensional segmentation result, which improved the integrity of the three-dimensional segmentation result.
Smart Images

Figure CN119722715A_ABST
Abstract
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 three-dimensional segmentation results, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] By segmenting the target object in the three-dimensional image, a three-dimensional segmentation result of the target object can be obtained, but 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 three-dimensional segmentation results, an electronic device, a computer-readable storage medium, and a computer program product, so as 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.
[0004] In a first aspect, a method for processing a three-dimensional segmentation result is provided, the method being 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, the method comprising: 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.
[0005] In combination with any implementation manner of the present application, the step of connecting nodes in the candidate node set based on 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.
[0006] In combination with any embodiment of the present application, 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.
[0007] In combination with any implementation manner of the present application, 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.
[0008] In combination with any implementation manner of the present application, 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.
[0009] In combination with any implementation manner of the present application, the step of connecting nodes in the candidate node set based on 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.
[0010] In a second aspect, a three-dimensional segmentation result processing device is provided, wherein the three-dimensional segmentation result processing device 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 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.
[0011] In combination with any embodiment of the present application, the processing unit is further used for: 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.
[0012] In combination with any embodiment of the present application, the shape of the target object in the first three-dimensional segmentation result includes a tubular shape, and the construction unit is further used to: 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.
[0013] In combination with any embodiment of the present application, the processing unit is further used for: 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.
[0014] In combination with any embodiment of the present application, the processing unit is further used for: 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.
[0015] In combination with any embodiment of the present application, the processing unit is further used for: 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.
[0016] In a third aspect, an electronic device is provided, comprising: a processor and a memory, the memory being used to store computer program code, the computer program code comprising computer instructions, and when the processor executes the computer instructions, the electronic device executes the method as described in the first aspect above and any possible implementation thereof.
[0017] In a fourth aspect, another electronic device is provided, comprising: a processor, a sending device, an input device, an output device and a memory, wherein 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 as described in the first aspect above and any possible implementation method thereof.
[0018] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to execute the method as described in the first aspect and any possible implementation thereof.
[0019] In a sixth aspect, a computer program product is provided, which includes a computer program or instructions, and when the computer program or instructions are run on a computer, the computer is enabled to execute the method of the above-mentioned first aspect and any possible implementation thereof.
[0020] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0021] 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, 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. Select any one node from the target undirected graph and add it to the candidate node set. From the first edge, the edge containing the node in the candidate node set is determined to be the second edge. The shortest second edge is added 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. 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. The nodes contained in the shortest second edge are added 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, the nodes in the candidate node set are connected based on the edges in the first candidate edge set, so that the discontinuities in the first three-dimensional segmentation result can be connected to obtain the second three-dimensional segmentation result. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0023] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.
[0024] Figure 1 A schematic diagram of a first three-dimensional segmentation result provided in an embodiment of the present application; Figure 2 A schematic diagram of a process flow of a method for processing three-dimensional segmentation results provided in an embodiment of the present application; Figure 3 A schematic diagram of another first three-dimensional segmentation result provided in an embodiment of the present application; Figure 4 A schematic diagram of a closed figure provided in an embodiment of the present application; Figure 5 A schematic diagram of a non-closed figure provided in an embodiment of the present application; Figure 6 A schematic diagram of a linear segmentation result provided in an embodiment of the present application; Figure 7 A flowchart of another method for processing three-dimensional segmentation results provided in an embodiment of the present application; Figure 8 A flowchart of another method for processing three-dimensional segmentation results provided in an embodiment of the present application; Fig. 9 A schematic diagram of the structure of a three-dimensional segmentation result processing device provided in an embodiment of the present application; Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. 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 includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0027] Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. It should be understood that in this application, "at least one (item)" means one or more, "multiple" means two or more, and "at least two (items)" means two or three and more.
[0028] 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 is a discontinuity in the first three-dimensional segmentation result, the blood vessel is discontinuous in the first three-dimensional segmentation result. Please refer to Figure 1 , Figure 1 A schematic diagram of a first three-dimensional segmentation result provided in an embodiment of the present application. Figure 1 In the example, 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, so as 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.
[0029] The execution subject of the embodiment of the present application is a processing device for the three-dimensional segmentation result (hereinafter referred to as the processing device), wherein the processing device can be any electronic device that can execute the technical solution disclosed in the embodiment of the method of the present application. Optionally, the processing device can be one of the following: a mobile phone, a computer, a tablet computer, and a wearable smart device.
[0030] It should be understood that the method embodiment of the present application can also be implemented by a processor executing a computer program code. The following describes the embodiment of the present application in conjunction with the drawings in the embodiment of the present application. Figure 2, Figure 2 A flowchart of a method for processing three-dimensional segmentation results provided in an embodiment of the present application.
[0031] 201. Obtain a first three-dimensional segmentation result.
[0032] In the embodiment of the present application, the first three-dimensional segmentation result is a three-dimensional segmentation result of the target object. The first three-dimensional segmentation result can be obtained by segmenting a three-dimensional image containing the target object. 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 follows: Figure 1 shown.
[0033] 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 vessels shown is not closed.
[0034] In an implementation of obtaining the first three-dimensional segmentation result, the processing device receives the first three-dimensional segmentation result input by the user through an input component. The input component includes: a keyboard, a mouse, a touch screen, a touch pad, and an audio input device.
[0035] In another implementation of obtaining the first three-dimensional segmentation result, the processing device receives the first three-dimensional segmentation result sent by the terminal. Optionally, the terminal can be any one of the following: a mobile phone, a computer, a tablet computer, a server, and a wearable device.
[0036] 202. 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.
[0037] In an embodiment of the present application, an undirected graph is a data structure consisting of a plurality of nodes and first edges connecting the nodes, wherein a first edge exists 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 voxels in the first three-dimensional segmentation result, and optionally, the nodes in the target undirected graph correspond one-to-one to the voxels in the first three-dimensional segmentation result.
[0038] For the convenience of representation, the voxels in the first three-dimensional segmentation result are divided into discontinuous voxels, endpoint continuous voxels and non-endpoint continuous voxels. The nodes corresponding to the discontinuous voxels in the target undirected graph are called discontinuous nodes, the nodes corresponding to the endpoint continuous voxels in the target undirected graph are called endpoint continuous nodes, and the nodes corresponding to the non-endpoint continuous voxels in the target undirected graph are called non-endpoint continuous nodes, where discontinuous voxels are voxels at discontinuities, endpoint continuous voxels are continuous voxels at endpoints, non-endpoint continuous voxels are continuous voxels at non-endpoints, and continuous voxels include voxels other than voxels at discontinuities. For example, Figure 3 This is a schematic diagram of another first three-dimensional segmentation result provided in an embodiment of the present application. Figure 3 As shown, there is a discontinuity in the first three-dimensional segmentation result. Specifically, there is a discontinuity between voxel 1 and voxel 2. Except for the discontinuity between voxel 1 and voxel 2, all other parts are continuous. Therefore, voxel 1 and voxel 2 are discontinuous voxels, and all other voxels except voxel 1 and voxel 2 are continuous voxels. In 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 all non-endpoint continuous voxels. Correspondingly, in the target undirected graph, the node corresponding to voxel 1 and the node corresponding to voxel 2 are all discontinuous nodes, the node corresponding to voxel 3, the node corresponding to voxel 4, and the node corresponding to voxel 5 are all endpoint continuous nodes, and the node corresponding to voxel 6 and the node corresponding to voxel 7 are all non-endpoint continuous nodes.
[0039] 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 unconnected 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 nodes among node 1, node 2, node 3, node 4, node 5, node 6, and node 7.
[0040] Optionally, the length of the first side is positively correlated with the distance between two voxels corresponding to two nodes included in the first three-dimensional segmentation result. Figure 3 In the first three-dimensional segmentation result, the larger the distance between voxel 1 and voxel 2, the longer the length of the first edge between node 1 and node 2.
[0041] 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.
[0042] 203. Select any node from the target undirected graph and add it to the candidate node set.
[0043] In step 203, the processing device may select any 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 the processing device may make node 1 a node in the candidate node set by adding node 1 to the candidate node set. Optionally, before the processing device executes step 203, there is no node in the candidate node set.
[0044] 204. Determine, from the first edge, an edge that includes a node in the candidate node set as the second edge.
[0045] For example, 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 edge containing node 1 includes the first edge between node 1 and node 2, and the first edge between node 1 and node 3. Correspondingly, the second edge includes the first edge between node 1 and node 2, and the first edge between node 1 and node 3.
[0046] 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 graph.
[0047] In step 205, when the edges in the first candidate edge set meet the condition of not forming a closed graph, the processing device adds the second edge with the shortest length to the first candidate edge set. Accordingly, 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 graph. Figure 4 A schematic diagram of a closed figure provided in an embodiment of the present application, such as Figure 4 As 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 graph. For another example, Figure 5 A schematic diagram of a non-enclosed figure provided in an embodiment of the present application, such as Figure 5 As 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 graph, that is, Figure 5 The figure shown is a non-closed figure.
[0048] The second edge includes a node in the candidate node set and a node in the target undirected graph other than the candidate node set, so the node other than the candidate node set included in the shortest second edge is the node in the target undirected graph closest to the node in the candidate node set. In other words, the shortest second edge in step 205 is an edge including a node in the candidate node set and a node closest to the node in the candidate node set.
[0049] 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 a node in the candidate node set is a discontinuous node, then the node closest to the discontinuous node in the target undirected graph except the candidate node set can be a continuous node or a discontinuous node corresponding to the continuous voxel, wherein the continuous node includes an endpoint continuous node and a non-endpoint continuous node. In the case where the node closest to the discontinuous node is a continuous node corresponding to the continuous voxel, the shortest second edge added to the first candidate edge set is the edge between the discontinuous node and the continuous node, and the shortest second edge can connect the discontinuous node to the continuous node. In the case where 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, and the shortest second edge can connect the two discontinuous nodes. Correspondingly, the discontinuities in the first three-dimensional segmentation result can be connected by the shortest second edge.
[0050] In the first three-dimensional segmentation result, the voxel closest to the endpoint continuous voxel may be a non-endpoint continuous voxel connected to the endpoint continuous voxel or a voxel not connected to the endpoint continuous voxel. Therefore, if the node in the candidate node set is an endpoint continuous node, then the node closest to the endpoint continuous node among the nodes other than the candidate node set in the target undirected graph may be a non-endpoint continuous node corresponding to the non-endpoint continuous voxel connected to the endpoint continuous voxel or a node corresponding to the voxel not connected to the endpoint continuous voxel. In the case where the node closest to the endpoint continuous node is a non-endpoint continuous node corresponding to the non-endpoint continuous voxel connected to the endpoint continuous voxel, the shortest second edge added to the first candidate edge set is an edge between the endpoint continuous node and the non-endpoint continuous node corresponding to the non-endpoint continuous voxel connected to the endpoint continuous voxel. At this time, the shortest second edge can connect the endpoint continuous node and the non-endpoint continuous node corresponding to the non-endpoint continuous voxel connected to the endpoint continuous voxel. In the case where the node closest to the endpoint continuous node is the node corresponding to the voxel that is not connected to the endpoint continuous voxel, the shortest second edge is the edge between the endpoint continuous node and the node corresponding to the voxel that is not connected to the endpoint continuous voxel. In this case, 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 graph. For example, the node in the candidate node set is Figure 3The endpoint continuous node corresponding to voxel 3 in the target undirected graph, the node corresponding to voxel 6 is the node closest to the endpoint continuous node among the nodes other than the candidate nodes in the target undirected graph. 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 graph. Therefore, in the case where the node closest to the discontinuous node is the node corresponding to the voxel that is not connected to the endpoint continuous voxel, the processing device does not add the shortest second edge to the first candidate edge set.
[0051] In the first three-dimensional segmentation result, the voxel closest to the non-endpoint continuous voxel is the voxel connected to the continuous voxel, which can be any one of the discontinuous voxel, the endpoint continuous voxel, and the non-endpoint continuous voxel. Therefore, if the node in the candidate node set is a non-endpoint continuous node, then the node closest to the non-endpoint continuous node among the nodes other than the candidate node set in the target undirected graph is the node corresponding to the voxel connected to the non-endpoint voxel. At this time, the shortest second edge added to the first candidate edge set is the edge between the non-endpoint continuous node and the node corresponding to the voxel connected to the non-endpoint voxel. The shortest second edge can connect the non-endpoint continuous node and the node corresponding to the voxel connected to the non-endpoint voxel.
[0052] 206. Add the nodes included in the shortest second edge to the candidate node set.
[0053] In step 205, the shortest second edge includes nodes other than the nodes in the candidate node set. The processing device may add the nodes other than the nodes in the candidate node set included in the shortest second edge to the candidate node set by executing step 206. For example, the target undirected graph includes node 1, node 2, and node 3, the node in the candidate node set is 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.
[0054] 207. 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 a second three-dimensional segmentation result.
[0055] As described in step 205, two discontinuous nodes can be connected, a discontinuous node can be connected to a continuous node, an endpoint continuous node can be connected to a non-endpoint continuous node corresponding to a non-endpoint continuous voxel connected to an endpoint continuous voxel, and a non-endpoint continuous node can be connected to a node corresponding to a voxel connected to a non-endpoint 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 discontinuities in the first three-dimensional segmentation result can be connected. For example, based on the edges in the first candidate edge set, Figure 3 The discontinuity between voxel 1 and voxel 2 in is connected.
[0056] Since the continuous nodes are nodes corresponding to the continuous voxels, the endpoint nodes are nodes corresponding to the endpoint continuous voxels, and the non-endpoint nodes are nodes corresponding to the non-endpoint continuous voxels, by connecting the discontinuous nodes to the continuous nodes, the nodes corresponding to the discontinuous voxels can be connected to the nodes corresponding to the continuous nodes. At this time, the discontinuous voxels in the first three-dimensional segmentation result can be connected to the continuous voxels based on the edges in the first candidate edge set. Similarly, in the case where the edges in the first candidate edge set can connect the endpoint continuous nodes and the non-endpoint continuous nodes corresponding to the non-endpoint continuous voxels connected to the endpoint continuous voxels, the endpoint continuous voxels in the first three-dimensional segmentation result can be connected to the non-endpoint continuous voxels connected to the endpoint continuous voxels based on the edges in the first candidate edge set. The edges in the first candidate edge set can connect the non-endpoint continuous nodes and the nodes corresponding to the voxels connected to the non-endpoint voxels. Based on the edges in the first candidate edge set, the non-endpoint continuous voxels in the first three-dimensional segmentation result can be connected to the voxels connected to the non-endpoint continuous voxels.
[0057] The first three-dimensional segmentation result can be restored by connecting the discontinuous voxels in the first three-dimensional segmentation result with the continuous voxels, connecting the endpoint continuous voxels in the first three-dimensional segmentation result with the non-endpoint continuous voxels connected to the endpoint continuous voxels, and connecting the non-endpoint continuous voxels in the first three-dimensional segmentation result with the voxels connected to the non-endpoint continuous voxels. For example, based on the first candidate edge set, the discontinuous voxels in the first three-dimensional segmentation result are connected with the continuous voxels, the endpoint continuous voxels in the first three-dimensional segmentation result are connected with the non-endpoint continuous voxels connected to the endpoint continuous voxels, and the non-endpoint continuous voxels in the first three-dimensional segmentation result are connected to the voxels connected to the non-endpoint continuous voxels, so as to restore the first three-dimensional segmentation result. Figure 3The first three-dimensional segmentation result shown. At the same time, by connecting the discontinuities in the first three-dimensional segmentation result, the discontinuities in the first three-dimensional segmentation result can be connected on the basis of the first three-dimensional segmentation result. The nodes in the candidate node set are the same as the nodes in the target undirected graph, indicating that the nodes in the target undirected graph have been added to the candidate node set. Therefore, the processing device can connect the discontinuities in the first three-dimensional segmentation result by executing step 207 to obtain a second three-dimensional segmentation result.
[0058] Optionally, when the nodes in the candidate node set are different from the nodes in the target undirected graph, the processing device iteratively executes steps 204, 205, and 206 until the nodes in the candidate node set are the same as the nodes in the target undirected graph, and then connects 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.
[0059] 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, 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. Select any one node from the target undirected graph and add it to the candidate node set. From the first edge, the edge containing the node in the candidate node set is determined to be the second edge. The shortest second edge is added 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. 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. The nodes contained in the shortest second edge are added 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, the nodes in the candidate node set are connected based on the edges in the first candidate edge set, so that the discontinuities in the first three-dimensional segmentation result can be connected to obtain the second three-dimensional segmentation result.
[0060] As an optional implementation manner, the processing device performs the following steps during the process of executing step 207: 301. Obtain 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.
[0061] In the implementation of this application, the first coordinate is used to represent the position of the node in the candidate node set in the world coordinate system. In one possible implementation, the first three-dimensional segmentation result is obtained by segmenting the target object in the three-dimensional image, and the first coordinate can be obtained 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.
[0062] In the implementation of the present application, the second coordinate is used to represent the position of the 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 one possible implementation, 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 edge in the first candidate edge set in the world coordinate system based on the first coordinates of the nodes in the candidate node set.
[0063] 302. Use the target transformation relationship to transform the first coordinate into a third coordinate in the pixel coordinate system.
[0064] 303. Use the target transformation relationship to transform the second coordinate into a fourth coordinate in the pixel coordinate system.
[0065] 304. Obtain a second three-dimensional segmentation result based on the third coordinate and the fourth coordinate, wherein 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.
[0066] In step 304 , the second three-dimensional segmentation result includes voxels at positions of the third coordinates and voxels on the edge at positions of the fourth coordinates.
[0067] In this embodiment, after acquiring the first coordinate, the second coordinate and the target conversion relationship, the processing device converts the first coordinate into a third coordinate in the pixel coordinate system using the target conversion relationship, and converts the second coordinate into the third coordinate in the pixel coordinate system using the target conversion relationship. In this way, based on the third coordinate and the fourth coordinate, a 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.
[0068] As an optional implementation, 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 a tubular shape. In this case, the processing device performs the following steps during the execution of step 202: 401. Determine a linear segmentation result of the target object based on the first three-dimensional segmentation result.
[0069] In the embodiment of the present application, the shape of the target object in the linear segmentation result includes a linear shape, and the linear shape matches the tubular shape. Figure 6 A schematic diagram of a linear segmentation result provided in an embodiment of the present application, specifically, Figure 6 The linear segmentation results shown are based on Figure 3 The first three-dimensional segmentation result is shown.
[0070] In one possible implementation, the processing device determines a center line of the first three-dimensional segmentation result as a linear segmentation result of the target object. In another possible implementation, the processing device determines n tubular cross sections of the first three-dimensional segmentation result. Determine n centers of the n tubular cross sections. Determine a linear segmentation result of the target object based on the n centers.
[0071] 402. Construct a target undirected graph based on the linear segmentation results.
[0072] 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.
[0073] 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, a target undirected graph is constructed based on the linear segmentation result, which can reduce the number of nodes in the target undirected graph. In this way, the second three-dimensional segmentation result is obtained based on the target undirected graph, which can reduce the amount of data processing. 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, the target undirected graph is constructed based on the linear segmentation result, which can reduce the complexity of the connection relationship between the nodes in the target undirected graph. In this way, the second three-dimensional segmentation result is obtained based on the target undirected graph, which can reduce the complexity and the probability of error, and thus improve the accuracy of the second three-dimensional segmentation result.
[0074] As an optional implementation, when the processing device constructs the target undirected graph by executing steps 401 and 402, after executing step 207, it further executes the following steps: expanding the second three-dimensional segmentation result so that the second three-dimensional segmentation result changes from a linear shape to a tubular shape, and obtaining a third three-dimensional segmentation result.
[0075] Since the shape of the target undirected graph constructed based on the linear segmentation result is also linear, the shape of the second three-dimensional segmentation result determined based on the target undirected graph is also linear, so the processing device can obtain a third three-dimensional segmentation result with a tubular shape by expanding the second three-dimensional segmentation result.
[0076] As an optional implementation, after the processing device dilates the second 3D segmentation result to obtain a third 3D segmentation result, it further performs the following steps: using the first 3D segmentation result to correct the shape of the third 3D segmentation result to obtain a fourth 3D segmentation result.
[0077] Since there is a difference between the shape of the third 3D segmentation result and the shape of the first 3D segmentation result, the processing device uses the first 3D segmentation result to correct the shape of the third 3D segmentation result so that the shape of the third 3D segmentation result matches the shape of the first 3D segmentation result to obtain a fourth 3D segmentation result.
[0078] In a possible implementation, considering that the purpose of the processing device is to connect the discontinuities in the first three-dimensional segmentation result, and the continuous parts other than the discontinuities in the first three-dimensional segmentation result may not be optimized. Therefore, the processing device may use the shape of the continuous parts other than the discontinuities in the first three-dimensional segmentation result to correct the shape of the part corresponding to the continuous part in the third three-dimensional segmentation result. In this way, in the fourth three-dimensional segmentation result, the shape of the part corresponding to the discontinuity in the first three-dimensional segmentation result is determined based on the shape of the third three-dimensional segmentation result, and the shape of the remaining part is determined based on the shape of the first three-dimensional segmentation result.
[0079] Optionally, the processing device uses the continuous part of the first three-dimensional segmentation result except the discontinuous part to replace the part of the third three-dimensional segmentation result corresponding to the continuous part, so as to obtain a fourth three-dimensional segmentation result.
[0080] Optionally, the processing device replaces the discontinuity in the first three-dimensional segmentation result with a portion of the third three-dimensional segmentation result corresponding to the discontinuity in the first three-dimensional segmentation result to obtain a fourth three-dimensional segmentation result.
[0081] As an optional implementation, the processing device implements “connecting nodes in the candidate node set based on edges in the first candidate edge set to obtain a second three-dimensional segmentation result” by executing the following steps: 501. Determine a third edge whose length is greater than or equal to a length threshold from the first candidate edge set.
[0082] In the embodiment of the present application, the length threshold is a basis for determining 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 indicates that the length of the edge is long. On the contrary, if the length of an edge is less than the length threshold, it indicates that the length of the edge is short. Therefore, by executing step 501, the processing device can determine a third edge with a long length from the first candidate edge set.
[0083] 502. Remove the third edge in the first candidate edge set to obtain a second candidate edge set.
[0084] Considering that in the continuous part of 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 edge in the first candidate edge set is positively correlated with the distance between two voxels corresponding to two nodes included in the edge. Therefore, the confidence of the third edge being the edge between two nodes corresponding to two adjacent voxels in the continuous part is low, and 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.
[0085] 503. Connect nodes in the candidate node set based on the edges in the second candidate edge set to obtain a second three-dimensional segmentation result.
[0086] In this embodiment, after the processing device determines the third edge whose length is greater than or equal to the length threshold from the first candidate edge set, the third edge in the first candidate edge set is removed 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 a second three-dimensional segmentation result, which can improve the accuracy of the second three-dimensional segmentation result.
[0087] See also Figure 7 , Figure 7 A flowchart of another method for processing three-dimensional segmentation results provided in an embodiment of the present application. Figure 7 In the processing method of the three-dimensional segmentation result shown in FIG. 1 , 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. Figure 7 As 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 a distance matrix. Based on the distance matrix and the linear segmentation result, a target undirected graph can be constructed. Based on the target undirected graph, a first candidate edge set and a candidate node set can be obtained (the specific implementation process can be seen in steps 203, 204, and 205), wherein, Figure 7 The first undirected graph shown 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. Figure 7In the example, the three-dimensional space in which 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 a minimum spanning tree (MST) to obtain the first undirected graph. Based on the first candidate edge set, a second candidate edge set can be obtained (the specific implementation process can be referred to steps 501 and 502), wherein: 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. Figure 7 , the three-dimensional space where the second undirected graph is located is the three-dimensional space represented by the world coordinate system. Based on the second undirected graph, a third three-dimensional segmentation result can be obtained. Specifically, firstly, the first coordinate of the node in the second undirected graph in the world coordinate system, the fifth coordinate of the edge of the second undirected graph in the world coordinate system and the target transformation relationship are obtained, and then the first coordinate is converted into the third coordinate in the pixel coordinate system by using the target transformation relationship, and the fifth coordinate is converted into the sixth coordinate in the pixel coordinate system by using the target transformation relationship. Based on the fifth coordinate and the sixth coordinate, the second three-dimensional segmentation result is obtained. Then, the second three-dimensional segmentation result is expanded to obtain the third three-dimensional segmentation result. Optionally, the processing device obtains the third three-dimensional segmentation result by expanding and denoising the second three-dimensional segmentation result. Optionally, denoising is implemented by multi-scale smoothing. Optionally, the multi-scale smoothing is implemented by filtering based on a Gaussian pyramid, or by filtering based on a Laplacian pyramid. After obtaining the third three-dimensional segmentation result, the processing device uses 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.
[0088] See also Figure 8 , Figure 8 A flowchart of another method for processing three-dimensional segmentation results provided in an embodiment of the present application is shown below. Figure 8 In the processing method of the three-dimensional segmentation result shown in FIG, the target object is a blood vessel and the length threshold is 8 mm. Figure 8 As shown, after the first three-dimensional segmentation result and the length threshold are input into the three-dimensional segmentation result processing device, the three-dimensional segmentation result processing device processes the first three-dimensional segmentation result based on the three-dimensional segmentation result processing method described above, and outputs a fourth three-dimensional segmentation result.
[0089] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0090] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among which, personal information processing may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0091] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0092] See also Fig. 9 , Fig. 9 A schematic diagram of the structure of a three-dimensional segmentation result processing device provided in an embodiment of the present application. The three-dimensional segmentation result processing device 1 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. The three-dimensional segmentation result processing device 1 includes: an acquisition unit 11, a construction unit 12, an addition unit 13, a determination unit 14, and a processing unit 15. Specifically: An acquisition unit 11, configured to acquire the first three-dimensional segmentation result; A construction unit 12 is used to construct a target undirected graph based on the first three-dimensional segmentation result, where 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 13, configured to select any node from the target undirected graph and add it to the candidate node set; A determining unit 14, configured to determine, from the first edges, an edge including a node in the candidate node set as a second edge; The adding unit 13 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 13 is further configured to add the nodes included in the shortest second edge to the candidate node set; The processing unit 15 is configured 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.
[0093] In combination with any embodiment of the present application, the processing unit 15 is further used for: 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.
[0094] In combination with any embodiment of the present application, the shape of the target object in the first three-dimensional segmentation result includes a tubular shape, and the construction unit 12 is further used to: 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.
[0095] In combination with any embodiment of the present application, the processing unit 15 is further used for: 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.
[0096] In combination with any embodiment of the present application, the processing unit 15 is further used for: 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.
[0097] In combination with any embodiment of the present application, the processing unit 15 is further used for: 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.
[0098] 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, 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. Select any one node from the target undirected graph and add it to the candidate node set. From the first edge, the edge containing the node in the candidate node set is determined to be the second edge. The shortest second edge is added 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. 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. The nodes contained in the shortest second edge are added 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, the nodes in the candidate node set are connected based on the edges in the first candidate edge set, so that the discontinuities in the first three-dimensional segmentation result can be connected to obtain the second three-dimensional segmentation result.
[0099] 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 method 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.
[0100] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device 2 includes a processor 21 and a memory 22. Optionally, the electronic device 2 also 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 via a connector, and the connector includes various interfaces, transmission lines or buses, etc., which are not limited in the embodiments of the present application. It should be understood that in each embodiment of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, it can be connected through various interfaces, transmission lines, buses, etc.
[0101] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present application.
[0102] The memory 22 can be used to store computer program instructions and various computer program codes including the program code for executing the program code 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 portable read only memory (CD-ROM), which is used for related instructions and data.
[0103] 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 can be independent devices or an integrated device.
[0104] It can be understood that in the embodiment of the present application, the memory 22 can be used not only 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, and so on. The embodiment of the present application does not limit the specific data stored in the memory.
[0105] Understandably, Fig.10 Only a simplified design of an electronic device is shown. In practical applications, the electronic device may also 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.
[0106] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present application have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.
[0108] In the several embodiments provided in 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 schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0109] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0110] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0111] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by 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 process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0112] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
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