Progress tracking method for skin lesion area intelligent measurement and three-dimensional reconstruction

By setting reference marking points in the skin lesion area and combining edge weight positioning and adaptive grid segmentation algorithm, the accuracy of edge recognition and progress tracking in three-dimensional reconstruction of skin lesions is solved, and high-precision lesion area measurement and progress analysis are achieved, providing a scientific basis for clinical treatment.

CN120564984AInactive Publication Date: 2025-08-29CHANGZHOU TCM HOSPITAL
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510939645.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-08-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the three-dimensional reconstruction of skin lesion areas, it is difficult to achieve stable feature matching and accurate lesion edge recognition, and the lesion progress tracking method is limited by the lack of spatial reference benchmarks, resulting in insufficient reconstruction accuracy and inaccurate progress analysis.

Method used

By setting reference mark points around the lesion area, obtaining their three-dimensional spatial coordinates, combining edge weight positioning algorithms to accurately locate and compensate correction of the edges of the lesion area, and using the adaptive grid segmentation algorithm to refine the morphological characteristics of the lesion area, and at the same time, using reference mark points as registration reference to achieve accurate spatial registration of data at different time points.

Benefits of technology

It improves the accuracy of edge recognition in the lesion area and the accuracy of three-dimensional reconstruction, provides a reliable data basis for lesion progress analysis, and generates a comprehensive measurement report to support doctors' intuitive tracking of changes in skin lesions and clinical treatment decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120564984A_ABST
    Figure CN120564984A_ABST
Patent Text Reader

Abstract

The invention provides a progress tracking method for skin lesion area intelligent measurement and three-dimensional reconstruction, which relates to the technical field of medical image processing, and comprises the steps of setting reference mark points at the periphery of a lesion area, collecting multi-angle image data, positioning the edge of the lesion area by combining an edge weight positioning algorithm with the reference mark points, a three-dimensional structure is reconstructed by adopting grid construction and a self-adaptive subdivision algorithm, and spatial registration is carried out by utilizing a reference mark point, so that precise tracking of the progress of a lesion area at different time points is realized, and the monitoring precision and reliability of the morphological change of the skin lesion area are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to medical image processing technology, and in particular to a progress tracking method for intelligent measurement and three-dimensional reconstruction of skin lesion area. Background Art

[0002] Image processing and 3D reconstruction technologies are widely used in medical image analysis. Currently, 3D model reconstruction is primarily achieved through multi-view image acquisition and feature matching. However, when reconstructing skin lesions, traditional feature-based reconstruction methods struggle to achieve stable matching results due to the lack of distinct surface reflectivity and texture features, resulting in insufficient reconstruction accuracy. Furthermore, existing meshing algorithms often employ a uniform meshing strategy, failing to adaptively refine critical areas such as lesion edges.

[0003] Existing methods for tracking lesion progression rely primarily on image registration techniques to align data collected at different time points. However, due to the lack of a reliable spatial reference, registration based solely on image features is susceptible to changes in lesion morphology, making it difficult to accurately distinguish between global displacement and local deformation of the lesion area, thus affecting the accuracy of progression analysis.

[0004] Therefore, there is an urgent need for a method for intelligent measurement and three-dimensional reconstruction of skin lesion area to track its progress. By introducing a spatial reference benchmark to improve the reliability of feature matching, and using an adaptive grid subdivision strategy to achieve accurate expression of the morphological characteristics of the lesion area, it provides effective technical support for the quantitative analysis of lesion progression. Summary of the Invention

[0005] The embodiment of the present invention provides a method for intelligent measurement and three-dimensional reconstruction of skin lesion area and tracking progress, which can solve the problems in the prior art.

[0006] A first aspect of an embodiment of the present invention provides a method for tracking the progress of intelligent measurement and three-dimensional reconstruction of skin lesion area, comprising:

[0007] Collect multi-angle image data of the lesion area, set reference marking points around the lesion area, and obtain the three-dimensional spatial coordinates of the reference marking points;

[0008] Perform edge detection based on multi-angle image data, use edge weight positioning algorithm combined with the three-dimensional spatial coordinates of the reference markers to locate the edge of the lesion area, and compensate and correct the edge of the lesion area to obtain an enhanced image;

[0009] Based on the enhanced image and the three-dimensional spatial coordinates of the fiducial markers, a mesh construction algorithm is used to generate an initial three-dimensional mesh of the lesion area. The node curvature values ​​are calculated based on the mesh node coordinates and mesh unit topological relationships in the initial three-dimensional mesh. An adaptive mesh subdivision algorithm is used to refine areas where the curvature values ​​exceed a preset curvature threshold, obtaining subdivided mesh data that contains the morphological characteristics of the lesion area.

[0010] Using the three-dimensional spatial coordinates of the fiducial markers as the registration reference, the subdivided grid data collected at different time points are spatially registered. The progression parameters of the lesion area are calculated based on the registered subdivided grid data, and a measurement report is generated based on the subdivided grid data and the progression parameters.

[0011] In an optional embodiment,

[0012] Edge detection is performed based on multi-angle image data. The edge position of the lesion area is located using an edge weight positioning algorithm combined with the three-dimensional spatial coordinates of the reference markers. The edge position of the lesion area is compensated and corrected to obtain an enhanced image including:

[0013] Dividing the multi-angle image data into overlapping sub-blocks, calculating the local histogram and cumulative distribution function of the overlapping sub-blocks, constructing adaptive weights according to the spatial distances between adjacent sub-blocks for fusion, and obtaining a contrast-enhanced preprocessed image;

[0014] Constructing a multi-scale hybrid edge detection operator, performing edge response calculation on the pre-processed image, analyzing local extreme value features, and obtaining an initial edge intensity map of the lesion area;

[0015] Constructing a distance field based on the three-dimensional spatial coordinates of the reference markers, performing nonlinear mapping based on the morphological features of the lesion area to obtain a spatial constraint field, and fusing the spatial constraint field with the initial edge intensity map to generate a constrained edge feature map;

[0016] According to the constrained edge feature map, local gradient information is extracted, and the gradient direction consistency weight is calculated to obtain a weighted edge point set. The weighted edge point set is threshold-screened to obtain initial edge points. The initial edge points are gap-connected using morphological operations of adaptive kernels. Noise points are removed by combining the region growing criterion to obtain a continuous edge contour. The local curvature of the continuous edge contour is calculated, and the contour is smoothed and corrected. The corrected edge contour is superimposed on the preprocessed image to obtain an enhanced image.

[0017] In an optional embodiment,

[0018] The morphological operation of the adaptive kernel is used to perform gap connection on the initial edge points, and the noise points are removed by combining the region growing criterion to obtain the continuous edge contour including:

[0019] Obtaining the position information of the initial edge point, constructing a neighborhood window based on the position information, calculating the pixel distribution within the neighborhood window, and extracting the local curvature value and gradient direction of the edge point;

[0020] Determining a scale parameter and a direction parameter of a morphological kernel function according to the local curvature value and the gradient direction, inputting the scale parameter and the direction parameter into a preset kernel function template to generate an adaptive morphological structure element;

[0021] Performing a morphological dilation operation on the initial edge points using the adaptive morphological structuring element, comparing the dilated edge region with the original edge point set, extracting newly added connected edge points, and merging the newly added connected edge points with the original edge point set to obtain an initially connected edge point set;

[0022] For each edge point in the initially connected edge point set, a connectivity metric, a distance metric, and an edge strength metric are calculated, and a weighted combination is performed to generate a region growing criterion. The connected edge points are screened according to the region growing criterion, and edge points that do not meet the criterion threshold are eliminated to obtain optimized edge points.

[0023] The optimized edge points are iteratively refined using a thinning template, and the edge topology is kept unchanged in each iteration until a continuous edge contour with a single pixel width is obtained.

[0024] In an optional embodiment,

[0025] Based on the enhanced image and the 3D spatial coordinates of the fiducial markers, an initial 3D mesh of the lesion area is generated using a mesh construction algorithm, including:

[0026] Obtaining the three-dimensional spatial coordinates of the lesion area edge contour point set and the reference mark points in the enhanced image, calculating the position offset and rotation angle between adjacent reference mark points, establishing a piecewise continuous spatial mapping function, and transforming the lesion area edge contour point set into a three-dimensional spatial coordinate system through the spatial mapping function to obtain the lesion area spatial edge contour points;

[0027] Constructing a local coordinate system centered on the spatial edge contour point of the lesion area, calculating the Euclidean distance and normal deviation from any position in the lesion area to the spatial edge contour point of the lesion area, calculating an influence weight based on the Euclidean distance and normal deviation, and superimposing the influence weights to obtain an edge density function;

[0028] The initial density distribution of the grid nodes is determined based on the edge density function, the initial frontier surface is constructed with the spatial edge contour points of the lesion area, the node spacing of the initial frontier surface is calculated to generate new grid nodes, tetrahedral grid units are connected to construct and the frontier surface is updated until the internal space of the lesion area is filled to generate an initial three-dimensional grid.

[0029] In an optional embodiment,

[0030] The node curvature values ​​are calculated based on the grid node coordinates and grid cell topological relationships in the initial three-dimensional grid. An adaptive grid subdivision algorithm is used to refine areas where the curvature values ​​exceed the preset curvature threshold. The subdivided grid data containing the morphological characteristics of the lesion area is obtained, including:

[0031] Obtaining the grid node coordinates and grid unit topological relationships of the initial three-dimensional grid, calculating the set of adjacent nodes within the first-order neighborhood for each grid node, constructing a local coordinate system for the node based on the set of adjacent nodes, calculating the normal vector of the node, fitting a quadratic surface to each grid node using the normal vector and the local coordinate system, calculating the principal curvature value and principal curvature direction of the quadratic surface at the current node, and obtaining the local curvature feature of the node;

[0032] Calculating the maximum curvature value of each grid cell based on the local curvature feature, comparing the maximum curvature value with a preset curvature threshold, and marking the grid cells that need to be subdivided;

[0033] For the marked grid cells, the grid subdivision direction is determined according to the principal curvature direction of the nodes, the subdivision ratio is set according to the principal curvature value, and a new grid node is inserted into the grid cells;

