Contour line extraction method and device and computer equipment

Poisson downsampling and surface reconstruction algorithms are used to process point cloud data, and the contour lines are extracted in combination with corrosion operations, which solves the problem of low efficiency in contour lines extraction and CBCT image fusion in the prior art, achieving more efficient and accurate preoperative planning.

CN119625007APending Publication Date: 2025-03-14CHONGQING XISHAN SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411717533.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Prior art In the preoperative planning of artificial total knee arthroplasty surgery, the efficiency of contour extraction and CBCT image fusion is low, affecting the quality of the planning.

Method used

The original point cloud data is processed using Poisson downsampling algorithm and surface reconstruction algorithm, the target point cloud data set and three-dimensional model are obtained, and the contour data is extracted through corrosion operations.

Benefits of technology

The accuracy and efficiency of contour extraction are improved, the accuracy of fusion with CBCT images is enhanced, and the quality and efficiency of preoperative planning is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119625007A_ABST
    Figure CN119625007A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a contour line extraction method and device and computer equipment, and relates to the technical field of medical image processing. The method comprises the following steps: acquiring an original point cloud data set of a target object; obtaining a target point cloud data set of the target object based on the original point cloud data set by using a Poisson downsampling algorithm; the target point cloud data set comprises a plurality of collection points of the target object, and the number of the collection points meets a preset collection point number; obtaining a three-dimensional model of the target object based on the target point cloud data set by using a surface reconstruction algorithm; and performing corrosion operation on the three-dimensional model of the target object to obtain contour line data of the target object. According to the method, the precision and efficiency of contour line extraction and CBCT fusion of the target object are improved, and the efficiency and precision of prosthesis placement in the preoperative planning of artificial total knee arthroplasty are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of medical image processing, and in particular to a contour extraction method, device and computer equipment. Background Art

[0002] In the preoperative planning of total knee arthroplasty, it is usually necessary to extract the contour of the artificial knee prosthesis and obtain the fusion effect of the extracted contour with the cone beam computed tomography (CBCT) image.

[0003] Among the current technologies for contour extraction and CBCT fusion, one part uses openCV for edge extraction and image superposition, which is generally not accurate and inefficient, affecting the quality of preoperative planning; the other part uses AI for extraction and then uses linear interpolation for fusion. Although this method has a significant improvement in quality, it requires a relatively high sample size and is time-consuming. Therefore, the current technologies for contour extraction and CBCT fusion have the problem of low efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a contour extraction method, device and computer equipment to address the above technical problems.

[0005] In a first aspect, the present application provides a contour extraction method. The method comprises:

[0006] Obtain the original point cloud dataset of the target object;

[0007] Using a Poisson downsampling algorithm, based on the original point cloud data set, a target point cloud data set of the target object is obtained; the target point cloud data set includes a plurality of acquisition points of the target object, and the number of the acquisition points meets the preset number of acquisition points;

[0008] Using a surface reconstruction algorithm, based on the target point cloud data set, to obtain a three-dimensional model of the target object;

[0009] An erosion operation is performed on the three-dimensional model of the target object to obtain contour line data of the target object.

[0010] In one of the embodiments, the method of using a Poisson downsampling algorithm to obtain a target point cloud dataset of the target object based on the original point cloud dataset includes: determining a current sampling point in the original point cloud dataset, and determining a point cloud sampling radius for the target object; determining a point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius; and obtaining the target point cloud dataset of the target object based on the point cloud sampling area and the point cloud sampling radius.

[0011] In one of the embodiments, the step of acquiring the target point cloud dataset of the target object based on the point cloud sampling area and the point cloud sampling radius includes: determining a candidate area of ​​the target object in the point cloud sampling area; the distance between the candidate area and the current sampling point is greater than or equal to the point cloud sampling radius; there is no sampling point of the target object in the candidate area; determining a new current sampling point of the target object in the original three-dimensional point cloud data of the candidate area; the distance between the new current sampling point and the current sampling point is greater than the point cloud sampling radius; and executing the steps of determining the point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius, determining the candidate area of ​​the target object in the point cloud sampling area, and determining the new current sampling point of the target object in the original three-dimensional point cloud data of the candidate area, until the number of determined sampling points meets the preset number of acquisition points of the target point cloud dataset.

[0012] In one of the embodiments, the use of a surface reconstruction algorithm to obtain a three-dimensional model of the target object based on the target point cloud data set includes: determining a search area radius for the target object; constructing a search area for the target object with the search area radius; the search area is a spherical area; determining an initial triangle of the target object based on multiple sampling points of the target point cloud data set; the initial triangle includes three triangle sampling points; the three triangle sampling points are adjacent; the normal vectors of the three triangle sampling points are consistent; and obtaining the three-dimensional model of the target object based on the search area and the initial triangle.

