Cosmetic plastic auxiliary analysis method and system based on three-dimensional surface shape digital measurement
By repairing noise through Gaussian filtering and energy functions, and combining illumination models and parameter constraints, a high-precision three-dimensional facial model is generated, which solves the problems of insufficient data processing and visualization in existing technologies and realizes efficient, accurate and personalized analysis of cosmetic surgery.
Patent Information
- Application Number
- CN202511190033.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-25
AI Technical Summary
Existing facial three-dimensional digital measurement technology has deficiencies in data processing integrity and visualization intuitiveness, making it difficult to achieve high-precision three-dimensional model reconstruction and professional visualization interaction, and unable to meet the accuracy and personalization needs of cosmetic surgery.
A Gaussian filter algorithm is used to process noise, an energy function is constructed to repair defective areas, point cloud data is extracted and a gradient field is constructed to generate a three-dimensional facial model. This is combined with the illumination model for visualization, and the parameter mapping matrix is used to constrain the transformation parameters input by the user to achieve real-time updating of the visualized image.
It improves the accuracy and efficiency of medical image processing, enhances the details and interactivity of 3D modeling, supports real-time user operations, provides high-precision facial feature analysis, reduces surgical risks and improves the accuracy of surgical plans.
Smart Images

Figure CN120672973A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cosmetic surgery technology, and in particular discloses a cosmetic surgery auxiliary analysis method and system based on three-dimensional face shape digital measurement. Background Art
[0002] With the rapid development of the medical aesthetics industry, facial plastic surgery demands increasingly higher precision and personalization. Three-dimensional digital technology has become an indispensable core technology in modern cosmetic surgery. Traditional facial analysis methods rely primarily on two-dimensional photographs and physician judgment, making it difficult to accurately grasp the three-dimensional structural features of the face and lacking quantitative evaluation criteria. While existing 3D reconstruction technologies can capture spatial information about the face, they still have significant deficiencies in data processing integrity and intuitive visualization.
[0003] The key challenges facing current facial three-dimensional digital measurement technology stem from the complex processing requirements of multi-source medical imaging data. The tomographic data generated by medical imaging equipment contains a large amount of noise interference and data missing. These raw data cannot be used directly for three-dimensional model construction and must undergo a complex pre-processing process. Insufficient data pre-processing 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 take into account both detail fidelity and overall visual effects when dealing with complex facial structures, making it difficult for doctors to obtain intuitive and accurate three-dimensional visual references.
[0004] Facial cosmetic surgery applications place special demands on the interactivity and parameter adjustability of 3D models. Doctors need to be able to adjust the model's display parameters, material properties, and viewing angle in real time to observe facial features from different angles and plan surgical procedures. However, existing systems are limited in terms of smooth interaction and refined parameter adjustment, lacking visual interfaces and operational tools tailored to the specific needs of cosmetic surgery professionals.
[0005] Therefore, how to build a facial cosmetic surgery auxiliary analysis system that integrates multi-source medical imaging data processing, high-precision three-dimensional model reconstruction and professional visual interaction, and realizes a complete technical chain from raw image data to operational three-dimensional models, has become a key issue in promoting the digital development of cosmetic surgery. Summary of the Invention
[0006] The present invention provides a cosmetic surgery auxiliary analysis method and system based on three-dimensional facial digital measurement, aiming to solve at least one defect existing in the above-mentioned prior art.
[0007] One aspect of the present invention relates to a cosmetic surgery auxiliary analysis method based on three-dimensional facial shape digital measurement, comprising the following steps: Obtain a medical image dataset and use a Gaussian filter algorithm to perform noise processing. If the difference between the grayscale value of a pixel and the neighborhood mean exceeds a preset threshold, it is determined to be a noise point and smoothed to obtain a first image dataset; An energy function is constructed based on the first image data set, and defect areas in the image are filled and repaired by superimposing single-point energy terms and adjacent-point interaction energy terms to obtain a second image data set; 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 facial model; Obtain the mesh vertex coordinates and normal vector information of the 3D facial model, and generate a visual image by fusing the ambient light component, diffuse reflection component, and specular reflection component through the light intensity calculation formula; A parameter mapping matrix is established to constrain the range of the transformation parameters input by the user. If the rotation angle exceeds the preset range, it is automatically corrected and the updated mesh vertex position is calculated using the coordinate transformation formula; The visual image is updated in real time according to the transformation parameters and material attribute parameters, and the facial feature analysis results are output.
[0008] Furthermore, a medical image dataset is obtained and noise processing is performed using a Gaussian filtering algorithm. If the difference between the grayscale value of a pixel and the neighborhood mean exceeds a preset threshold, it is determined to be a noise point and smoothing is performed. The steps of obtaining the first image dataset include: Obtaining a medical image data set and performing pixel grayscale value analysis to extract a pixel grayscale value of each pixel from the medical image data set, and obtaining a first grayscale difference set by calculating a difference between the pixel grayscale value and a grayscale mean of neighboring pixels; Noise detection is performed based on the first grayscale difference set. If the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, the pixel is determined to be a noise point, and a noise point position set is obtained. The Gaussian filter algorithm is used to smooth the noise point position set, and the pixel grayscale value is adjusted by applying the Gaussian filter algorithm to the noise point to obtain the second image set; The data set is generated from the second image set, and the first image data set is generated by saving the processed data of the second image set.
[0009] Furthermore, the step of constructing an energy function based on the first image data set and filling and repairing defective areas in the image by superimposing single-point energy terms and adjacent-point interaction energy terms to obtain the second image data set includes: Obtaining pixel grayscale values and texture features of pixel points from the first image data set, partitioning the image using a region segmentation algorithm, and determining regions containing defects by calculating the mean value of texture features and pixel grayscale value distribution of each region, thereby obtaining a defect region set; For the defect area set, the boundary detection algorithm is used to extract the boundary contour of the defect area, and the boundary contour set is determined by calculating the pixel gray value gradient of the boundary pixel points; According to the boundary contour set and texture features, an energy function is constructed to obtain an energy distribution set; The energy distribution set is smoothed using the Gaussian filtering algorithm, and the second image data set is generated by adjusting the pixel grayscale values of the pixels in the defect area and filling and repairing them in combination with texture features.
[0010] Furthermore, extracting point cloud data from the second image dataset and constructing a gradient field, and performing local encryption processing if the point cloud density is lower than a preset threshold, the steps of generating a three-dimensional facial model include: Obtaining pixel grayscale values and depth information of pixel points in the second image dataset, and generating point cloud data including three-dimensional spatial coordinates using a stereoscopic microscopy algorithm to obtain a point cloud dataset; The number of points per unit volume of the point cloud dataset is calculated. If the point cloud density is lower than the preset threshold, the interpolation algorithm is used to locally encrypt the low-density area to obtain an encrypted point cloud dataset. The pixel grayscale value gradient of each point is calculated based on the encrypted point cloud dataset, and the gradient field describing the surface changes is constructed using the gradient descent algorithm to obtain the gradient field dataset. A mesh generation algorithm is used to generate a triangular mesh using the gradient field dataset and the encrypted point cloud dataset. A three-dimensional facial model is constructed by combining the boundary contour and normal vector to obtain a three-dimensional facial model dataset.
[0011] Furthermore, the steps of obtaining mesh vertex coordinates and normal vector information of the three-dimensional facial model and fusing the ambient light component, the diffuse reflection component, and the specular reflection component using a light intensity calculation formula to generate a visualization image include: Obtaining a mesh vertex dataset of a three-dimensional facial model, calculating the three-dimensional coordinates and normal vector of each mesh vertex using vector operations, and obtaining a mesh vertex attribute dataset; Based on the mesh vertex attribute dataset and the preset light source position, the illumination model is used to calculate the ambient light component of each mesh vertex, and combined with the reflection coefficient of the surface material, the ambient light intensity dataset is obtained; If the angle between the normal vector in the mesh vertex attribute dataset and the light source position is less than a preset threshold, the diffuse reflection component is calculated using the 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 mesh vertex normal vector, and L represents the light source direction vector, thus obtaining the diffuse reflection intensity dataset. The specular reflection component is calculated using the specular reflection formula I_s=k_s(R·V)^n based on the diffuse reflection intensity dataset and the viewing angle direction. The ambient light intensity dataset and the diffuse reflection intensity dataset are then fused to generate a visualization image dataset, where 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 specular index.
[0012] Furthermore, a parameter mapping matrix is established to constrain the range of the transformation parameters input by the user. If the rotation angle exceeds the preset range, it is automatically corrected. The steps of calculating the updated mesh vertex position using the coordinate transformation formula include: Obtain the transformation parameter data set input by the user, construct a parameter mapping matrix through matrix operations, and obtain the initial transformation matrix. The transformation parameter data set includes the rotation angle, translation amount, and scaling ratio; Determine whether the rotation angle in the initial transformation matrix exceeds a preset angle threshold. If so, use a linear interpolation method to correct the rotation angle to obtain a corrected transformation matrix. The coordinate transformation formula T(v)=M·v is used to calculate the mesh vertex dataset of the 3D facial model to obtain an updated mesh vertex dataset, where T(v) represents the transformed mesh vertex coordinates, M represents the modified transformation matrix, and v represents the original mesh vertex coordinates. The updated mesh vertex dataset is combined with preset rendering parameters to generate a mesh of a three-dimensional facial model and obtain a visual mesh vertex position dataset.
[0013] Furthermore, the steps of updating the visual image in real time according to the transformation parameters and the material attribute parameters and outputting the facial feature analysis results include: Obtain the transformation parameter data set and material attribute data set input by the user, construct the initial transformation matrix and the initial material mapping matrix through matrix operations, and obtain the initial transformation matrix and the initial material mapping matrix; If the parameters in the initial transformation matrix exceed the preset range, the transformation parameters are corrected using a linear interpolation method to obtain a corrected transformation matrix; The mesh vertices of the 3D facial model are calculated using the coordinate transformation formula T(v)=M·v using the modified transformation matrix to obtain an updated mesh vertex dataset, where T(v) represents the transformed mesh vertex coordinates, M represents the modified transformation matrix, and v represents the original mesh vertex coordinates. According to the material attribute data set, the texture mapping algorithm is used to update the initial material mapping matrix to obtain the updated material mapping matrix; Generate real-time updated visual image data through the updated mesh vertex data set and the updated material mapping matrix; A facial feature extraction algorithm is used to extract facial feature points from the real-time updated visual image data to obtain a facial feature point set; According to the facial feature point set, the relative position relationship between the facial feature points is calculated using the geometric analysis method to obtain the facial feature analysis results.
[0014] Another aspect of the present invention relates to a cosmetic surgery auxiliary analysis system based on three-dimensional facial shape digital measurement, which is used to implement the above-mentioned cosmetic surgery auxiliary analysis method based on three-dimensional facial shape digital measurement, comprising: A first acquisition module is used to acquire a medical image data set and perform noise processing using a Gaussian filtering algorithm. If the difference between the grayscale value of a pixel and the neighborhood mean exceeds a preset threshold, it is determined to be a noise point and smoothed to obtain a first image data set; A second acquisition module is used to construct an energy function based on the first image data set, and fill and repair the defective area in the image by superimposing the single point energy term and the adjacent point interaction energy term to obtain a second image data set; A first generation module is configured to extract point cloud data from the second image dataset and construct a gradient field, and perform local encryption processing if the point cloud density is lower than a preset threshold to generate a three-dimensional facial model; The second generation module is used to obtain the mesh vertex coordinates and normal vector information of the 3D facial model, and generate a visual image by fusing the ambient light component, diffuse reflection component and specular reflection component through the light intensity calculation formula; The calculation module is used to establish a parameter mapping matrix to constrain the range of the transformation parameters input by the user. If the rotation angle exceeds the preset range, it will be automatically corrected and the updated mesh vertex position will be calculated using the coordinate transformation formula; The output module is used to update the visual image in real time according to the transformation parameters and material attribute parameters, and output the facial feature analysis results.
[0015] Furthermore, the first acquisition module includes: a first acquisition unit, configured to acquire a medical image dataset and extract a pixel grayscale value of each pixel from the medical image dataset by performing pixel grayscale value analysis, and obtain a first grayscale difference value set by calculating a difference between the pixel grayscale value and a grayscale mean of neighboring pixels; a second acquisition unit, configured to perform noise detection based on the first grayscale difference value set, and if the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, determine that the pixel is a noise point, and obtain a noise point position set; a third acquisition unit, configured to perform smoothing processing on the noise point position set using a Gaussian filter algorithm, and adjust the pixel grayscale values by applying the Gaussian filter algorithm to the noise points to obtain a second image set; The first generating unit is configured to generate a data set from the second image set, and generate a first image data set by storing processed data of the second image set.
[0016] Furthermore, the second acquisition module includes: a fourth acquisition unit, configured to acquire a medical image dataset and extract a pixel grayscale value of each pixel from the medical image dataset by performing pixel grayscale value analysis, and obtain a first grayscale difference value set by calculating a difference between the pixel grayscale value and a grayscale mean of neighboring pixels; a fifth acquisition unit, configured to perform noise detection based on the first grayscale difference value set, and determine that the pixel is a noise point if the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, thereby obtaining a noise point position set; a sixth acquisition unit, configured to perform smoothing processing on the noise point position set using a Gaussian filter algorithm, and adjust pixel grayscale values by applying the Gaussian filter algorithm to the noise points to obtain a second image set; The second generating unit is configured to generate a data set from the second image set, and generate a first image data set by storing processed data of the second image set.
[0017] The beneficial effects achieved by the present invention are: The present invention provides a method and system for auxiliary analysis of cosmetic surgery based on three-dimensional facial digital measurement, which performs noise processing on medical image data sets through Gaussian filtering, constructs an energy function to repair defective areas, extracts point cloud data and constructs a gradient field to generate a three-dimensional facial model, obtains the mesh vertex coordinates and normal vector information of the model, and fuses multiple illumination components to generate a visual image. The present invention 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. This method realizes the construction and visualization of a three-dimensional facial model from medical image data, supports user interactive operations, can be widely used in medical image analysis, facial modeling and other fields, and improves the accuracy and efficiency of medical image processing and three-dimensional visualization. The method and system for auxiliary analysis of cosmetic surgery based on three-dimensional facial digital measurement provided by the present invention have the following beneficial effects: 1. Improved image preprocessing accuracy: 1. Robust noise suppression: Through Gaussian filtering and dynamic thresholding (smoothing when the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold), it can effectively remove interference such as salt and pepper noise and Gaussian noise in medical images, making facial tissue boundaries clearer; Compared with traditional median filtering: Gaussian filtering preserves edge details while suppressing noise. It is particularly suitable for preserving subtle structures such as facial skin texture and pores, and avoids feature distortion caused by oversmoothing. 2. Intelligent defect repair: Based on energy function-based defect filling (superposition calculation of single-point energy terms and adjacent-point interaction energy terms), it can automatically repair local defects such as light spots, scratches, facial acne pits, and scars in images, seamlessly connecting the pixel grayscale values and texture features of the filled area with the surrounding tissue; Application value: Avoid 3D modeling errors caused by defects in the original image. For example, repairing scars on the nose can make subsequent rhinoplasty simulations more consistent with the real facial structure.
[0018] Detail enhancement of 2D and 3D modeling: 1. Adaptive optimization of point cloud data. Through gradient field analysis and local encryption processing (automatic encryption when the point cloud density falls below a threshold), it can enhance the point cloud density of key facial features (such as the corners of the eyes, lip line, and nose bridge), solving the point cloud sparseness problem of traditional laser scanning in low-curvature areas (such as cheeks); Data comparison: In areas with large curvature changes, such as the nose tip, the point cloud density can be increased from 50 points / cm² using traditional methods to 200 points / cm², and the model surface error is reduced to within 0.1mm; 2. Realistic physical lighting simulation, integrating ambient light, diffuse reflection, and specular reflection components into a lighting model (such as the Phong lighting model), can faithfully reproduce the optical properties of facial skin (such as the oily reflection on the forehead and the matte texture of the cheeks), avoiding the "plastic feel" of traditional 3D models; Clinical value: Doctors can observe the three-dimensional effect of the face through changes in light and shadow, for example, to determine whether the light and shadow transition after apple muscle filling is natural, thereby reducing the deviation between the postoperative effect and the expected effect.
[0019] 3. Security and interaction efficiency of parameter control: 1. The parameter mapping matrix constrains the range of rotation angles (such as the zygomatic arch inward thrust angle and mandibular angle rotation amplitude) and translation distances (such as the length of the nose bridge elevation), and automatically corrects out-of-limit values (such as limiting the mandibular angle rotation angle to ≤15° to avoid the risk of nerve damage), eliminating unreasonable operations at the algorithm level. Risk control: Preset safety thresholds based on the anatomical database. For example, during rhinoplasty, if the upward rotation angle of the nasal tip exceeds 30°, an automatic warning will be issued, indicating that the nostrils may be exposed. 2. An immersive, real-time interactive experience. Mesh vertex positions are calculated in real time based on coordinate transformation formulas (such as rotation matrices and translation vectors). As users adjust parameters (such as using a slider to change chin length), the 3D model is updated at 60fps, achieving a "what you see is what you get" simulation experience. Improved doctor-patient communication: Patients can visually observe the facial changes resulting from different plastic surgery plans (e.g., comparing the heights of two rhinoplasty implants), while doctors can quickly verify the aesthetic proportions of the design plan (e.g., the three-part, five-eye standard) through real-time rendering.
[0020] 4. Comprehensive benefits of clinical application: 1. Accuracy of surgical plans: High-precision 3D models (error <0.3mm) combined with illumination simulation can quantitatively analyze indicators such as the degree of facial asymmetry (such as the difference in left and right cheek width) 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 the changes in facial contour after osteotomy. 2. Pre-operative risk prediction: By rehearsing the effects of different surgical parameters using a model, potential problems (such as compatibility between the implant and surrounding tissues, and the risk of neurovascular compression) can be identified in advance, reducing intraoperative adjustment time and lowering surgical risks by approximately 25%; 3. Efficient utilization of medical resources. The automated image processing and modeling process (from image input to 3D model generation takes less than 10 minutes) greatly improves efficiency compared to traditional manual measurement (which takes 1-2 hours), making it suitable for large-scale pre-operative evaluation of cosmetic plastic surgery.
[0021] In summary, the cosmetic surgery auxiliary analysis method and system based on three-dimensional facial digital measurement provided by the present invention has achieved a leap from "experience-driven" to "data-driven" in the field of cosmetic surgery through full-process technological innovation of high-precision image processing → detail enhancement modeling → physical lighting rendering → safe interactive simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The figure is a flow chart of an embodiment of a cosmetic surgery auxiliary analysis method based on three-dimensional facial shape digital measurement according to the present invention. DETAILED DESCRIPTION
[0023] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0024] like Figure 1 As shown, the first embodiment of the present invention proposes a cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement, comprising the following steps: Step S100: Obtain a medical image dataset and perform noise processing using a Gaussian filtering algorithm. If the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, it is determined to be a noise point and smoothed to obtain a first image dataset.
[0025] Medical imaging datasets are collections of digital images acquired through various medical imaging technologies that record the internal or external structure and physiological functions of the human body. These datasets contain extensive anatomical, pathological, or functional information and serve as core foundational data for medical diagnosis, treatment planning, medical research, and medical technology development.
[0026] The Gaussian filter algorithm is a linear smoothing filter based on the Gaussian function and is a classic technique in signal and image processing. Its core concept is to perform a convolution operation on an image or signal using a Gaussian kernel. By performing a weighted average of neighboring pixel values, it reduces noise and smoothes details while preserving image edges and structural information as much as possible.
[0027] Pixel Grayscale Value is a numerical value used to represent the brightness or darkness of a single pixel in an image. It is a basic attribute of a grayscale image (an image that does not contain color information).
[0028] The neighborhood mean is a commonly used local statistic in image processing and computer vision. It describes the average grayscale value of a pixel in an image and its surrounding pixels. Its core concept is to extract local image features or suppress noise by analyzing the grayscale distribution of a pixel's local area.
[0029] Noise pixels are abnormal pixels in an image whose grayscale values or texture characteristics are significantly inconsistent with those of surrounding pixels. They are typically introduced by factors such as imaging device defects, transmission interference, and environmental disturbances. Noise pixels interfere with image visual quality and subsequent processing (such as image analysis and object detection), so they must be suppressed through filtering and denoising algorithms.
[0030] Smoothing is a technique used in image processing to smoothen the image overall or in local areas by suppressing image noise and reducing local grayscale fluctuations between pixels. Its core goal is to reduce high-frequency details (such as noise and subtle textures) while preserving low-frequency information (such as object outlines and large-scale structures) as much as possible. Smoothing is widely used in image denoising, preprocessing, and noise reduction before feature extraction.
[0031] Step S200: construct an energy function based on the first image data set, and fill and repair the defective area in the image by superimposing the single-point energy term and the adjacent point interaction energy term to obtain the second image data set.
[0032] The energy function has different definitions and applications in different fields, but its core concept is to use a mathematical function to map a system's state or properties into a numerical value (energy). This value can be used to describe the system's stability, cost, similarity, or optimization objective. Energy functions are often used as the objective function in optimization problems, minimizing or maximizing the energy value to determine the optimal state of the system.
[0033] This method, based on energy function optimization, fills defective areas in images by superimposing single-point energy terms with the interactive energy terms of adjacent points. Its core concept is to transform the problem of filling defective areas (such as scratches, noise points, and missing pixels) in an image into an energy minimization problem. By defining two types of energy terms to characterize the local characteristics and neighborhood dependencies of pixels, an optimization algorithm is ultimately used to determine the optimal filling value, resulting in a visually coherent and natural image after restoration.
[0034] In computer vision, image processing, and energy optimization models (such as Markov random fields and conditional random fields), the unary energy term is a fundamental component of energy functions, describing the degree of match, or cost, between the properties of a single pixel or point and the target state. The unary energy term captures the "energy" (i.e., independent cost or preference) of a single point independent of its surroundings and is a core element in constructing global energy functions.
[0035] In computer vision, image processing, and energy optimization models (such as Markov random fields and conditional random fields), the pairwise energy term is a key component of the energy function, describing the contribution of label relationships between adjacent pixels / points to the overall energy. The pairwise energy term captures the dependencies or constraints between adjacent points and works together with the single-point energy term to ensure a balance between local rationality (the single-point term) and global consistency (the interaction term).
[0036] Step S300: extract point cloud data from the second image data set and construct a gradient field. If the point cloud density is lower than a preset threshold, perform local encryption processing to generate a three-dimensional facial model.
[0037] Point cloud data is a dataset consisting of discrete points in three-dimensional space. Each point usually contains coordinates (x, y, z) and attributes (such as color, intensity, etc.). It is widely used in lidar, photogrammetry, 3D scanning and other fields.
[0038] The gradient field is a vector field that characterizes the rate of change (i.e., steepness and direction) of a point cloud surface in a local area. Each point corresponds to a gradient vector, whose magnitude represents the magnitude of the local change, and its direction points to the direction of fastest function growth (usually perpendicular to the surface normal vector).
[0039] Local densification based on a point cloud density threshold is a point cloud data preprocessing strategy designed to improve the spatial uniformity and detail integrity of the point cloud by automatically identifying low-density areas and adding sampling points. Its core logic involves calculating the density of a local region of the point cloud, comparing it to a preset threshold, and performing densification on areas with a density below the threshold to meet the data density requirements of subsequent processing (such as 3D reconstruction and surface modeling).
[0040] In the field of point cloud processing, point cloud density is used to describe the distribution density of points in point cloud data. It is an important indicator for measuring point cloud quality, geometric structure characteristics, or spatial sampling characteristics.
[0041] A 3D facial model is a three-dimensional data structure constructed using digital technology that accurately depicts the geometric shape, texture features, and dynamic expressions of the human face. 3D facial models integrate facial spatial coordinates, surface details, topological relationships, and other information into a visual and interactive model in a mathematically or computer-readable format. They are widely used in computer graphics, virtual reality, biomedicine, security identification, and film and television special effects.
[0042] Step S400: Obtain mesh vertex coordinates and normal vector information of the three-dimensional facial model, and fuse the ambient light component, diffuse reflection component, and specular reflection component using a light intensity calculation formula to generate a visual image.
[0043] In a three-dimensional facial model, mesh vertex coordinates and normal vector information are the core data that describe the model's geometric structure and surface characteristics. Together, they determine the model's shape, lighting effects, and rendering realism.
[0044] A normal vector is a unit vector perpendicular to a point on the model surface. It is used to describe the orientation and curvature of the surface and is divided into mesh vertex normal vectors and face normal vectors.
[0045] Generating visual images by fusing ambient, diffuse, and specular components using a light intensity calculation formula is a core step in photorealistic rendering in computer graphics. Essentially, this approach is based on a lighting model, mathematically modeling the different types of lighting components in a scene (ambient, diffuse, and specular). This is then combined to calculate the final light intensity at each point on an object's surface, resulting in a visual image with a three-dimensional and realistic feel.
[0046] Ambient Light simulates the uniform distribution of light after multiple scattering in the environment. It does not depend on the direction of the light source or the orientation of the object surface and can be regarded as the basic lighting of the scene.
[0047] Diffuse light simulates the phenomenon of light being scattered evenly in all directions when it hits a rough surface. Its intensity depends on the angle between the light source direction and the surface normal vector of the object.
[0048] Specular light simulates the directional reflection of light when it hits a smooth surface (such as the highlight effect of metal and glass). Its intensity depends on the angle between the observer's perspective and the direction of the reflected light.
[0049] Visualization refers to a technology that uses graphical means to transform data, information, or abstract concepts into visual forms visible to the human eye, effectively and intuitively conveying knowledge, expressing patterns, or presenting scenes. Through visual elements such as color, shape, texture, and spatial relationships, it transforms complex data or content that is difficult to directly understand (such as 3D models, simulation results, and statistical information) into a visual symbol system that is easy to perceive and interpret.
[0050] Step S500: Establish a parameter mapping matrix to constrain the range of the transformation parameters input by the user. If the rotation angle exceeds the preset range, it will be automatically corrected and the updated mesh vertex position will be calculated using the coordinate transformation formula.
[0051] The parameter mapping matrix is a mechanism that maps the original parameters input by the user to the target parameter range through mathematical transformations (such as matrix operations in linear algebra). Its core goal is to constrain the range of parameters and ensure that the input values comply with the valid range preset by the system (such as the physical feasible domain, geometric rationality or business rules).
[0052] The parameter mapping matrix bridges the gap between the user input space and the system's legal space through mathematical transformations. Its core value lies in constraining parameter ranges while preserving the directionality and continuity of user intent. This mechanism is widely used in fields such as computer graphics, human-computer interaction, and physical simulation, ensuring system stability while enhancing the naturalness and predictability of user operations.
[0053] Transformation parameters refer to quantitative parameters used to describe the geometric transformation of objects or space (such as changes in position, direction, size, and shape) in fields such as computer graphics, robotics, mathematical modeling, and physical simulation.
[0054] The automatic rotation angle correction mechanism is a core method for ensuring the legality of angle values through mathematical transformations or control logic. Its core goal is to strike a balance between constraint validity and preserving user intent. The choice of correction method is determined by scenario requirements (such as whether angle jumps are allowed and whether periodicity is present), ultimately optimizing system stability and interactive experience. 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 transformations or rules to fall within the valid range, ensuring system stability, geometric rationality, and interactive safety.
[0055] Calculating updated mesh vertex positions using coordinate transformation formulas is a core operation in geometric transformations used in computer graphics, robotics, and geometric modeling. Essentially, this involves mapping the original mesh vertex coordinates to new coordinate positions using mathematical formulas. This allows for geometric transformations like translation, rotation, scaling, shearing, and projection, thereby changing the spatial position, orientation, size, or shape of an object.
[0056] Step S600: updating the visual image in real time according to the transformation parameters and the material attribute parameters, and outputting the facial feature analysis results.
[0057] Real-time visual image updates involve dynamically updating the visualization of the 3D facial model through a graphics rendering engine based on input transformation parameters (such as translation, rotation, and scaling of the facial model) and material attribute parameters (such as skin color, texture, and gloss). Transformation parameters describe the spatial pose and shape changes of the facial model, while material attribute parameters describe the optical properties and texture of the facial surface.
[0058] Facial feature analysis is the analysis of real-time rendered images or 3D models to extract quantitative results such as facial geometric features, expression status, and material matching, which are used to drive interaction, evaluation, or decision-making.
[0059] Furthermore, the cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in this embodiment includes step S100: Step S110 , obtaining a medical image data set and performing pixel grayscale value analysis to extract the pixel grayscale value of each pixel from the medical image data set, and obtaining a first grayscale difference set by calculating the difference between the pixel grayscale value and the grayscale mean of the neighboring pixels.
[0060] For example, in medical image processing, obtaining medical image datasets usually involves extracting CT or MRI images from the hospital's PACS (Picture Archiving and Communication System) system or public datasets such as LIDC-IDRI (The Lung Image Database Consortium).
[0061] Consider a set of chest CT images, each 512x512 pixels in size, with a pixel grayscale value ranging from 0 to 255. Each pixel's grayscale value reflects tissue density, with lung areas typically exhibiting lower grayscale values and bone areas exhibiting higher grayscale values. This data acquisition method ensures reliability and consistency in subsequent analysis, facilitating accurate diagnosis.
[0062] Specifically, the grayscale value of each pixel is extracted and its difference with the mean of its neighboring pixels is calculated, using a 3x3 neighborhood window. For example, if a pixel has a grayscale value of 150, its eight neighboring pixels have grayscale values of 145, 148, 152, 147, 149, 146, 151, and 150, respectively, with a mean of 148.5 and a difference of 1.5. This process generates the first set of grayscale differences, which reflects the local characteristics of grayscale variations in the image and helps identify outliers.
[0063] Step S120: Perform noise detection based on the first grayscale difference set. If the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, the pixel is determined to be a noise point, and a noise point position set is obtained.
[0064] In one possible implementation, noise detection is performed by setting a threshold. Assuming the preset threshold is 10, if the difference between a pixel's grayscale value and its neighborhood mean exceeds 10, it is considered a noise point. For example, if a pixel's grayscale value is 200 and its neighborhood mean is 150, the difference is 50, far exceeding the threshold, and is marked as a noise point. All noise points constitute a noise point location set. This method can effectively distinguish normal tissue from noise interference, improving image quality.
[0065] Step S130 : performing smoothing processing on the noise point position set by using a Gaussian filter algorithm, and adjusting the pixel grayscale values by applying the Gaussian filter algorithm to the noise points to obtain a second image set.
[0066] For example, a Gaussian filter algorithm can be applied to a set of noise point locations using a Gaussian kernel with a standard deviation of 1.5 and a window size of 5x5. Suppose a pixel with a grayscale value of 200 at a noise point is adjusted to a neighborhood weighted average value, such as 180, after Gaussian filtering. This smoothing process reduces noise interference on the image, preserves edge information, and generates a second image set, improving visual clarity and the accuracy of subsequent analysis.
[0067] Step S140 : generating a data set from the second image set, and generating a first image data set by saving the processed data of the second image set.
[0068] Specifically, generating the first image dataset requires saving the processed data of the second image dataset. For example, the processed CT images can be stored in DICOM format, including metadata such as patient ID and scan parameters. This saved dataset can be used for deep learning model training or clinical diagnosis. This approach ensures data consistency and facilitates subsequent analysis and model development.
[0069] In one possible implementation, the choice of Gaussian filter parameters significantly impacts the results. A smaller standard deviation preserves details better and is suitable for fine structure analysis, while a larger standard deviation is suitable for removing obvious noise.
[0070] 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 to meet the needs of different clinical scenarios.
[0071] For example, the above processing flow can significantly improve the accuracy of nodule detection in lung CT images. Noise reduction results in clearer nodule edges, reducing misdiagnosis rates. Furthermore, the generated first image dataset provides high-quality input for AI-assisted diagnosis, helping to improve diagnostic efficiency and reliability. This approach, through multi-step collaborative optimization, ensures the robustness and practicality of medical image processing.
[0072] Furthermore, the cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in this embodiment includes step S200: Step S210: Obtain pixel grayscale values and texture features of pixel points from the first image data set, partition the image using a region segmentation algorithm, determine the region containing defects by calculating the texture feature mean and pixel grayscale value distribution of each region, and obtain a defect region set.
[0073] In the field of medical image processing, when obtaining the pixel grayscale values and texture features of pixels from a first image dataset, data can be extracted from chest CT images. Assuming the image size is 512x512 pixels and the pixel grayscale value range is 0-255, texture features can be calculated using local binary patterns or grayscale co-occurrence matrices, reflecting the grayscale variation patterns of the pixel neighborhood. For example, for a pixel in a certain lung region, the pixel grayscale value is 120, and its neighborhood forms a specific texture pattern. After quantization, the feature value is obtained and used for subsequent segmentation.
[0074] The region segmentation algorithm uses a graph-cut-based approach to divide the image into multiple regions, such as the lungs, pleura, and bones. Specifically, the texture feature mean and pixel grayscale distribution are calculated for each region. For example, if the lung region has a texture feature mean of 0.8 and a grayscale mean of 100, while a region with a texture mean of 1.2 and a grayscale distribution that deviates from the normal range is identified as containing defects, forming a defect region set. This process ensures accurate identification of defective regions.
[0075] Step S220: for the defect area set, a boundary detection algorithm is used to extract the boundary contours of the defect area, and the boundary contour set is determined by calculating the pixel grayscale value gradient of the boundary pixel points.
[0076] In one embodiment, a boundary detection algorithm, such as the Canny algorithm, is applied to the defect region set to extract the boundary contours of the defect region. For example, if the grayscale value of pixels in a defect region suddenly changes from 100 to 180, the pixel grayscale gradient is calculated, and pixels with higher gradient values are marked as boundary points, forming a boundary contour set.
[0077] It's important to note that combining gradient calculations with texture features can improve the accuracy of boundary detection. For example, a high texture feature value at a boundary point indicates that it is likely the edge of a lesion rather than noise. The boundary contour set provides precise region positioning for subsequent processing.
[0078] Step S230: construct an energy function based on the boundary contour set and texture features to obtain an energy distribution set.
[0079] An energy function is constructed based on a set of boundary contours and texture features. Minimizing this energy function optimizes the characterization of the defect region. Assuming the energy function for a defect region combines grayscale gradients and texture features, it generates an energy distribution set, which reflects the degree of abnormality of the pixels within the region. Specifically, a high energy value for a pixel indicates a deviation from normal tissue characteristics. It is important to note that this energy distribution set provides a quantitative basis for subsequent repair.
[0080] Step S240: Use a Gaussian filter algorithm to smooth the energy distribution set, adjust the pixel grayscale values of the pixels in the defect area, and perform filling and repair in combination with texture features to generate a second image data set.
[0081] In one 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 grayscale value of a pixel is 160, which is adjusted to 150 after smoothing. Inpainting is performed in conjunction with texture features to generate a second image dataset.
[0082] Optimally, during restoration, pixel grayscale values can be dynamically adjusted based on texture characteristics, ensuring a seamless connection between the repaired area and surrounding tissue. For example, after restoration, the grayscale values of the pixels in the lung area are evenly distributed, and the texture characteristics are consistent with those of normal tissue. This approach improves the quality of the imaging dataset and provides reliable data support for subsequent diagnosis.
[0083] In one embodiment, the second image dataset can be saved in DICOM format, including the patient ID and scan parameters, for easy clinical use. For example, the restored CT images exhibit higher regional consistency in lung nodule detection, facilitating subsequent analysis. It should be noted that the introduction of texture features makes the restoration process more targeted and reduces the risk of erroneous restorations. This multi-step collaborative processing ensures the integrity and practicality of the image data.
[0084] Furthermore, the cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in this embodiment includes step S300: Step S310: Obtain pixel grayscale values and depth information of pixel points in the second image data set, and use a stereoscopic microscopy algorithm to generate point cloud data containing three-dimensional space coordinates to obtain a point cloud data set.
[0085] In the field of medical image processing, data can be extracted from cranial CT images by obtaining the pixel grayscale values and depth information of the second image dataset. Assuming an image size of 512x512 pixels, with a pixel grayscale value range of 0-255, depth information is generated through multi-slice CT scans and reflects the position of the pixels in three-dimensional space. Stereoscopic microscopy algorithms can convert this information into point cloud data, generating a point cloud dataset containing 3D spatial coordinates.
[0086] Specifically, each pixel is assigned x, y, z coordinates and a pixel grayscale value. For example, the coordinates of a pixel in a skull region are (100, 120, 50) and the pixel grayscale value is 150. The point cloud dataset provides the basis for subsequent 3D modeling.
[0087] Step S320: 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 to obtain an encrypted point cloud dataset.
[0088] In one embodiment, the number of points per unit volume of a point cloud dataset is calculated. Assuming the unit volume is 1 cubic millimeter, a density threshold of 100 points / cubic millimeter is preset. If the point cloud density in a certain area is 80 points / cubic millimeter, which is lower than the threshold, an interpolation algorithm is used for local encryption.
[0089] For example, using the nearest neighbor interpolation method, new points are inserted in low-density areas. The pixel grayscale value is calculated based on the weighted average of neighboring points. For example, the grayscale value of the inserted point is approximately 145. After encryption, the point cloud density increases to 110 points per cubic millimeter, forming an encrypted point cloud dataset. This encryption method ensures the uniformity of the point cloud data.
[0090] Step S330: Calculate the pixel grayscale value gradient of each point based on the encrypted point cloud dataset, and use the gradient descent algorithm to construct a gradient field that describes the surface changes to obtain a gradient field dataset.
[0091] For example, calculating the pixel grayscale gradient at each point based on an encrypted point cloud dataset can reflect surface grayscale changes. For example, if the pixel grayscale value at a certain point suddenly changes from 140 to 180, the high gradient value indicates a possible skull surface boundary. A gradient descent algorithm is used to construct a gradient field, generating a gradient field dataset that describes surface variations. Specifically, the gradient field can mark the interface between the skull and soft tissue, providing accurate surface information for subsequent modeling.
[0092] Step S340: Generate a triangular mesh using a mesh generation algorithm using the gradient field dataset and the encrypted point cloud dataset, and construct a three-dimensional facial model by combining the boundary contour and the normal vector to obtain a three-dimensional facial model dataset.
[0093] In one embodiment, a mesh generation algorithm is used to generate a triangular mesh using the gradient field dataset and the encrypted point cloud dataset. For example, the point cloud data is connected into a triangular mesh based on the Delaunay triangulation algorithm, and the boundary contours and normal vectors are combined to construct a 3D facial model.
[0094] Assuming the normal vector of a skull region points outward, the mesh is generated to create a smooth skull surface. The 3D facial model dataset can be saved in STL format, containing mesh vertex coordinates and facet information, facilitating clinical surgical planning or 3D printing. For example, the generated skull model can be used for precise positioning of bone structures during surgical navigation, reducing operator error.
[0095] It's important to note that the combination of point cloud encryption and gradient field construction results in smoother model surfaces and clearer boundaries. For example, the encrypted point cloud data reduces voids, while the gradient field enhances surface detail. This multi-step collaborative processing improves the accuracy and reliability of 3D models, providing high-quality data support for medical imaging analysis.
[0096] Preferably, the cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in this embodiment includes step S400: Step S410: Obtain a mesh vertex dataset of the three-dimensional facial model, calculate the three-dimensional coordinates and normal vector of each mesh vertex using vector operations, and obtain a mesh vertex attribute dataset.
[0097] For example, in the field of medical image processing, a mesh vertex dataset based on a 3D facial model can be used to obtain mesh vertex coordinates and normal vectors through vector operations, forming a mesh vertex attribute dataset. The mesh vertex coordinates describe the position of each point on the model surface in 3D space. For example, the coordinates of a mesh vertex on a skull model are (150, 200, 80) mm. The normal vector reflects the surface orientation, such as (0.7, 0.2, 0.6), and is used for subsequent lighting calculations. The mesh vertex attribute dataset provides basic geometric information for visualization.
[0098] Step S420: Calculate the ambient light component of each mesh vertex using the illumination model according to the mesh vertex attribute dataset and the preset light source position, and obtain the ambient light intensity dataset in combination with the reflection coefficient of the surface material.
[0099] In one possible implementation, an ambient light model can be used to calculate the ambient light component based on a mesh vertex attribute dataset and a preset light source position. Ambient light simulates uniformly scattered light. Assuming the light source position is (300, 300, 500) mm, the ambient light intensity is 0.3, and the surface material reflectance is 0.4, the ambient light component of a particular mesh vertex can be obtained through simple multiplication. This approach ensures that the model maintains basic brightness even when there is no directional light source.
[0100] Step S430: If the angle between the normal vector in the mesh vertex attribute dataset and the light source position is less than a preset threshold, the diffuse reflection component is calculated using the 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 mesh vertex normal vector, and L represents the light source direction vector, to obtain a diffuse reflection intensity dataset.
[0101] For example, if the angle between the normal vector and the light source is less than a preset threshold, such as 30 degrees, the diffuse reflection formula is used to calculate the diffuse reflection component. Diffuse reflection simulates the scattering of light on a rough surface. For example, if the normal vector of a mesh 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, then the dot product of the vectors yields the diffuse reflection intensity. This method can highlight the variations in light and shade on the model's surface and enhance the sense of three-dimensionality.
[0102] Step S440: Calculate the specular reflection component using the specular reflection formula I_s=k_s(R·V)^n based on the diffuse reflection intensity dataset and the viewing angle direction, fuse the ambient light intensity dataset and the diffuse reflection intensity dataset, and generate a visualization image dataset, where 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.
[0103] In one possible implementation, the specular component is calculated based on the viewing direction and the specular exponent. Specular reflection simulates the specular effect of smooth surfaces, such as the smooth areas of a skull model. Assuming the viewing vector is (0.3, 0.4, 0.8), the specular coefficient is 0.8, and the specular exponent is 32, the specular intensity can be obtained by taking the dot product of the reflection vector and the viewing vector. This approach effectively captures the glossiness of the model surface.
[0104] For example, a visualization image dataset can be generated by fusing ambient light intensity datasets, diffuse reflection intensity datasets, and specular reflection intensity datasets. The fusion process considers the weighted influence of different lighting components, such as 30% ambient light, 50% diffuse reflection, and 20% specular reflection, to generate the color values of the final image pixels. This approach enables realistic lighting and shadow effects on the skull model during surgical navigation, facilitating the observation of skeletal details.
[0105] In one possible implementation, the visualization image dataset can be further optimized, for example by adjusting the light source position to simulate operating room lighting conditions or by varying the highlight index to emphasize specific areas. These extensions enrich the visualization and meet diverse clinical needs. It should be noted that integrating multiple illumination components can significantly enhance the realism of the model and provide a reliable visual basis for subsequent analysis.
[0106] Furthermore, the cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in this embodiment includes step S500: Step S510: Obtain a transformation parameter data set input by the user, construct a parameter mapping matrix through matrix operations, and obtain an initial transformation matrix. The transformation parameter data set includes a rotation angle, a translation amount, and a scaling ratio.
[0107] In one possible implementation, acquiring a transformation parameter dataset is a core step in 3D facial model processing. Transformation parameters typically include rotation angle, translation, and scaling, which together define the geometric transformation of the model in 3D space. For example, a user might enter a rotation angle of 45 degrees, a translation along the X-axis of 50 mm, and a scaling factor of 1.2. These parameters are entered through the user interface or a configuration file, ensuring that the model's position and morphology can be adjusted to specific needs.
[0108] It should be noted that the rationality of the transformation parameters directly affects the accuracy of subsequent matrix operations. Therefore, when inputting, it is necessary to ensure that the range of the parameter values is within a reasonable range. For example, the rotation angle is usually between -180 degrees and 180 degrees. For example, the process of constructing a 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 ultimately combined into a unified initial transformation matrix. For example, assuming the rotation angle is 30 degrees, the translation along the Y axis is 100 mm, and the scaling ratio is 1.5, the system will first calculate the rotation matrix, translation vector, and scaling matrix separately, and then synthesize the initial transformation matrix through matrix multiplication. This method ensures the order and consistency of the transformation, providing a reliable foundation for subsequent mesh vertex coordinate calculations.
[0109] Step S520: Determine whether the rotation angle in the initial transformation matrix exceeds a preset angle threshold. If so, use a linear interpolation method to correct the rotation angle to obtain a corrected transformation matrix.
[0110] In one possible implementation, determining whether the rotation angle in the initial transformation matrix exceeds a preset threshold is a key step. For example, if the angle threshold is set to 60 degrees and the input rotation angle is 75 degrees, it exceeds the threshold. In this case, linear interpolation is used to correct the rotation angle, for example, interpolating 75 degrees to within 60 degrees, to generate a corrected transformation matrix. This correction avoids model deformation or distortion caused by excessive rotation angles.
[0111] For example, in medical image processing, excessive rotation can cause unnatural distortion in the facial model, affecting the doctor's judgment of the surgical area. The corrected transformation matrix can maintain the geometric integrity of the model.
[0112] Step S530: Calculate the mesh vertex dataset of the 3D facial model using the coordinate transformation formula T(v)=M·v to obtain an updated mesh vertex dataset, where T(v) represents the transformed mesh vertex coordinates, M represents the modified transformation matrix, and v represents the original mesh vertex coordinates.
[0113] Calculating the mesh vertex dataset of a 3D facial model using a coordinate transformation formula is the core of generating the updated mesh vertex dataset. For example, the original mesh vertex coordinates of (100, 150, 200) mm might be transformed into new coordinates of (120, 180, 240) mm after applying the modified transformation matrix. This process is implemented through matrix and vector multiplication, which is computationally efficient and produces accurate results.
[0114] Step S540: Generate a mesh of a three-dimensional facial model using the updated mesh vertex dataset in combination with preset rendering parameters to obtain a visual mesh vertex position dataset.
[0115] The updated mesh vertex dataset reflects the model's new position and form in space, providing accurate geometric information for subsequent rendering. In one possible implementation, generating a visualization mesh vertex position dataset based on preset rendering parameters is the final step in visualizing the 3D facial model. Rendering parameters may include material properties, lighting direction, or color mapping. For example, if a material is set to semi-transparent, a lighting direction of (200, 200, 300) mm, and a warm color mapping, the system will generate a visualization mesh based on the updated mesh vertex dataset. This approach produces a clear model surface, making it easier to observe the details of the facial structure.
[0116] Preferably, by adjusting rendering parameters, such as increasing lighting intensity or changing color mapping, specific areas of the model, such as the bridge of the nose or cheekbones, can be highlighted to meet different analysis needs. For example, in an extended solution, interactive visualization can be achieved by dynamically adjusting transformation parameters.
[0117] For example, users can input a new rotation angle or scale in real time, and the system instantly updates the transformation matrix and recalculates the mesh vertex dataset to generate a new visualization. This interactivity is particularly useful in medical education, where teachers can adjust parameters to show how facial models change from different angles, helping students understand anatomical structures.
[0118] It should be noted that this dynamic adjustment can also support real-time feedback, allowing users to quickly optimize the model rendering 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 rendering effect of facial bones in different positions by adjusting the translation amount, or zoom in on a specific area by scaling to observe details. These operations rely on the efficient calculation of the transformation matrix to ensure that the model maintains geometric consistency under complex transformations, thereby providing support for accurate analysis.
[0119] Furthermore, the cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement proposed in this embodiment includes step S600: Step S610: Obtain the transformation parameter data set and material attribute data set input by the user, construct an initial transformation matrix and an initial material mapping matrix through matrix operations, and obtain the initial transformation matrix and the initial material mapping matrix.
[0120] For example, in 3D facial model processing, obtaining user-entered transformation parameter datasets and material property datasets is fundamental to building a visual model. Transformation parameter datasets might include rotation angle, translation, and scale factor, for example, setting the rotation angle to 30 degrees, translation along the Z axis to 80 mm, and scale factor to 1.3. Material property datasets might include texture color, reflectivity, and transparency, for example, setting the texture color to natural skin color, reflectivity to 0.6, and transparency to 0.2. These parameters are input through the user interface, ensuring that the model's form and appearance can be adjusted to specific needs.
[0121] It should be noted that the diversity of input parameters provides flexibility for subsequent matrix operations and texture mapping. In one possible implementation, the initial transformation matrix and the initial material mapping matrix are constructed through matrix operations. The initial transformation matrix converts the rotation, translation, and scaling parameters into mathematical representations, such as converting a 30-degree rotation angle into a rotation matrix, an 80-mm translation into a translation vector, and a scaling ratio of 1.3 into a scaling matrix, and then synthesizes a unified transformation matrix through matrix multiplication. The initial material mapping matrix generates a preliminary material distribution based on properties such as texture color and reflectivity, such as evenly mapping skin color to the model surface. It should be noted that this matrix construction method ensures the mathematical consistency of the parameters.
[0122] Step S620: If the parameters in the initial transformation matrix exceed the preset range, the transformation parameters are corrected using a linear interpolation method to obtain a corrected transformation matrix.
[0123] For example, if the rotation angle in the initial transformation matrix exceeds a preset range, such as setting a threshold of 45 degrees and an input of 50 degrees, a linear interpolation method is used to correct the angle to within 45 degrees.
[0124] Step S630: Calculate the mesh vertices of the 3D facial model using the corrected transformation matrix and the coordinate transformation formula T(v)=M·v to obtain an updated mesh vertex dataset, where T(v) represents the transformed mesh vertex coordinates, M represents the corrected transformation matrix, and v represents the original mesh vertex coordinates.
[0125] The modified transformation matrix is applied to the mesh vertices using the coordinate transformation formula. For example, if the original mesh vertex coordinates were (100, 150, 200) mm, the modified coordinates might be (120, 170, 220) mm. This modification method maintains the geometric stability of the model.
[0126] Step S640: According to the material attribute data set, a texture mapping algorithm is used to update the initial material mapping matrix to obtain an updated material mapping matrix.
[0127] Preferably, the texture mapping algorithm updates the material mapping matrix according to the material attribute data set, for example, adjusting the reflectivity to highlight the highlight area of the face to generate a more realistic skin effect.
[0128] Step S650: Generate real-time updated visual image data using the updated mesh vertex data set and the updated material mapping matrix.
[0129] In one possible implementation, the updated mesh vertex dataset is combined with the material mapping matrix 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 tone and lighting effects. It should be noted that real-time updates support dynamic adjustments, such as when the user changes the zoom level, the model will immediately appear magnified.
[0130] Step S660: Using a facial feature extraction algorithm, facial feature points are extracted from the real-time updated visual image data to obtain a facial feature point set.
[0131] Preferably, the facial feature extraction algorithm extracts key points from the visual image data, for example, the coordinates of the nose tip are (130, 160, 210) mm, and the coordinates of the mouth corners are (110, 140, 200) mm.
[0132] Step S670: Calculate the relative position relationship between the facial feature points using a geometric analysis method based on the facial feature point set to obtain a facial feature analysis result.
[0133] These facial feature points are calculated using geometric analysis methods to determine their relative distances. For example, the distance from the tip of the nose to the corner of the mouth is 30 mm, and the angle is 15 degrees, forming a facial feature analysis result. The facial feature analysis results can be used to assess facial symmetry or structural features. For example, in an extended solution, the system supports users to adjust material properties in real time, such as changing transparency to highlight bone structure or adjusting lighting angle to emphasize facial contours. Preferably, this interactivity allows users to quickly modify parameters through the interface, and the system instantly updates the visualization effect, making it easier to observe model changes under different parameters.
[0134] It is understandable that the results of facial feature analysis can be further used for medical diagnosis. For example, by using the distance between facial feature points to determine facial structural abnormalities, this can provide a reference for surgical planning. It should be noted that the flexibility and real-time nature of this method significantly enhance the practicality of the model.
[0135] The present invention relates to a cosmetic and plastic surgery auxiliary analysis system based on three-dimensional face shape digital measurement, which is used to implement the above-mentioned cosmetic and plastic surgery auxiliary analysis method based on three-dimensional face shape digital measurement. The cosmetic and plastic surgery auxiliary analysis system based on three-dimensional face shape digital measurement includes a first acquisition module, a second acquisition module, a first generation module, a second generation module, a calculation module and an output module, wherein the first acquisition module is used to acquire a medical image data set and use a Gaussian filtering algorithm to perform noise processing. If the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, it is determined to be a noise point and smoothed to obtain a first image data set; the second acquisition module is used to construct an energy function based on the first image data set, and calculate the defect area in the image by superimposing the single point energy term and the adjacent point interaction energy term. Perform filling and repair to obtain a second image data set; the first generation module is used to extract point cloud data from the second image data set and construct a gradient field. If the point cloud density is lower than a preset threshold, local encryption processing is performed to generate a three-dimensional facial model; the second generation module is used to obtain the mesh vertex coordinates and normal vector information of the three-dimensional facial model, and fuse the ambient light component, diffuse reflection component and specular reflection component through the light intensity calculation formula to generate a visual image; the calculation module is used to establish a parameter mapping matrix to constrain the range of the transformation parameters input by the user. If the rotation angle exceeds the preset range, it is automatically corrected and the updated mesh vertex position is calculated through the coordinate transformation formula; the output module is used to update the visual image in real time according to the transformation parameters and material attribute parameters, and output the facial feature analysis results.
[0136] Furthermore, the present embodiment provides a cosmetic plastic surgery auxiliary analysis system based on three-dimensional facial digital measurement, wherein the first acquisition module includes a first acquisition unit, a second acquisition unit, a third acquisition unit, and a first generation unit, wherein the first acquisition unit is used to acquire a medical image data set and use pixel grayscale value analysis to extract the pixel grayscale value of each pixel from the medical image data set, and obtain a first grayscale difference set by calculating the difference between the pixel grayscale value and the grayscale mean of the neighborhood pixels; the second acquisition unit is used to perform noise detection based on the first grayscale difference set, and if the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, the pixel is determined to be a noise point, and a noise point position set is obtained; the third acquisition unit is used to use a Gaussian filtering algorithm to smooth the noise point position set, and adjust the pixel grayscale value by applying the Gaussian filtering algorithm to the noise point to obtain a second image set; the first generation unit is used to generate a data set from the second image set, and generate a first image data set by saving the processed data of the second image set.
[0137] Preferably, the cosmetic surgery auxiliary analysis system based on three-dimensional facial digital measurement provided by this embodiment, the second acquisition module includes a fourth acquisition unit, a fifth acquisition unit, a sixth acquisition unit and a second generation unit, wherein the fourth acquisition unit is used to acquire a medical image data set and use pixel grayscale value analysis to extract the pixel grayscale value of each pixel from the medical image data set, and obtain a first grayscale difference set by calculating the difference between the pixel grayscale value and the grayscale mean of the neighborhood pixels; the fifth acquisition unit is used to perform noise detection based on the first grayscale difference set, and if the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, the pixel is determined to be a noise point, and a noise point position set is obtained; the sixth acquisition unit is used to use a Gaussian filtering algorithm to smooth the noise point position set, and adjust the pixel grayscale value by applying the Gaussian filtering algorithm to the noise point to obtain a second image set; the second generation unit is used to generate a data set from the second image set, and generate a first image data set by saving the processed data of the second image set.
[0138] The cosmetic surgery auxiliary analysis method and system based on three-dimensional facial shape digital measurement provided in this embodiment has the following beneficial effects compared with the prior art: 1. Improved image preprocessing accuracy: 1. Robust noise suppression: Through Gaussian filtering and dynamic thresholding (smoothing when the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold), it can effectively remove interference such as salt and pepper noise and Gaussian noise in medical images, making facial tissue boundaries clearer; Compared with traditional median filtering: Gaussian filtering preserves edge details while suppressing noise. It is particularly suitable for preserving subtle structures such as facial skin texture and pores, and avoids feature distortion caused by oversmoothing. 2. Intelligent defect repair: Based on energy function-based defect filling (superposition calculation of single-point energy terms and adjacent-point interaction energy terms), it can automatically repair local defects such as light spots, scratches, facial acne pits, and scars in images, seamlessly connecting the pixel grayscale values and texture features of the filled area with the surrounding tissue; Application value: Avoid 3D modeling errors caused by defects in the original image. For example, repairing scars on the nose can make subsequent rhinoplasty simulations more consistent with the real facial structure.
[0139] Detail enhancement of 2D and 3D modeling: 1. Adaptive optimization of point cloud data. Through gradient field analysis and local encryption processing (automatic encryption when the point cloud density falls below a threshold), it can enhance the point cloud density of key facial features (such as the corners of the eyes, lip line, and nose bridge), solving the point cloud sparseness problem of traditional laser scanning in low-curvature areas (such as cheeks); Data comparison: In areas with large curvature changes, such as the nose tip, the point cloud density can be increased from 50 points / cm² using traditional methods to 200 points / cm², and the model surface error is reduced to within 0.1mm; 2. Realistic physical lighting simulation, integrating ambient light, diffuse reflection, and specular reflection components into a lighting model (such as the Phong lighting model), can faithfully reproduce the optical properties of facial skin (such as the oily reflection on the forehead and the matte texture of the cheeks), avoiding the "plastic feel" of traditional 3D models; Clinical value: Doctors can observe the three-dimensional effect of the face through changes in light and shadow, for example, to determine whether the light and shadow transition after apple muscle filling is natural, thereby reducing the deviation between the postoperative effect and the expected effect.
[0140] 3. Security and interaction efficiency of parameter control: 1. The parameter mapping matrix constrains the range of rotation angles (such as the zygomatic arch inward thrust angle and mandibular angle rotation amplitude) and translation distances (such as the length of the nose bridge elevation), and automatically corrects out-of-limit values (such as limiting the mandibular angle rotation angle to ≤15° to avoid the risk of nerve damage), eliminating unreasonable operations at the algorithm level. Risk control: Preset safety thresholds based on the anatomical database. For example, during rhinoplasty, if the upward rotation angle of the nasal tip exceeds 30°, an automatic warning will be issued, indicating that the nostrils may be exposed. 2. An immersive, real-time interactive experience. Mesh vertex positions are calculated in real time based on coordinate transformation formulas (such as rotation matrices and translation vectors). As users adjust parameters (such as using a slider to change chin length), the 3D model is updated at 60fps, achieving a "what you see is what you get" simulation experience. Improved doctor-patient communication: Patients can visually observe the facial changes resulting from different plastic surgery plans (e.g., comparing the heights of two rhinoplasty implants), while doctors can quickly verify the aesthetic proportions of the design plan (e.g., the three-part, five-eye standard) through real-time rendering.
[0141] 4. Comprehensive benefits of clinical application: 1. Accuracy of surgical plans: High-precision 3D models (error <0.3mm) combined with illumination simulation can quantitatively analyze indicators such as the degree of facial asymmetry (such as the difference in left and right cheek width) 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 the changes in facial contour after osteotomy. 2. Pre-operative risk prediction: By rehearsing the effects of different surgical parameters using a model, potential problems (such as compatibility between the implant and surrounding tissues, and the risk of neurovascular compression) can be identified in advance, reducing intraoperative adjustment time and lowering surgical risks by approximately 25%; 3. Efficient utilization of medical resources. The automated image processing and modeling process (from image input to 3D model generation takes less than 10 minutes) greatly improves efficiency compared to traditional manual measurement (which takes 1-2 hours), making it suitable for large-scale pre-operative evaluation of cosmetic plastic surgery.
[0142] In summary, the cosmetic surgery auxiliary analysis method and system based on three-dimensional facial digital measurement provided in this embodiment has achieved a leap from "experience-driven" to "data-driven" in the field of cosmetic surgery through full-process technological innovation of high-precision image processing → detail enhancement modeling → physical lighting rendering → safe interactive simulation.
[0143] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the invention. Thus, the present invention is intended to include such changes and modifications as fall within the scope of the claims and their equivalents.
Claims
1. A cosmetic surgery auxiliary analysis method based on three-dimensional facial digital measurement, characterized in that: The following steps are involved: Obtain a medical image dataset and use a Gaussian filter algorithm to perform noise processing. If the difference between the grayscale value of a pixel and the neighborhood mean exceeds a preset threshold, it is determined to be a noise point and smoothed to obtain a first image dataset; constructing an energy function based on the first image data set, and filling and repairing defective areas in the image by superimposing single-point energy terms and adjacent-point interaction energy terms to obtain a second image data set; extracting point cloud data from the second image dataset and constructing a gradient field, and performing local encryption processing if the point cloud density is lower than a preset threshold to generate a three-dimensional facial model; Obtaining mesh vertex coordinates and normal vector information of the three-dimensional facial model, and fusing ambient light component, diffuse reflection component, and specular reflection component through a light intensity calculation formula to generate a visual image; A parameter mapping matrix is established to constrain the range of the transformation parameters input by the user. If the rotation angle exceeds the preset range, it is automatically corrected and the updated mesh vertex position is calculated using the coordinate transformation formula; The visual image is updated in real time according to the transformation parameters and the material attribute parameters, and the facial feature analysis result is output.
2. The cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement according to claim 1, characterized in that: The step of obtaining a medical image dataset and performing noise processing using a Gaussian filtering algorithm, wherein if the difference between the grayscale value of a pixel and the neighborhood mean exceeds a preset threshold, the pixel is determined to be a noise point and smoothed, and the step of obtaining a first image dataset includes: Obtaining a medical image dataset and performing pixel grayscale value analysis to extract a pixel grayscale value of each pixel from the medical image dataset, and obtaining a first grayscale difference value set by calculating a difference between the pixel grayscale value and a grayscale mean of neighboring pixels; Performing noise detection based on the first grayscale difference set, if the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, determining that the pixel is a noise point, and obtaining a noise point position set; A Gaussian filter algorithm is used to smooth the noise point position set, and the pixel grayscale values are adjusted by applying the Gaussian filter algorithm to the noise points to obtain a second image set; A data set is generated from the second image set, and a first image data set is generated by saving processed data of the second image set.
3. The cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement according to claim 1, characterized in that: The steps of constructing an energy function based on the first image data set and filling and repairing defective areas in the image by superimposing single-point energy terms and adjacent-point interaction energy terms to obtain a second image data set include: Obtaining pixel grayscale values and texture features of pixel points from the first image data set, partitioning the image using a region segmentation algorithm, and determining regions containing defects by calculating the mean value of texture features and pixel grayscale value distribution of each region to obtain a defect region set; For the defect area set, a boundary detection algorithm is used to extract the boundary contours of the defect area, and a boundary contour set is determined by calculating the pixel grayscale value gradient of the boundary pixel points; constructing an energy function based on the boundary contour set and texture features to obtain an energy distribution set; The energy distribution set is smoothed by using a Gaussian filtering algorithm, and the pixel grayscale values of the pixels in the defect area are adjusted and filled in and repaired in combination with texture features to generate a second image data set.
4. The cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement according to claim 1, characterized in that: The steps of extracting point cloud data from the second image dataset and constructing a gradient field, and performing local encryption processing if the point cloud density is lower than a preset threshold, and generating a three-dimensional facial model include: Obtaining pixel grayscale values and depth information of pixel points in the second image dataset, and generating point cloud data including three-dimensional spatial coordinates using a stereoscopic microscopy algorithm to obtain a point cloud dataset; Calculating the number of points within a unit volume of the point cloud dataset; if the point cloud density is lower than a preset threshold, locally encrypting the low-density area using an interpolation algorithm to obtain an encrypted point cloud dataset; Calculating the pixel grayscale value gradient of each point according to the encrypted point cloud data set, and constructing a gradient field describing surface changes using a gradient descent algorithm to obtain a gradient field data set; A triangular mesh is generated by using the gradient field dataset and the encrypted point cloud dataset using a mesh generation algorithm, and a three-dimensional facial model is constructed by combining boundary contours and normal vectors to obtain a three-dimensional facial model dataset.
5. The cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement according to claim 1, characterized in that: The steps of obtaining mesh vertex coordinates and normal vector information of the three-dimensional facial model and fusing ambient light component, diffuse reflection component and specular reflection component using a light intensity calculation formula to generate a visual image include: Obtaining a mesh vertex dataset of the three-dimensional facial model, and calculating the three-dimensional coordinates and normal vector of each mesh vertex using vector operations to obtain a mesh vertex attribute dataset; According to the mesh vertex attribute dataset and the preset light source position, the ambient light component of each mesh vertex is calculated using the illumination model, and the ambient light intensity dataset is obtained by combining 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, the diffuse reflection component is calculated using the 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 mesh vertex normal vector, and L represents the light source direction vector, to obtain the diffuse reflection intensity dataset; The specular reflection component is calculated using the specular reflection formula I_s=k_s(R·V)^n based on the diffuse reflection intensity dataset and the viewing angle direction. The ambient light intensity dataset and the diffuse reflection intensity dataset are fused to generate a visualization image dataset, where 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 specular index.
6. The cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement according to claim 1, characterized in that: The step of establishing a parameter mapping matrix to constrain the range of the transformation parameters input by the user, automatically correcting the rotation angle if it exceeds the preset range, and calculating the updated mesh vertex position using the coordinate transformation formula includes: Obtaining a transformation parameter data set input by the user, constructing a parameter mapping matrix through matrix operations, and obtaining an initial transformation matrix, wherein the transformation parameter data set includes a rotation angle, a translation amount, and a scaling ratio; Determining whether the rotation angle in the initial transformation matrix exceeds a preset angle threshold, and if so, correcting the rotation angle using a linear interpolation method to obtain a corrected transformation matrix; Calculating the mesh vertex dataset of the three-dimensional facial model using a coordinate transformation formula T(v)=M·v to obtain an updated mesh vertex dataset, where T(v) represents the transformed mesh vertex coordinates, M represents the modified transformation matrix, and v represents the original mesh vertex coordinates; The updated mesh vertex data set is combined with preset rendering parameters to generate a mesh of the three-dimensional facial model, thereby obtaining a visual mesh vertex position data set.
7. The cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement according to claim 1, characterized in that: The steps of updating the visual image in real time according to the transformation parameters and the material attribute parameters and outputting the facial feature analysis results include: Obtain the transformation parameter data set and material attribute data set input by the user, construct the initial transformation matrix and the initial material mapping matrix through matrix operations, and obtain the initial transformation matrix and the initial material mapping matrix; If the parameters in the initial transformation matrix exceed the preset range, the transformation parameters are corrected using a linear interpolation method to obtain a corrected transformation matrix; The mesh vertices of the 3D facial model are calculated using the coordinate transformation formula T(v)=M·v using the modified transformation matrix to obtain an updated mesh vertex dataset, where T(v) represents the transformed mesh vertex coordinates, M represents the modified transformation matrix, and v represents the original mesh vertex coordinates. According to the material attribute data set, the initial material mapping matrix is updated using a texture mapping algorithm to obtain an updated material mapping matrix; Generate real-time updated visual image data through the updated mesh vertex data set and the updated material mapping matrix; A facial feature extraction algorithm is used to extract facial feature points from the real-time updated visual image data to obtain a facial feature point set; According to the facial feature point set, a geometric analysis method is used to calculate the relative position relationship between the facial feature points to obtain a facial feature analysis result.
8. A cosmetic surgery auxiliary analysis system based on three-dimensional face shape digital measurement, used to implement the cosmetic surgery auxiliary analysis method based on three-dimensional face shape digital measurement according to any one of claims 1 to 7, characterized in that: include: A first acquisition module is used to acquire a medical image data set and perform noise processing using a Gaussian filtering algorithm. If the difference between the grayscale value of a pixel and the neighborhood mean exceeds a preset threshold, it is determined to be a noise point and smoothed to obtain a first image data set; A second acquisition module is configured to construct an energy function based on the first image data set, and fill and repair defect areas in the image by superimposing single-point energy terms and adjacent-point interaction energy terms to obtain a second image data set; a first generating module, configured to extract point cloud data from the second image dataset and construct a gradient field, and perform local encryption processing if the point cloud density is lower than a preset threshold to generate a three-dimensional facial model; The second generation module is used to obtain the mesh vertex coordinates and normal vector information of the three-dimensional facial model, and generate a visual image by fusing the ambient light component, the diffuse reflection component and the specular reflection component through a light intensity calculation formula; The calculation module is used to establish a parameter mapping matrix to constrain the range of the transformation parameters input by the user. If the rotation angle exceeds the preset range, it will be automatically corrected and the updated mesh vertex position will be calculated using the coordinate transformation formula; The output module is used to update the visual image in real time according to the transformation parameters and material attribute parameters, and output the facial feature analysis results.
9. The cosmetic surgery auxiliary analysis system based on three-dimensional face shape digital measurement according to claim 8, characterized in that: The first acquisition module includes: a first acquisition unit, configured to acquire a medical image dataset and extract a pixel grayscale value of each pixel from the medical image dataset by performing pixel grayscale value analysis, and obtain a first grayscale difference value set by calculating a difference between the pixel grayscale value and a grayscale mean of neighboring pixels; a second acquisition unit, configured to perform noise detection based on the first grayscale difference value set, and determine that the pixel is a noise point if the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, thereby obtaining a noise point position set; a third acquisition unit, configured to perform smoothing processing on the noise point position set using a Gaussian filter algorithm, and adjust pixel grayscale values by applying the Gaussian filter algorithm to the noise points to obtain a second image set; The first generating unit is configured to generate a data set from the second image set, and generate a first image data set by storing processed data of the second image set.
10. The cosmetic surgery auxiliary analysis system based on three-dimensional face shape digital measurement according to claim 8, characterized in that: The second acquisition module includes: a fourth acquisition unit, configured to acquire a medical image dataset and extract a pixel grayscale value of each pixel from the medical image dataset using pixel grayscale value analysis, and obtain a first grayscale difference value set by calculating a difference between the pixel grayscale value and a grayscale mean of neighboring pixels; a fifth acquisition unit, configured to perform noise detection based on the first grayscale difference value set, and determine that the pixel is a noise point if the difference between the pixel grayscale value and the neighborhood mean exceeds a preset threshold, thereby obtaining a noise point position set; a sixth acquisition unit, configured to perform smoothing processing on the noise point position set using a Gaussian filter algorithm, and adjust pixel grayscale values by applying the Gaussian filter algorithm to the noise points to obtain a second image set; The second generating unit is configured to generate a data set from the second image set, and generate a first image data set by storing processed data of the second image set.
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
Cited By
Light field reconstruction method and system based on coaxial light path integration and double-domain dynamic calibration
CN120947809A
A light field reconstruction method and system based on coaxial optical path integration and dual-domain dynamic calibration
CN120947809B