[0034] The local curvature features are used to perform local surface fitting on the new grid nodes, adjust the spatial positions of the new grid nodes, reconstruct the grid units containing the new grid nodes and update the topological relationships to obtain subdivided grid data containing the morphological features of the lesion area.

[0035] In an optional embodiment,

[0036] Using the 3D coordinates of the fiducial markers as the registration reference, spatial registration is performed on the subdivided grid data collected at different time points. The progression parameters of the lesion area are calculated based on the registered subdivided grid data. A measurement report is generated based on the subdivided grid data and the progression parameters, including:

[0037] Obtain the three-dimensional spatial coordinates of the fiducial markers in the subdivided grid data at different time points, select the adjacent markers in the first-order neighborhood of each fiducial marker, calculate the spatial distance and connection direction between the adjacent markers and the central marker, and construct a structural feature vector reflecting the local spatial distribution;

[0038] Calculating the similarity between marker points at different time points using the structural feature vector, establishing a matching strength matrix of the marker points based on the similarity, and obtaining corresponding relationships of the marker points by screening according to the matching strength matrix;

[0039] The matching strength in the correspondence between the marker points is used as the registration weight to construct a weighted distance field function. The spatial transformation matrix is ​​solved by minimizing the weighted distance field function, and the spatial transformation matrix is ​​used to perform overall registration on the subdivided grid data at the reference time point.

[0040] Calculating the deformation direction and amplitude of the local area based on the registered marker point pairs, constructing a deformation mapping function that describes tissue deformation, and performing local deformation registration on the subdivided mesh data after overall registration according to the deformation mapping function to obtain the subdivided mesh data after local registration;

[0041] The rotation angle and translation distance of the lesion area are extracted from the spatial transformation matrix as global motion parameters, the volume change rate and maximum deformation amplitude of the lesion area are extracted from the deformation mapping function as local deformation parameters, and the curvature and expansion speed of the lesion area boundary are calculated based on the subdivided grid data after local registration as boundary feature parameters.

[0042] The global motion parameters, local deformation parameters and boundary feature parameters are combined to generate a progress measurement report of the lesion area.

[0043] In an optional embodiment,

[0044] The deformation direction and amplitude of the local area are calculated based on the registered marker point pairs, and a deformation mapping function describing tissue deformation is constructed. The subdivided mesh data after global registration is locally deformed and registered according to the deformation mapping function. The subdivided mesh data after local registration includes:

[0045] Selecting marker points in the first-order neighborhood of the registered marker point pair to form a local point set, and establishing a local deformation gradient tensor based on the local point set;

[0046] Decomposing the local deformation gradient tensor to obtain a local deformation tensor, extracting the eigenvector of the local deformation tensor to obtain the deformation direction of the local area, and obtaining the deformation amplitude of the local area by taking the difference between the local deformation tensor and the unit matrix;

[0047] constructing a displacement term of a deformation mapping function based on the deformation direction and deformation amplitude of the local area, constraining the displacement term using a spatial distance weighted function, constructing a strain energy constraint of the deformation mapping function, and determining a continuity condition of the deformation field based on the strain energy constraint;

[0048] A deformation mapping function that satisfies the continuity condition is solved using a variational method, a displacement of each point in the globally registered subdivided mesh data is calculated based on the deformation mapping function, and the subdivided mesh data is deformed according to the displacement to obtain the subdivided mesh data after local deformation registration.

[0049] According to a second aspect of an embodiment of the present invention, an electronic device is provided, including:

[0050] processor;

[0051] a memory for storing processor-executable instructions;

[0052] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0053] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0054] In this embodiment, reference markers are used to assist in three-dimensional reconstruction. By setting reference markers around the lesion area and obtaining their three-dimensional spatial coordinates, the edge weight positioning algorithm is combined to achieve precise positioning and compensation correction of the edge of the lesion area, thereby enhancing image quality and improving the accuracy of edge recognition in the lesion area. An adaptive grid subdivision algorithm is used to refine the area exceeding the preset curvature threshold according to the node curvature value, effectively retaining the morphological feature details of the lesion area, ensuring the accuracy and authenticity of the three-dimensional reconstruction, and providing a reliable data basis for subsequent lesion progression analysis. By using reference markers as the alignment reference, accurate spatial alignment of data collected at different time points is achieved. The progression parameters of the lesion area are obtained by calculating the aligned subdivided grid data, and a comprehensive measurement report is generated, enabling doctors to intuitively and accurately track changes in the area of ​​skin lesions, providing a scientific basis for clinical treatment decisions and efficacy evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 Schematic diagram of the process of tracking the progress of intelligent measurement and three-dimensional reconstruction of skin lesion area according to an embodiment of the present invention;

[0056] Figure 2 This is a heat map of edge density function distribution according to an embodiment of the present invention;

[0057] Figure 3 This is a cloud diagram of the spatial distribution of the lesion boundary expansion speed according to an embodiment of the present invention. DETAILED DESCRIPTION

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0059] The following specific embodiments are used to describe the technical solution of the present invention in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0060] Figure 1 FIG. 1 is a flow chart of a method for tracking the progress of intelligent measurement and three-dimensional reconstruction of skin lesion area according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0061] Collect multi-angle image data of the lesion area, set reference marking points around the lesion area, and obtain the three-dimensional spatial coordinates of the reference marking points;

[0062] Perform edge detection based on multi-angle image data, use edge weight positioning algorithm combined with the three-dimensional spatial coordinates of the reference markers to locate the edge of the lesion area, and compensate and correct the edge of the lesion area to obtain an enhanced image;

[0063] Based on the enhanced image and the three-dimensional spatial coordinates of the fiducial markers, a mesh construction algorithm is used to generate an initial three-dimensional mesh of the lesion area. The node curvature values ​​are calculated based on the mesh node coordinates and mesh unit topological relationships in the initial three-dimensional mesh. An adaptive mesh subdivision algorithm is used to refine areas where the curvature values ​​exceed a preset curvature threshold, obtaining subdivided mesh data that contains the morphological characteristics of the lesion area.

[0064] Using the three-dimensional spatial coordinates of the fiducial markers as the registration reference, the subdivided grid data collected at different time points are spatially registered. The progression parameters of the lesion area are calculated based on the registered subdivided grid data, and a measurement report is generated based on the subdivided grid data and the progression parameters.

[0065] In an optional embodiment,

[0066] Edge detection is performed based on multi-angle image data. The edge position of the lesion area is located using an edge weight positioning algorithm combined with the three-dimensional spatial coordinates of the reference markers. The edge position of the lesion area is compensated and corrected to obtain an enhanced image including:

[0067] Dividing the multi-angle image data into overlapping sub-blocks, calculating the local histogram and cumulative distribution function of the overlapping sub-blocks, constructing adaptive weights according to the spatial distances between adjacent sub-blocks for fusion, and obtaining a contrast-enhanced preprocessed image;

[0068] Constructing a multi-scale hybrid edge detection operator, performing edge response calculation on the pre-processed image, analyzing local extreme value features, and obtaining an initial edge intensity map of the lesion area;

[0069] Constructing a distance field based on the three-dimensional spatial coordinates of the reference markers, performing nonlinear mapping based on the morphological features of the lesion area to obtain a spatial constraint field, and fusing the spatial constraint field with the initial edge intensity map to generate a constrained edge feature map;

[0070] According to the constrained edge feature map, local gradient information is extracted, and the gradient direction consistency weight is calculated to obtain a weighted edge point set. The weighted edge point set is threshold-screened to obtain initial edge points. The initial edge points are gap-connected using morphological operations of adaptive kernels. Noise points are removed by combining the region growing criterion to obtain a continuous edge contour. The local curvature of the continuous edge contour is calculated, and the contour is smoothed and corrected. The corrected edge contour is superimposed on the preprocessed image to obtain an enhanced image.

[0071] In this embodiment, the acquired multi-angle image data is first preprocessed. The image is divided into overlapping sub-blocks, each 32×32 pixels in size, with an 8-pixel overlap between adjacent sub-blocks. A local histogram is calculated for each overlapping sub-block, and the frequency of occurrence of pixels at each grayscale level is counted to generate a 256-level grayscale histogram. Based on the local histogram, a cumulative distribution function (CDF) is calculated for each sub-block. This function represents the proportion of pixels with a grayscale value less than or equal to a certain value within the total number of pixels. Adaptive weights are constructed based on the spatial distance between adjacent sub-blocks, with closer distances giving greater weights. Specifically, when the distance between the centers of two sub-blocks is less than 20 pixels, the weight is set to 0.8; when the distance is between 20 and 40 pixels, the weight is set to 0.5; and when the distance is greater than 40 pixels, the weight is set to 0.2. Using these weights, the CDFs of adjacent sub-blocks are weightedly fused to generate a contrast-enhanced preprocessed image. In this image, the contrast between the lesion and normal skin is improved by approximately 30%.

[0072] A multi-scale hybrid edge detection operator was constructed to calculate edge responses. This hybrid operator, consisting of the Sobel, Prewitt, and Canny operators, performs edge detection at scales of 3×3, 5×5, and 7×7, respectively. The Sobel operator primarily detects horizontal and vertical edges, the Prewitt operator detects diagonal edges, and the Canny operator provides a more complete edge profile. The hybrid operator was applied to the preprocessed image, calculating the gradient response value of each pixel in all directions. Pixels with a gradient response value greater than 15 were considered potential edge points. The gradient response extreme value features within a local 3×3 neighborhood were analyzed to determine whether the central pixel was a local extreme point. If so, it was marked as an edge candidate. All edge candidate points were combined to generate an initial edge intensity map of the lesion area. The edge intensity values ​​in this map range from 0 to 255, with larger values ​​indicating more significant edge features.

[0073] A distance field is constructed based on the three-dimensional spatial coordinates of the fiducial markers. The fiducial markers are typically 6-8 distinct anatomical landmarks surrounding the lesion. The three-dimensional coordinates of these points are acquired using a binocular stereo vision system with an accuracy of up to 0.1 mm. With the fiducial markers as the center, the Euclidean distance from each pixel on the image plane to the nearest fiducial marker is calculated to generate the initial distance field. The distance field is nonlinearly mapped based on the morphological features of the lesion, such as area, perimeter, and circularity. The specific mapping method is as follows: when the distance is less than 10 mm, the mapping coefficient is 1.2; when the distance is between 10 and 30 mm, the mapping coefficient is 1.0; and when the distance is greater than 30 mm, the mapping coefficient is 0.8. After mapping, a spatial constraint field is obtained, which is weightedly fused with the initial edge intensity map in a ratio of 7:3 to generate a constrained edge feature map.