[0013] In one embodiment, performing an erosion operation on the three-dimensional model of the target object to obtain contour line data of the target object includes: determining a three-dimensional template object for the target object; and performing an erosion operation on the three-dimensional model using the three-dimensional template object to obtain the contour line data of the target object.

[0014] In one embodiment, the method of using the three-dimensional template object to perform an corrosion operation on the three-dimensional model to obtain the contour data of the target object includes: using the three-dimensional template object to perform an corrosion operation on the three-dimensional model to obtain a corroded three-dimensional model corresponding to the three-dimensional model; and obtaining the contour data of the target object based on the difference between the three-dimensional model and the corroded three-dimensional model.

[0015] In one embodiment, the three-dimensional model includes multiple voxels; the multiple voxels include foreground voxels of the prosthesis part and background voxels of the non-prosthesis part; the use of the three-dimensional template object to perform an erosion operation on the three-dimensional model to obtain a corroded three-dimensional model corresponding to the three-dimensional model includes: aligning the center point of the three-dimensional template object with the center point of each foreground voxel of the three-dimensional model to obtain overlapping information between the three-dimensional template object and each foreground voxel; and obtaining the corroded three-dimensional model corresponding to the three-dimensional model based on the overlapping information.

[0016] In a second aspect, the present application provides a contour extraction device. The device comprises:

[0017] A data acquisition module is used to obtain the original point cloud data set of the target object;

[0018] A downsampling module, configured to obtain a target point cloud data set of the target object based on the original point cloud data set by using a Poisson downsampling algorithm; the target point cloud data set includes a plurality of acquisition points of the target object, and the number of the acquisition points meets a preset number of acquisition points;

[0019] A surface reconstruction module, used for obtaining a three-dimensional model of the target object based on the target point cloud data set using a surface reconstruction algorithm;

[0020] The corrosion module is used to perform corrosion operation on the three-dimensional model of the target object to obtain contour line data of the target object.

[0021] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0022] Obtain the original point cloud dataset of the target object;

[0023] Using a Poisson downsampling algorithm, based on the original point cloud data set, a target point cloud data set of the target object is obtained; the target point cloud data set includes a plurality of acquisition points of the target object, and the number of the acquisition points meets the preset number of acquisition points;

[0024] Using a surface reconstruction algorithm, based on the target point cloud data set, to obtain a three-dimensional model of the target object;

[0025] An erosion operation is performed on the three-dimensional model of the target object to obtain contour line data of the target object.

[0026] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0027] Obtain the original point cloud dataset of the target object;

[0028] Using a Poisson downsampling algorithm, based on the original point cloud data set, a target point cloud data set of the target object is obtained; the target point cloud data set includes a plurality of acquisition points of the target object, and the number of the acquisition points meets the preset number of acquisition points;

[0029] Using a surface reconstruction algorithm, based on the target point cloud data set, to obtain a three-dimensional model of the target object;

[0030] An erosion operation is performed on the three-dimensional model of the target object to obtain contour line data of the target object.

[0031] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0032] Obtain the original point cloud dataset of the target object;

[0033] Using a Poisson downsampling algorithm, based on the original point cloud data set, a target point cloud data set of the target object is obtained; the target point cloud data set includes a plurality of acquisition points of the target object, and the number of the acquisition points meets the preset number of acquisition points;

[0034] Using a surface reconstruction algorithm, based on the target point cloud data set, to obtain a three-dimensional model of the target object;

[0035] An erosion operation is performed on the three-dimensional model of the target object to obtain contour line data of the target object.

[0036] In the above-mentioned contour extraction method, device and computer equipment, first, the original point cloud data set of the target object can be obtained; next, the Poisson downsampling algorithm can be used to obtain the target point cloud data set of the target object based on the original point cloud data set; the target point cloud data set includes multiple acquisition points of the target object; the number of acquisition points meets the preset number of acquisition points; then, the surface reconstruction algorithm can be used to obtain the three-dimensional model of the target object based on the target point cloud data set; finally, the three-dimensional model of the target object can be corroded to obtain the contour data of the target object. In the method provided in the embodiment of the present application, the original point cloud data can be downsampled using the Poisson downsampling algorithm, which can simplify the data volume and reduce the computational complexity, and the surface reconstruction algorithm can be combined to improve the accuracy and efficiency of the surface reconstruction of the target object. Finally, the corrosion operation can be combined to improve the accuracy of the contour extraction of the target object, and then the accuracy and efficiency of the contour extraction and fusion of CBCT of the target object are improved, ensuring the efficiency and accuracy of the prosthesis placement in the preoperative planning of total knee replacement. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 A schematic diagram of a flow chart of a contour extraction method provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of a process for obtaining a target point cloud data set of a target object provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of another process for obtaining a target point cloud data set of a target object provided in an embodiment of the present application;

