Cosmetic plastic surgery auxiliary analysis method and system based on three-dimensional surface shape digitization measurement

By using Gaussian filtering and energy function to repair noise, constructing a gradient field to generate a 3D facial model, and integrating illumination components and parameter mapping matrices, the noise interference and interactivity issues in 3D digital facial measurement were resolved. This achieved high-precision 3D visualization and interactive operation, improving the accuracy and safety of cosmetic surgery.

CN120672973BActive Publication Date: 2025-12-12CHANGSHA MEILAI MEDICAL BEAUTY HOSPITAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511190033.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-12-12
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

Existing facial 3D digital measurement technologies suffer from noise interference and data loss when processing multi-source medical image data, resulting in poor geometric accuracy and visualization effects of 3D models. Furthermore, they lack professional visualization and interactive operation tools, making it difficult to meet the precision and personalization needs of cosmetic surgery.

Method used

The algorithm employs Gaussian filtering to process noise, constructs an energy function to repair defective areas, generates a 3D facial model by constructing a gradient field from point cloud data, and integrates multiple illumination components to generate a visualized image. Simultaneously, a parameter mapping matrix is ​​established to constrain the range of transformation parameters input by the user, enabling real-time interaction and feature analysis.

Benefits of technology

It improves the accuracy and efficiency of medical image processing, enhances the detail and realism of 3D modeling, supports interactive user operation, realizes a complete technical chain from image data to 3D model, and improves the accuracy and safety of surgical plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120672973B_ABST
    Figure CN120672973B_ABST
Patent Text Reader

Abstract

The application discloses an aesthetic plastic surgery auxiliary analysis method and system based on three-dimensional surface shape digital measurement, obtains a medical image data set, and adopts a Gaussian filtering algorithm to perform noise processing; if the difference between the pixel gray value and the neighborhood average value exceeds a preset threshold value, the noise point is determined and smoothed, and a first image data set is obtained; an energy function is constructed according to the first image data set; a defect area in the image is filled and repaired through the superposition calculation of a single-point energy item and an adjacent point interactive energy item, and a second image data set is obtained; point cloud data is extracted from the second image data set, a gradient field is constructed, and if the point cloud density is lower than a preset threshold value, local encryption processing is performed, and a three-dimensional face model is generated; the grid vertex coordinates and normal vector information of the three-dimensional face model are obtained, an environmental light component, a diffuse reflection component and a specular reflection component are fused through an illumination intensity calculation formula to generate a visual image, and the precision and efficiency of medical image processing and three-dimensional visualization are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of cosmetic and plastic surgery, and discloses a cosmetic and plastic surgery auxiliary analysis method and system based on three-dimensional facial shape digital measurement. BACKGROUND

[0002] With the rapid development of the medical beauty industry, the demand for precision and individualization of facial plastic surgery is increasing, and three-dimensional digital technology has become an indispensable core technology support in the field of modern cosmetic and plastic surgery. Traditional facial analysis methods mainly rely on two-dimensional photos and doctor's experience, which is difficult to accurately grasp the three-dimensional structural characteristics of the face, and lacks quantitative evaluation standards. Although existing three-dimensional reconstruction technology can obtain spatial information of the face, there are still obvious deficiencies in the completeness of data processing and the intuitiveness of visualization.

[0003] The key challenge of current facial three-dimensional digital measurement technology comes from the complexity of multi-source medical image data processing requirements. The tomographic data generated by medical imaging devices contains a large amount of noise interference and data loss. These raw data cannot be directly used for three-dimensional model construction and must go through a complex preprocessing process. Inadequate data preprocessing directly affects the accuracy of subsequent three-dimensional reconstruction. When there are noise points, void defects or irregular grids in the original point cloud data, the geometric accuracy of the facial model will decrease. The lack of geometric accuracy further restricts the authenticity of the visualization effect. Traditional surface rendering methods and volume data rendering methods often cannot balance detail fidelity and overall visual effect when dealing with complex facial structures, making it difficult for doctors to obtain intuitive and accurate three-dimensional visual references.

[0004] The facial cosmetic and plastic surgery application scenario has special requirements for the interactivity and parameter adjustability of the three-dimensional model. Doctors need to be able to adjust the display parameters, material properties and viewing angle direction of the model in real time, so as to observe the facial features from different angles and develop surgical plans. However, existing systems have limitations in the smoothness of interactive operation and the refinement of parameter adjustment, and lack of visual interfaces and operation tools designed for the professional needs of cosmetic and plastic surgery.

[0005] Therefore, how to construct a facial cosmetic and plastic surgery auxiliary analysis system that integrates multi-source medical image data processing, high-precision three-dimensional model reconstruction and professional visualization interaction, and realizes the complete technical chain from raw image data to operable three-dimensional model, has become a key problem to promote the digital development of cosmetic and plastic surgery. SUMMARY

[0006] The present application provides a cosmetic and plastic surgery auxiliary analysis method and system based on three-dimensional facial shape digital measurement, aiming to solve at least one of the defects in the prior art.

[0007] An aspect of the present application relates to a cosmetic plastic surgery auxiliary analysis method based on three-dimensional surface shape digitization measurement, comprising the following steps:

[0008] Obtain a medical image dataset and perform noise processing using a Gaussian filter algorithm, if the difference between the pixel gray value and the neighborhood mean value exceeds the preset threshold, it is determined as a noise point and is smoothed, obtaining a first image dataset;

[0009] According to the first image dataset, an energy function is constructed, and the defect area in the image is repaired by calculating the superposition of the single-point energy term and the adjacent point interaction energy term, obtaining a second image dataset;

[0010] Extract point cloud data from the second image dataset and construct a gradient field, if the point cloud density is lower than the preset threshold, execute local encryption processing, generate a three-dimensional face model;

[0011] Obtain the grid vertex coordinates and normal vector information of the three-dimensional face model, generate a visual image by fusing the ambient light component, diffuse reflection component and specular reflection component through the light intensity calculation formula;

[0012] Establish a parameter mapping matrix to range constrain the transformation parameters input by the user, if the rotation angle exceeds the preset range, it is automatically corrected, and the updated grid vertex position is calculated through the coordinate transformation formula;

[0013] According to the transformation parameters and material attribute parameters, the visual image is updated in real time, and the face feature analysis result is output.

[0014] Further, the step of obtaining a medical image dataset and performing noise processing using a Gaussian filter algorithm includes:

[0015] Obtain a medical image dataset and perform noise processing using a Gaussian filter algorithm, if the difference between the pixel gray value and the neighborhood mean value exceeds the preset threshold, it is determined as a noise point and is smoothed, obtaining a first image dataset;

[0016] According to the first gray difference set, noise detection is performed, if the difference between the pixel gray value and the neighborhood mean value exceeds the preset threshold, the pixel is determined as a noise point, and a noise point position set is obtained;

[0017] Smooth the noise point position set using a Gaussian filter algorithm, adjust the pixel gray value by applying the Gaussian filter algorithm to the noise point, and obtain a second image set;

[0018] From the second image set, a dataset is generated, the processed data of the second image set is saved, and a first image dataset is generated.

[0019] Further, the step of constructing an energy function according to the first image dataset, calculating the defect area in the image by superimposing a single-point energy item and an adjacent-point interaction energy item to fill and repair, and obtaining the second image dataset includes:

[0020] The pixel gray value and texture feature of the pixel point are obtained from the first image dataset, the image is partitioned by using a region segmentation algorithm, the region containing defects is determined by calculating the texture feature mean value and pixel gray value distribution of each region, and a defect region set is obtained;

[0021] For the defect region set, a boundary detection algorithm is used to extract the boundary contour of the defect region, and the boundary contour set is determined by calculating the pixel gray value gradient of the boundary pixel point;

[0022] According to the boundary contour set and the texture feature, an energy function is constructed to obtain an energy distribution set;

[0023] The energy distribution set is smoothed by using a Gaussian filtering algorithm, the pixel gray value of the pixel point in the defect region is adjusted, and the texture feature is combined to fill and repair to generate the second image dataset.

[0024] Further, the steps of extracting point cloud data from the second image dataset and constructing a gradient field, and if the point cloud density is lower than a preset threshold, performing local encryption processing to generate a three-dimensional face model include:

[0025] The pixel gray value and depth information of the pixel point in the second image dataset are obtained, point cloud data containing three-dimensional space coordinates are generated by using a stereomicroscopic algorithm, and a point cloud dataset is obtained;

[0026] The number of points in a unit volume is calculated for the point cloud dataset, if the point cloud density is lower than a preset threshold, an interpolation algorithm is used to locally encrypt the low-density region, and an encrypted point cloud dataset is obtained;

[0027] The pixel gray value gradient of each point is calculated according to the encrypted point cloud dataset, a gradient field describing the surface change is constructed by using a gradient descent algorithm, and a gradient field dataset is obtained;

[0028] By using the gradient field dataset and the encrypted point cloud dataset, a triangular mesh is generated by using a mesh generation algorithm, a three-dimensional face model is constructed by combining the boundary contour and the normal vector, and a three-dimensional face model dataset is obtained.

[0029] Further, the steps of obtaining the grid vertex coordinates and normal vector information of the three-dimensional face model, and generating a visual image by fusing an ambient light component, a diffuse reflection component and a specular reflection component through a light intensity calculation formula include:

[0030] The grid vertex data set of the three-dimensional face model is acquired, vector operation is used to calculate the three-dimensional coordinates and normal vector of each grid vertex, and a grid vertex attribute data set is obtained;

[0031] According to the grid vertex attribute data set and the preset light source position, the ambient light component of each grid vertex is calculated by using a light model, and the ambient light intensity data set is obtained in combination with the reflection coefficient of the surface material;