[0074] Local gradient information is extracted based on the constrained edge feature map. The gradient magnitude and direction of the center pixel are calculated within a 5×5 neighborhood. The gradient magnitude indicates the edge strength, and the gradient direction indicates the edge direction. The consistency of the gradient direction within the neighborhood is calculated. When more than 60% of the pixels have gradient directions similar to the center pixel (the angle difference is less than 30 degrees), the gradient direction consistency weight of the center pixel is set to a high value (0.8-1.0); otherwise, it is set to a low value (0.2-0.5). The edge feature value is multiplied by the gradient direction consistency weight to obtain a weighted edge point set. The weighted edge point set is filtered using an adaptive threshold value of 1.5 times the average value of the edge feature. After screening, the initial edge points are obtained.

[0075] Initial edge points are gap-connected using a morphological operation with an adaptive kernel. The size of the adaptive kernel is dynamically adjusted based on the local edge density, using a 7×7 structuring element in edge-sparse regions and a 3×3 structuring element in edge-dense regions. Disconnected edge points are connected if their spacing is less than 8 pixels and their orientation changes by less than 45 degrees. A region growing criterion is used to remove noise points. High-confidence edge points are used as seeds and the algorithm expands outward. Expansion stops when the grayscale difference in the expanded region exceeds a threshold (typically set to 20) or when a preset maximum number of iterations (typically 10) is reached. A continuous edge contour is obtained, and the local curvature of this contour is calculated using a curvature calculation window of nine adjacent edge points. Regions with abnormal curvature (those with curvature values ​​exceeding twice the mean) are smoothed and refitted using cubic spline interpolation to ensure a smooth transition. The corrected edge contour is superimposed on the preprocessed image to produce an enhanced image with clearly defined lesion edges. This enhanced image can be directly used for subsequent area measurement and three-dimensional reconstruction analysis.

[0076] In this embodiment, the accuracy of edge detection is significantly improved through multi-angle image data processing and three-dimensional spatial constraints of reference markers. It effectively solves the edge blurring problem of traditional methods in the case of uneven lighting and complex textures. The application of multi-scale hybrid edge detection operators combined with spatial constraint fields makes the edge positioning accuracy far superior to the performance of conventional single algorithms. The combination of adaptive kernel morphological operations and regional growth criteria effectively solves the problems of edge breakage and noise interference, and the generated continuous edge contour has a high degree of morphological consistency. Local curvature calculation and smooth correction ensure the natural transition of the edge contour and avoid jagged edges and distortion. The overall solution does not require manual intervention and has high processing efficiency. It provides reliable technical support for the accurate measurement and three-dimensional reconstruction of skin lesion area, which is of great significance for evaluating treatment effects and disease progression.

[0077] In an optional embodiment,

[0078] The morphological operation of the adaptive kernel is used to perform gap connection on the initial edge points, and the noise points are removed by combining the region growing criterion to obtain the continuous edge contour including:

[0079] Obtaining the position information of the initial edge point, constructing a neighborhood window based on the position information, calculating the pixel distribution within the neighborhood window, and extracting the local curvature value and gradient direction of the edge point;

[0080] Determining a scale parameter and a direction parameter of a morphological kernel function according to the local curvature value and the gradient direction, inputting the scale parameter and the direction parameter into a preset kernel function template to generate an adaptive morphological structure element;

[0081] Performing a morphological dilation operation on the initial edge points using the adaptive morphological structuring element, comparing the dilated edge region with the original edge point set, extracting newly added connected edge points, and merging the newly added connected edge points with the original edge point set to obtain an initially connected edge point set;

[0082] For each edge point in the initially connected edge point set, a connectivity metric, a distance metric, and an edge strength metric are calculated, and a weighted combination is performed to generate a region growing criterion. The connected edge points are screened according to the region growing criterion, and edge points that do not meet the criterion threshold are eliminated to obtain optimized edge points.

[0083] The optimized edge points are iteratively refined using a thinning template, and the edge topology is kept unchanged in each iteration until a continuous edge contour with a single pixel width is obtained.

[0084] In this implementation, the location information of the initial edge points is first obtained. Each initial edge point is represented by its coordinate values ​​(x, y), which are integer values ​​within the image resolution range. A neighborhood window is constructed based on this location information. The default window size is 11×11 pixels. For areas with high edge point density, the window size can be adjusted to 7×7 pixels; for areas with low edge point density, the window size can be adjusted to 15×15 pixels. The pixel distribution characteristics within the neighborhood window are calculated, including the number of edge points within the window, their spatial distribution, and their grayscale value distribution. The number of edge points is obtained by simple counting; the spatial distribution is represented by calculating the dispersion of edge points within the window; smaller dispersion values ​​indicate a more concentrated edge point population; and the grayscale value distribution is represented by calculating the mean and standard deviation of the grayscale values ​​of the edge points. The local curvature value of the edge point is extracted by selecting five adjacent edge points around the edge point, fitting a curve through these points, and calculating the curvature of the curve at the current edge point. The curvature value typically ranges from -0.5 to 0.5. A curvature value of 0 indicates a straight edge, while a larger absolute value indicates a more curved edge. The gradient direction of the edge point is also extracted. The gradient direction is represented by the angle of the gradient vector at the edge point, which ranges from 0 to 360 degrees.

[0085] The scale and orientation parameters of the morphological kernel function are determined based on the local curvature value and gradient direction. The scale parameter determines the size of the morphological structuring element, while the orientation parameter determines its orientation. When the absolute value of the local curvature is less than 0.1, indicating an approximately straight edge, the scale parameter is set to a 3×1 strip. When the absolute value of the local curvature is between 0.1 and 0.3, the scale parameter is set to a 3×3 square. When the absolute value of the local curvature is greater than 0.3, indicating a significantly curved edge, the scale parameter is set to a 5×5 circle. The orientation parameter is consistent with the gradient direction. For example, when the gradient direction is 45 degrees, the orientation parameter of the morphological kernel function is also 45 degrees. The scale and orientation parameters are input into a preset kernel function template to generate an adaptive morphological structuring element. The preset kernel function template includes three basic shapes: straight line, square, and circle. The final structuring element is generated by adjusting the scale and rotation angle. For example, for an edge point with a gradient direction of 30 degrees and a curvature value of 0.05, the generated structuring element is a 3×1 strip with a rotation angle of 30 degrees.

[0086] An adaptive morphological structuring element is used to perform a morphological dilation operation on the initial edge points. The dilation operation is performed by coinciding the center point of the structuring element with each edge point, and all pixels covered by the structuring element are marked as edge points. For example, for a 3×3 square structuring element, the edge point is taken as the center and the eight adjacent pixels around it are marked as edge points. After the dilation operation, the previously disconnected edges may be connected. The dilated edge area is compared with the original edge point set to extract the newly added connected edge points. The newly added connected edge points are points that exist in the dilated edge area but do not exist in the original edge point set. The newly added connected edge points are merged with the original edge point set to obtain the initially connected edge point set. The initially connected edge point set contains the original edge points and the newly added connected edge points, forming a more continuous edge contour.

[0087] For each edge point in the initial set of connected edge points, a connectivity metric, a distance metric, and an edge strength metric are calculated and weighted together to generate the region growing criterion. The connectivity metric indicates how well an edge point is connected to its neighbors. It is calculated by counting the number of edge points in an eight-way neighborhood around the edge point. A greater number indicates better connectivity, and the connectivity metric ranges from 0 to 8. The distance metric indicates the distance from the edge point to the nearest original edge point. A closer distance indicates higher reliability, and the distance metric is typically normalized between 0 and 1. The edge strength metric indicates the gradient magnitude at the edge point. A larger gradient magnitude indicates a more distinct edge feature, and the edge strength metric is typically normalized between 0 and 1. These three metrics are weighted and combined with weights of 0.4, 0.3, and 0.3 to generate the final region growing criterion. Higher criterion values ​​indicate higher reliability of the edge point. A threshold for the criterion is set at 0.6, and the connected edge points are screened, eliminating those that do not meet the threshold to obtain optimized edge points. The optimized edge point set only retains edge points with high reliability and removes most noise points and incorrect connection points.

[0088] The optimized edge points are iteratively morphologically refined using a refinement template. The refinement template is a set of special structural elements that are used to gradually remove the outer pixels of the edge and retain the skeleton structure. Commonly used refinement templates include 3×3 templates in 8 directions, which correspond to the edge pixel deletion conditions in different directions. In each iteration, these 8 templates are used in turn to process the edge points. The edge points that meet the conditions are deleted, but the edge topology structure must remain unchanged, that is, points that will cause edge disconnection or pixel connectivity changes cannot be deleted. The iterative process continues until the preset number of iterations is reached (usually 10 to 20 times) or the edge width no longer changes, and finally a continuous edge contour with a single pixel width is obtained. The edge contour with a single pixel width can accurately represent the boundary of the skin lesion area, facilitating subsequent area calculation and three-dimensional reconstruction.

[0089] In this embodiment, high-precision connection and optimization of skin lesion edges are achieved through morphological operations and region growing criteria of adaptive kernels. Based on the morphological structural elements that are dynamically adjusted based on local curvature values ​​and gradient directions, edge connections are more adaptable to complex lesion morphologies. The region growing criterion with a multi-parameter combination effectively screens out misconnected points and noise points, thereby improving the reliability of edge contours. Iterative refinement processing ensures the single-pixel width characteristics of edge contours, providing an accurate basis for area measurement. The overall solution takes into account both edge continuity and morphological fidelity, overcomes the limitations of traditional methods in processing irregular edges, and is particularly suitable for skin lesions with complex shapes and blurred boundaries. The edge extraction process is fully automated, requires no human intervention, has a short processing time, and has high edge point positioning accuracy, providing high-quality edge contour data for intelligent measurement and three-dimensional reconstruction of skin lesion areas.