[0041] Figure 4 A schematic diagram of a process for obtaining a three-dimensional model of a target object provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of another process for obtaining a three-dimensional model of a target object provided in an embodiment of the present application;

[0043] Figure 6 A schematic diagram of a process for obtaining contour line data of a target object provided in an embodiment of the present application;

[0044] Figure 7A schematic diagram of another process for obtaining contour line data of a target object according to the difference between a three-dimensional model and a corrosion three-dimensional model provided in an embodiment of the present application;

[0045] Figure 8 A structural block diagram of a contour extraction device provided in an embodiment of the present application;

[0046] Fig. 9 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] In an exemplary embodiment, Figure 1 As shown, a contour extraction method is provided. This embodiment uses the method applied to a server as an example for illustration. It can be understood that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0049] Step 102: Acquire the original point cloud data set of the target object.

[0050] Among them, in this step, the embodiment of the present application can be used in the medical image processing process of preoperative planning of total knee replacement. In this case, the target object can be a knee joint prosthesis. In a possible implementation, a three-dimensional scanning technology, such as computed tomography (CT) and magnetic resonance imaging (MRI), can be used to obtain the original point cloud data set of the target object. The original point cloud data set can be a point set in the knee joint area, which describes the anatomical structure of the knee joint, including bones, soft tissues and possible prosthesis surfaces. The original point cloud data set may include multiple point cloud data, each of which may be represented by three-dimensional point coordinates. In addition, each point cloud data may contain additional information, such as the normal vector, color or intensity information of each point. Specifically, first, a three-dimensional image of the knee joint may be obtained using technologies such as CT, CBCT or laser scanning; next, the three-dimensional image data of the knee joint may be processed into a visualized three-dimensional model; finally, the structure of the knee joint is extracted using an image processing algorithm to generate point cloud data containing surface points.

[0051] Step 104 , using a Poisson downsampling algorithm, based on the original point cloud dataset, obtain a target point cloud dataset of the target object.

[0052] Among them, the target point cloud data set includes multiple acquisition points of the target object, and the number of acquisition points meets the preset number of acquisition points. The Poisson Disk Sampling is a point cloud sampling algorithm used to extract uniformly distributed subsets from dense point cloud data. In medical image processing, especially the processing of knee joint prostheses, this method can retain key features while reducing the amount of data. Its basic principle is to randomly select points in space to ensure that the distance between each pair of points is not less than the set minimum value. This method is particularly suitable for application scenarios that need to avoid excessive aggregation of points, such as computer graphics, scientific computing, and medical imaging. Specifically, in the first step, the original point cloud data set can be input into the Poisson Disk Sampling algorithm model. In the initialization stage, the point cloud sampling radius can be set for the original point cloud data set, and then the point cloud sampling area can be defined for the original point cloud data set, for example, a two-dimensional plane or a three-dimensional volume. The point cloud sampling radius can be the minimum distance between two point clouds in the original point cloud data set. The size of the point cloud sampling radius can be determined according to the preset number of acquisition points of the target object. Among them, the Delaunay triangulation of the target object can also be determined, and the Delaunay triangulation can be used to maintain the topological relationship of the points during the sampling process; the point cloud sampling area can be a Voronoi region, and the Voronoi region can be used to divide the spatial area to ensure that the minimum interval of the point cloud sampling radius is maintained between each sampling point. The second step is to randomly select a point data in the original point cloud data set as the current sampling point, and add it to the sampling set S, which is the final sampling set of the target object and can be used to store the final uniform sampling point set of the target object. The third step is to iteratively sample the original point cloud data set and repeat the following three steps: 1. Generate new points in the Voronoi region: Find an area containing free space in the Voronoi region, generate a new current sampling point p, and ensure that the distance between the current sampling point and the existing sampling point is greater than r, where the free space refers to the area in the Voronoi region that is greater than r from the sampling points in the region. This area is not covered by any other sampling points and can be used to generate new sampling points. 2. Distance check: insert the newly generated current sampling point p into the Delaunay structure D, and ensure that its distance from other sampling points is not less than r. If the condition that the distance from other sampling points is not less than r is not met, discard the current sampling point and regenerate it. 3. Update Delaunay triangulation: add the newly generated current sampling point p to the Delaunay triangulation D, and update the Voronoi region of the adjacent points. 4. Update the sampling set: add the current sampling point p that meets the distance condition to the sampling set S as a new sampling point.The termination condition of the iterative sampling can be that there is no available space in the Voronoi region to generate new sampling points, and / or the number of determined sampling points meets the preset number of acquisition points of the target point cloud dataset. When the termination condition is met, the sampling set S can be output as a downsampled point cloud of the knee prosthesis. The point cloud set is evenly distributed, and the minimum distance between each point is r, which retains the key feature information of the prosthesis. The output sampling set S is the target point cloud dataset of the target object.