[0032] If the angle between the normal vector in the grid vertex attribute data set and the light source position is less than a preset threshold, the diffuse reflection component is calculated by using a diffuse reflection formula I_d=k_d(N·L), wherein I_d represents the diffuse reflection intensity, k_d represents the diffuse reflection coefficient, N represents the grid vertex normal vector, and L represents the light source direction vector, and a diffuse reflection intensity data set is obtained;

[0033] The specular reflection component is calculated by using a specular reflection formula I_s=k_s(R·V)^n through the diffuse reflection intensity data set and the viewing angle direction, the ambient light intensity data set and the diffuse reflection intensity data set are fused, and a visual image data set is generated, wherein I_s represents the specular reflection intensity, k_s represents the specular reflection coefficient, R represents the reflection vector, V represents the viewing angle vector, and n represents the highlight index.

[0034] Further, a parameter mapping matrix is established to range constrain the transformation parameters input by the user, and the rotation angle is automatically corrected if it exceeds the preset range, and the steps of calculating the updated grid vertex position by using a coordinate transformation formula include:

[0035] A transformation parameter data set input by the user is acquired, a parameter mapping matrix is constructed by matrix operation, an initial transformation matrix is obtained, and the transformation parameter data set includes a rotation angle, a translation amount and a scaling ratio;

[0036] It is judged whether the rotation angle in the initial transformation matrix exceeds a preset angle threshold, and if so, the rotation angle is corrected by using a linear interpolation method to obtain a corrected transformation matrix;

[0037] The grid vertex data set of the three-dimensional face model is calculated by using a coordinate transformation formula T(v)=M·v to obtain an updated grid vertex data set, wherein T(v) represents the transformed grid vertex coordinates, M represents the corrected transformation matrix, and v represents the original grid vertex coordinates;

[0038] A grid of the three-dimensional face model is generated by combining the updated grid vertex data set with the preset rendering parameters, and a visual grid vertex position data set is obtained.

[0039] Further, the visual image is updated in real time according to the transformation parameters and the material attribute parameters, and the steps of outputting the face feature analysis result include:

[0040] Obtain the transformation parameter dataset and the material attribute dataset input by the user, construct an initial transformation matrix and an initial material mapping matrix through matrix operation, and obtain the initial transformation matrix and the initial material mapping matrix;

[0041] If the parameters in the initial transformation matrix exceed the preset range, the linear interpolation method is used to correct the transformation parameters, and a corrected transformation matrix is obtained.

[0042] Through the corrected transformation matrix, the grid vertex of the three-dimensional face model is calculated by using the coordinate transformation formula T(v)=M·v, and an updated grid vertex dataset is obtained, wherein T(v) represents the transformed grid vertex coordinates, M represents the corrected transformation matrix, and v represents the original grid vertex coordinates.

[0043] According to the material attribute dataset, the initial material mapping matrix is updated by using a texture mapping algorithm, and an updated material mapping matrix is obtained.

[0044] Through the updated grid vertex dataset and the updated material mapping matrix, real-time updated visual image data is generated.

[0045] The face feature extraction algorithm is used to extract the face feature points from the real-time updated visual image data, and a face feature point set is obtained.

[0046] According to the face feature point set, the relative position relationship between the face feature points is calculated by using a geometric analysis method, and a face feature analysis result is obtained.

[0047] Another aspect of the present application relates to a cosmetic plastic surgery auxiliary analysis system based on three-dimensional surface digital measurement, which is used to realize the cosmetic plastic surgery auxiliary analysis method based on three-dimensional surface digital measurement described above, and includes:

[0048] The first acquisition module is used to acquire the medical image dataset and perform noise processing by using a Gaussian filtering algorithm, and if the difference between the pixel gray value and the neighborhood mean value exceeds the preset threshold, the noise point is determined and smoothed, and a first image dataset is obtained.

[0049] The second acquisition module is used to construct an energy function according to the first image dataset, and the defect area in the image is repaired by filling through the superposition of the single-point energy term and the adjacent point interaction energy term, and a second image dataset is obtained.

[0050] The first generation module is used to extract point cloud data from the second image dataset and construct a gradient field, and if the point cloud density is lower than the preset threshold, local encryption processing is performed, and a three-dimensional face model is generated.

[0051] The second generation module is configured to acquire grid vertex coordinates and normal vector information of the three-dimensional face model, and generate a visual image by fusing ambient light components, diffuse reflection components and specular reflection components through an illumination intensity calculation formula.

[0052] The calculation module is configured to establish a parameter mapping matrix to range-constrain the transformation parameters input by the user, automatically correct the rotation angle if the rotation angle exceeds a preset range, and calculate updated grid vertex positions through a coordinate transformation formula.

[0053] The output module is configured to update the visual image in real time according to the transformation parameters and material attribute parameters, and output a face feature analysis result.

[0054] Further, the first acquisition module comprises:

[0055] The first acquisition unit is configured to acquire the medical image dataset and analyze pixel gray values, extract pixel gray values of each pixel from the medical image dataset, and obtain a first gray value difference set by calculating differences between the pixel gray values and neighborhood pixel gray mean values.

[0056] The second acquisition unit is configured to perform noise detection according to the first gray value difference set, determine a pixel as a noise point if a difference between the pixel gray value and the neighborhood mean value exceeds a preset threshold, and obtain a noise point position set.

[0057] The third acquisition unit is configured to perform smoothing processing on the noise point position set by using a Gaussian filtering algorithm, adjust the pixel gray value by applying the Gaussian filtering algorithm to the noise point, and obtain a second image set.

[0058] The first generation unit is configured to generate a dataset from the second image set, save processed data of the second image set, and generate a first image dataset.

[0059] Further, the second acquisition module comprises:

[0060] The fourth acquisition unit is configured to acquire the medical image dataset and analyze pixel gray values, extract pixel gray values of each pixel from the medical image dataset, and obtain a first gray value difference set by calculating differences between the pixel gray values and neighborhood pixel gray mean values.

[0061] The fifth acquisition unit is configured to perform noise detection according to the first gray value difference set, determine a pixel as a noise point if a difference between the pixel gray value and the neighborhood mean value exceeds a preset threshold, and obtain a noise point position set.

[0062] The sixth acquisition unit is configured to perform smoothing processing on the noise point position set by using a Gaussian filtering algorithm, adjust the pixel gray value by applying the Gaussian filtering algorithm to the noise point, and obtain a second image set.

[0063] The second generating unit is configured to generate a first image data set by saving processed data of the second image set.

[0064] The present application has the following beneficial effects:

[0065] The present application provides a cosmetic plastic surgery auxiliary analysis method and system based on three-dimensional surface digital measurement. The method performs noise processing on medical image data sets through Gaussian filtering, constructs an energy function to repair defect areas, extracts point cloud data and constructs a gradient field to generate a three-dimensional facial model, obtains mesh vertex coordinates and normal vector information of the model, and fuses multiple illumination components to generate a visual image. The present application also establishes a parameter mapping matrix to constrain the transformation parameters input by the user, updates the mesh vertex positions through coordinate transformation, updates the visual image in real time according to the transformation parameters and material properties, and outputs the facial feature analysis results. The method realizes the construction and visualization of a three-dimensional facial model from medical image data, supports interactive operation by the user, and can be widely applied to medical image analysis and facial modeling, thereby improving the precision and efficiency of medical image processing and three-dimensional visualization. The cosmetic plastic surgery auxiliary analysis method and system based on three-dimensional surface digital measurement provided by the present application have the following beneficial effects:

[0066] I. Precision improvement of image preprocessing:

[0067] 1. Robustness of noise suppression: Through Gaussian filtering algorithm and dynamic threshold judgment (pixel gray value difference from the average value of the neighborhood exceeds the preset threshold, smoothing processing), the method can effectively remove salt and pepper noise, Gaussian noise and other interference in medical images, making the facial tissue boundary clearer.

[0068] Compared with traditional median filtering: Gaussian filtering can retain edge details while suppressing noise, and is particularly suitable for retaining fine structures such as facial skin texture and pores, avoiding feature distortion caused by excessive smoothing.

[0069] 2. Intelligence of defect repair: Based on the defect filling of the energy function (single-point energy term and adjacent point interaction energy term are superimposed and calculated), the method can automatically repair local defects such as light spots, scratches, facial acne pits and scars in the image, and the pixel gray value and texture features of the filling area and the surrounding tissue are seamlessly connected.

[0070] Application value: Avoiding three-dimensional modeling errors caused by defects in the original image, for example, repairing scars on the nasal ala can make subsequent nasal plastic simulation more consistent with the real facial structure.

[0071] II. Detail enhancement of three-dimensional modeling:

[0072] 1. Adaptive optimization of point cloud data, through gradient field analysis and local encryption processing (automatic encryption when point cloud density is below the threshold), can enhance the point cloud density of key facial features (such as eye corners, lip lines, and nasal arches), solving the problem of sparse point cloud in low curvature areas (such as cheeks) of traditional laser scanning;

[0073] Data comparison: In areas with large curvature changes such as the tip of the nose, the point cloud density can be increased from 50 points / cm² in traditional methods to 200 points / cm², and the model surface error can be reduced to within 0.1 mm;

[0074] 2. Realistic physical lighting simulation, integrating environmental light, diffuse reflection, and specular reflection components of the lighting model (such as the Phong lighting model), can realistically restore the optical properties of facial skin (such as the oil reflection on the forehead and the matte texture on the cheeks), avoiding the "plastic feel" of traditional three-dimensional models;

[0075] Clinical value: Doctors can observe facial stereoscopic effects through light and shadow changes, such as judging whether the light and shadow transition after apple muscle filling is natural, reducing the deviation between postoperative effect and expectation.

[0076] Three, safety and interaction efficiency of parameter control:

[0077] 1. Constraint mechanism of transformation parameters, parameter mapping matrix limits the range of rotation angles (such as the angle of pushing the zygomatic arch and the rotation amplitude of the mandibular angle), and automatically corrects the out-of-limit values (such as limiting the rotation angle of the mandibular angle ≤15° to avoid the risk of nerve damage), eliminating unreasonable operations from the algorithm level;

[0078] Risk control: Combined with the anatomical database, preset safety thresholds, such as automatically prompting when the nose tip rotation angle exceeds 30° in rhinoplasty, which may cause nostril exposure;

[0079] 2. Immersive experience of real-time interaction, based on the real-time calculation of grid vertex positions based on coordinate transformation formulas (such as rotation matrix and translation vector), the three-dimensional model can be updated at a frame rate of 60fps when the user adjusts the parameters (such as changing the chin length with a slider), achieving a "what you see is what you get" simulation effect;

[0080] Optimization of doctor-patient communication: Patients can visually observe the changes in facial features under different plastic surgery plans (such as comparing the heights of two rhinoplasty prostheses), and doctors can quickly verify the aesthetic proportions of the design plan (such as the three-court five-eye standard) through real-time rendering.

[0081] Four, comprehensive benefits of clinical application:

[0082] 1. Precision of surgical plan, high-precision three-dimensional model (error <0.3mm) combined with light simulation, can quantitatively analyze facial asymmetry degree (such as left and right cheek width difference), skin laxity and other indicators, and provide data support for personalized surgical plan; for example: when calculating the amount of mandibular angle osteotomy, the bone section can be generated according to the point cloud data to simulate the change of facial profile after osteotomy;

[0083] 2. Preoperative risk prediction, the effect of different surgical parameters can be simulated through model preview, potential problems (such as the compatibility of prosthesis implantation with surrounding tissues, nerve and blood vessel compression risk) can be found in advance, the intraoperative adjustment time is reduced, and the surgical risk is reduced by about 25%;

[0084] 3. Efficient use of medical resources, automatic image processing and modeling process (from image input to three-dimensional model generation, time consumption <10 minutes), which greatly improves the efficiency compared with traditional manual measurement (1-2 hours are needed), and is suitable for large-scale cosmetic and plastic preoperative evaluation.

[0085] In summary, the cosmetic and plastic surgery auxiliary analysis method and system based on three-dimensional surface digital measurement provided by the application realize the leap from "experience-oriented" to "data-driven" in the field of cosmetic and plastic surgery through the whole process technical innovation of high-precision image processing, detail enhancement modeling, physical light rendering and safe interactive simulation. BRIEF DESCRIPTION OF DRAWINGS

[0086] Figure 1 The figure shows the flowchart of an embodiment of the cosmetic and plastic surgery auxiliary analysis method based on three-dimensional surface digital measurement. DETAILED DESCRIPTION

[0087] In order to better understand the above technical solutions, the above technical solutions will be described in detail in combination with the drawings in the specification and specific embodiments.

[0088] As shown in the figure, the first embodiment of the application proposes a cosmetic and plastic surgery auxiliary analysis method based on three-dimensional surface digital measurement, which includes the following steps: Figure 1 Step S100, obtain the medical image data set and use the Gaussian filter algorithm for noise processing, if the difference between the pixel gray value and the neighborhood mean value exceeds the preset threshold, it is determined as a noise point and is subjected to smoothing processing, and a first image data set is obtained.

[0089] The medical image data set refers to the digital image collection obtained by various medical imaging techniques for recording the internal or external structure and physiological function of the human body. These data sets contain a large amount of anatomical, pathological or functional information, which is the core basic data for medical diagnosis, treatment planning, medical research and medical technology development.

[0090]

[0091] ​Gaussian Filter Algorithm is a linear smoothing filter algorithm based on Gaussian function, which belongs to the classic technology in the field of signal processing and image processing. Its core idea is to use Gaussian kernel to perform convolution operation on images or signals, and to reduce noise and smooth details by weighted average of neighboring pixel values, while preserving the edges and structure information of the image as much as possible.

[0092] Pixel Grayscale Value is a numerical value used to represent the brightness of a single pixel in an image, and is a basic attribute of grayscale images (images without color information).

[0093] Neighborhood Mean is a local statistical quantity commonly used in image processing and computer vision, which is used to describe the average characteristics of the pixel grayscale values of a pixel and its surrounding neighboring pixels. Its core idea is to analyze the grayscale distribution of the local area of the pixel, extract the local features of the image, or suppress noise.

[0094] Noise Pixel refers to an abnormal pixel point in an image that is significantly different from the pixel grayscale values or texture features of its surrounding pixels, usually introduced by imaging device defects, transmission interference, environmental interference, etc. Noise pixels will interfere with the visual effect of the image and subsequent processing (such as image analysis, target detection, etc.), so they need to be suppressed by filtering, denoising, etc.

[0095] Smoothing Processing is a technique in image processing that suppresses image noise and weakens local grayscale fluctuations between pixels to make the image overall or local area smoother. Its core goal is to reduce high-frequency details (such as noise, fine texture) in the image, while preserving low-frequency information (such as object contours, large-scale structures) as much as possible. Smoothing processing is widely used in image denoising, preprocessing, and noise reduction before feature extraction.

[0096] Step S200, according to the first image data set, an energy function is constructed, and the defect area in the image is filled and repaired by superposition of single-point energy item and adjacent point interaction energy item, to obtain the second image data set.

[0097] Energy Function is defined and applied differently in different fields, but its core idea is to map the state or property of a system into a numerical value (energy value) through a mathematical function, which is used to describe the stability, cost, similarity or optimization goal of the system. Energy function is often used as the objective function of optimization problem, and the optimal state of the system is solved by minimizing or maximizing the energy value.

[0098] Image defect area repair is calculated by superimposing a single-point energy term and an adjacent-point interaction energy term, which is an image repair method based on energy function optimization. The core idea is to convert the defect area filling problem in the image (such as scratches, noise points, missing pixels) into an energy minimization problem, define two types of energy terms to describe the local features and neighborhood dependencies of pixels, and finally solve the optimal filling value through an optimization algorithm, so that the repaired image is visually coherent and natural.

[0099] In computer vision, image processing, and energy optimization models (such as Markov Random Fields, Conditional Random Fields), the unary energy term is a basic component of the energy function, used to describe the matching degree or cost of the single pixel / point's own attributes and the target state. The unary energy term describes the "energy" of a single point independent of the surrounding environment (i.e., independent cost or preference), which is one of the core elements of building a global energy function.

[0100] In computer vision, image processing, and energy optimization models (such as Markov Random Fields, Conditional Random Fields), the pairwise energy term is a key component of the energy function, used to describe the contribution of the label relationship between adjacent pixels / points to the overall energy. The pairwise energy term describes the dependency or constraint between adjacent points, working together with the unary energy term to ensure a balance between local rationality (unary term) and global consistency (interaction term).

[0101] Step S300, extract point cloud data from the second image dataset and construct a gradient field, if the point cloud density is lower than the preset threshold, perform local encryption processing, and generate a three-dimensional face model.

[0102] Point cloud data is a dataset composed of discrete points in three-dimensional space, each point usually contains coordinates (x, y, z) and attributes (such as color, intensity, etc.), widely used in laser radar, photogrammetry, three-dimensional scanning, etc.

[0103] The gradient field is a vector field that describes the rate of change (i.e., steepness and direction) of the point cloud surface in the local area, each point corresponds to a gradient vector, its size represents the local change amplitude, and the direction points to the direction of the fastest function growth (usually perpendicular to the surface normal vector).

[0104] Local encryption processing based on point cloud density threshold is a point cloud data preprocessing strategy that aims to improve the spatial uniformity and detail integrity of point cloud by automatically identifying low-density areas and supplementing sampling points. The core logic is to calculate the density value of the local area of the point cloud, compare it with the preset threshold, and perform encryption operation on the area with density lower than the threshold to meet the data density requirements of subsequent processing such as three-dimensional reconstruction, surface modeling, etc.

[0105] In the field of point cloud processing, point cloud density is used to describe the distribution density of points in point cloud data, and is an important indicator for measuring point cloud quality, geometric structure characteristics or spatial sampling characteristics.

[0106] A three-dimensional face model is a three-dimensional data structure constructed through digital technology that can accurately depict the geometric shape, texture features, and dynamic expressions of a human face. In a mathematical or computer-recognizable form, it integrates spatial coordinates, surface details, and topological relationships of the face into a visual and interactive model, widely used in computer graphics, virtual reality, biomedicine, security recognition, film special effects, and other fields.

[0107] In step S400, the grid vertex coordinates and normal vector information of the three-dimensional face model are obtained, and the ambient light component, diffuse reflection component, and specular reflection component are fused through the lighting intensity calculation formula to generate a visual image.

[0108] In a three-dimensional face model, grid vertex coordinates and normal vector information are core data that describe the geometric structure and surface characteristics of the model, and together determine the shape, lighting effect, and rendering realism of the model.

[0109] A normal vector is a unit vector perpendicular to a point on the surface of a model, used to describe the orientation and curvature of the surface, and is divided into grid vertex normal vectors and face normal vectors.

[0110] Fusing ambient light component, diffuse reflection component, and specular reflection component through lighting intensity calculation formula to generate a visual image is one of the core steps of photorealistic rendering in computer graphics. Its essence is based on lighting model, which mathematically models different types of lighting components (ambient light, diffuse reflection light, and specular reflection light) in the scene, and calculates the final lighting intensity of each point on the object surface by superposition, thereby generating a visual image with stereoscopic and realistic effects.

[0111] Ambient light is a type of light that simulates the uniform distribution of light after multiple scattering in the environment, and does not depend on the direction of the light source and the orientation of the object surface. It can be considered as the basic lighting of the scene.