[0090] In an optional embodiment,

[0091] Based on the enhanced image and the 3D spatial coordinates of the fiducial markers, an initial 3D mesh of the lesion area is generated using a mesh construction algorithm, including:

[0092] Obtaining the three-dimensional spatial coordinates of the lesion area edge contour point set and the reference mark points in the enhanced image, calculating the position offset and rotation angle between adjacent reference mark points, establishing a piecewise continuous spatial mapping function, and transforming the lesion area edge contour point set into a three-dimensional spatial coordinate system through the spatial mapping function to obtain the lesion area spatial edge contour points;

[0093] Constructing a local coordinate system centered on the spatial edge contour point of the lesion area, calculating the Euclidean distance and normal deviation from any position in the lesion area to the spatial edge contour point of the lesion area, calculating an influence weight based on the Euclidean distance and normal deviation, and superimposing the influence weights to obtain an edge density function;

[0094] The initial density distribution of the grid nodes is determined based on the edge density function, the initial frontier surface is constructed with the spatial edge contour points of the lesion area, the node spacing of the initial frontier surface is calculated to generate new grid nodes, tetrahedral grid units are connected to construct and the frontier surface is updated until the internal space of the lesion area is filled to generate an initial three-dimensional grid.

[0095] For example, first obtain the edge contour point set of the lesion area in the enhanced image. The edge contour point set consists of a series of two-dimensional coordinate points (x, y). The coordinate accuracy of each point is at the sub-pixel level, usually reaching an accuracy of 0.1 pixel. At the same time, obtain the three-dimensional spatial coordinates of the reference marker points. The reference marker points are usually selected from the characteristic obvious positions on the patient's skin surface, such as moles, scars or skin texture feature points. Generally, 6-8 marker points are selected that are evenly distributed around the lesion area. The three-dimensional coordinates (X, Y, Z) of each marker point are obtained by a binocular vision system or a structured light scanner. The coordinate accuracy can reach 0.1 mm. Calculate the position offset and rotation angle between adjacent reference marker points. The position offset is expressed as a three-dimensional vector (ΔX, ΔY, ΔZ), and the rotation angle is expressed as an Euler angle (α, β, γ). For any two adjacent reference marker points p1 and p2, the position offset from p1 to p2 is calculated as the difference between the coordinates of the two points, and the rotation angle is obtained by calculating the angle between the local surface normal vectors around the two points. A piecewise continuous spatial mapping function is established, defining a local transformation between each pair of adjacent fiducial markers. The transformation parameters are determined by the position offset and rotation angle. In specific implementation, an interpolation method based on radial basis functions is used, with the fiducial markers as control points, to construct a smooth spatial mapping relationship. The radial basis functions are multi-quadratic functions, with the influence radius set to 1.5 times the distance between adjacent fiducial markers to ensure smooth transformation. The set of lesion edge contour points is transformed into a three-dimensional spatial coordinate system using the spatial mapping function. For each edge point (x, y) in the two-dimensional image, the three nearest fiducial markers are found. A weight factor is calculated based on the distance to these three markers. The weight factor is inversely proportional to the distance, with closer distances giving a greater weight. The spatial mapping functions corresponding to these three fiducial markers are combined according to the weights to obtain the mapping transformation for that edge point. The mapping transformation is then applied to convert the two-dimensional coordinates (x, y) into three-dimensional coordinates (X, Y, Z), resulting in the spatial edge contour points of the lesion. The density of the spatial edge contour points is the same as that of the original two-dimensional edge contour points, typically containing 8-10 points per millimeter.

[0096] Construct a local coordinate system centered on the spatial edge contour point of the lesion area. For each spatial edge contour point, calculate its local surface normal vector, which is obtained by fitting the surface of 5-7 adjacent contour points around the point. Define the direction of the normal vector as the z-axis of the local coordinate system, and select two orthogonal vectors perpendicular to the z-axis as the x-axis and y-axis to form a right-handed coordinate system. Calculate the Euclidean distance and normal deviation from any position in the lesion area to the spatial edge contour point of the lesion area. The Euclidean distance directly calculates the straight-line distance between two points in space, and the normal deviation is calculated as: the angle between the vector from the point inside the lesion area to the edge contour point and the normal vector at the contour point. The smaller the angle, the greater the possibility that the internal point is located in the normal direction of the contour point. The influence weight is calculated based on the Euclidean distance and the normal deviation. The influence weight is calculated using an exponential decay function. When the Euclidean distance is less than 2 mm and the normal deviation angle is less than 30 degrees, the influence weight is greater than 0.7; when the Euclidean distance is between 2-5 mm or the normal deviation angle is between 30-60 degrees, the influence weight is between 0.3-0.7; when the Euclidean distance is greater than 5 mm or the normal deviation angle is greater than 60 degrees, the influence weight is less than 0.3. The influence weights are superimposed to obtain the edge density function. For each point in the lesion area, the sum of the influence weights of all edge contour points is calculated to form a continuous edge density field. The edge density function has a larger value in the area close to the contour and a smaller value in the area far from the contour, reflecting the degree of association between the spatial point and the edge. Optionally, for any point P in the lesion area space, its spatial relationship parameters to all edge contour points are calculated. Assume that there are N points in the edge contour of the lesion area, denoted as E1, E2, ..., E n , each edge point E i There is a corresponding normal vector n i For point P and each edge point E i Between, calculate two key parameters: Euclidean distance d i and normal deviation θ i . Euclidean distance d i From point P to edge point E i The linear distance in space, in millimeters; the normal deviation θ i is the vector PE i and edge point normal vector n i The angle between them is in degrees.

[0097] Based on the Euclidean distance d i and normal deviation θ i Calculate the edge point E i The influence weight w on point P i The influence weight is calculated using a two-parameter attenuation function: when the distance d iWhen the distance is less than 2 mm, the distance factor is 0.9-1.0; when the distance is 2-5 mm, the distance factor decreases linearly to 0.3-0.6; when the distance exceeds 5 mm, the distance factor decays rapidly to below 0.1. i When the deviation is less than 15 degrees, the direction factor is 0.9-1.0; when the deviation is 15-45 degrees, the direction factor drops to 0.5-0.8; when the deviation exceeds 45 degrees, the direction factor is lower than 0.3. The final impact weight w i Determined by the product of the distance factor and the direction factor, it reflects the influence of point P on the edge point E. i The overall intensity of the impact.

[0098] The edge density function value DF(P) is obtained by superimposing the influence weights of all edge points on point P: DF(P) = w1+w2+...+w n To avoid fluctuations in the function value caused by changes in the number of edge points, the results are usually normalized so that the edge density function value ranges between 0 and 1. The edge density function reaches its maximum value (close to 1) at the edge of the lesion and gradually decays as it moves inward or outward, forming a continuous and smooth density field.

[0099] In practical applications, the edge density function is typically calculated at discrete grid points, using an octree structure for spatial partitioning. The grid is finer near the edge (0.5 mm spacing) and coarser away from the edge (2-3 mm spacing). Trilinear interpolation can be used to obtain the edge density function value at any spatial location, ensuring the continuity of the function throughout space. This edge density function effectively describes the strength of the association between a spatial point and the lesion edge, providing a reliable basis for subsequent grid density control.

[0100] The initial mesh node density distribution is determined based on the edge density function. In areas with high edge density function values ​​(typically greater than 0.6), the mesh node density is set higher, with a node spacing of 0.5-1 mm. In areas with medium edge density function values ​​(typically between 0.3-0.6), the node spacing is 1-2 mm. In areas with low edge density function values ​​(typically less than 0.3), the node spacing is 2-3 mm. This adaptive mesh density distribution ensures a detailed representation of the lesion edge while reducing computational complexity in the interior region. An initial frontier surface is constructed using the spatial edge contour points of the lesion region. The initial frontier surface consists of a triangular mesh, with each triangle formed by three adjacent edge contour points. The construction process utilizes a restricted Delaunay triangulation algorithm, with triangle side lengths limited to 0.5-1.5 mm to ensure mesh quality. New mesh nodes are generated by calculating the node spacing of the initial frontier surface. For each triangle on the frontier surface, a new mesh node is generated in the triangle normal direction based on its area and the mesh density requirements of the region. The new node is typically positioned 0.5-1 times the average side length of the triangle plane to ensure the shape quality of the mesh cells. Connect and construct tetrahedral mesh elements and update the leading edge. Connect the newly generated nodes to the three vertices of the original triangle to form a tetrahedral element. Delete the original triangle and add the newly formed three triangles to the leading edge. The updated leading edge represents the exterior surface of the currently constructed mesh. Repeat the node generation and tetrahedron construction process until the interior of the lesion area is filled, generating the initial 3D mesh.

[0101] In this embodiment, high-precision three-dimensional reconstruction of the skin lesion area is achieved through the coordinated use of the three-dimensional spatial coordinates of the reference marker points and the enhanced image. In the prior art, the three-dimensional reconstruction of skin lesions usually adopts a single surface scanning or a simple image mapping method, which lacks the ability to accurately locate the edge of the lesion and is difficult to adapt to the deformation of the skin surface, resulting in a deviation between the reconstructed model and the actual lesion morphology. The present application accurately maps the two-dimensional edge contour to the three-dimensional space based on the piecewise continuous space mapping function, which solves the limitations of the traditional method in processing skin surface deformation, especially the mapping distortion problem when the lesion spans multiple surface areas. The innovatively introduced edge density function establishes a quantitative description model of the association between spatial points and edges by comprehensively considering the Euclidean distance and normal deviation, solving the problem of inaccurate edge expression in traditional grid generation. The adaptive grid density distribution strategy controlled by this function enables the rational allocation of grid resources, while ensuring the fine expression of edges and optimizing the computational efficiency. The frontier surface advancing grid generation algorithm ensures the complete filling of complex morphological lesions and overcomes the defects of traditional methods in processing irregular shapes. The overall solution achieves high-fidelity three-dimensional reconstruction of the morphological characteristics of the lesion area, provides a reliable geometric model for accurate measurement of skin lesion area and progression tracking, and significantly improves the accuracy and objectivity of clinical evaluation.