[0053] Step 106 , using a surface reconstruction algorithm, based on the target point cloud data set, to obtain a three-dimensional model of the target object.

[0054] Among them, in this step, the surface reconstruction algorithm can be a ball pivoting surface reconstruction algorithm, which is a triangulation-based method mainly used to construct a continuous surface from sparse three-dimensional point cloud data. Specifically, in the first step, the target point cloud data set can be input into the ball pivoting surface reconstruction algorithm model. In the initialization stage, the search area radius for the target object can be set, and the search area radius can be determined according to the density of the point cloud data and the surface details of the prosthesis. In the second step, the initial triangle of the target object, that is, the seed triangle, is determined in the target point cloud data set; the initial triangle is composed of three adjacent sampling points with consistent normal vectors. The spherical search area determined by the search area radius touches the three sampling points and does not contain other sampling points, thereby ensuring the accuracy of surface reconstruction. In the third step, a front edge set is established, and the three edges of the initial triangle are added to the front edge set F, which records the edges to be extended and is used to gradually expand on the surface to form a complete triangulated network; each edge in the front edge set is represented by its two end points and is initially active. Step 4: For each active edge in the frontier set F, perform the following operations: 1. Determine the third point: rotate the sphere so that it continues to touch the two points on the edge, and find a new point p new , so that the sphere is at the two endpoints of the contact edge and the new point p new 2. Generate a new triangle: Put the new point p newConnect the two endpoints of the edge to generate a new triangle. 3. Update the front edge set: add the edges of the newly generated triangle to the front set. For edges that already exist in the set, mark them as frozen to avoid repeated generation of triangles. 4. Check the status of the edge: If a certain edge cannot find a new point that meets the conditions, mark the edge as a boundary or frozen state. Repeat the fourth step, gradually expand all the front edges and generate new triangles until there are no active edges in the front set, or no new points that meet the conditions can be found; this expansion process will form a complete triangulated network on the surface of the knee prosthesis and generate a continuous surface. The fifth step is to output the surface reconstruction result of the target object and generate a triangulated network of the target object. The triangulated network represents the surface of the target object. The vertex and triangle information of the triangulated network are output to form a complete target object, that is, the surface model of the knee prosthesis. The surface model of the target object is the three-dimensional model of the target object.

[0055] Step 108: performing an erosion operation on the three-dimensional model of the target object to obtain contour line data of the target object.

[0056] Among them, the corrosion operation is a morphological processing technique used to shrink the foreground area in the image. In the processing of three-dimensional models, corrosion can help remove small noise and unimportant areas, thereby retaining the main contour lines on the boundary. Specifically, in the first step, the three-dimensional model of the target object can be input into the corrosion model. The three-dimensional model can be a three-dimensional point cloud and / or voxel data, which can be recorded as a three-dimensional matrix M, and each voxel in the matrix represents a part of the target object. Among them, the voxel values ​​can generally be divided into two categories: the prosthesis part (foreground) and the background part (background). In the second step, a three-dimensional structure element B can be defined to perform the corrosion operation; the commonly used structure element is a three-dimensional spherical or cubic kernel, and the size depends on the required corrosion depth. In the third step, an erosion operation can be performed on the three-dimensional matrix M to obtain the eroded three-dimensional model of the target object, which may include: 1. Aligning the center of the structural element B to each foreground voxel position (prosthesis part); 2. Checking whether the voxels in the area covered by B are completely contained in the foreground area; 3. If all positions of B overlap with the foreground within the coverage range, the voxel value of the center position is retained as the foreground, otherwise its value is set as the background. Further, the edge of the target object, that is, the contour line, can be calculated, and the eroded three-dimensional model can be differentially operated with the original model, that is, the eroded model is subtracted from the original model to obtain the difference between the two. The difference is mainly concentrated in the edge area, so the difference can be regarded as the contour line of the prosthesis. A new three-dimensional point set or voxel set can be extracted according to the result of the differential calculation as the initial contour line of the target object, and then the initial contour line can be post-processed, and the data post-processing can include but is not limited to smoothing, noise reduction and thinning operations. Among them, the smoothing process means that when the contour line is jagged or not smooth, the contour line can be smoothed, such as applying a three-dimensional Gaussian filter. Denoising can be done by removing isolated contour points or noise points, and voxel regions with smaller areas or volumes can be deleted by setting thresholds. Refinement can be done by further refining the contours as needed to obtain clearer boundaries. Finally, the post-processed contour data of the target object can be output, and the contour data can be directly superimposed on the CBCT image for preoperative planning and precise adjustment of the prosthesis position.