[0112] Diffuse Light is a phenomenon that simulates the uniform scattering of light rays in all directions when they hit a rough surface, with intensity depending on the angle between the light source direction and the object surface normal.

[0113] Specular Light is a phenomenon that simulates the directional reflection of light rays when they hit a smooth surface (such as the highlight effect of metal or glass), with intensity depending on the angle between the observer's view angle and the reflected light direction.

[0114] Visualization is a technology that converts data, information, or abstract concepts into visual forms that can be perceived by the human eye through graphical means, to intuitively and efficiently convey knowledge, express laws, or present scenarios. It uses visual elements such as color, shape, texture, and spatial relationships to transform complex data or difficult-to-understand content (such as three-dimensional models, simulation results, statistical information, etc.) into an easy-to-perceive and interpret visual symbol system.

[0115] Step S500, establish parameter mapping matrix to range constrain the transformation parameter input by user, if the rotation angle exceeds the preset range, automatically correct, calculate the updated grid vertex position through coordinate transformation formula.

[0116] Parameter mapping matrix is a mechanism that maps the original parameters input by the user to the target parameter range through mathematical transformation (such as matrix operations in linear algebra), its core goal is to range constrain the parameters, ensure that the input value meets the system's preset effective interval (such as physical feasibility, geometric reasonableness, or business rules).

[0117] Parameter mapping matrix builds a bridge between user input space and system legal space through mathematical transformation, its core value lies in constraining the parameter range while preserving the directionality and continuity of user intent. This mechanism is widely used in computer graphics, human-computer interaction, physical simulation, etc., not only guarantees system stability, but also improves the naturalness and predictability of user operation.

[0118] Transformation parameter refers to the quantitative parameter used to describe the geometric transformation (such as position, direction, size, shape change) of objects or space in the fields of computer graphics, robotics, mathematical modeling, and physical simulation.

[0119] The automatic correction mechanism of the rotation angle is a core means to ensure the legality of the angle value through mathematical transformation or control logic, and the core goal is to balance between the constraint effectiveness and the user intention preservation. The selection of the correction method needs to be determined according to the scene requirements (such as whether the angle jump is allowed, whether it has periodicity), and finally the optimization of system stability and interactive experience is realized. When the rotation angle input by the user or calculated by the system exceeds the preset legal range, the angle value is automatically adjusted through mathematical transformation or rules to fall within the effective interval, so as to ensure the stability, geometric rationality or interactive safety of the system.

[0120] The calculation of the updated grid vertex position through the coordinate transformation formula is the core operation of geometric transformation in computer graphics, robotics and geometric modeling. Its essence is to map the original grid vertex coordinates to new coordinate positions through mathematical formulas to realize geometric transformations such as translation, rotation, scaling, skewing, projection, etc. of objects, so as to change the spatial position, direction, size or shape of the object.

[0121] Step S600, updating the visual image in real time according to the transformation parameter and the material attribute parameter, and outputting the face feature analysis result.

[0122] The real-time updating of the visual image is based on the input transformation parameter (such as the translation, rotation and scaling of the face model) and the material attribute parameter (such as the skin color, texture and glossiness), and the visual effect of the three-dimensional face model is dynamically updated through the graphic rendering engine. Among them, the transformation parameter is a parameter describing the spatial pose and shape change of the face model. The material attribute parameter is a parameter describing the optical properties and texture of the face surface.

[0123] Face feature analysis is an analysis of the real-time rendered image or three-dimensional model to extract quantitative results such as face geometric features, expression state and material matching degree, which is used to drive interaction, evaluation or decision-making.

[0124] Further, the cosmetic plastic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in the embodiment comprises the following steps:

[0125] Step S110, acquiring a medical image data set and using pixel gray value analysis to extract the pixel gray value of each pixel from the medical image data set, and obtaining a first gray difference value set by calculating the difference between the pixel gray value and the average gray value of the neighborhood pixels.

[0126] For example, in medical image processing, obtaining a medical image dataset usually involves extracting CT or MRI images from a hospital's PACS (Picture Archiving and Communication System) system or public datasets such as LIDC-IDRI (The Lung Image Database Consortium).

[0127] Suppose a set of chest CT images is obtained, with a size of 512x512 pixels and pixel grayscale values ranging from 0 to 255. The pixel grayscale value of each pixel reflects the tissue density, and the lung area usually presents a lower pixel grayscale value, while the bone area has a higher pixel grayscale value. This data acquisition method ensures the reliability and consistency of subsequent analysis, which helps to make accurate diagnosis.

[0128] Specifically, the pixel grayscale value of each pixel is extracted and the difference between it and the mean value of the neighboring pixels is calculated, which can be done using a 3x3 neighborhood window. For example, a pixel grayscale value is 150, and the grayscale values of its 8 neighboring pixels are 145, 148, 152, 147, 149, 146, 151, and 150, with a mean value of 148.5 and a difference of 1.5. This process generates a first set of grayscale difference values, reflecting the local features of grayscale changes in the image, which helps to identify abnormal points.

[0129] Step S120, noise detection is performed according to the first set of grayscale difference values. If the difference between the pixel grayscale value and the mean value of the neighborhood exceeds the preset threshold, the pixel is determined to be a noise point, and a set of noise point positions is obtained.

[0130] In one possible implementation, noise detection is completed by setting a threshold. Suppose the preset threshold is 10, if the difference between the pixel grayscale value and the mean value of its neighborhood exceeds 10, it is determined to be a noise point. For example, a pixel grayscale value is 200, the mean value of the neighborhood is 150, and the difference is 50, which is far beyond the threshold, and it is marked as a noise point. All noise points form a set of noise point positions. This method can effectively distinguish between normal tissue and noise interference, and improve the image quality.

[0131] Step S130, a Gaussian filter algorithm is used to smooth the set of noise point positions, and the pixel grayscale value is adjusted by applying the Gaussian filter algorithm to the noise points to obtain a second image set.

[0132] For example, a Gaussian filter algorithm can be applied to the set of noise point positions, and a Gaussian kernel with a standard deviation of 1.5 and a window size of 5x5 can be selected. Suppose a noise point has a pixel grayscale value of 200, which is adjusted to the weighted average value of the neighborhood after Gaussian filtering, such as 180. This smoothing process reduces the interference of noise on the image, preserves the edge information, generates a second image set, and improves the visual clarity of the image and the accuracy of subsequent analysis.

[0133] Step S140, data set generation from the second image set, by saving the processed data of the second image set, a first image data set is generated.

[0134] Specifically, generating the first image data set requires saving the processed data of the second image set. For example, the processed CT image is stored in DICOM format, containing metadata such as patient ID and scan parameters. The saved data set can be used for deep learning model training or clinical diagnosis. This method ensures data consistency, facilitating subsequent analysis and model development.

[0135] In one possible implementation, the parameter selection of Gaussian filtering has a significant impact on the result. Smaller standard deviation can better preserve details, suitable for fine structure analysis; larger standard deviation is suitable for removing obvious noise.

[0136] Preferably, the parameters can be dynamically adjusted according to the image type to ensure the best smoothing effect. This flexibility improves the adaptability of the algorithm, meeting the needs of different clinical scenarios.

[0137] For example, the above processing flow can significantly improve the accuracy of nodule detection in lung CT images. After noise reduction, the nodule edge is clearer, reducing the misdiagnosis rate. At the same time, the generated first image data set provides high-quality input for AI-assisted diagnosis, helping to improve diagnosis efficiency and reliability. This method optimizes through multiple steps, ensuring the robustness and practicality of medical image processing.

[0138] Further, the cosmetic plastic surgery auxiliary analysis method based on three-dimensional surface digital measurement proposed in the embodiment, step S200 includes:

[0139] Step S210, obtaining pixel gray value and texture feature of pixel points from the first image data set, using region segmentation algorithm to divide the image, determining the region containing defects by calculating the texture feature mean value and pixel gray value distribution of each region, and obtaining the defect region set.

[0140] In the field of medical image processing, when obtaining the pixel gray value and texture feature of the pixel points from the first image data set, data can be extracted from the chest CT image. Assuming that the image size is 512x512 pixels, the pixel gray value range is 0-255. Texture features can be calculated by local binary patterns or gray level co-occurrence matrix, reflecting the gray level change rule of the neighborhood of the pixel points. Illustratively, for a certain lung region pixel, the pixel gray value is 120, and its neighborhood forms a certain texture pattern, and after quantization, the feature value is obtained for subsequent segmentation.

[0141] The region segmentation algorithm can adopt a graph cut-based method to divide the image into multiple regions, such as a lung region, a pleura region, and a bone region. Specifically, the texture feature mean value and the pixel gray value distribution of each region are calculated. For example, the texture feature mean value of the lung region is 0.8, and the gray mean value is 100, while the texture mean value of a certain region is 1.2, and the gray distribution deviates from the normal range, which is determined as a region containing defects, constituting a defect region set. This process ensures accurate identification of the defect region.

[0142] In step S220, a boundary detection algorithm is used to extract the boundary contour of the defect region set, and the boundary contour set is determined by calculating the pixel gray value gradient of the boundary pixel point.

[0143] In an embodiment, a boundary detection algorithm such as the Canny algorithm is applied to the defect region set to extract the boundary contour of the defect region. For example, the pixel gray value of a certain defect region suddenly changes from 100 to 180, and after calculating the pixel gray value gradient, the pixel with a higher gradient value is marked as a boundary point to form a boundary contour set.

[0144] It should be noted that the gradient calculation combined with the texture feature can improve the accuracy of boundary detection. For example, the texture feature value of a certain boundary point is higher, indicating that it may be the edge of a lesion rather than noise interference. The boundary contour set provides accurate region positioning for subsequent processing.

[0145] In step S230, an energy function is constructed based on the boundary contour set and the texture feature to obtain an energy distribution set.