[0102] Figure 2 This is a heat map of the edge density function distribution according to an embodiment of the present invention, such as Figure 2 As shown in the figure, the spatial distribution characteristics of the edge density function of the lesion area are intuitively shown. The black curve in the figure represents the edge contour of the lesion area, and the thermal chromatogram shows the distribution of the edge density function value from red (high density) to blue (low density). At the edge of the lesion, the edge density function value calculated by this technical solution is generally high, such as reaching 0.97 at the coordinates (200, 250), 0.95 at (250, 150), 0.96 at (600, 250), and 0.94 at (450, 400). These positions correspond to the inflection points and high curvature areas of the lesion edge contour. As you move toward the inner area of ​​the lesion, the edge density function value gradually decreases, and is only 0.28 at the central area (400, 250). The density values ​​of the surrounding points are 0.43, 0.39, 0.41, 0.37, 0.52 and 0.46, respectively, forming a smooth transition from the edge to the center. This density distribution characteristic enables the mesh generation algorithm to adaptively adjust the mesh node density based on the edge density function value, using a finer mesh (node ​​spacing of 0.5-1 mm) in the edge area (density function value > 0.7) and a sparser mesh (node ​​spacing of 2-3 mm) in the internal area (density function value < 0.3). Compared with the traditional uniform meshing method, this technical solution can significantly reduce the number of nodes in the internal area while ensuring the geometric accuracy of the lesion edge, thereby improving computational efficiency. In particular, for lesions with complex shapes, the edge density function of this solution can accurately capture local features, ensuring that important areas obtain sufficient mesh accuracy.

[0103] In an optional embodiment,

[0104] The node curvature values ​​are calculated based on the grid node coordinates and grid cell topological relationships in the initial three-dimensional grid. An adaptive grid subdivision algorithm is used to refine areas where the curvature values ​​exceed the preset curvature threshold. The subdivided grid data containing the morphological characteristics of the lesion area is obtained, including:

[0105] Obtaining the grid node coordinates and grid unit topological relationships of the initial three-dimensional grid, calculating the set of adjacent nodes within the first-order neighborhood for each grid node, constructing a local coordinate system for the node based on the set of adjacent nodes, calculating the normal vector of the node, fitting a quadratic surface to each grid node using the normal vector and the local coordinate system, calculating the principal curvature value and principal curvature direction of the quadratic surface at the current node, and obtaining the local curvature feature of the node;

[0106] Calculating the maximum curvature value of each grid cell based on the local curvature feature, comparing the maximum curvature value with a preset curvature threshold, and marking the grid cells that need to be subdivided;

[0107] For the marked grid cells, the grid subdivision direction is determined according to the principal curvature direction of the nodes, the subdivision ratio is set according to the principal curvature value, and a new grid node is inserted into the grid cells;

[0108] The local curvature features are used to perform local surface fitting on the new grid nodes, adjust the spatial positions of the new grid nodes, reconstruct the grid units containing the new grid nodes and update the topological relationships to obtain subdivided grid data containing the morphological features of the lesion area.

[0109] For example, the grid node coordinates and grid unit topology of the initial three-dimensional grid are first obtained. The grid node coordinates are expressed in a three-dimensional rectangular coordinate system. Each node has a unique identifier and a corresponding spatial coordinate value (x, y, z). The grid unit topology describes the connection relationship between nodes. For triangular grids, each unit consists of three node identifiers; for tetrahedral grids, each unit consists of four node identifiers. This information is usually stored in a grid data structure. The node coordinate precision is usually a floating point number, accurate to six decimal places, to ensure the ability to express the characteristics of subtle skin lesions. For each grid node, the set of adjacent nodes within the first-order neighborhood is calculated. The first-order neighborhood refers to all nodes directly connected to the current node. The calculation method is to traverse all grid cells, and for each cell containing the current node, the other nodes in the cell are added to the adjacent node set. For surface grid nodes, the number of adjacent nodes is usually between 5 and 8; for internal grid nodes, the number of adjacent nodes is usually between 10 and 15. The local coordinate system of the node is constructed based on the set of adjacent nodes. The local coordinate system is a right-handed rectangular coordinate system with the origin at the current node and the direction of the coordinate axis determined according to the distribution of adjacent nodes. The specific method is to perform principal component analysis on the coordinates of adjacent nodes, and take the direction with the largest variance as the first axis of the local coordinate system, the direction with the second largest variance as the second axis, and the direction of the cross product of the two axes as the third axis. Calculate the normal vector of the node. The normal vector refers to the unit vector perpendicular to the local surface where the node is located. For surface mesh nodes, the normal vector calculation method is to take a weighted average of the normal vectors of all triangular face units to which the node belongs, and the weight is usually the area of ​​the triangle. For internal mesh nodes, the normal vector is obtained by fitting the local point cloud formed by adjacent nodes. After normalization, the length of the normal vector is 1, and the direction points to the outside of the diseased tissue.

[0110] Using the normal vector and the local coordinate system, a quadratic surface is fitted to each grid node. A quadratic surface refers to a surface that can be represented by a quadratic polynomial in the local coordinate system. The fitting method is to use the least squares method, with the current node as the origin, transform the coordinates of the adjacent nodes into the local coordinate system, construct the coefficient matrix of the quadratic polynomial, and solve to obtain the best fitting quadratic surface parameters. Calculate the principal curvature value and principal curvature direction of the quadratic surface at the current node. The principal curvature value is the maximum and minimum curvature of the surface at a certain point, and the principal curvature direction is the direction corresponding to these two curvature values. The calculation method is to solve the eigenvalue and eigenvector of the curvature tensor of the quadratic surface at the node. The eigenvalue is the principal curvature value, and the eigenvector is the principal curvature direction. The local curvature characteristics of the node are obtained, including the maximum principal curvature, the minimum principal curvature and their corresponding directions. For skin lesion areas, the principal curvature of raised lesions is usually positive, ranging from 0.1 to 0.5; the principal curvature of sunken lesions is usually negative, ranging from -0.5 to -0.1; and the principal curvature of flat areas is close to zero, ranging from -0.05 to 0.05.

[0111] Based on the local curvature characteristics, the maximum curvature value of each grid cell is calculated. The maximum curvature value refers to the one with the largest absolute value among the principal curvature values ​​of all nodes of the grid cell (including the maximum principal curvature and the minimum principal curvature). For triangular cells, the principal curvature values ​​of three vertices are considered; for tetrahedral cells, the principal curvature values ​​of four vertices are considered. The maximum curvature value is compared with the preset curvature threshold to mark the grid cells that need to be subdivided. The preset curvature threshold is set according to the type of lesion. For skin lesions with slight undulations, the threshold is set between 0.1 and 0.2; for lesions that are obviously raised or sunken, the threshold is set between 0.2 and 0.3; for lesions with sharply changing edges, the threshold is set between 0.3 and 0.5. When the maximum curvature value of a grid cell exceeds the corresponding preset threshold, the cell is marked as needing subdivision.

[0112] For marked mesh cells, the subdivision direction is determined based on the principal curvature of their nodes. The subdivision direction is the preferred direction when inserting new nodes within the cell. For triangular cells, if the maximum curvature direction is approximately parallel to a triangle edge (with an angle less than 30 degrees), subdivision is prioritized along that edge. If the maximum curvature direction is not parallel to any edge, subdivision proceeds from the triangle's centroid toward the direction of maximum curvature. For tetrahedral cells, the subdivision direction is determined by combining the principal curvature directions of the four vertices, prioritizing the direction corresponding to vertices with larger principal curvature values. The subdivision ratio is set based on the principal curvature value, which determines the number and placement of newly inserted nodes. A larger principal curvature value results in a higher subdivision ratio. Specifically, when the absolute value of the principal curvature is between 1 and 1.5 times the preset threshold, the subdivision ratio is 1:2, meaning one cell is subdivided into two. When the absolute value of the principal curvature is between 1.5 and 2 times the preset threshold, the subdivision ratio is 1:4. When the absolute value of the principal curvature exceeds 2 times the preset threshold, the subdivision ratio is 1:8.

[0113] New mesh nodes are inserted within a mesh cell. The initial position of the new node is determined by the subdivision direction and subdivision ratio. For a 1:2 subdivision, the new node is typically located at the cell center or edge midpoint. For a 1:4 subdivision, the new node is located at a feature point within the cell, such as the center of a face or the midpoint of an edge. For a 1:8 subdivision, the new node includes not only face centers and edge midpoints, but also points within the cell body.

[0114] Local curvature features are used to perform local surface fitting on the new mesh node, adjusting the spatial position of the new mesh node. The initial position of the new node is typically obtained through linear interpolation, which may not accurately reflect the curvature characteristics of the lesion surface. To obtain a more accurate surface morphology, the position of the new node needs to be adjusted. This adjustment method uses the local surface parameters of the surrounding nodes to recalculate the surface height at the new node. Specifically, five to eight existing nodes near the new node are selected. The coordinates and curvature characteristics of these nodes are used to construct a local quadratic surface equation. The plane coordinates (x, y) of the new node in the local coordinate system are substituted into the equation to calculate the corresponding height z, thereby adjusting the spatial position of the new node. This adjustment ensures that the new node lies on the fitted surface, more accurately reflecting the morphological characteristics of the lesion surface. The mesh cells containing the new mesh node are reconstructed and the topology is updated. The reconstruction process involves deleting the original coarse mesh cells and creating new mesh cells connecting the new node and the original nodes. For triangular meshes, if a triangle is subdivided into two, two new triangles are created; if it is subdivided into four, four new triangles are created. For tetrahedral meshes, the number of new cells after subdivision corresponds to the subdivision ratio. Topology updates include recording the adjacency of new nodes and updating the adjacency of existing nodes to ensure the continuity and integrity of the mesh.