[0057] In the method of this embodiment, the original point cloud data set of the target object can be obtained; next, the Poisson downsampling algorithm can be used to obtain the target point cloud data set of the target object based on the original point cloud data set; the target point cloud data set includes multiple acquisition points of the target object; the number of multiple acquisition points meets the preset number of acquisition points; then, the surface reconstruction algorithm can be used to obtain the three-dimensional model of the target object based on the target point cloud data set; finally, the three-dimensional model of the target object can be corroded to obtain the contour data of the target object. In the method provided by the embodiment of the present application, the original point cloud data can be downsampled using the Poisson downsampling algorithm, which can simplify the data volume and reduce the computational complexity, and the surface reconstruction algorithm can be combined to improve the accuracy and efficiency of the surface reconstruction of the target object. Finally, the corrosion operation can be combined to improve the accuracy of the contour extraction of the target object, and then the accuracy and efficiency of the contour extraction and fusion of CBCT of the target object are improved, ensuring the efficiency and accuracy of the prosthesis placement in the preoperative planning of total knee replacement.

[0058] In an exemplary embodiment, Figure 2 As shown, step 104 may include steps 202 to 206. Among them:

[0059] Step 202 : determining a current sampling point in the original point cloud data set, and determining a point cloud sampling radius for the target object.

[0060] In the initialization stage, a point data can be randomly selected from the original point cloud data set as the current sampling point, and added to the sampling set S, which is the final sampling set of the target object and can be used to store the final uniform sampling point set of the target object. The point cloud sampling radius can be the minimum distance between two point clouds in the original point cloud data set. The size of the point cloud sampling radius can be determined according to the preset number of collection points of the target object.

[0061] Step 204 : determining the point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius.

[0062] The point cloud sampling area may be a Voronoi region. In addition, the Delaunay triangulation of the target object may be determined. The Delaunay triangulation may be used to maintain the topological relationship of the points during the sampling process; the Voronoi region may be used to divide the spatial region to ensure that the minimum interval of the point cloud sampling radius is maintained between each sampling point.

[0063] Step 206 : acquiring a target point cloud data set of the target object according to the point cloud sampling area and the point cloud sampling radius.

[0064] In an exemplary embodiment, Figure 3 As shown, step 206 may include steps 302 to 306. Among them:

[0065] Step 302: determine a candidate region of the target object in the point cloud sampling region.

[0066] The distance between the candidate area and the current sampling point is greater than or equal to the point cloud sampling radius; there is no sampling point of the target object in the candidate area. The candidate area can be an idle area in the Voronoi area, and the idle space refers to the area in the Voronoi area that is greater than r from the sampling point in the area. This area is not covered by any other sampling points and can be used to generate new sampling points.

[0067] Step 304: determine a new current sampling point of the target object in the original three-dimensional point cloud data of the candidate area.

[0068] Among them, an area containing free space is searched in the Voronoi area, and a new current sampling point p is generated, and the distance between the new current sampling point and the current sampling point is greater than the point cloud sampling radius. Furthermore, the newly generated current sampling point p can be inserted into the Delaunay structure D, and it is ensured that its distance from other sampling points is not less than r. If the condition that the distance from other sampling points is not less than r is not met, the current sampling point is discarded and regenerated. In addition, the newly generated current sampling point p can be added to the Delaunay triangulation D, and the Voronoi area of ​​the adjacent points is updated at the same time, and the current sampling point p that meets the distance condition is added to the sampling set S as a new sampling point.

[0069] Step 306 , returning to the step of determining the point cloud sampling area of ​​the target object based on the current sampling points and the point cloud sampling radius, until the number of determined sampling points meets the preset number of acquisition points of the target point cloud data set.

[0070] Among them, when a new current sampling point is determined, the step of determining the point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius can be returned to execute until the iteration termination condition is met. In this step, the termination condition is that the number of determined sampling points meets the preset number of acquisition points of the target point cloud data set; in another possible implementation, the termination condition can also be that there is no available space in the Voronoi area to generate new sampling points. When the termination condition is met, the sampling set S can be output as a downsampled point cloud of the knee prosthesis. The point cloud set is evenly distributed, and the minimum distance between each point is r, which retains the key feature information of the prosthesis. The output sampling set S is the target point cloud data set of the target object.

[0071] In the method of this embodiment, the original point cloud data may be downsampled using a Poisson downsampling algorithm, which may reduce the amount of data and the computational complexity.

[0072] In an exemplary embodiment, Figure 4 As shown, step 106 may include steps 402 to 408. Among them:

[0073] Step 402, determining the search area radius for the target object.