[0146] Based on the boundary contour set and the texture feature, an energy function is constructed, which can optimize the feature description of the defect region by minimizing the energy function. Assuming that the energy function of a certain defect region combines the gray gradient and the texture feature to generate an energy distribution set, which reflects the abnormality degree of the pixels in the region. Specifically, a pixel with a higher energy value indicates that it deviates from the normal tissue characteristics. It should be noted that the energy distribution set provides a quantitative basis for subsequent repair.

[0147] In step S240, a Gaussian filter algorithm is used to smooth the energy distribution set, and the pixel gray value of the pixel point in the defect region is adjusted to fill and repair in combination with the texture feature to generate a second image data set.

[0148] In an embodiment, a Gaussian filter algorithm is used to smooth the energy distribution set, with a standard deviation of 1.2 and a window size of 5x5. For example, the original pixel gray value of a certain pixel is 160, which is adjusted to 150 after smoothing, and the second image data set is generated by filling and repairing in combination with the texture feature.

[0149] Preferably, the pixel gray value can be dynamically adjusted according to the texture feature during the repair, ensuring that the repaired region is naturally connected with the surrounding tissue. For example, the pixel gray value of the repaired lung region is uniformly distributed, and the texture feature is consistent with the normal tissue. This method improves the quality of the image data set and provides reliable data support for subsequent diagnosis.

[0150] In one embodiment, the second image data set can be saved in DICOM format, including patient ID and scanning parameters, for clinical use. Illustratively, the repaired CT image shows higher regional consistency in lung nodule detection, which is helpful for subsequent analysis. It should be noted that the introduction of texture features makes the repair process more targeted and reduces the risk of false repair. This multi-step cooperative processing ensures the integrity and practicality of the image data.

[0151] Further, the cosmetic plastic surgery auxiliary analysis method based on three-dimensional surface digital measurement proposed in the embodiment comprises the following steps:

[0152] In step S310, the pixel gray value and depth information of the pixel points in the second image data set are obtained, and a stereoscopic microscopic algorithm is used to generate point cloud data containing three-dimensional space coordinates to obtain a point cloud data set.

[0153] In the field of medical image processing, the pixel gray value and depth information of the pixel points in the second image data set can be extracted from the CT image of the skull. Assuming that the image size is 512x512 pixels, the pixel gray value range is 0-255, and the depth information is generated by multi-layer CT scanning, reflecting the position of the pixel points in the three-dimensional space. The stereoscopic microscopic algorithm can convert these information into point cloud data to generate a point cloud data set containing three-dimensional space coordinates.

[0154] Specifically, each pixel point is assigned with x, y, z coordinates and pixel gray value, such as the coordinates of a certain skull region pixel point being (100, 120, 50) and the pixel gray value being 150. The point cloud data set provides a basis for subsequent three-dimensional modeling.

[0155] In step S320, the number of points in a unit volume is calculated for the point cloud data set, and if the point cloud density is lower than a preset threshold, an interpolation algorithm is used to locally encrypt the low-density region to obtain an encrypted point cloud data set.

[0156] In one embodiment, the number of points in a unit volume is calculated for the point cloud data set, assuming that the unit volume is 1 cubic millimeter and the preset density threshold is 100 points / cubic millimeter. If the point cloud density of a certain region is 80 points / cubic millimeter, which is lower than the threshold, an interpolation algorithm is used for local encryption.

[0157] For example, based on the nearest neighbor interpolation method, new points are inserted in the low-density area, and the pixel gray value is generated by weighted average of adjacent points, such as the pixel gray value of the inserted point is about 145. After encryption, the point cloud density is increased to 110 points per cubic millimeter, forming an encrypted point cloud dataset. This encryption method ensures the uniformity of the point cloud data.

[0158] Step S330, calculate the pixel gray value gradient of each point based on the encrypted point cloud dataset, and use the gradient descent algorithm to construct a gradient field describing the surface change to obtain a gradient field dataset.

[0159] For example, based on the encrypted point cloud dataset, the pixel gray value gradient of each point can reflect the surface gray value change. Assuming that the pixel gray value of a certain point suddenly changes from 140 to 180, the gradient value is high, indicating that it may be the boundary of the skull surface. The gradient field is constructed using the gradient descent algorithm to generate a gradient field dataset describing the surface change rule. Specifically, the gradient field can mark the junction of the skull and soft tissue, providing accurate surface information for subsequent modeling.

[0160] Step S340, generate a triangular mesh using a mesh generation algorithm based on the gradient field dataset and the encrypted point cloud dataset, combine the boundary contour and the normal vector to construct a three-dimensional facial model, and obtain a three-dimensional facial model dataset.

[0161] In one embodiment, a triangular mesh is generated using a mesh generation algorithm based on the gradient field dataset and the encrypted point cloud dataset. For example, based on the Delaunay triangulation algorithm, the point cloud data is connected to a triangular mesh, and a three-dimensional facial model is constructed by combining the boundary contour and the normal vector.

[0162] Assuming that the normal vector of a certain skull region points outward, a smooth skull surface is formed after mesh generation. The three-dimensional facial model dataset can be saved in STL format, containing mesh vertex coordinates and face information, which is convenient for clinical surgery planning or 3D printing. For example, the generated skull model can accurately locate the bone structure in surgical navigation, reducing the operation error.

[0163] It should be noted that the combination of point cloud encryption and gradient field construction makes the model surface smoother and the boundary clearer. For example, the encrypted point cloud data reduces the void, and the gradient field enhances the performance of surface details. This multi-step collaborative processing improves the accuracy and reliability of the three-dimensional model, providing high-quality data support for medical image analysis.

[0164] Preferably, the cosmetic plastic surgery auxiliary analysis method based on three-dimensional surface digital measurement proposed in the embodiment comprises the following steps:

[0165] In step S410, a grid vertex dataset of the three-dimensional face model is obtained, and a vector operation is used to calculate the three-dimensional coordinates and normal vector of each grid vertex to obtain a grid vertex attribute dataset.

[0166] For example, in the field of medical image processing, based on the grid vertex dataset of the three-dimensional face model, the grid vertex coordinates and normal vector can be obtained through vector operation to form the grid vertex attribute dataset. The grid vertex coordinates describe the position of each point on the model surface in the three-dimensional space, such as the coordinates of a skull model grid vertex being (150, 200, 80) millimeters, and the normal vector reflects the surface orientation, such as (0.7, 0.2, 0.6), which is used for subsequent lighting calculation. The grid vertex attribute dataset provides basic geometric information for visualization.

[0167] In step S420, based on the grid vertex attribute dataset and a preset light source position, an ambient light component of each grid vertex is calculated using a lighting model, and combined with the reflectance of the surface material to obtain an ambient light intensity dataset.

[0168] In one possible implementation, based on the grid vertex attribute dataset and a preset light source position, the ambient light component can be calculated using an ambient light model. The ambient light model simulates uniform scattered light. Assuming that the light source position is (300, 300, 500) millimeters, the ambient light intensity is 0.3, and the reflectance of the surface material is 0.4, the ambient light component of a certain grid vertex can be obtained through simple multiplication. This method ensures that the model still has basic brightness in the absence of directional light sources.

[0169] In step S430, if the angle between the normal vector in the grid vertex attribute dataset and the light source position is less than a preset threshold, a diffuse reflection component is calculated using a diffuse reflection formula I_d=k_d(N·L), where I_d represents the diffuse reflection intensity, k_d represents the diffuse reflection coefficient, N represents the grid vertex normal vector, and L represents the light source direction vector, to obtain a diffuse reflection intensity dataset.

[0170] For example, for the judgment of the angle between the normal vector and the light source direction, if the angle is less than a preset threshold such as 30 degrees, the diffuse reflection component is calculated using the diffuse reflection formula. The diffuse reflection simulates the scattering effect of light on a rough surface. Assuming that the normal vector of a certain grid vertex is (0.5, 0.5, 0.7), the light source direction vector is (0.6, 0.6, 0.5), and the diffuse reflection coefficient is 0.6, the diffuse reflection intensity can be obtained through vector dot product. This method can highlight the light and dark changes on the model surface and enhance the stereoscopic effect.

[0171] Step S440, calculate the specular reflection component by the diffuse reflection intensity dataset and the view direction using the specular reflection formula I_s=k_s(R·V)^n, fuse the ambient light intensity dataset and the diffuse reflection intensity dataset to generate the visualization image dataset, wherein I_s represents the specular reflection intensity, k_s represents the specular reflection coefficient, R represents the reflection vector, V represents the view vector, and n represents the highlight index.

[0172] In a possible implementation, the calculation of the specular reflection component is based on the view direction and the highlight index. The specular reflection simulates the highlight effect of smooth surfaces, such as the smooth areas of the skull model. Assuming that the view vector is (0.3, 0.4, 0.8), the specular reflection coefficient is 0.8, and the highlight index is 32, the specular reflection intensity can be obtained by the dot product of the reflection vector and the view vector. This way can effectively represent the luster characteristics of the model surface.

[0173] For example, the fusion of the ambient light intensity dataset, the diffuse reflection intensity dataset, and the specular reflection intensity dataset can generate the visualization image dataset. The fusion process considers the weighted influence of different light components, such as 30% ambient light, 50% diffuse reflection, and 20% specular reflection, to generate the color value of the final image pixel. This method makes the skull model present a realistic light and shadow effect in surgical navigation, facilitating the observation of bone details by doctors.

[0174] In a possible implementation, the visualization image dataset can be further optimized, such as by adjusting the light source position to simulate the light environment in the operating room or changing the highlight index to highlight specific areas. These extended schemes enrich the visualization effect and meet different clinical needs. It should be noted that the fusion of multiple light components can significantly improve the realism of the model and provide a reliable visual basis for subsequent analysis.