[0115] In this embodiment, an adaptive mesh subdivision algorithm achieves high-precision 3D reconstruction of the morphological features of skin lesions. Precise local surface feature description based on node curvature calculations addresses the difficulty of traditional uniform meshes in accurately representing complex lesion morphologies. The introduction of principal curvature values ​​and directions imbues the subdivision process with clear directionality and selectivity, avoiding the waste of computational resources caused by blind subdivision. A curvature threshold-driven adaptive subdivision strategy optimizes mesh resource allocation, providing higher mesh density in areas with significant morphological variations, such as lesion edges, protrusions, and depressions, while maintaining low mesh complexity in flat areas. A local adjustment mechanism for quadratic surface fitting ensures that the positions of newly inserted nodes accurately reflect the actual morphology of the lesion surface, significantly improving the geometric fidelity of the 3D model. The dynamic correlation between the subdivision ratio and curvature value ensures that the degree of mesh refinement is proportional to the morphological complexity, achieving an optimal balance between computational efficiency and reconstruction accuracy. This overall solution significantly improves the accuracy of 3D reconstruction of skin lesions, providing a reliable geometric model for precise lesion area measurement, morphological change analysis, and progression tracking, with significant diagnostic value and assessment significance in clinical applications.

[0116] In an optional embodiment,

[0117] Using the 3D coordinates of the fiducial markers as the registration reference, spatial registration is performed on the subdivided grid data collected at different time points. The progression parameters of the lesion area are calculated based on the registered subdivided grid data. A measurement report is generated based on the subdivided grid data and the progression parameters, including:

[0118] Obtain the three-dimensional spatial coordinates of the fiducial markers in the subdivided grid data at different time points, select the adjacent markers in the first-order neighborhood of each fiducial marker, calculate the spatial distance and connection direction between the adjacent markers and the central marker, and construct a structural feature vector reflecting the local spatial distribution;

[0119] Calculating the similarity between marker points at different time points using the structural feature vector, establishing a matching strength matrix of the marker points based on the similarity, and obtaining corresponding relationships of the marker points by screening according to the matching strength matrix;

[0120] The matching strength in the correspondence between the marker points is used as the registration weight to construct a weighted distance field function. The spatial transformation matrix is ​​solved by minimizing the weighted distance field function, and the spatial transformation matrix is ​​used to perform overall registration on the subdivided grid data at the reference time point.

[0121] Calculating the deformation direction and amplitude of the local area based on the registered marker point pairs, constructing a deformation mapping function that describes tissue deformation, and performing local deformation registration on the subdivided mesh data after overall registration according to the deformation mapping function to obtain the subdivided mesh data after local registration;

[0122] The rotation angle and translation distance of the lesion area are extracted from the spatial transformation matrix as global motion parameters, the volume change rate and maximum deformation amplitude of the lesion area are extracted from the deformation mapping function as local deformation parameters, and the curvature and expansion speed of the lesion area boundary are calculated based on the subdivided grid data after local registration as boundary feature parameters.

[0123] The global motion parameters, local deformation parameters and boundary feature parameters are combined to generate a progress measurement report of the lesion area.

[0124] This embodiment first obtains the three-dimensional spatial coordinates of fiducial markers from the subdivided grid data at different time points. The fiducial markers are typically selected at stable, characteristic locations on the skin surface, such as moles, scars, or other obvious anatomical landmarks. In clinical practice, 6-12 fiducial markers are typically selected, evenly distributed around the lesion. These markers remain relatively stable during examinations at different time points. The three-dimensional spatial coordinates of each fiducial marker are expressed in millimeters, accurate to two decimal places, and expressed using a right-handed coordinate system. The neighboring markers within each fiducial marker's first-order neighborhood are selected. A first-order neighborhood refers to the other markers that are directly connected to or closest to the current marker. For a uniformly distributed network of markers, the first-order neighborhood typically contains 3-5 neighboring markers. The spatial distances and connecting line directions between the neighboring markers and the central marker are calculated. The spatial distance is the Euclidean distance between the two points, expressed in millimeters; the connecting line direction is the unit vector from the central marker to the neighboring marker, expressed in three-dimensional coordinates. A structural feature vector is constructed to reflect the local spatial distribution. The structural feature vector contains information about the spatial relationship between the central marker and all of its neighboring markers within its first-order neighborhood. The specific construction method is to sort adjacent marker points by distance from closest to farthest, take the distance values ​​and connecting direction of the first three points, and form a 12-dimensional structural feature vector (3 points, 4 parameters per point: distance value and 3D direction vector). This structural feature vector can effectively describe the local spatial structure characteristics around the marker point and is invariant to rotation and translation.

[0125] The similarity between markers at different time points is calculated using structural feature vectors. This similarity reflects the degree of local structural match between the two markers. The calculation method compares each dimension of the two structural feature vectors: the difference in distance is calculated using relative error, and the difference in direction is calculated using the cosine of the angle. The distance and direction differences are each normalized to a range of 0–1, and the final similarity value is obtained through weighted combination, with the weight typically set at 40% for distance and 60% for direction. Similarity values ​​range from 0–1, with higher values ​​indicating greater local structural similarity between the two markers. Based on the similarity, a marker matching strength matrix is ​​established. The matching strength matrix is ​​an M×N matrix, where M and N are the number of markers at the two time points. Each element in the matrix represents the similarity value between the corresponding two markers. The matching strength matrix is ​​used to filter the marker correspondences. The filtering method uses a greedy algorithm, selecting the pair of markers with the highest similarity in the matrix as a match. Other possible matches between these two markers are then eliminated. This process is repeated until all markers have a correspondence or a preset threshold is met. Successful matching typically requires a similarity value greater than 0.7.

[0126] The matching strength of the marker point correspondences is used as the registration weight; pairs of marker points with higher matching strengths have a greater influence in the registration process. A weighted distance field function is constructed, which describes the sum of the weighted distances between the marker points at the reference time point and the corresponding marker points at the target time point after spatial transformation. Specifically, for each pair of matched marker points, the Euclidean distance between the transformed reference and target points is calculated and multiplied by the corresponding matching strength weight. The sum of the weighted distances of all pairs of marker points is the weighted distance field function value. The spatial transformation matrix is ​​solved by minimizing the weighted distance field function. The spatial transformation matrix describes the overall transformation relationship from the reference time point coordinate system to the target time point coordinate system. The iterative closest point algorithm is used for optimization. The initial transformation matrix is ​​set to the identity matrix. In each iteration, the transformation parameters are updated to reduce the weighted distance field function value. The iteration is terminated when the function value change is less than a preset threshold (usually 0.01) or the maximum number of iterations (usually 100) is reached. The resulting spatial transformation matrix contains a rotation matrix and a translation vector, with a total of 12 parameters. The spatial transformation matrix is ​​used to globally align the subdivided grid data at the reference time point, and the transformation matrix is ​​applied to each node coordinate of the subdivided grid to obtain the globally aligned grid data.

[0127] Based on the registered marker pairs, the deformation direction and magnitude of the local region are calculated. The local region is defined as the area within a certain range centered on the marker point, typically 1.5 times the average distance between marker points. The deformation direction is the direction of the displacement vector from the reference time point to the target time point; the deformation magnitude is the length of the displacement vector, expressed in millimeters. A deformation mapping function is constructed to describe tissue deformation, mapping the reference position of any point in space to the target position. This function is implemented using radial basis function interpolation, using the registered marker pairs as control points, each with a corresponding displacement vector. The radial basis functions are multi-quadratic functions, with an influence radius set to twice the average distance between adjacent marker points. Local deformation registration is performed on the globally registered subdivided mesh data based on the deformation mapping function. For each node in the mesh, the displacement vector under the deformation mapping function is calculated. This displacement vector is then applied to adjust the node position, resulting in the locally registered subdivided mesh data. The locally registered mesh data reflects the local deformation of the skin lesion area at different time points.

[0128] The rotation angle and translation distance of the lesion region are extracted from the spatial transformation matrix as global motion parameters. The rotation angle is obtained by decomposing the rotation matrix and is expressed as rotation angles around the three coordinate axes, in degrees; the translation distance is the modulus of the translation vector, in millimeters. These parameters reflect the overall positional change of the lesion region between two time points. The volume change rate and maximum deformation amplitude of the lesion region are extracted from the deformation mapping function as local deformation parameters. The volume change rate is calculated by calculating the ratio of the lesion volume before and after registration and expressed as a percentage; the maximum deformation amplitude is the maximum deformation amplitude of all mesh nodes within the lesion region, in millimeters. These parameters reflect the growth or shrinkage of the lesion region. The curvature and expansion rate of the lesion region boundary are calculated as boundary characteristic parameters based on the locally registered subdivided mesh data. The boundary curvature is the average curvature value of each point on the lesion boundary, expressed in millimeters; the expansion rate is the displacement of the lesion boundary in the normal direction divided by the time interval, in millimeters per day. These parameters reflect the morphological changes and expansion trends of the lesion boundary.

[0129] The overall motion parameters, local deformation parameters, and boundary feature parameters are combined to generate a progress measurement report for the lesion area. The report content includes: area change (square millimeters), volume change (cubic millimeters), maximum thickness change (millimeters), average and maximum speed of boundary expansion (millimeters per day), average and changing trends of boundary curvature, and time series data of volume change rate. The report is presented in tabular and graphical form, intuitively showing the changes in the lesion area at different time points, providing an objective basis for clinicians to evaluate the treatment effect and predict the progression of the disease. The graphical part includes a three-dimensional model comparison diagram, a cross-sectional profile change diagram, an area change trend diagram, and a volume change trend diagram, which clearly show the morphological changes and development trends of the lesion area.

[0130] In this embodiment, the three-dimensional spatial coordinates of fiducial markers enable precise registration and progression tracking of skin lesion data at different time points. A marker matching mechanism based on structural feature vectors overcomes the sensitivity of traditional registration methods to initial position and improves the matching stability between heterogeneous data. A spatial transformation solution strategy guided by a weighted distance field function effectively addresses non-rigid deformation of the skin surface and adapts to interfering factors such as patient position changes and skin laxity. A deformation mapping constructed using radial basis functions accurately characterizes local deformations and captures subtle growth patterns within the lesion area. Separate measurement of global motion parameters and local deformation parameters provides a multidimensional assessment of lesion progression, distinguishing between apparent displacement caused by positional changes and true pathological expansion. Dynamic monitoring of boundary feature parameters enables quantitative assessment of lesion aggressiveness and early warning of rapidly expanding areas. A comprehensive progression measurement report intuitively presents the spatiotemporal evolution of lesions, providing clinicians with objective and quantitative disease progression indicators. This significantly improves the accuracy of treatment efficacy assessment and the reliability of prognostic judgment, providing a scientific basis for individualized treatment plan adjustments.