[0074] In this embodiment, the surface reconstruction algorithm may be a ball pivoting surface reconstruction algorithm, which is a triangulation-based method mainly used to construct a continuous surface from sparse three-dimensional point cloud data. Specifically, in the first step, the target point cloud data set may be input into the ball pivoting surface reconstruction algorithm model, and in the initialization stage, the search area radius for the target object may be set, and the search area radius may be determined according to the density of the point cloud data and the surface details of the prosthesis.

[0075] Step 404: construct a spherical search area for the target object with the search area radius.

[0076] The spherical search area may be a rotating sphere constructed with a search area radius for realizing surface reconstruction of the target object.

[0077] Step 406 : determining an initial triangle of the target object according to a plurality of sampling points of the target point cloud data set.

[0078] The initial triangle of the target object, i.e., the seed triangle, is determined in the target point cloud data set; the initial triangle is composed of three adjacent sampling points with consistent normal vectors. The spherical search area determined by the search area radius touches the three sampling points of the initial triangle and does not include other sampling points, thereby ensuring the accuracy of surface reconstruction.

[0079] Step 408: Acquire a three-dimensional model of the target object according to the spherical search area and the initial triangle.

[0080] In an exemplary embodiment, Figure 5 As shown, step 408 may include steps 502 to 506. Among them:

[0081] Step 502: Determine the current sampling point of the target object according to the spherical search area and each active edge.

[0082] Step 504: Generate a current triangle of the target object according to each active edge and the current sampling point.

[0083] Step 506: Acquire a three-dimensional model of the target object according to the spherical search area and the current triangle.

[0084] Specifically, the three edges of the starting triangle can be determined as active edges. Specifically, a front edge set is established, and the three edges of the initial triangle are added to the front edge set F. The set records the edges to be expanded and is used to gradually expand on the surface to form a complete triangulated network; each edge in the front edge set is represented by its two end points and is initially active. Step 4: For each active edge in the front edge set F, perform the following operations: 1. Determine the third point: Rotate the sphere so that it continues to touch the two points on the edge, and find a new point p at the same time. new , so that the sphere is at the two endpoints of the contact edge and the new point p new 2. Generate a new triangle: Put the new point p new Connect the two endpoints of the edge to generate a new triangle. 3. Update the front edge set: add the edges of the newly generated triangle to the front set. For edges that already exist in the set, mark them as frozen to avoid repeated generation of triangles. 4. Check the status of the edge: If a certain edge cannot find a new point that meets the conditions, mark the edge as a boundary or frozen state. Repeat the fourth step, gradually expand all the front edges and generate new triangles until there are no active edges in the front set, or no new points that meet the conditions can be found; this expansion process will form a complete triangulated network on the surface of the knee prosthesis and generate a continuous surface. The fifth step is to output the surface reconstruction result of the target object and generate a triangulated network of the target object. The triangulated network represents the surface of the target object. The vertex and triangle information of the triangulated network are output to form a complete target object, that is, the surface model of the knee prosthesis. The surface model of the target object is the three-dimensional model of the target object.

[0085] In the method of this embodiment, the surface reconstruction algorithm can be combined to perform surface reconstruction on the target object, thereby improving the accuracy and efficiency of surface reconstruction of the target object.

[0086] In an exemplary embodiment, Figure 6 As shown, step 108 may include steps 602 to 604. Among them:

[0087] Step 602: determine a three-dimensional template object for the target object.

[0088] Among them, the corrosion operation is a morphological processing technique used to shrink the foreground area in the image. In the processing of three-dimensional models, corrosion can help remove small noise and unimportant areas, thereby retaining the main contours on the boundary. Specifically, in the first step, the three-dimensional model of the target object can be input into the corrosion model. The three-dimensional model can be a three-dimensional point cloud and / or voxel data, which can be recorded as a three-dimensional matrix M, and each voxel in the matrix represents a part of the target object. Further, a three-dimensional structure element B can be defined to perform the corrosion operation; the commonly used structure element is a three-dimensional spherical or cubic kernel, and the size depends on the required corrosion depth.

[0089] Step 604: Use the 3D template object to perform an erosion operation on the 3D model to obtain contour data of the target object.

[0090] In an exemplary embodiment, Figure 7 As shown, step 604 may include steps 702 to 704. Among them:

[0091] Step 702: perform an erosion operation on the three-dimensional model using the three-dimensional template object to obtain an eroded three-dimensional model corresponding to the three-dimensional model.

[0092] Step 704: Acquire contour data of the target object according to the difference between the three-dimensional model and the corrosion three-dimensional model.

[0093] Among them, the corroded three-dimensional model, that is, the corroded three-dimensional model, can be differentially calculated with the original model, that is, the corroded model is subtracted from the original model to obtain the difference between the two, and the difference is mainly concentrated in the edge area. Therefore, the difference can be regarded as the contour of the prosthesis. A new three-dimensional point set or voxel set can be extracted according to the result of the differential calculation as the initial contour of the target object, and then the initial contour can be post-processed. Finally, the post-processed contour data of the target object can be output, and the contour data can be directly superimposed on the CBCT image for preoperative planning and precise adjustment of the prosthesis position.

