Method and device for three-dimensional surface reconstruction of medical images based on diffusion least squares
By using the diffusion least squares method, combined with edge voxel extraction and sampled voxel fitting, the problems of low reconstruction accuracy and insufficient generalization ability in existing technologies are solved, and high-precision three-dimensional surface reconstruction is achieved, which is applicable to unseen anatomical structures.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TIANJIN UNIV
- Filing Date
- 2026-04-15
- Publication Date
- 2026-06-26
AI Technical Summary
Existing 3D surface reconstruction technologies in the medical field suffer from low reconstruction accuracy and insufficient generalization ability. In particular, data-driven methods rely on large-scale labeled datasets, making them difficult to apply to unseen anatomical structures.
A diffusion-based least squares approach is adopted to achieve 3D surface reconstruction by extracting edge voxels using binary segmentation masks, filtering sampled voxels, and fitting least squares data, combined with Poisson surface reconstruction and mesh iterative deformation.
It achieves volumetric medical image 3D surface reconstruction without data dependency, with strong generalization ability and high reconstruction accuracy, and is applicable to unseen anatomical structures.
Smart Images

Figure CN122289609A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing, and more specifically, to a method and apparatus for three-dimensional surface reconstruction of medical images based on diffusion least squares. Background Technology
[0002] In medical imaging applications, three-dimensional surface reconstruction of anatomical structures is a key technology for generating patient-specific models. The accuracy of the reconstruction directly affects the reliability of preoperative planning, the safety of surgical navigation, and the accuracy of biomechanical simulation.
[0003] Existing 3D surface reconstruction techniques are mainly divided into two categories: traditional methods and data-driven methods. However, both have significant drawbacks: although traditional methods have good generalization ability, there is a large geometric deviation between their reconstruction results and the real anatomical morphology; while data-driven methods rely heavily on large-scale labeled datasets, but high-quality labeled data is scarce in the medical field, which can easily lead to data distribution bias and insufficient model generalization ability, and is difficult to apply to unseen anatomical structures.
[0004] Therefore, there is still a lack of a volumetric medical image 3D surface reconstruction method that does not require data dependence, has strong generalization ability, and has high reconstruction accuracy. Summary of the Invention
[0005] In view of this, this application provides a method and apparatus for three-dimensional surface reconstruction of medical images based on diffusion least squares.
[0006] One aspect of this application provides a method for three-dimensional surface reconstruction of medical images based on diffusion least squares, comprising: edge extraction based on a binary segmentation mask of a three-dimensional image to determine multiple edge voxels of the three-dimensional image; selecting multiple sampling voxels from the voxels of the three-dimensional image based on the edge voxels; performing least squares fitting on multiple local coordinate data of the multiple sampling voxels to determine multiple fitting parameter values and calculating corresponding residual values; if the residual values are greater than a fitting error threshold, determining global coordinate data of the edge voxels through data mapping based on the multiple fitting parameter values; and obtaining a three-dimensional surface mesh through Poisson surface reconstruction and mesh iterative deformation based on the multiple global coordinate data.
[0007] According to an embodiment of this application, the method further includes: when the residual value is less than or equal to a fitting error threshold: determining a first spatial range centered on the sampled voxels, thereby obtaining a second spatial range determined based on a plurality of first spatial ranges of a plurality of sampled voxels; updating the plurality of sampled voxels by filtering voxels of the three-dimensional image located within the second spatial range; and updating the plurality of fitting parameter values and the residual value based on the updated plurality of sampled voxels.
[0008] According to an embodiment of this application, the method further includes: when the updated residual value is greater than a preset multiple of the original residual value, determining the global coordinate data of the edge voxels by data mapping based on the multiple original fitting parameter values.
[0009] According to an embodiment of this application, the method further includes: obtaining the number of times the residual value is updated; and, when the number of updates is equal to a preset number threshold, determining the global coordinate data of the edge voxels by data mapping based on the currently updated multiple fitting parameter values.
[0010] According to an embodiment of this application, the method of determining the global coordinate data of the edge voxel based on multiple fitting parameter values through data mapping includes: selecting a first parameter value from the multiple fitting parameter values; using the first parameter value as the coordinate value of the third axis in a three-dimensional spatial coordinate system to obtain the local coordinate data of the edge voxel; performing coordinate transformation on the local coordinate data of the edge voxel using a rotation matrix to obtain first coordinate data; and adding the spatial coordinate data of the edge voxel in the three-dimensional image to the first coordinate data to obtain the global coordinate data of the edge voxel.
[0011] According to an embodiment of this application, the above-mentioned least-squares fitting of multiple local coordinate data of multiple sampled voxels to determine multiple fitting parameter values and calculate the corresponding residual values includes: determining a rotation matrix based on the normal vector of the edge voxel; performing coordinate transformation on the spatial coordinate data of the sampled voxel in the three-dimensional image through the rotation matrix to obtain the local coordinate data of the sampled voxel; performing least-squares fitting of multiple local coordinate data to determine multiple fitting parameter values and calculate the corresponding residual values.
[0012] According to an embodiment of this application, the above-mentioned coordinate transformation of the spatial coordinate data of the sampled voxel in the three-dimensional image by the above-mentioned rotation matrix to obtain the local coordinate data of the sampled voxel includes: subtracting the spatial coordinate data of the sampled voxel in the three-dimensional image from the spatial coordinate data of the edge voxel in the three-dimensional image to obtain second coordinate data; and using the above-mentioned rotation matrix to perform coordinate transformation on the second coordinate data to obtain the local coordinate data of the sampled voxel.
[0013] According to an embodiment of this application, the above-mentioned method of selecting multiple sampling voxels from voxels of the three-dimensional image based on the edge voxels includes: determining a third spatial range centered on the edge voxels; selecting voxels of the three-dimensional image located within the third spatial range to obtain multiple target voxels; and excluding the edge voxels from the multiple target voxels to obtain multiple sampling voxels.
[0014] According to an embodiment of this application, the above-mentioned method of obtaining a three-dimensional surface mesh based on multiple global coordinate data through Poisson surface reconstruction and mesh iterative deformation includes: performing Poisson surface reconstruction on multiple global coordinate data to generate a source mesh; using multiple edge voxels as target point clouds; using the source mesh as an initial template and the target point clouds as alignment targets, introducing multiple loss function constraints to iteratively deform the source mesh to obtain a three-dimensional surface mesh.
[0015] Another aspect of this application provides a medical image three-dimensional surface reconstruction device based on diffusion least squares, comprising: an edge voxel determination module for edge extraction based on a binary segmentation mask of a three-dimensional image to determine multiple edge voxels of the three-dimensional image; a sampling voxel determination module for selecting multiple sampling voxels from the voxels of the three-dimensional image based on the edge voxels; a data processing module for performing least squares fitting on multiple local coordinate data of the multiple sampling voxels to determine multiple fitting parameter values and calculate corresponding residual values; a coordinate update module for determining global coordinate data of the edge voxels based on the multiple fitting parameter values through data mapping when the residual value is greater than a fitting error threshold; and a three-dimensional surface reconstruction module for obtaining a three-dimensional surface mesh based on the multiple global coordinate data through Poisson surface reconstruction and mesh iterative deformation.
[0016] According to the embodiments of this application, by acquiring the edge voxels of a three-dimensional image and multiple sampling voxels corresponding to the edge voxels, and performing least squares fitting on multiple local coordinate data of the multiple sampling voxels to determine multiple fitting parameter values, the global coordinate data of the edge voxels can be determined by data mapping based on the multiple fitting parameter values, and a three-dimensional surface mesh can be obtained by Poisson surface reconstruction based on the multiple global coordinate data, thus realizing volumetric medical image three-dimensional surface reconstruction that is data-independent, has strong generalization ability and high reconstruction accuracy. Attached Figure Description
[0017] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0018] Figure 1 A schematic diagram illustrating an application scenario of the diffusion least squares method for three-dimensional surface reconstruction of medical images according to an embodiment of this application is shown.
[0019] Figure 2 A flowchart of a three-dimensional surface reconstruction method for medical images based on diffusion least squares according to an embodiment of this application is shown;
[0020] Figure 3A schematic diagram of a medical image three-dimensional surface reconstruction method based on diffusion least squares according to an embodiment of this application is shown;
[0021] Figure 4 A schematic diagram of a medical image three-dimensional surface reconstruction method based on diffusion least squares according to another embodiment of this application is shown;
[0022] Figure 5 A block diagram of a medical image three-dimensional surface reconstruction apparatus based on diffusion least squares according to an embodiment of this application is shown;
[0023] Figure 6 A block diagram of an electronic device according to an embodiment of this application is shown schematically. Detailed Implementation
[0024] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms "comprising," "including," etc., as used herein indicate the presence of the above-described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0027] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0028] In the embodiments of this application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security, network security, and national security.
[0029] In the embodiments of this application, the user's authorization or consent was obtained before obtaining or collecting the user's personal information.
[0030] Figure 1 A schematic diagram illustrating an application scenario of the diffusion least squares method for three-dimensional surface reconstruction of medical images according to an embodiment of this application is shown.
[0031] like Figure 1 As shown, volumetric medical images are first acquired, and then image segmentation and diffusion least squares optimization are performed based on computer equipment to obtain global coordinate data of edge voxels. Then, through surface deformation iterative optimization, a three-dimensional surface mesh is obtained based on multiple global coordinate data of multiple edge voxels, thereby obtaining the reconstruction result.
[0032] Figure 2 A flowchart of a three-dimensional surface reconstruction method for medical images based on diffusion least squares according to an embodiment of this application is shown.
[0033] like Figure 2 As shown, the medical image three-dimensional surface reconstruction method based on diffusion least squares includes steps S210~S250.
[0034] In step S210, edge extraction is performed based on the binary segmentation mask of the 3D image to determine multiple edge voxels of the 3D image.
[0035] In fields such as medical imaging, industrial non-destructive testing, and 3D biological image analysis, it is often necessary to process 3D images. A 3D image can be viewed as a spatial stacking of 2D images, composed of basic units arranged regularly on a 3D grid, which are called voxels. Each voxel has spatial coordinates and its corresponding image intensity value (such as grayscale value, computed volumetric value, etc.). Unlike pixels in a 2D image, voxels represent physical or biological properties within a tiny cubic region.
[0036] To separate target structures (such as organs, tumors, defects, and pores) from the background, binary segmentation masks are often used. A binary segmentation mask is a three-dimensional matrix with the same dimensions as the 3D image, where each voxel position is assigned a binary value: 1 indicates that the voxel belongs to the target structure; 0 indicates that the voxel does not belong to the target structure. Binary segmentation masks can be obtained through methods such as manual annotation, thresholding, region growing, and deep learning models.
[0037] In the embodiments of this application, a segmentation model for the target structure can be trained using deep learning. A given volumetric medical image is input into the segmentation model to obtain a binary segmentation mask for the target structure. The binary segmentation mask can be resampled to equal intervals according to actual accuracy requirements and hardware conditions. Voxels can be divided into mask voxels and background voxels based on the code values of the binary segmentation mask. A code value of 1 represents that the voxel belongs to the target structure and is used as the mask voxel; a code value of 0 represents that the voxel does not belong to the target structure and is used as the background voxel. An Euclidean distance transformation can be performed based on the binary mask to obtain the Euclidean distance D from the mask voxel to the background voxel. voxels The i-th edge voxel is identified as the edge voxel of the 3D image.
[0038] In step S220, multiple sampled voxels are selected from the voxels of the 3D image based on edge voxels.
[0039] In embodiments of this application, the sampling voxel is a voxel in a 3D image associated with an edge voxel. For example, once an edge voxel is determined, voxels within the surrounding spatial range of the edge voxel can be used as sampling voxels, wherein the surrounding spatial range can be determined according to the actual situation.
[0040] In step S230, least squares fitting is performed on multiple local coordinate data of multiple sampled voxels to determine multiple fitting parameter values and calculate the corresponding residual values.
[0041] Least squares fitting is a mathematical optimization method used to find a curve or function that minimizes the sum of squared errors between it and a given set of data points. A fitting equation can be defined, and data can be fitted using multiple local coordinate data points to obtain multiple parameters of the fitted equation, i.e., multiple fitting parameter values. Simultaneously, based on the fitting parameter values and the multiple local coordinate data points, residual values for each of the fitting parameter values can be obtained.
[0042] In step S240, if the residual value is greater than the fitting error threshold, the global coordinate data of the edge voxels are determined by data mapping based on multiple fitting parameter values.
[0043] In a 3D image, each edge voxel has its corresponding spatial coordinate data. The global coordinate data of the edge voxel is determined by data mapping. That is, the initial spatial coordinate data of the edge voxel in the 3D image is updated, and the global coordinate data is used as the updated spatial coordinate data, so that the position of the edge voxel in the 3D image is more smoothly represented.
[0044] In step S250, a three-dimensional surface mesh is obtained based on multiple global coordinate data through Poisson surface reconstruction and mesh iterative deformation.
[0045] Through the embodiments of this application, by acquiring the edge voxels of a three-dimensional image and multiple sampling voxels corresponding to the edge voxels, and performing least squares fitting on multiple local coordinate data of the multiple sampling voxels to determine multiple fitting parameter values, the global coordinate data of the edge voxels can be determined by data mapping based on the multiple fitting parameter values, and a three-dimensional surface mesh can be obtained by Poisson surface reconstruction based on the multiple global coordinate data. This achieves volumetric medical image three-dimensional surface reconstruction that is data-independent, has strong generalization ability, and high reconstruction accuracy.
[0046] According to an embodiment of this application, based on edge voxels, multiple sampling voxels are selected from voxels of a three-dimensional image, including: determining a third spatial range centered on the edge voxels; selecting voxels of the three-dimensional image located within the third spatial range to obtain multiple target voxels; and excluding edge voxels from the multiple target voxels to obtain multiple sampling voxels.
[0047] In the embodiments of this application, a neighborhood search algorithm can be used to obtain multiple sampling voxels adjacent to the edge voxels. To facilitate understanding of the relative positional relationship between multiple sampling voxels and edge voxels, the third spatial range can be imagined as a 3×3×3 cube with 27 small cubes. The edge voxels correspond to the small cube at the center of the cube. Voxels of the 3D image within the third spatial range are selected, i.e., it is determined whether there are voxels at the 26 positions corresponding to the other 26 small cubes. If so, the voxel at that position is identified as a sampling voxel. When voxels are present at all 26 positions corresponding to the small cubes, the number of sampling voxels is 26. When voxels are present at all 5 positions corresponding to the small cubes, the number of sampling voxels is 5. In the embodiments of this application, the third spatial range can be a 3×3×3 cube range centered on the edge voxel, a 4×4×4 cube range centered on the edge voxel, or a range corresponding to other spatial structures. Multiple sampling voxels can be represented as a sampling voxel set. In the form of.
[0048] According to an embodiment of this application, least squares fitting is performed on multiple local coordinate data of multiple sampled voxels to determine multiple fitting parameter values and calculate the corresponding residual values, including: determining a rotation matrix based on the normal vector of the edge voxel; performing coordinate transformation on the spatial coordinate data of the sampled voxels in the three-dimensional image through the rotation matrix to obtain the local coordinate data of the sampled voxels; performing least squares fitting on multiple local coordinate data to determine multiple fitting parameter values and calculate the corresponding residual values.
[0049] According to an embodiment of this application, the local coordinate data of the sampled voxels in a three-dimensional image is obtained by performing coordinate transformation on the spatial coordinate data of the sampled voxels in the three-dimensional image using a rotation matrix, including: subtracting the spatial coordinate data of the sampled voxels in the three-dimensional image from the spatial coordinate data of the edge voxels in the three-dimensional image to obtain second coordinate data; and performing coordinate transformation on the second coordinate data using a rotation matrix to obtain the local coordinate data of the sampled voxels.
[0050] When the spatial coordinates of the edge voxel are (x, y, z), its corresponding Euclidean distance is D(x, y, z). The gradient field of the edge voxel can then be expressed as:
[0051] (1);
[0052] The normal vector of the edge voxel can then be expressed as:
[0053] (2);
[0054] Local coordinate data refers to the coordinate position of the sampled voxels in a local coordinate system. The local coordinate system is a new coordinate system established with the edge voxels as the origin, where the Z-axis of the local coordinate system coincides with the normal vector corresponding to the edge voxel's normal vector. A rotation matrix can be used to transform the spatial coordinate data of the sampled voxels into local coordinate data. The transformation formula is:
[0055] (3);
[0056] Among them, R i Let P be the rotation matrix corresponding to the i-th edge voxel. i P represents the spatial coordinate data of the i-th edge voxel. j The spatial coordinate data of the j-th sampled voxel.
[0057] Least square fitting is performed based on multiple local coordinate data to determine multiple fitting parameter values, i.e., a quadratic surface fitting equation is used to fit the sampled voxel set within the local coordinate system. By performing a fitting process and forcing a smooth transition on the local surface, the fitting equation can be expressed as:
[0058] (4);
[0059] Where x, y, and z are the three coordinate parameter values of the local coordinate data of the sampled voxel, and a, b, c, d, e, and f are the fitting parameter values.
[0060] The residual value after least squares fitting can be expressed as:
[0061] (5);
[0062] Where, x j y j , z j These are the three coordinate parameter values of the local coordinate data of the j-th sampled voxel.
[0063] According to an embodiment of this application, the global coordinate data of an edge voxel is determined by data mapping based on multiple fitted parameter values, including: selecting a first parameter value from multiple fitted parameter values; using the first parameter value as the coordinate value of the third axis in a three-dimensional spatial coordinate system to obtain local coordinate data of the edge voxel; performing coordinate transformation on the local coordinate data of the edge voxel using a rotation matrix to obtain first coordinate data; and adding the spatial coordinate data of the edge voxel in the three-dimensional image to the first coordinate data to obtain global coordinate data of the edge voxel.
[0064] When multiple fitting parameter values are a, b, c, d, e, and f, then f is the first parameter value. At this time, the local coordinate data P of the i-th edge voxel... ’ i The global coordinates of the i-th edge voxel can be represented as (0, 0, f), and can be represented as:
[0065] (6);
[0066] Among them, R i -1 For R i The inverse matrix.
[0067] In the embodiments of this application, by converting the spatial coordinate data of the edge voxels into global coordinate data, the position of the edge voxels in the three-dimensional image is actually smoothed based on the relative positional relationship between the edge voxels and the sampled voxels, which provides a basis for the subsequent reconstruction of the three-dimensional surface mesh.
[0068] According to an embodiment of this application, a three-dimensional surface mesh is obtained based on multiple global coordinate data through Poisson surface reconstruction and mesh iterative deformation, including: performing Poisson surface reconstruction on multiple global coordinate data to generate a source mesh; using multiple edge voxels as target point clouds; using the source mesh as an initial template and the target point clouds as alignment targets, introducing multiple loss function constraints to iteratively deform the source mesh to obtain a three-dimensional surface mesh.
[0069] In the embodiments of this application, after smoothing the edge voxels based on global coordinate data, all smoothed edge voxels are used as an edge voxel set and input into Poisson surface reconstruction to generate a source mesh homeomorphic to the target structure. Subsequently, initial edge voxels are sampled from a binary segmentation mask and used as the target point cloud for optimization iteration. Then, using the source mesh as the initial template, multiple loss function constraints are introduced to achieve accurate alignment between the source mesh and the target point cloud. The loss function can be expressed as:
[0070] (7);
[0071] Wherein, λ1, λ2, λ3, and λ4 are preset constants; This is a bidirectional chamfer distance loss, used to constrain the positional deviation between the source mesh and the target point cloud; Mesh edge length loss is used to maintain the stability of the mesh topology; To ensure consistency of normal vector loss, it is used to ensure a smooth transition of surface normals; This is the Laplacian smoothing loss, used to maintain mesh smoothness.
[0072] When the value L of the loss function is less than a preset threshold or the number of iterations reaches a specified number, the iterative optimization stops, and the final 3D surface mesh is output. In the embodiments of this application, the preset threshold can be 10. -5 .
[0073] According to an embodiment of this application, the medical image three-dimensional surface reconstruction method based on diffusion least squares further includes: when the residual value is less than or equal to the fitting error threshold: determining a first spatial range centered on the sampled voxels, thereby obtaining a second spatial range determined based on multiple first spatial ranges of multiple sampled voxels; updating multiple sampled voxels by filtering the voxels of the three-dimensional image located within the second spatial range; and updating multiple fitting parameter values and residual values based on the updated multiple sampled voxels.
[0074] When the residual value is less than or equal to the fitting error threshold, it indicates that the number of currently determined sampling voxels is insufficient. To more comprehensively represent the surface region centered on the edge voxels, a larger spatial range is needed to filter more sampling voxels, and more local coordinate data is used for least-squares fitting. When the residual value determined based on the current sampling voxel set is small, the size of the sampling voxel set can be expanded by filtering more sampling voxels. For example, if there are 5 sampling voxels obtained based on the edge voxels, performing least-squares fitting on 5 local spatial data may result in a small residual value, less than or equal to the fitting error threshold. In this case, more sampling voxels can be obtained through "diffusion" to update multiple fitting parameter values and residual values. For example, 5 sampling voxels are "diffused" to 25 sampling voxels. Then, least squares fitting is performed based on the 25 local spatial data corresponding to these 25 voxels, and the resulting fitting parameter values and residual values are updated. If the residual values obtained from fitting based on the 25 local spatial data are still less than or equal to the fitting error threshold, the 25 sampling voxels are further "diffused" to 80 sampling voxels, and least squares fitting is performed based on the 80 local spatial data corresponding to these 80 voxels, thereby continuously updating the fitting parameter values and residual values. The core concept of this application is to expand the number of sampling voxels through diffusion to obtain a more widely distributed set of sampling voxels, and then perform least squares fitting based on this expanded set of sampling voxels, thereby improving the fitting effect. This application summarizes and defines this technical solution as diffused least squares.
[0075] For ease of understanding, the edge voxel can be considered as a point, which remains constant as the center. Multiple voxels surrounding the edge voxel are considered as multiple sampling voxels. When the results obtained based on multiple sampling voxels do not meet the threshold condition, a range is defined centered on each sampling voxel, i.e., a first spatial range. These multiple first spatial ranges of multiple sampling voxels are integrated to obtain a larger spatial range, i.e., a second spatial range, still centered on the edge voxel. All voxels within the second spatial range are considered as updated multiple sampling voxels, and this process is repeated. This method, starting with the edge voxel as the initial point and progressively expanding the spatial coverage outwards, with the outer boundary of the currently determined multiple sampling voxels serving as the starting boundary for the next determined multiple sampling voxels, gradually increases the size of the sampling voxel set, exhibiting an iterative diffusion process in spatial behavior.
[0076] According to an embodiment of this application, the medical image three-dimensional surface reconstruction method based on diffusion least squares further includes: when the updated residual value is greater than a preset multiple of the original residual value, determining the global coordinate data of the edge voxels by data mapping based on multiple fitting parameter values before the update.
[0077] Least square fitting based on multiple local coordinate data does not necessarily yield better results with more local coordinate data. It's possible that diffusing to obtain more sampling voxels can lead to larger residuals after least square fitting based on more local coordinate data. Therefore, if the updated residual value is greater than a preset multiple of the original residual value, it indicates that diffusing more sampling voxels has resulted in a significantly worse fit, exceeding the tolerance threshold, and diffusing should be stopped. For example, if the updated residual value is more than 1.3 times the original residual value, diffusing should be stopped, and the global coordinate data of the edge voxels should be determined through data mapping based on the original fitting parameter values.
[0078] According to an embodiment of this application, the medical image three-dimensional surface reconstruction method based on diffusion least squares further includes: obtaining the number of updates of the residual values; and, when the number of updates is equal to a preset number threshold, determining the global coordinate data of the edge voxels through data mapping based on the currently updated multiple fitting parameter values.
[0079] During the voxel update iteration process, the number of voxels grows exponentially. Therefore, to avoid parameter explosion caused by an excessive number of voxels during the update iteration process, it is necessary to limit the number of voxel update iterations. By setting a preset threshold, iteration stops when the number of updates to the residual value equals the preset threshold. Based on the currently updated multiple fitted parameter values, the global coordinate data of the edge voxels is determined through data mapping.
[0080] Figure 3 A schematic diagram of a three-dimensional surface reconstruction method for medical images based on diffusion least squares according to an embodiment of this application is shown.
[0081] like Figure 3 As shown, segmenting the target object in the medical image yields a segmentation result. Resampling the segmentation result yields a resampled segmentation result, which is a preprocessing operation for acquiring a 3D image. Edge voxels are extracted from the resampled segmentation result, i.e., edge extraction is performed based on the binary segmentation mask of the 3D image to determine multiple edge voxels in the 3D image. Diffusion least squares optimization is performed on the edge voxels to obtain a low-precision 3D surface, i.e., the global coordinate data of the edge voxels are determined through data mapping. The resampled segmentation result is used as the target point cloud, and the low-precision 3D surface is iterated through deformation to output a high-precision 3D surface mesh, i.e., image reconstruction is performed based on multiple global coordinate data.
[0082] Figure 4 A schematic diagram of a three-dimensional surface reconstruction method for medical images based on diffusion least squares according to another embodiment of this application is shown.
[0083] like Figure 4As shown, local coordinate transformation represents transforming the spatial coordinate data of the sampled voxels in the 3D image using a rotation matrix to obtain the local coordinate data of the sampled voxels. Local least squares fitting represents performing least squares fitting on multiple local coordinate data of multiple sampled voxels to determine multiple fitting parameter values and calculate the corresponding residual values. Coordinate update represents determining the global coordinate data of edge voxels through data mapping based on multiple fitting parameter values. Convergence of diffusion least squares optimization represents determining whether the fitting result meets preset conditions, including: the residual value is greater than the fitting error threshold, the updated residual value is greater than a preset multiple of the original residual value, and the number of updates of the residual value is equal to a preset threshold. Smoothing boundary voxel points represents obtaining the global coordinate data of edge voxels to achieve edge voxel smoothing. Convergence of surface deformation iterative optimization represents determining whether the value of the loss function is less than a preset threshold or the number of iterations reaches a specified number.
[0084] Figure 5 A block diagram of a medical image three-dimensional surface reconstruction apparatus based on diffusion least squares according to an embodiment of this application is shown.
[0085] like Figure 5 As shown, the medical image three-dimensional surface reconstruction device based on diffusion least squares includes an edge voxel determination module 510, a sampling voxel determination module 520, a data processing module 530, a coordinate update module 540, and a three-dimensional surface reconstruction module 550.
[0086] Edge voxel determination module 510 is used for edge extraction based on binary segmentation mask of 3D image to determine multiple edge voxels of 3D image.
[0087] The sampling voxel determination module 520 is used to select multiple sampling voxels from voxels in a 3D image based on edge voxels.
[0088] The data processing module 530 is used to perform least squares fitting on multiple local coordinate data of multiple sampled voxels, determine multiple fitting parameter values, and calculate the corresponding residual values.
[0089] The coordinate update module 540 is used to determine the global coordinate data of edge voxels based on multiple fitting parameter values through data mapping when the residual value is greater than the fitting error threshold.
[0090] The 3D surface reconstruction module 550 is used to obtain a 3D surface mesh based on multiple global coordinate data through Poisson surface reconstruction and mesh iterative deformation.
[0091] Figure 6 A block diagram of an electronic device according to an embodiment of this application is shown. Figure 6The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0092] like Figure 6 As shown, an electronic device 600 according to an embodiment of this application includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0093] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 602 and / or RAM 603. It should be noted that the aforementioned programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in one or more of the aforementioned memories.
[0094] According to embodiments of this application, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.
[0095] According to embodiments of this application, the method flow according to embodiments of this application can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by processor 601, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0096] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0097] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0098] For example, according to embodiments of this application, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.
[0099] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this application. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the diffusion least squares-based medical image three-dimensional surface reconstruction method provided in the embodiments of this application.
[0100] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0101] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0102] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations are not explicitly described in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments of this application can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of this application.
[0104] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A method for three-dimensional surface reconstruction of medical images based on diffusion least squares, characterized in that, include: Edge extraction is performed based on a binary segmentation mask of a 3D image to determine multiple edge voxels of the 3D image; Based on the edge voxels, multiple sampling voxels are selected from the voxels of the three-dimensional image; Least squares fitting is performed on multiple local coordinate data of multiple sampling voxels to determine multiple fitting parameter values, and the corresponding residual values are calculated. If the residual value is greater than the fitting error threshold, the global coordinate data of the edge voxel is determined by data mapping based on multiple fitting parameter values. Based on multiple global coordinate data, a three-dimensional surface mesh is obtained through Poisson surface reconstruction and mesh iterative deformation.
2. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 1, characterized in that, The method further includes: When the residual value is less than or equal to the fitting error threshold: A first spatial range is determined with the sampling voxel as the center, thereby obtaining a second spatial range determined based on multiple first spatial ranges of multiple sampling voxels; The plurality of sampled voxels are updated by filtering the voxels of the three-dimensional image located within the second spatial range; Based on the updated sampling voxels, the updated fitting parameter values and residual values are obtained.
3. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 2, characterized in that, The method further includes: If the updated residual value is greater than a preset multiple of the original residual value, the global coordinate data of the edge voxels are determined by data mapping based on the multiple fitting parameter values before the update.
4. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 2, characterized in that, The method further includes: Obtain the number of times the residual value has been updated; When the number of updates equals a preset threshold, the global coordinate data of the edge voxels are determined by data mapping based on the currently updated values of multiple fitting parameters.
5. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 1, characterized in that, The step of determining the global coordinate data of the edge voxels through data mapping based on multiple fitting parameter values includes: The first parameter value is selected from the plurality of fitted parameter values; Using the first parameter value as the coordinate value of the third axis in the three-dimensional spatial coordinate system, the local coordinate data of the edge voxel is obtained; The local coordinate data of the edge voxels are transformed using a rotation matrix to obtain the first coordinate data; The spatial coordinate data of the edge voxel in the 3D image is added to the first coordinate data to obtain the global coordinate data of the edge voxel.
6. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 1, characterized in that, The step of performing least-squares fitting on multiple local coordinate data of multiple sampled voxels to determine multiple fitting parameter values and calculate the corresponding residual values includes: The rotation matrix is determined based on the normal vector of the edge voxel; The spatial coordinate data of the sampled voxel in the three-dimensional image are transformed by the rotation matrix to obtain the local coordinate data of the sampled voxel. Least squares fitting is performed on multiple local coordinate data to determine multiple fitting parameter values, and the corresponding residual values are calculated.
7. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 6, characterized in that, The step of performing coordinate transformation on the spatial coordinate data of the sampled voxels in the three-dimensional image using the rotation matrix to obtain the local coordinate data of the sampled voxels includes: Subtract the spatial coordinate data of the sampled voxel in the three-dimensional image from the spatial coordinate data of the edge voxel in the three-dimensional image to obtain the second coordinate data; The rotation matrix is used to perform coordinate transformation on the second coordinate data to obtain the local coordinate data of the sampled voxel.
8. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 1, characterized in that, The step of selecting multiple sampled voxels from the voxels of the 3D image based on the edge voxels includes: The third spatial range is defined with the edge voxel as the center; Voxels of the three-dimensional image located within the third spatial range are selected to obtain multiple target voxels; The edge voxels are excluded from the plurality of target voxels to obtain a plurality of sampled voxels.
9. The method for three-dimensional surface reconstruction of medical images based on diffusion least squares according to claim 1, characterized in that, The process of obtaining a three-dimensional surface mesh based on multiple global coordinate data through Poisson surface reconstruction and iterative mesh deformation includes: Poisson surface reconstruction is performed on multiple global coordinate data to generate the source mesh; Multiple edge voxels are used as target point clouds; Using the source mesh as the initial template and the target point cloud as the alignment target, multiple loss function constraints are introduced to iteratively deform the source mesh to obtain a three-dimensional surface mesh.
10. A medical image three-dimensional surface reconstruction device based on diffusion least squares, comprising: An edge voxel determination module is used to perform edge extraction based on a binary segmentation mask of a 3D image to determine multiple edge voxels of the 3D image; A sampling voxel determination module is used to select multiple sampling voxels from the voxels of the three-dimensional image based on the edge voxels; The data processing module is used to perform least squares fitting on multiple local coordinate data of multiple sampling voxels, determine multiple fitting parameter values, and calculate the corresponding residual values. The coordinate update module is used to determine the global coordinate data of the edge voxel based on multiple fitting parameter values by data mapping when the residual value is greater than the fitting error threshold. The three-dimensional surface reconstruction module is used to obtain a three-dimensional surface mesh based on multiple global coordinate data through Poisson surface reconstruction and mesh iterative deformation.