[0131] Figure 3 This is a cloud diagram of the spatial distribution of the lesion boundary expansion speed according to an embodiment of the present invention, as shown in FIG. Figure 3As shown in the figure, the dynamic characteristics of the expansion of skin lesions measured based on precise registration technology during the 24-week follow-up period are demonstrated. The figure clearly shows the evolution of the lesion from the initial elliptical boundary (dashed outline) to the irregular morphology (solid outline), and the expansion rate of different areas is accurately quantified by color gradient. Through the measurement of this technical solution, it was found that the lesion expanded most rapidly in the upper area, reaching 0.82mm / week, followed by the right area (0.65mm / week), and the lower and left areas were relatively slow (0.47mm / week and 0.31mm / week, respectively). This uneven expansion pattern produced significant morphological changes, with an expansion heterogeneity index of 2.65 (the ratio of the expansion rate of the fastest area to the slowest area). Compared with traditional image segmentation-based methods, this technical solution significantly reduces measurement error by combining fiducial marker registration and local deformation mapping. This high-precision spatial distribution measurement is of great clinical significance, helping doctors identify the most active areas of lesions and guiding targeted biopsy and precise treatment. Traditional boundary detection methods (such as GVF Snake or Level Set) often cannot accurately distinguish between actual lesion expansion and visual differences caused by changes in observation angle. However, this scheme effectively eliminates this interference through spatial registration, providing a more reliable quantitative basis for lesion progression assessment.

[0132] In an optional embodiment,

[0133] The deformation direction and amplitude of the local area are calculated based on the registered marker point pairs, and a deformation mapping function describing tissue deformation is constructed. The subdivided mesh data after global registration is locally deformed and registered according to the deformation mapping function. The subdivided mesh data after local registration includes:

[0134] Selecting marker points in the first-order neighborhood of the registered marker point pair to form a local point set, and establishing a local deformation gradient tensor based on the local point set;

[0135] Decomposing the local deformation gradient tensor to obtain a local deformation tensor, extracting the eigenvector of the local deformation tensor to obtain the deformation direction of the local area, and obtaining the deformation amplitude of the local area by taking the difference between the local deformation tensor and the unit matrix;

[0136] constructing a displacement term of a deformation mapping function based on the deformation direction and deformation amplitude of the local area, constraining the displacement term using a spatial distance weighted function, constructing a strain energy constraint of the deformation mapping function, and determining a continuity condition of the deformation field based on the strain energy constraint;

[0137] A deformation mapping function that satisfies the continuity condition is solved using a variational method, a displacement of each point in the globally registered subdivided mesh data is calculated based on the deformation mapping function, and the subdivided mesh data is deformed according to the displacement to obtain the subdivided mesh data after local deformation registration.

[0138] Exemplarily, first, the marker points within the first-order neighborhood of the registered marker point pair are selected to form a local point set. The marker point pair refers to the marker points of the same anatomical position matched in the data collected at different time points. The registered marker point pair contains the three-dimensional spatial coordinate information of the reference time point and the current time point. The first-order neighborhood refers to the set of marker points directly connected to the current marker point, and the 4-6 marker points closest to the current point are usually selected. In clinical applications, these marker points are usually distributed around the skin lesion area with a spacing of about 5-10 mm. The local point set consists of the central marker point and the marker points within its first-order neighborhood, usually containing 5-7 marker points. Based on the local point set, a local deformation gradient tensor is established. The local deformation gradient tensor describes the deformation characteristics of the local area from the reference time point to the current time point. The establishment method is: the local point set coordinates of the reference time point are composed of matrix A, the local point set coordinates corresponding to the current time point are composed of matrix B, and the transformation relationship between matrix B and matrix A is calculated. In practice, the least squares method is used to solve the transformation matrix F that satisfies B = F × A. F is the local deformation gradient tensor, a 3 × 3 matrix. Each element of the deformation gradient tensor typically ranges from 0.8 to 1.2, representing the scaling ratio of the local region in each direction.

[0139] The local deformation gradient tensor F is decomposed using polar decomposition, which decomposes the deformation gradient tensor F into the product of a rotation matrix R and a stretch tensor U. The rotation matrix R is an orthogonal matrix representing the overall rotation of the local region; the stretch tensor U is a symmetric positive definite matrix representing the deformation of the local region. In skin lesion monitoring, the stretch tensor U is of primary interest, as it reflects the actual deformation state of the skin tissue. The deformation direction of the local region is obtained by extracting the eigenvectors of the local deformation tensor. Eigenvectors are direction vectors corresponding to the eigenvalues ​​of the deformation tensor U. By solving the characteristic equation |U-λI|=0, the eigenvalues ​​λ1, λ2, and λ3 (usually sorted from largest to smallest) are obtained. The corresponding eigenvectors v1, v2, and v3 are then obtained by solving the equation system (U-λiI)vi=0. These eigenvectors are mutually orthogonal unit vectors and represent the principal directions of deformation. In skin lesion monitoring, the eigenvector corresponding to the largest eigenvalue typically points in the direction of most significant lesion expansion. The difference between the local deformation tensor and the identity matrix yields the deformation amplitude of the local region. The deformation amplitude is the norm of the difference matrix obtained by subtracting the identity matrix I from the deformation tensor U. Each element of this difference matrix represents the amount of deformation relative to the undeformed state, with larger norm values ​​indicating more significant deformation. In practical applications, the deformation amplitude is typically expressed as the Euclidean norm, ranging from 0 to 0.5, where 0 indicates no deformation and 0.5 indicates significant deformation (equivalent to a 50% expansion or contraction).

[0140] The displacement term of the deformation mapping function is constructed based on the deformation direction and magnitude of the local region. The displacement term describes the displacement vector field of each point in space from a reference position to its current position. The construction method is as follows: for any point p in space, the spatial distance from all marker points is calculated. Based on these distance values, a weight coefficient is calculated, with the weight coefficient decreasing with increasing distance. The deformation direction and magnitude at each marker point are combined according to the weights to obtain the displacement vector at point p. In specific implementation, the displacement vector is calculated as follows: at each marker point, the deformation direction vector is multiplied by the deformation magnitude to obtain the displacement vector. For any point in space, a weight is calculated based on its distance from each marker point. The displacement vector of each marker point is then summed according to the weights to obtain the displacement vector for that point. The displacement term is constrained by a spatial distance weighting function, which controls the range and degree of influence of a marker point on the surrounding area. A commonly used weighting function is the Gaussian function, with the weight equal to a negative exponential decay. Distance is the Euclidean distance from the spatial point to the marker point, and σ is the influence radius parameter. In skin lesion monitoring, σ is usually set to 1.5 times the average distance between adjacent markers, which is about 7.5-15 mm. The strain energy constraint of the deformation mapping function is constructed, and the strain energy constraint is used to ensure the smoothness and physical rationality of the deformation field. The strain energy constraint is based on the elastic body deformation theory and takes into account the elastic properties of the material. In skin tissue modeling, an isotropic linear elastic material model is usually used, and its parameters are set to Young's modulus 1000 Pascals and Poisson's ratio 0.45. The continuity condition of the deformation field is determined according to the strain energy constraint. The continuity condition requires that the deformation mapping function meets certain smoothness and continuity in the entire spatial domain. Specifically, the first-order derivative (strain field) and the second-order derivative of the displacement field are required to change continuously in space to avoid unreasonable sharp deformation or fracture.

[0141] The variational method is used to solve a deformation mapping function that satisfies continuity conditions. The variational method transforms the solution of the deformation mapping function into the problem of minimizing a target functional. The target functional consists of two components: a data term and a regularization term. The data term ensures that the deformation at the marker points matches the observed value, while the regularization term ensures the smoothness of the deformation field. The solution is an iterative algorithm, with the initial solution set to a zero displacement field. The displacement field is updated at each iteration to reduce the target functional. The iteration terminates when the functional value changes less than a preset threshold (typically 0.001) or when the maximum number of iterations (typically 100) is reached. In the actual calculation, the finite element method is used to discretize the continuous problem. The space is divided into a tetrahedral mesh. Displacement variables are defined at the mesh nodes, and the displacement value of each node is obtained by solving a system of linear equations. The displacement of each point in the globally registered subdivided mesh data is calculated based on the deformation mapping function. For each node in the subdivided mesh, its coordinates are substituted into the solved deformation mapping function to calculate the corresponding displacement vector. The displacement vector consists of three components, representing the displacement values ​​in the x, y, and z directions, expressed in millimeters. In skin lesion monitoring, the typical displacement range is 0-5 mm. The subdivided mesh data is deformed according to the displacement value, and the calculated displacement vector is applied to the corresponding mesh node to update the node coordinates. For each node in the mesh, the new coordinates are equal to the original coordinates plus the displacement vector. After updating all node coordinates, the mesh connectivity remains unchanged, resulting in the subdivided mesh data after local deformation and registration.

[0142] The subdivided mesh data after local deformable registration accurately reflects the morphological changes of the skin lesion area at different time points. This deformable registration method fully accounts for the nonlinear deformation characteristics of skin tissue and can effectively handle local deformation caused by lesion growth, treatment response, or tissue repair. The registered mesh data can be used to calculate key clinical indicators such as the rate of change of lesion area, the rate of volume growth, and the direction and speed of boundary expansion.

[0143] In this embodiment, precise local deformation analysis enables high-precision quantitative characterization of skin lesion morphological changes. A polar decomposition method based on the deformation gradient tensor effectively separates rotational and extensional deformations of skin tissue, resolving the problem of deformation aliasing caused by traditional registration methods, which cannot distinguish between pathological deformation and deformation caused by posture adjustments. A feature vector-driven deformation direction extraction mechanism accurately locates the principal axis of lesion extension, providing a directional indicator for clinical invasiveness assessment. The introduction of strain energy constraints ensures the biomechanical plausibility of the deformation field and avoids the non-physical deformation artifacts produced by purely geometric registration methods. A spatial distance weighting function achieves a smooth transition between the influences of multiple markers, resolving the issue of coordinating local rigid deformation with global elastic deformation. A variational solution framework ensures that the deformation mapping function maintains overall continuity while satisfying marker constraints, significantly improving registration accuracy within lesion boundary regions. This physically constrained non-rigid registration method accurately reflects the growth pattern and treatment response of skin lesions, achieving submillimeter registration accuracy. This provides reliable technical support for quantitative assessment of skin lesion progression, objective assessment of treatment efficacy, and the development of precision medicine plans.