[0094] In an exemplary embodiment, step 702 may include: aligning the center point of the three-dimensional template object with the center point of each foreground voxel of the three-dimensional model to obtain overlapping information between the three-dimensional template object and each foreground voxel; and obtaining an eroded three-dimensional model corresponding to the three-dimensional model based on the overlapping information.

[0095] The three-dimensional model includes a plurality of voxels; the plurality of voxels include foreground voxels of the prosthesis part. The three-dimensional template object, i.e., the three-dimensional structure element B, can be used to perform an erosion operation on the three-dimensional matrix M to obtain the eroded three-dimensional model of the target object. Specifically, 1. Align the center of the structure element B to the center position of each foreground voxel (prosthesis part); 2. Check whether the voxels in the area covered by B are completely contained in the foreground area; 3. If all positions of B overlap with the foreground within the coverage range, the voxel value at the center position is retained as the foreground, otherwise its value is set to the background.

[0096] In the method of this embodiment, the corrosion operation can be combined to improve the accuracy of target object contour extraction, thereby improving the accuracy and efficiency of target object contour extraction and CBCT fusion, ensuring the efficiency and accuracy of prosthesis placement in preoperative planning of total knee replacement.

[0097] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0098] Based on the same inventive concept, the embodiment of the present application also provides a contour extraction device for implementing the above-mentioned contour extraction method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more contour extraction device embodiments provided below can refer to the limitations of the contour extraction method above, and will not be repeated here.

[0099] In one embodiment, Figure 8 As shown, a contour extraction device is provided, including: a data acquisition module 802, a downsampling module 804, a surface reconstruction module 806 and an erosion module 808, wherein:

[0100] A data acquisition module 802 is used to acquire an original point cloud data set of a target object;

[0101] A downsampling module 804 is used to obtain a target point cloud dataset of the target object based on the original point cloud dataset using a Poisson downsampling algorithm; the target point cloud dataset includes a plurality of acquisition points of the target object, and the number of the acquisition points meets a preset number of acquisition points;

[0102] A surface reconstruction module 806 is used to obtain a three-dimensional model of the target object based on the target point cloud data set using a surface reconstruction algorithm;

[0103] The corrosion module 808 is used to perform corrosion operation on the three-dimensional model of the target object to obtain contour data of the target object.

[0104] In one embodiment, the downsampling module 804 is further used to: determine a current sampling point in the original point cloud data set, and determine a point cloud sampling radius for the target object; determine a point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius; and obtain the target point cloud data set of the target object according to the point cloud sampling area and the point cloud sampling radius.

[0105] In one embodiment, the downsampling module 804 is further used to: determine a candidate area for the target object in the point cloud sampling area; the distance between the candidate area and the current sampling point is greater than or equal to the point cloud sampling radius; there is no sampling point of the target object in the candidate area; determine a new current sampling point of the target object in the original three-dimensional point cloud data of the candidate area; the distance between the new current sampling point and the current sampling point is greater than the point cloud sampling radius; return to execute the step of determining the point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius until the number of determined sampling points meets the preset number of acquisition points of the target point cloud data set.

[0106] In one embodiment, the surface reconstruction module 806 is also used to: determine the search area radius for the target object; construct a spherical search area for the target object with the search area radius; determine the initial triangle of the target object based on multiple sampling points of the target point cloud data set; the initial triangle is composed of three adjacent sampling points with consistent normal vectors; and obtain the three-dimensional model of the target object based on the spherical search area and the initial triangle.

[0107] In one embodiment, the initial triangle includes three active edges; the surface reconstruction module 806 is further used to: determine the current sampling point of the target object based on the spherical search area and each of the active edges; generate the current triangle of the target object based on each of the active edges and the current sampling point; and obtain the three-dimensional model of the target object based on the spherical search area and the current triangle.

[0108] In one embodiment, the corrosion module 808 is further used to: determine a three-dimensional template object for the target object; and perform an corrosion operation on the three-dimensional model using the three-dimensional template object to obtain the contour line data of the target object.

[0109] In one embodiment, the corrosion module 808 is further used to: use the three-dimensional template object to perform an corrosion operation on the three-dimensional model to obtain a corroded three-dimensional model corresponding to the three-dimensional model; and obtain the contour data of the target object based on the difference between the three-dimensional model and the corroded three-dimensional model.