[0175] Further, the cosmetic plastic surgery auxiliary analysis method based on three-dimensional surface digital measurement proposed in the embodiment includes the following steps:

[0176] Step S510, obtain the transformation parameter dataset input by the user, construct a parameter mapping matrix through matrix operation to obtain an initial transformation matrix, and the transformation parameter dataset includes a rotation angle, a translation amount, and a scaling ratio.

[0177] In a possible implementation, the acquisition of the transformation parameter dataset is the core link of the three-dimensional face model processing. The transformation parameters usually include the rotation angle, the translation amount, and the scaling ratio, which collectively define the geometric transformation of the model in the three-dimensional space. For example, the user may input a rotation angle of 45 degrees, a translation of 50 millimeters along the X-axis, and a scaling ratio of 1.2. These parameters are input through the user interface or the configuration file to ensure that the model can adjust the position and form according to specific needs.

[0178] It should be noted that the rationality of the transformation parameters directly affects the accuracy of the subsequent matrix operation, so when inputting, the range of the parameter values should be ensured to be within a reasonable interval, such as the rotation angle usually being between -180 degrees and 180 degrees. For example, the process of constructing the parameter mapping matrix is to convert the input transformation parameters into an operable mathematical representation. The rotation angle can be represented by a rotation matrix, the translation amount can be represented by a translation vector, and the scaling ratio can be represented by a scaling matrix. These matrices are finally combined into an initial transformation matrix. For example, assuming that the rotation angle is 30 degrees, the translation along the Y axis is 100 millimeters, and the scaling ratio is 1.5, the system will first calculate the rotation matrix, the translation vector, and the scaling matrix, respectively, and then combine them into the initial transformation matrix through matrix multiplication. This way ensures the order and consistency of the transformation, providing a reliable basis for subsequent mesh vertex coordinate calculation.

[0179] In step S520, it is determined whether the rotation angle in the initial transformation matrix exceeds a preset angle threshold. If it exceeds, the linear interpolation method is used to correct the rotation angle to obtain a corrected transformation matrix.

[0180] In a possible implementation, determining whether the rotation angle in the initial transformation matrix exceeds the preset threshold is a key step. For example, the angle threshold is set to 60 degrees, and if the input rotation angle is 75 degrees, it exceeds the threshold. At this time, the linear interpolation method is used to correct the rotation angle, such as interpolating 75 degrees to within 60 degrees, to generate a corrected transformation matrix. This correction avoids the model deformation or distortion caused by an excessively large rotation angle.

[0181] For example, in medical image processing, an excessively large rotation can cause unnatural distortion of the facial model, affecting the judgment of the surgeon on the operation area. The corrected transformation matrix can maintain the geometric integrity of the model.

[0182] In step S530, the coordinate transformation formula T(v) = M v is used to calculate the mesh vertex data set of the three-dimensional facial model to obtain an updated mesh vertex data set, where T(v) represents the transformed mesh vertex coordinates, M represents the corrected transformation matrix, and v represents the original mesh vertex coordinates.

[0183] Using the coordinate transformation formula to calculate the mesh vertex data set of the three-dimensional facial model is the core of generating the updated mesh vertex data set. For example, the original mesh vertex coordinates are (100, 150, 200) millimeters, and after the action of the corrected transformation matrix, the new coordinates can be (120, 180, 240) millimeters. This process is implemented through matrix and vector multiplication, which is high in calculation efficiency and accurate in results.

[0184] Step S540, generate a mesh of the three-dimensional face model by combining the updated mesh vertex dataset with preset rendering parameters, to obtain a visual mesh vertex position dataset.

[0185] The updated mesh vertex dataset reflects the new position and shape of the model in space, providing accurate geometric information for subsequent rendering. In one possible implementation, generating a visual mesh vertex position dataset by combining preset rendering parameters is the last step in visualizing the three-dimensional face model. Rendering parameters can include material properties, lighting direction, or color mapping method. For example, if the material is set to be translucent, the lighting direction is (200, 200, 300) millimeters, and the color mapping is warm, the system will generate a visual mesh based on the updated mesh vertex dataset. This way, a clear model surface can be generated, making it easy to observe the details of the facial structure.

[0186] Preferably, by adjusting the rendering parameters, such as increasing the lighting intensity or changing the color mapping, the specific areas of the model, such as the nasal bridge or the cheekbones, can be highlighted, thus meeting different analysis needs. For example, in an extended scheme, interactive visualization can be achieved by dynamically adjusting the transformation parameters.

[0187] For example, the user can input new rotation angles or scaling ratios in real time, and the system will update the transformation matrix and recalculate the mesh vertex dataset to generate new visualization effects. This interactivity is particularly useful in medical teaching, where teachers can demonstrate the morphological changes of the face model at different angles by adjusting the parameters, helping students understand the anatomical structure.

[0188] It should be noted that this dynamic adjustment also supports real-time feedback, making it easy for users to quickly optimize the model presentation effect. In one possible implementation, the diversity of transformation parameters provides flexible application scenarios for the model. For example, in surgical planning, doctors can simulate the presentation effect of facial bones at different positions by adjusting the translation amount, or enlarge a specific area to observe details by adjusting the scaling ratio. These operations rely on the efficient calculation of the transformation matrix, ensuring that the model remains geometrically consistent under complex transformations, thus providing support for accurate analysis.

[0189] Further, the cosmetic and plastic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in this embodiment includes the following steps:

[0190] Step S610, obtain the transformation parameter dataset and material property dataset input by the user, and construct an initial transformation matrix and an initial material mapping matrix through matrix operation, to obtain the initial transformation matrix and the initial material mapping matrix.

[0191] For example, in three-dimensional face model processing, obtaining the user-input transformation parameter dataset and material attribute dataset is the basis for constructing the visual model. The transformation parameter dataset can include rotation angle, translation amount, and scaling ratio, such as a rotation angle of 30 degrees, a translation of 80 millimeters along the Z-axis, and a scaling ratio of 1.3. The material attribute dataset can include texture color, reflectivity, and transparency, such as setting the texture color to natural skin color, the reflectivity to 0.6, and the transparency to 0.2. These parameters are input through the user interface to ensure that the model can adjust its shape and appearance according to specific requirements.

[0192] It should be noted that the diversity of input parameters provides flexibility for subsequent matrix operations and texture mapping. In one possible implementation, an initial transformation matrix and an initial material mapping matrix are constructed through matrix operations. The initial transformation matrix converts rotation, translation, and scaling parameters into mathematical representations, such as converting a 30-degree rotation angle into a rotation matrix, an 80-millimeter translation into a translation vector, and a scaling ratio of 1.3 into a scaling matrix, and then synthesizing a unified transformation matrix through matrix multiplication. The initial material mapping matrix generates a preliminary material distribution based on attributes such as texture color and reflectivity, such as uniformly mapping skin color to the model surface. It should be noted that this matrix construction method ensures mathematical consistency of the parameters.

[0193] Step S620, if the parameters in the initial transformation matrix exceed the preset range, the linear interpolation method is used to correct the transformation parameters to obtain a corrected transformation matrix.

[0194] For example, if the rotation angle in the initial transformation matrix exceeds the preset range, for example, the threshold is set to 45 degrees, and the input is 50 degrees, the linear interpolation method is used to correct the angle to within 45 degrees.

[0195] Step S630, using the corrected transformation matrix, the grid vertices of the three-dimensional face model are calculated using the coordinate transformation formula T(v) = M v to obtain an updated grid vertex dataset, where T(v) represents the transformed grid vertex coordinates, M represents the corrected transformation matrix, and v represents the original grid vertex coordinates.

[0196] The corrected transformation matrix acts on the grid vertices through the coordinate transformation formula, for example, the original grid vertex coordinates are (100, 150, 200) millimeters, and the new coordinates after correction can be (120, 170, 220) millimeters. This correction method maintains the geometric stability of the model.

[0197] Step S640, according to the material attribute dataset, the initial material mapping matrix is updated using the texture mapping algorithm to obtain an updated material mapping matrix.

[0198] Preferably, the texture mapping algorithm updates the material mapping matrix according to the material property dataset, for example, adjusting reflectance to highlight facial highlight areas, to generate more realistic skin texture effects.

[0199] Step S650, generating real-time updated visual image data by the updated mesh vertex dataset and the updated material mapping matrix.

[0200] In one possible implementation, the updated mesh vertex dataset and the material mapping matrix are combined to generate real-time updated visual image data. For example, based on the corrected mesh vertex coordinates and the new material mapping, the system generates a facial model with natural skin color and light and shadow effects. It should be noted that real-time updating supports dynamic adjustment, for example, after the user changes the zoom ratio, the model immediately presents the magnification effect.

[0201] Step S660, using a facial feature extraction algorithm to extract facial feature points from the real-time updated visual image data to obtain a facial feature point set.

[0202] Preferably, the facial feature extraction algorithm extracts key points from the visual image data, for example, the coordinates of the tip of the nose are (130, 160, 210) millimeters, and the coordinates of the corners of the mouth are (110, 140, 200) millimeters.

[0203] Step S670, according to the facial feature point set, using a geometric analysis method to calculate the relative position relationship between the facial feature points to obtain a facial feature analysis result.

[0204] These facial feature points are calculated by a geometric analysis method to calculate the relative distance, for example, the distance from the tip of the nose to the corner of the mouth is 30 millimeters, and the angle is 15 degrees, forming a facial feature analysis result. The facial feature analysis result can be used to evaluate the facial symmetry or structural features. For example, in an extended scheme, the system supports the user to adjust the material properties in real time, for example, to change the transparency to highlight the skeletal structure, or to adjust the light angle to emphasize the facial contour. Preferably, this interactivity allows the user to quickly modify the parameters through the interface, and the system updates the visualization effect in real time, which is convenient for observing the model changes under different parameters.