[0144] According to a second aspect of an embodiment of the present invention, an electronic device is provided, including:

[0145] processor;

[0146] a memory for storing processor-executable instructions;

[0147] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0148] According to a third aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described above is implemented.

[0149] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A progress tracking method for intelligent measurement and three-dimensional reconstruction of skin lesion area, characterized in that: include: Collect multi-angle image data of the lesion area, set reference marking points around the lesion area, and obtain the three-dimensional spatial coordinates of the reference marking points; Perform edge detection based on multi-angle image data, use edge weight positioning algorithm combined with the three-dimensional spatial coordinates of the reference markers to locate the edge of the lesion area, and compensate and correct the edge of the lesion area to obtain an enhanced image; Based on the enhanced image and the three-dimensional spatial coordinates of the fiducial markers, a mesh construction algorithm is used to generate an initial three-dimensional mesh of the lesion area. The node curvature values ​​are calculated based on the mesh node coordinates and mesh unit topological relationships in the initial three-dimensional mesh. An adaptive mesh subdivision algorithm is used to refine areas where the curvature values ​​exceed a preset curvature threshold, obtaining subdivided mesh data that contains the morphological characteristics of the lesion area. Using the three-dimensional spatial coordinates of the fiducial markers as the registration reference, the subdivided grid data collected at different time points are spatially registered. The progression parameters of the lesion area are calculated based on the registered subdivided grid data, and a measurement report is generated based on the subdivided grid data and the progression parameters.

2. The method according to claim 1, characterized in that Edge detection is performed based on multi-angle image data. The edge position of the lesion area is located using an edge weight positioning algorithm combined with the three-dimensional spatial coordinates of the reference markers. The edge position of the lesion area is compensated and corrected to obtain an enhanced image including: Dividing the multi-angle image data into overlapping sub-blocks, calculating the local histogram and cumulative distribution function of the overlapping sub-blocks, constructing adaptive weights according to the spatial distances between adjacent sub-blocks for fusion, and obtaining a contrast-enhanced preprocessed image; Constructing a multi-scale hybrid edge detection operator, performing edge response calculation on the pre-processed image, analyzing local extreme value features, and obtaining an initial edge intensity map of the lesion area; Constructing a distance field based on the three-dimensional spatial coordinates of the reference markers, performing nonlinear mapping based on the morphological features of the lesion area to obtain a spatial constraint field, and fusing the spatial constraint field with the initial edge intensity map to generate a constrained edge feature map; According to the constrained edge feature map, local gradient information is extracted, and the gradient direction consistency weight is calculated to obtain a weighted edge point set. The weighted edge point set is threshold-screened to obtain initial edge points. The initial edge points are gap-connected using morphological operations of adaptive kernels. Noise points are removed by combining the region growing criterion to obtain a continuous edge contour. The local curvature of the continuous edge contour is calculated, and the contour is smoothed and corrected. The corrected edge contour is superimposed on the preprocessed image to obtain an enhanced image.

3. The method according to claim 2, characterized in that The morphological operation of the adaptive kernel is used to perform gap connection on the initial edge points, and the noise points are removed by combining the region growing criterion to obtain the continuous edge contour including: Obtaining the position information of the initial edge point, constructing a neighborhood window based on the position information, calculating the pixel distribution within the neighborhood window, and extracting the local curvature value and gradient direction of the edge point; Determining a scale parameter and a direction parameter of a morphological kernel function according to the local curvature value and the gradient direction, inputting the scale parameter and the direction parameter into a preset kernel function template to generate an adaptive morphological structure element; Performing a morphological dilation operation on the initial edge points using the adaptive morphological structuring element, comparing the dilated edge region with the original edge point set, extracting newly added connected edge points, and merging the newly added connected edge points with the original edge point set to obtain an initially connected edge point set; For each edge point in the initially connected edge point set, a connectivity metric, a distance metric, and an edge strength metric are calculated, and a weighted combination is performed to generate a region growing criterion. The connected edge points are screened according to the region growing criterion, and edge points that do not meet the criterion threshold are eliminated to obtain optimized edge points. The optimized edge points are iteratively refined using a thinning template, and the edge topology is kept unchanged in each iteration until a continuous edge contour with a single pixel width is obtained.

4. The method according to claim 1, wherein Based on the enhanced image and the 3D spatial coordinates of the fiducial markers, an initial 3D mesh of the lesion area is generated using a mesh construction algorithm, including: Obtaining the three-dimensional spatial coordinates of the lesion area edge contour point set and the reference mark points in the enhanced image, calculating the position offset and rotation angle between adjacent reference mark points, establishing a piecewise continuous spatial mapping function, and transforming the lesion area edge contour point set into a three-dimensional spatial coordinate system through the spatial mapping function to obtain the lesion area spatial edge contour points; Constructing a local coordinate system centered on the spatial edge contour point of the lesion area, calculating the Euclidean distance and normal deviation from any position in the lesion area to the spatial edge contour point of the lesion area, calculating an influence weight based on the Euclidean distance and normal deviation, and superimposing the influence weights to obtain an edge density function; The initial density distribution of the grid nodes is determined based on the edge density function, the initial frontier surface is constructed with the spatial edge contour points of the lesion area, the node spacing of the initial frontier surface is calculated to generate new grid nodes, tetrahedral grid units are connected to construct and the frontier surface is updated until the internal space of the lesion area is filled to generate an initial three-dimensional grid.

5. The method according to claim 1, wherein The node curvature values ​​are calculated based on the grid node coordinates and grid cell topological relationships in the initial three-dimensional grid. An adaptive grid subdivision algorithm is used to refine areas where the curvature values ​​exceed the preset curvature threshold. The subdivided grid data containing the morphological characteristics of the lesion area is obtained, including: Obtaining the grid node coordinates and grid unit topological relationships of the initial three-dimensional grid, calculating the set of adjacent nodes within the first-order neighborhood for each grid node, constructing a local coordinate system for the node based on the set of adjacent nodes, calculating the normal vector of the node, fitting a quadratic surface to each grid node using the normal vector and the local coordinate system, calculating the principal curvature value and principal curvature direction of the quadratic surface at the current node, and obtaining the local curvature feature of the node; Calculating the maximum curvature value of each grid cell based on the local curvature feature, comparing the maximum curvature value with a preset curvature threshold, and marking the grid cells that need to be subdivided; For the marked grid cells, the grid subdivision direction is determined according to the principal curvature direction of the nodes, the subdivision ratio is set according to the principal curvature value, and a new grid node is inserted into the grid cells; The local curvature features are used to perform local surface fitting on the new grid nodes, adjust the spatial positions of the new grid nodes, reconstruct the grid units containing the new grid nodes and update the topological relationships to obtain subdivided grid data containing the morphological features of the lesion area.

6. The method according to claim 1, characterized in that Using the 3D coordinates of the fiducial markers as the registration reference, the subdivided grid data collected at different time points are spatially registered. The progression parameters of the lesion area are calculated based on the registered subdivided grid data. A measurement report based on the subdivided grid data and progression parameters is generated, including: Obtain the three-dimensional spatial coordinates of the fiducial markers in the subdivided grid data at different time points, select the adjacent markers in the first-order neighborhood of each fiducial marker, calculate the spatial distance and connection direction between the adjacent markers and the central marker, and construct a structural feature vector reflecting the local spatial distribution; Calculating the similarity between marker points at different time points using the structural feature vector, establishing a matching strength matrix of the marker points based on the similarity, and obtaining corresponding relationships of the marker points by screening according to the matching strength matrix; The matching strength in the correspondence between the marker points is used as the registration weight to construct a weighted distance field function. The spatial transformation matrix is ​​solved by minimizing the weighted distance field function, and the spatial transformation matrix is ​​used to perform overall registration on the subdivided grid data at the reference time point. Calculating the deformation direction and amplitude of the local area based on the registered marker point pairs, constructing a deformation mapping function that describes tissue deformation, and performing local deformation registration on the subdivided mesh data after overall registration according to the deformation mapping function to obtain the subdivided mesh data after local registration; The rotation angle and translation distance of the lesion area are extracted from the spatial transformation matrix as the overall motion parameters. The volume change rate and maximum deformation amplitude of the lesion area are extracted from the deformation mapping function as the local deformation parameters. The curvature and expansion speed of the lesion area boundary are calculated based on the subdivided grid data after local registration as the boundary feature parameters. The global motion parameters, local deformation parameters and boundary feature parameters are combined to generate a progress measurement report of the lesion area.

7. The method according to claim 6, characterized in that The deformation direction and amplitude of the local area are calculated based on the registered marker point pairs, and a deformation mapping function describing tissue deformation is constructed. The subdivided mesh data after global registration is locally deformed and registered according to the deformation mapping function. The subdivided mesh data after local registration includes: Selecting marker points in the first-order neighborhood of the registered marker point pair to form a local point set, and establishing a local deformation gradient tensor based on the local point set; Decomposing the local deformation gradient tensor to obtain a local deformation tensor, extracting the eigenvector of the local deformation tensor to obtain the deformation direction of the local area, and obtaining the deformation amplitude of the local area by taking the difference between the local deformation tensor and the unit matrix; constructing a displacement term of a deformation mapping function based on the deformation direction and deformation amplitude of the local area, constraining the displacement term using a spatial distance weighted function, constructing a strain energy constraint of the deformation mapping function, and determining a continuity condition of the deformation field based on the strain energy constraint; A deformation mapping function that satisfies the continuity condition is solved using a variational method, a displacement of each point in the globally registered subdivided mesh data is calculated based on the deformation mapping function, and the subdivided mesh data is deformed according to the displacement to obtain the subdivided mesh data after local deformation registration.

8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Water turbine operation characteristic curve data extraction method

    CN121564372A