[0110] In one embodiment, the three-dimensional model includes multiple voxels; the multiple voxels include foreground voxels of the prosthesis part; the corrosion module 808 is also used to: align the center point of the three-dimensional template object with the center point of each foreground voxel of the three-dimensional model, and obtain the overlapping information between the three-dimensional template object and each foreground voxel; according to the overlapping information, obtain the corroded three-dimensional model corresponding to the three-dimensional model.

[0111] Each module in the above-mentioned contour extraction device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0112] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store contour extraction related data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a contour extraction method is implemented.

[0113] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0114] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0115] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0116] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0118] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0119] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0120] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A contour extraction method, characterized in that: The method comprises: Obtain the original point cloud dataset of the target object; Using a Poisson downsampling algorithm, based on the original point cloud data set, a target point cloud data set of the target object is obtained; the target point cloud data set includes a plurality of acquisition points of the target object, and the number of the acquisition points meets the preset number of acquisition points; Using a surface reconstruction algorithm, based on the target point cloud data set, to obtain a three-dimensional model of the target object; An erosion operation is performed on the three-dimensional model of the target object to obtain contour line data of the target object.

2. The method according to claim 1, characterized in that The method of obtaining a target point cloud dataset of the target object based on the original point cloud dataset by using a Poisson downsampling algorithm includes: Determining a current sampling point in the original point cloud data set, and determining a point cloud sampling radius for the target object; Determine a point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius; The target point cloud data set of the target object is acquired according to the point cloud sampling area and the point cloud sampling radius.

3. The method according to claim 2, characterized in that The step of acquiring the target point cloud data set of the target object according to the point cloud sampling area and the point cloud sampling radius includes: Determine a candidate area of ​​the target object in the point cloud sampling area; the distance between the candidate area and the current sampling point is greater than or equal to the point cloud sampling radius; and there is no sampling point of the target object in the candidate area; Determine a new current sampling point of the target object in the original three-dimensional point cloud data of the candidate area; the distance between the new current sampling point and the current sampling point is greater than the point cloud sampling radius; Return to the step of determining the point cloud sampling area of ​​the target object based on the current sampling point and the point cloud sampling radius, until the number of determined sampling points meets the preset number of acquisition points of the target point cloud data set.

4. The method according to claim 1, characterized in that: The method of obtaining a three-dimensional model of the target object based on the target point cloud data set by using a surface reconstruction algorithm includes: Determining a search area radius for the target object; Constructing a spherical search area for the target object with the search area radius; Determine an initial triangle of the target object according to a plurality of sampling points of the target point cloud data set; the initial triangle is composed of three adjacent sampling points with consistent normal vectors; The three-dimensional model of the target object is acquired according to the spherical search area and the initial triangle.

5. The method according to claim 4, characterized in that The initial triangle includes three active edges; The step of acquiring the three-dimensional model of the target object according to the spherical search area and the initial triangle comprises: Determining a current sampling point of the target object according to the spherical search area and each of the active edges; Generate a current triangle of the target object according to each of the active edges and the current sampling point; The three-dimensional model of the target object is acquired according to the spherical search area and the current triangle.

6. The method according to claim 1, characterized in that The corroding operation is performed on the three-dimensional model of the target object to obtain contour line data of the target object, including: Determining a three-dimensional template object for the target object; The three-dimensional model is eroded using the three-dimensional template object to obtain the contour data of the target object.

7. The method according to claim 6, characterized in that The step of performing an erosion operation on the three-dimensional model using the three-dimensional template object to obtain the contour line data of the target object includes: Using the three-dimensional template object to perform an erosion operation on the three-dimensional model to obtain an eroded three-dimensional model corresponding to the three-dimensional model; The contour data of the target object is acquired according to the difference between the three-dimensional model and the corrosion three-dimensional model.

8. The method according to claim 7, characterized in that The three-dimensional model includes a plurality of voxels; the plurality of voxels include foreground voxels of the prosthesis part; The corroding operation is performed on the three-dimensional model by using the three-dimensional template object to obtain a corroded three-dimensional model corresponding to the three-dimensional model, including: Aligning the center point of the three-dimensional template object with the center point of each foreground voxel of the three-dimensional model, and acquiring overlapping information between the three-dimensional template object and each foreground voxel; The corrosion three-dimensional model corresponding to the three-dimensional model is obtained according to the overlapping information.

9. A contour extraction device, characterized in that: The device comprises: A data acquisition module is used to obtain the original point cloud data set of the target object; A downsampling module, configured to obtain a target point cloud data set of the target object based on the original point cloud data set by using a Poisson downsampling algorithm; the target point cloud data set includes a plurality of acquisition points of the target object, and the number of the acquisition points meets a preset number of acquisition points; A surface reconstruction module, used for obtaining a three-dimensional model of the target object based on the target point cloud data set using a surface reconstruction algorithm; The corrosion module is used to perform corrosion operation on the three-dimensional model of the target object to obtain contour line data of the target object.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.