[0205] It can be understood that the facial feature analysis result can be further used for medical diagnosis, for example, by judging the facial structure abnormality through the facial feature point distance, to provide a reference for surgical planning. It should be noted that the flexibility and real-time performance of this method significantly improve the practicality of the model.

[0206] The application relates to a cosmetic plastic surgery auxiliary analysis system based on three-dimensional surface shape digital measurement, which is used for realizing the cosmetic plastic surgery auxiliary analysis method based on three-dimensional surface shape digital measurement, and comprises a first acquisition module, a second acquisition module, a first generation module, a second generation module, a calculation module and an output module. The first acquisition module is used for acquiring a medical image data set and performing noise processing by adopting a Gaussian filtering algorithm. If the difference between a pixel gray value and a neighborhood average value exceeds a preset threshold value, the pixel is determined as a noise point and is subjected to smoothing processing, and a first image data set is obtained. The second acquisition module is used for constructing an energy function according to the first image data set, filling and repairing a defect area in the image by superposition calculation of a single-point energy item and a neighboring point interaction energy item, and obtaining a second image data set. The first generation module is used for extracting point cloud data from the second image data set and constructing a gradient field. If the point cloud density is lower than a preset threshold value, local encryption processing is performed, and a three-dimensional face model is generated. The second generation module is used for acquiring grid vertex coordinates and normal vector information of the three-dimensional face model, and generating a visual image by fusing an ambient light component, a diffuse reflection component and a specular reflection component through an illumination intensity calculation formula. The calculation module is used for establishing a parameter mapping matrix to range-constrain a transformation parameter input by a user. If a rotation angle exceeds a preset range, the rotation angle is automatically corrected, and an updated grid vertex position is calculated through a coordinate transformation formula. The output module is used for updating the visual image in real time according to the transformation parameter and a material property parameter, and outputting a face feature analysis result.

[0207] Further, the cosmetic plastic surgery auxiliary analysis system based on three-dimensional surface shape digital measurement provided by the embodiment comprises a first acquisition module, a second acquisition module, a third acquisition module and a first generation module. The first acquisition module is used for acquiring a medical image data set and adopting pixel gray value analysis. The pixel gray value of each pixel in the medical image data set is extracted, and a first gray value difference set is obtained by calculating the difference between the pixel gray value and the neighborhood pixel gray average value. The second acquisition module is used for performing noise detection according to the first gray value difference set. If the difference between the pixel gray value and the neighborhood average value exceeds a preset threshold value, the pixel is determined as a noise point, and a noise point position set is obtained. The third acquisition module is used for performing smoothing processing on the noise point position set by adopting a Gaussian filtering algorithm. The pixel gray value is adjusted by applying the Gaussian filtering algorithm to the noise point, and a second image set is obtained. The first generation module is used for generating a data set from the second image set. The processed data of the second image set is saved, and a first image data set is generated.

[0208] Preferably, the cosmetic plastic surgery auxiliary analysis system based on three-dimensional surface shape digital measurement provided in the embodiment comprises a second acquisition module, a third acquisition module, a fourth acquisition module, a fifth acquisition module, a sixth acquisition module and a second generation module.

[0209] Compared with the prior art, the cosmetic plastic surgery auxiliary analysis method and system based on three-dimensional surface shape digital measurement provided in the embodiment have the beneficial effects as follows:

[0210] I. Precision improvement of image preprocessing:

[0211] 1. Robustness of noise suppression: By using the Gaussian filtering algorithm and the dynamic threshold judgment (smooth processing when the difference between the pixel gray value and the neighborhood mean value exceeds the preset threshold), the salt and pepper noise, Gaussian noise and other interference in the medical image can be effectively removed, and the facial tissue boundary is clearer.

[0212] Compared with the traditional median filtering: Gaussian filtering can retain edge details while suppressing noise, and is especially suitable for retaining fine structures such as facial skin texture and pores, avoiding feature distortion caused by excessive smoothing.

[0213] 2. Intelligence of defect repair: Based on the defect filling of the energy function (superposition calculation of the single-point energy term and the adjacent-point interaction energy term), the local defects such as spots, scratches, facial acne pits and scars in the image can be automatically repaired, and the pixel gray value and texture features of the filling area and the surrounding tissue are seamlessly connected.

[0214] Application value: Avoiding three-dimensional modeling errors caused by defects in the original image, for example, repairing scars on the nasal ala can make subsequent nasal plastic simulation more consistent with the real facial structure.

[0215] II. Detail enhancement of three-dimensional modeling:

[0216] 1. Adaptive optimization of point cloud data, through gradient field analysis and local encryption processing (automatic encryption when point cloud density is below the threshold), can enhance the point cloud density of key facial features (such as eye corners, lip lines, and nasal arches), solving the problem of sparse point cloud in low curvature areas (such as cheeks) of traditional laser scanning;

[0217] Data comparison: In areas with large curvature changes such as the tip of the nose, the point cloud density can be increased from 50 points / cm² in traditional methods to 200 points / cm², and the model surface error can be reduced to within 0.1 mm;

[0218] 2. Realistic physical lighting simulation, integrating environmental light, diffuse reflection, and specular reflection components of the lighting model (such as the Phong lighting model), can realistically restore the optical properties of facial skin (such as the oil reflection on the forehead and the matte texture on the cheeks), avoiding the "plastic feel" of traditional three-dimensional models;

[0219] Clinical value: Doctors can observe facial stereoscopic effects through light and shadow changes, such as judging whether the light and shadow transition after apple muscle filling is natural, reducing the deviation between postoperative effect and expectation.

[0220] Three, safety and interaction efficiency of parameter control:

[0221] 1. Constraint mechanism of transformation parameters, parameter mapping matrix limits the range of rotation angles (such as the angle of pushing the zygomatic arch and the rotation amplitude of the mandibular angle), and automatically corrects the out-of-limit values (such as limiting the rotation angle of the mandibular angle ≤15° to avoid the risk of nerve damage), eliminating unreasonable operations from the algorithm level;

[0222] Risk control: Combined with the anatomical database, preset safety thresholds, such as automatically prompting when the nose tip rotation angle exceeds 30° in rhinoplasty, which may cause nostril exposure;

[0223] 2. Immersive experience of real-time interaction, based on the real-time calculation of grid vertex positions based on coordinate transformation formulas (such as rotation matrix and translation vector), the three-dimensional model can be updated at a frame rate of 60fps when the user adjusts the parameters (such as changing the chin length with a slider), achieving a "what you see is what you get" simulation effect;

[0224] Optimization of doctor-patient communication: Patients can visually observe the changes in facial features under different plastic surgery plans (such as comparing the heights of two rhinoplasty prostheses), and doctors can quickly verify the aesthetic proportions of the design plan (such as the three-court five-eye standard) through real-time rendering.

[0225] Four, comprehensive benefits of clinical application:

[0226] 1. Precision of surgical plans: The combination of high-precision 3D models (error <0.3mm) and lighting simulation can quantify and analyze indicators such as the degree of facial asymmetry (e.g., the difference in width between the left and right cheeks) and skin laxity, providing data support for personalized surgical plans; for example, when calculating the amount of mandibular angle osteotomy, bone cross-sections can be generated based on point cloud data to simulate changes in facial contours after osteotomy.

[0227] 2. Preoperative risk assessment: By using models to simulate the effects of different surgical parameters, potential problems can be identified in advance (such as the compatibility of the implant with surrounding tissues and the risk of nerve and blood vessel compression), reducing intraoperative adjustment time and lowering surgical risk by approximately 25%.

[0228] 3. Efficient utilization of medical resources and automated image processing and modeling process (from image input to 3D model generation takes less than 10 minutes), which greatly improves efficiency compared to traditional manual measurement (which takes 1-2 hours) and is suitable for large-scale preoperative evaluation of cosmetic surgery.

[0229] In summary, the cosmetic surgery auxiliary analysis method and system based on three-dimensional surface digital measurement provided in this embodiment, through the whole-process technological innovation of high-precision image processing → detail enhancement modeling → physical lighting rendering → safe interactive simulation, has realized the leap from "experience-driven" to "data-driven" in the field of cosmetic surgery.

[0230] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and modifications of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and modifications.

Claims

1. A method for cosmetic surgery support analysis based on three-dimensional surface shape digitization measurement, characterized by, The method comprises the following steps: Obtaining a medical image dataset and performing noise processing by using a Gaussian filtering algorithm, determining a noise point and performing smoothing processing if the difference between the pixel gray value and the neighborhood mean value exceeds a preset threshold, and obtaining a first image dataset; Constructing an energy function according to the first image dataset, filling and repairing the defect area in the image by superimposing the single-point energy term and the adjacent-point interaction energy term, and obtaining a second image dataset; Extracting point cloud data from the second image dataset and constructing a gradient field, performing local encryption processing if the point cloud density is lower than a preset threshold, and generating a three-dimensional face model; Obtaining the grid vertex coordinates and normal vector information of the three-dimensional face model, generating a visual image by fusing the ambient light component, the diffuse reflection component and the specular reflection component through an illumination intensity calculation formula; Establishing a parameter mapping matrix to range-constrain the transformation parameters input by a user, automatically correcting the rotation angle if it exceeds a preset range, and calculating the updated grid vertex position through a coordinate transformation formula; Real-time updating the visual image according to the transformation parameters and material attribute parameters, and outputting a face feature analysis result; The step of constructing an energy function according to the first image dataset, filling and repairing the defect area in the image by superimposing the single-point energy term and the adjacent-point interaction energy term, and obtaining a second image dataset comprises: Obtaining the pixel gray value and texture feature of a pixel point from the first image dataset, dividing the image by using a region segmentation algorithm, determining the region containing defects by calculating the texture feature mean value and pixel gray value distribution of each region, and obtaining a defect region set; For the defect region set, extracting the boundary contour of the defect region by using a boundary detection algorithm, and determining a boundary contour set by calculating the pixel gray value gradient of the boundary pixel point; According to the boundary contour set and the texture feature, an energy function is constructed to obtain an energy distribution set; Smoothing processing is performed on the energy distribution set by using a Gaussian filtering algorithm, the pixel gray value of the pixel point in the defect region is adjusted, and filling and repairing is performed in combination with the texture feature to generate a second image dataset; The step of real-time updating the visual image according to the transformation parameters and material attribute parameters, and outputting a face feature analysis result comprises: Obtaining a transformation parameter dataset and a material attribute dataset input by a user, constructing an initial transformation matrix and an initial material mapping matrix by matrix operation, and obtaining the initial transformation matrix and the initial material mapping matrix; If the parameters in the initial transformation matrix exceed a preset range, the transformation parameters are corrected by using a linear interpolation method to obtain a corrected transformation matrix; The grid vertex of the three-dimensional face model is calculated by using a coordinate transformation formula T(v)=M·v through the corrected transformation matrix, to obtain an updated grid vertex dataset, wherein T(v) represents the transformed grid vertex coordinates, M represents the corrected transformation matrix, and v represents the original grid vertex coordinates; According to the material attribute dataset, the initial material mapping matrix is updated by using a texture mapping algorithm to obtain an updated material mapping matrix; Generate real-time updated visual image data through the updated mesh vertex dataset and the updated material mapping matrix; Extract facial feature points from the real-time updated visual image data by using a facial feature extraction algorithm to obtain a facial feature point set; According to the facial feature point set, calculate the relative position relationship between the facial feature points by using a geometric analysis method to obtain a facial feature analysis result.

2. The method for the cosmetic surgery auxiliary analysis based on the three-dimensional surface shape digitization measurement according to claim 1, wherein, The step of obtaining the medical image dataset and performing noise processing by using a Gaussian filtering algorithm includes: Obtain the medical image dataset and perform pixel gray value analysis to extract the pixel gray value of each pixel from the medical image dataset, calculate the difference between the pixel gray value and the neighborhood pixel gray mean value, and obtain a first gray difference value set; According to the first gray difference value set, if the difference between the pixel gray value and the neighborhood mean value exceeds a preset threshold, the pixel is determined to be a noise point, and a noise point position set is obtained; Smooth the noise point position set by using a Gaussian filtering algorithm, adjust the pixel gray value by applying the Gaussian filtering algorithm to the noise point, and obtain a second image set; Generate a first image dataset by saving the processed data of the second image set.

3. The method for the cosmetic surgery auxiliary analysis based on the three-dimensional surface shape digitization measurement according to claim 2, wherein, The step of generating a three-dimensional face model from the second image dataset includes: Obtain the pixel gray value and depth information of the pixel points in the second image dataset, generate point cloud data containing three-dimensional space coordinates by using a stereomicroscopic algorithm, and obtain a point cloud dataset; Calculate the number of points in a unit volume for the point cloud dataset, if the point cloud density is lower than a preset threshold, use an interpolation algorithm to locally encrypt the low-density area, and obtain an encrypted point cloud dataset; Calculate the pixel gray value gradient of each point according to the encrypted point cloud dataset, construct a gradient field describing the surface change by using a gradient descent algorithm, and obtain a gradient field dataset; Generate a triangular mesh by using a mesh generation algorithm through the gradient field dataset and the encrypted point cloud dataset, combine the boundary contour and the normal vector to construct a three-dimensional face model, and obtain a three-dimensional face model dataset.

4. The method for the cosmetic surgery auxiliary analysis based on the three-dimensional surface shape digitization measurement according to claim 3, wherein, The step of obtaining the mesh vertex coordinates and normal vector information of the three-dimensional face model and generating a visual image by fusing the ambient light component, diffuse reflection component and specular reflection component through the light intensity calculation formula includes: Obtain the mesh vertex dataset of the three-dimensional face model, calculate the three-dimensional coordinates and normal vector of each mesh vertex by using vector operation, and obtain a mesh vertex attribute dataset; According to the mesh vertex attribute dataset and the preset light source position, calculate the ambient light component of each mesh vertex by using a lighting model, and obtain an ambient light intensity dataset in combination with the reflection coefficient of the surface material; If the angle between the normal vector in the mesh vertex attribute dataset and the light source position is less than a preset threshold, a diffuse reflection component is calculated using a diffuse reflection formula I_d=k_d(N·L), wherein I_d represents diffuse reflection intensity, k_d represents a diffuse reflection coefficient, N represents a mesh vertex normal vector, and L represents a light source direction vector, to obtain a diffuse reflection intensity dataset; By using a specular reflection formula I_s=k_s(R·V)^n to calculate a specular reflection component from the diffuse reflection intensity dataset and a viewing angle direction, and by fusing the ambient light intensity dataset and the diffuse reflection intensity dataset, a visual image dataset is generated, wherein I_s represents specular reflection intensity, k_s represents a specular reflection coefficient, R represents a reflection vector, V represents a viewing angle vector, and n represents a highlight index.

5. The method for the cosmetic surgery auxiliary analysis based on the three-dimensional surface shape digitization measurement according to claim 4, wherein, The parameter mapping matrix constrains the transformation parameters input by the user in a range, and automatically corrects the rotation angle if it exceeds a preset range, and the step of calculating the updated mesh vertex position by the coordinate transformation formula includes: An initial transformation matrix is obtained by constructing a parameter mapping matrix through matrix operation from a transformation parameter dataset input by the user, and the transformation parameter dataset includes a rotation angle, a translation amount, and a scaling ratio; It is judged whether the rotation angle in the initial transformation matrix exceeds a preset angle threshold, and if so, the rotation angle is corrected using a linear interpolation method to obtain a corrected transformation matrix; The mesh vertex dataset of the three-dimensional face model is calculated using a coordinate transformation formula T(v)=M·v to obtain an updated mesh vertex dataset, wherein T(v) represents the transformed mesh vertex coordinates, M represents the corrected transformation matrix, and v represents the original mesh vertex coordinates; A grid of the three-dimensional face model is generated by combining the updated mesh vertex dataset with preset rendering parameters to obtain a visual mesh vertex position dataset.

6. A cosmetic surgery assisting analysis system based on three-dimensional surface shape digitizing measurement for realizing the cosmetic surgery assisting analysis method based on three-dimensional surface shape digitizing measurement according to any one of claims 1 to 5, characterized by, It includes: The first acquisition module is used for acquiring a medical image dataset and performing noise processing using a Gaussian filtering algorithm, determining noise points and performing smoothing processing if the difference between the pixel gray value and the neighborhood mean value exceeds a preset threshold, and obtaining a first image dataset; The second acquisition module is used for constructing an energy function according to the first image dataset, calculating the defect area in the image by superimposing a single-point energy term and an adjacent-point interaction energy term to fill and repair the defect area, and obtaining a second image dataset; The first generation module is used for extracting point cloud data from the second image dataset and constructing a gradient field, performing local encryption processing if the point cloud density is lower than a preset threshold, and generating a three-dimensional face model; The second generation module is used for acquiring mesh vertex coordinates and normal vector information of the three-dimensional face model, and generating a visual image by fusing an ambient light component, a diffuse reflection component, and a specular reflection component through an illumination intensity calculation formula; The calculation module is used for establishing a parameter mapping matrix to constrain the transformation parameters input by the user in a range, and automatically correcting the rotation angle if it exceeds a preset range, and calculating the updated mesh vertex position by a coordinate transformation formula; The output module is used for updating the visual image in real time according to the transformation parameters and material property parameters, and outputting a face feature analysis result.

7. The cosmetic surgery assisting analysis system based on three-dimensional surface shape digitizing measurement according to claim 6, wherein, The first acquisition module comprises: A first acquisition unit is configured to acquire a medical image dataset and extract a pixel gray value of each pixel from the medical image dataset by using a pixel gray value analysis, and obtain a first gray value difference set by calculating a difference between the pixel gray value and a neighborhood pixel gray mean value; A second acquisition unit is configured to perform noise detection according to the first gray value difference set, and determine a pixel as a noise point if the difference between the pixel gray value and the neighborhood mean value exceeds a preset threshold, and obtain a noise point position set; A third acquisition unit is configured to perform smoothing processing on the noise point position set by using a Gaussian filter algorithm, adjust the pixel gray value by applying the Gaussian filter algorithm to the noise point, and obtain a second image set; A first generation unit is configured to generate a first image dataset from the second image set by saving processed data of the second image set.

8. The cosmetic surgery assisting analysis system based on three-dimensional surface shape digitization measurement according to claim 7, wherein, The second acquisition module comprises: A fourth acquisition unit is configured to acquire a pixel gray value and a texture feature of a pixel from the first image dataset, divide the image by using a region segmentation algorithm, determine a region containing a defect by calculating a texture feature mean value and a pixel gray value distribution of each region, and obtain a defect region set; A fifth acquisition unit is configured to extract a boundary contour of the defect region by using a boundary detection algorithm for the defect region set, determine a boundary contour set by calculating a pixel gray value gradient of a boundary pixel point; A sixth acquisition unit is configured to construct an energy function according to the boundary contour set and the texture feature, and obtain an energy distribution set; A second generation unit is configured to perform smoothing processing on the energy distribution set by using a Gaussian filter algorithm, adjust the pixel gray value of a pixel point in the defect region, and generate a second image dataset by filling and repairing in combination with the texture feature.

Citation Information

Patent Citations

  • Orthopedic surgery plan generation method and device based on medical image and storage medium

    CN118866251A

  • Apparatus for correcting posture of ultrasound scanner for artificial intelligence-type ultrasound self-diagnosis using augmented reality glasses, and remote medical diagnosis method using same

    US20220387000A1