An adaptive nail art pattern generation method based on nail micro-curve and semantic driving
By extracting nail micro-surface features through curvature adaptive structured light coding and non-uniform sampling confidence weighting, a micro-surface geometric constraint model is constructed. Combined with semantic-driven generation technology, the accuracy and fit problems of nail pattern generation in existing technologies are solved, and high-precision, personalized nail art pattern generation is achieved.
Patent Information
- Application Number
- CN202611565975.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-10
- Publication Date
- 2026-11-24
AI Technical Summary
Existing nail art pattern generation technology struggles to balance sparse sampling in the middle of the nail with dense sampling at the edges, resulting in curvature estimation errors, loss of edge details, poor pattern generation accuracy and fit, and a lack of individualized optimization mechanisms.
Curvature-adaptive structured light coding is used to acquire 3D point cloud data. Multi-scale geometric features are extracted by combining non-uniform sampling confidence weighting. A micro-surface geometric constraint model is constructed, and semantically driven pattern generation is performed. The pattern elements are adaptively arranged and edge correction is performed through the micro-surface generative potential field.
It improves the accuracy of extracting the geometric features of the nail micro-curved surface, realizes the automatic shrinkage, spacing increase, transparency reduction and normal fine adjustment of pattern elements at the edge, improves the generation accuracy and fit, and reduces the risk of edge overflow and curling.
Smart Images

Figure CN123160643A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image adaptation, and in particular relates to an adaptive nail art pattern generation method based on nail micro-surfaces and semantic driving. Background Technology
[0002] Currently, with the development of personalized nail art customization and intelligent printing technology, existing nail art pattern generation solutions typically first acquire 3D point cloud data of the nail surface through methods such as structured light scanning, laser scanning, or image acquisition. Then, based on the point cloud, surface reconstruction and geometric feature extraction are performed, and semantic information such as user-input text, voice, or images is combined to generate the nail art pattern. Finally, the pattern is output through UV printing, inkjet printing, or 3D printing. In existing technologies, nail point cloud acquisition often uses structured light stripes with fixed spatial frequencies or uniform sampling methods; surface reconstruction often uses fixed grid resolution, uniform interpolation, or fixed strip division; geometric feature extraction often uses uniform neighborhood, equal-weight estimation, or fixed-scale curvature calculation; semantic parsing often statically maps keywords to global design parameters; geometric constraints and semantic parameters are often combined through simple multiplication or weighted superposition; and pattern unfolding often uses equal-area unfolding or uniform parametric unfolding.
[0003] However, the existing technologies still have the following problems: natural nail surfaces typically exhibit a slightly curved surface with a gentle central area and high curvature at the edges, making it difficult to balance sparse sampling in the central area with dense sampling at the edges when using fixed-frequency sampling; the point cloud distribution is non-uniform and the confidence levels of phase calculations at each sampling point differ, making uniform neighborhood and equal-weight estimation prone to significant curvature estimation bias in sparse regions; fixed grids, fixed strips, and globally unified design parameters are difficult to adapt to changes in curvature gradients, leading to loss of edge details or amplification of noise in the central area; the simple superposition of geometric constraints and semantic parameters makes it difficult to simultaneously control edge pattern overflow, surface deformation, and edge lifting of the bonding layer; generating planar patterns first and then adapting them to curved surfaces, as well as simple equal-area unfolding, easily causes visual compression or stretching of the edge region; in addition, there is a lack of a closed-loop optimization mechanism based on individual nail digital twins and quality feedback, making it difficult to continuously improve generation accuracy and bonding effect with use. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides an adaptive nail art pattern generation method based on nail micro-surfaces and semantic-driven principles, comprising: Acquire three-dimensional point cloud data of the user's natural nail surface, and simultaneously acquire sampling density information and phase position reliability information during the acquisition process of this three-dimensional point cloud data; Based on the three-dimensional point cloud data, the sampling density information, and the phase position confidence information, multi-scale geometric features of the user's natural nail surface are extracted; Based on the three-dimensional point cloud data, the sampling density information, the phase position confidence information, and the multi-scale geometric features, a micro-surface geometric constraint model of the user's natural nail is constructed. The system receives semantic descriptions input by the user and performs multi-granularity analysis on the semantic descriptions based on the micro-surface geometric constraint model to generate structured design parameters. Based on the micro-surface geometric constraint model and the structured design parameters, regionalized numerical design parameters are generated; Based on the microsurface geometric constraint model and the regionalized numerical design parameters, a microsurface generative potential field is constructed, and a dual-driven pattern element generation based on the microsurface generative potential field is performed using both geometric and semantic driving methods. Based on the potential field of the micro-surface and the stress information of the bonding layer in the geometric constraint model of the micro-surface, the generated pattern elements are adaptively arranged and edge-corrected. The corrected pattern element data is mapped to the micro-surface geometric constraint model, and shape-preserving unfolding is performed to output the printing data.
[0005] Optionally, acquiring the three-dimensional point cloud data of the user's natural nail surface includes: Structured light stripes are projected onto the surface of the user's natural nails using a structured light projection camera device; Based on the pre-collected coarse positioning information or prior nail morphology model, the curvature distribution of the nail surface is estimated, and according to the curvature distribution, a lower spatial frequency and wider stripes are used in the middle region of the nail, and a higher spatial frequency and narrower stripes are used in the edge region of the nail. The deformed stripe image modulated on the nail surface is acquired, the phase is calculated, and the three-dimensional coordinates of each sampling point on the nail surface are obtained by combining the system calibration parameters to generate nail surface point cloud data. Image frame registration and motion compensation are performed during the acquisition process.
[0006] Optionally, multi-scale geometric features of the user's natural nail surface are extracted, including: Taking each sampling point in the nail surface point cloud data as the center, the local neighborhood scale is adaptively determined based on the sampling density information; A comprehensive weight is constructed based on distance weight, phase position confidence weight, and sampling density compensation weight, and a weighted covariance matrix is then constructed. The weighted covariance matrix is decomposed into eigenvalues to obtain the local normal vector and principal curvature direction, and the maximum and minimum curvatures are calculated. The curvature parameters of the central region and the edge curvature parameters are obtained based on the maximum curvature and the minimum curvature; The cross-sectional curves are extracted along the longitudinal and transverse directions of the nail, and the longitudinal and transverse radii are obtained by fitting based on the local normal vector and curvature information; The surface elevation difference is calculated based on the nail surface point cloud data, and the boundary contour is extracted after segmentation and flattening from the nail surface point cloud data.
[0007] Optionally, constructing a micro-surface geometric constraint model of the user's natural nail includes: Based on the nail surface point cloud data, the sampling density information and the multi-scale curvature estimation confidence, an adaptive triangulation method is used to construct a three-dimensional mesh surface model, wherein the central low curvature region uses a larger mesh cell size and the edge high curvature region uses a smaller mesh cell size, and the boundary contour is used as a hard constraint boundary. On the three-dimensional mesh surface model, the weighted curvature estimate of each sampling point is used as the interpolation node, and weighted interpolation is performed using a comprehensive weight determined by phase position confidence, sampling density compensation weight and multi-scale curvature consistency weight to construct the curvature field; Based on the gradient distribution of the curvature field, multiple strip regions are adaptively divided along the width direction of the nail, and a surface level is assigned to each strip region; A microsurface geometric constraint model is generated based on the three-dimensional mesh surface model, the curvature field, the surface level, the boundary contour, and the multi-scale weighted normal vector; An inner bonding layer model conforming to the nail surface is generated based on the micro-curved surface geometric constraint model.
[0008] Optionally, the semantic description is analyzed at multiple granularities based on the micro-surface geometric constraint model to generate structured design parameters, including: The semantic description input by the user is segmented and keywords are extracted, and then classified according to at least one semantic granularity among theme, style, color, gradient, density, element and layout to obtain a multi-granularity semantic unit sequence. Map keywords to style tags and / or topic tags based on the style mapping knowledge base; Based on the curvature field and surface level in the microsurface geometric constraint model, the style tags and / or topic tags are adjusted with regionalized weights. Keywords are mapped to design element parameters, and the geometric feasibility range of the design element parameters is corrected according to the micro-surface geometric constraint model. The adjusted and corrected results are integrated into a set of structured design parameters, and each structured design parameter is assigned a fusion weight obtained by fusing semantic mapping scores and geometric feasibility scores.
[0009] Optionally, based on the microsurface geometric constraint model and the structured design parameters, regionalized numerical design parameters are generated, including: The color parameters in the structured design parameters are translated into color values, and a regionalized color parameter field is generated based on the surface level and the fusion weight. The element parameters in the structured design parameters are translated into reference point diameter, reference point distance, and reference transparency, and a regionalized point diameter field, a regionalized point distance field, and a regionalized transparency field are generated based on the curvature field and the surface level. The gradient parameters are translated into gradient functions, and the globally normalized position parameters are modulated into regionalized position parameters according to the curvature field. The style parameters are translated into element distribution density coefficients, element size scaling coefficients, and overall transparency baseline values, and then combined with the fusion weights and the surface level to generate a regionalized style coefficient field. A numerical design parameter set is generated based on the regionalized color parameter field, the regionalized point diameter field, the regionalized point distance field, the regionalized transparency field, the regionalized position parameter, and the regionalized style coefficient field.
[0010] Optionally, the step of constructing a micro-surface generative potential field and generating dual-driven pattern elements based on the micro-surface generative potential field includes: Based on the curvature field, surface level, boundary contour, and inner bonding layer model in the micro-surface geometric constraint model, a micro-surface generative potential field is constructed to characterize the degree to which pattern elements can be placed at various positions on the nail surface. The larger the curvature value, the higher the surface level, the closer to the boundary contour, or the more concentrated the stress in the bonding layer, the lower the micro-surface generative potential field. The type, color, shape, transparency, distribution probability, and arrangement of pattern elements are determined based on the numerical design parameter set. For each pattern element to be placed, a geometric correction coefficient is generated based on the micro-surface generative potential field at its intended placement location. The confidence of the semantically driven benchmark parameters is enhanced based on the fusion weight. The boundary contour is used as a hard constraint. When the intended placement location is less than the safe distance from the boundary, size shrinkage, transparency reduction, and normal direction fine-tuning are triggered. Based on the corrected and enhanced parameters, pattern elements are iteratively placed on the three-dimensional mesh surface model in descending order of the microsurface generative potential field, and the local microsurface generative potential field is updated after each placement.
[0011] Optionally, the adaptive arrangement and edge correction of the generated pattern elements includes: In the central region where the surface level is low and the potential field for micro-surface generation is high, the pattern elements are arranged according to the reference size, reference spacing and reference transparency, and maintain a consistent orientation along the multi-scale weighted normal vector direction; In the edge region where the surface level is high and the potential field for microsurface generation is low, the pattern elements are controlled to perform size shrinkage, spacing increase, transparency decrease and normal direction fine adjustment based on the normalized curvature value and the gradient of the potential field for microsurface generation. In the transition region between the central and edge regions, smooth interpolation is performed based on the gradient of the potential field that can generate micro-surfaces, so that the arrangement parameters change continuously. A stress relief zone is set near the boundary contour. Based on the normalized curvature value, the gradient modulus of the potential field for micro-curved surface generation, the normalized stress value of the bonding layer, and the distance to the boundary contour, the size, density, and transparency of the pattern elements within the stress relief zone are collaboratively corrected.
[0012] On the other hand, the present invention also provides an electronic device including a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.
[0013] On the other hand, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.
[0014] Compared with the prior art, the present invention has the following advantages and technical effects: This invention improves the accuracy of extracting geometric features of micro-surfaces from non-uniform point clouds by using curvature-adaptive structured light coding and phase position confidence and sampling density compensation; it constructs a micro-surface geometric constraint model that integrates curvature field, surface level, boundary contour, and bonding layer stress; it regionalizes semantic parameters and constructs a generative potential field, unifying geometric and semantic driving forces to achieve automatic shrinkage, spacing increase, transparency reduction, and normal fine-tuning of pattern elements at the edges; it reduces edge overflow, deformation, and warping by combining stress release and area-preserving unfolding compensation; and it improves individualized generation accuracy, bonding, and semantic consistency through quality assessment and potential field feedback closed-loop optimization. Attached Figure Description
[0015] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention. Detailed Implementation
[0016] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0017] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0018] Example 1 like Figure 1 As shown, this embodiment provides an adaptive nail art pattern generation method based on nail micro-surfaces and semantic-driven principles, including: Step 1: Acquisition of point cloud data of micro-curved surfaces of natural nail surface based on curvature adaptive structured light coding In this embodiment, step one employs a curvature-adaptive structured light coding scheme to acquire three-dimensional point cloud data of the user's natural nail surface. Specifically, the data acquisition device is preferably a structured light projection camera device, including a coding pattern projector, an image sensor, and a control unit. The coding pattern projector projects structured light stripes onto the user's natural nail surface; the control unit, based on pre-acquired coarse positioning information or a priori nail morphology model, estimates the curvature distribution of different regions on the nail surface, and dynamically modulates the spatial frequency and contrast of the structured light stripes accordingly: a lower spatial frequency and wider stripes are used in the gently curvature region in the middle of the nail, while a higher spatial frequency and narrower stripes are used in the region with higher curvature at the edges, thereby achieving denser sampling in the high-curvature edge region and sparser sampling in the low-curvature middle region. The image sensor acquires images of deformed stripes generated by the structured light on the nail surface due to the micro-curvature undulations, and their grayscale distribution satisfies the following relationship: in, Image pixel coordinates, The grayscale values of the collected stripes. Background light intensity, For stripe contrast, The spatial frequency is adaptively modulated by curvature. The phase is highly modulated by the nail surface. This is obtained through phase calculation. By combining the system calibration parameters, the three-dimensional coordinates of each sampling point on the nail surface can be calculated, generating nail surface point cloud data, denoted as... During the data acquisition process, the user's finger remains relatively still, and each acquisition session is controlled within 3 seconds. Preferably, minor finger tremors are suppressed through inter-frame image registration and motion compensation. To further improve scanning accuracy, the structured light contrast can be dynamically adjusted. To accommodate the characteristics of nail surfaces—uniform color and low reflectivity—selective sampling is employed. Optionally, high-curvature areas at the nail edges are sampled more densely, while low-curvature areas in the center are sampled more sparsely, thus reducing data volume while preserving edge surface details. The acquired raw data is nail surface point cloud data. It contains the three-dimensional coordinate information (x, y, z) of each sampling point.
[0019] Step 2: Multi-scale geometric feature extraction of nail micro-surface based on non-uniform sampling confidence weighting In this embodiment, step two follows the point cloud data of the nail surface obtained in step one. The sampling density field and phase position confidence information generated in step one during curvature adaptive structured light coding are used to extract the micro-curved geometric features of the nail surface using multi-scale, confidence-weighted extraction. Because step one uses curvature adaptive structured light coding, the point cloud in the low-curvature region of the nail center is sparse, while the point cloud in the high-curvature region at the edge is denser, and the phase calculation confidence of each sampling point differs. Directly using conventional equal-weighted principal component analysis or uniform neighborhood curvature estimation would result in significant estimation bias in the sparse region. Therefore, this embodiment proposes a multi-scale geometric feature extraction method based on non-uniform sampling confidence weighting, specifically including the following sub-steps: (2.1) In this embodiment, the output of step one is used as the reference. Based on this, for each sampling point Constructing local neighborhoods The scale of the local neighborhood is adaptively determined based on the curvature adaptive sampling density field in step one: a larger neighborhood scale is used in the low-curvature central region to suppress sparse sampling noise, and a smaller neighborhood scale is used in the high-curvature edge region to preserve local surface details. For the point set within each neighborhood, a weighted covariance matrix is constructed, the expression of which is: ; in, The weighted centroid of the neighborhood point set, The comprehensive weight is obtained by multiplying the distance weight, the confidence weight of the phase position in step one, and the curvature adaptive sampling density compensation weight. This is achieved through... Eigenvalue decomposition is performed to obtain three eigenvalues and their corresponding eigenvectors. The eigenvector corresponding to the smallest eigenvalue is the local normal vector, and the two larger eigenvalues correspond to the principal curvature directions. The maximum and minimum curvatures are then calculated. In the central region of the nail, i.e., within a certain range from the midline along the width direction, the maximum and minimum curvatures of each sampling point are weighted and averaged to obtain the curvature parameters of the central region. The weights of the weighted average also take into account the phase position confidence and sampling density compensation from step one, thereby improving the robustness of the central region curvature estimation under sparse sampling conditions.
[0020] (2.2) In the nail edge region, i.e., the region near the two sides of the nail along the width direction, based on the high-density point cloud obtained by the encrypted sampling in the high curvature region of the edge in step one, calculate the deflection angle of the normal vector of each sampling point relative to the reference normal vector of the central region. Specifically, using the average normal vector of the central region obtained in step (2.1) as the reference normal vector, the angle between the local normal vector of each sampling point in the edge region and the reference normal vector is statistically analyzed, and combined with the principal curvature value at that location, the edge curvature parameter is jointly characterized. Optionally, a multi-scale normal vector consistency check can be performed on the edge region to eliminate abnormal normal vectors caused by nail edge reflection or point cloud noise, thereby improving the accuracy of edge curvature estimation.
[0021] (2.3) Extract cross-sectional curves along the longitudinal direction of the nail, i.e., from the nail root to the nail tip, and laterally, i.e., from one side to the other. The extraction positions of the cross-sectional curves are adaptively determined based on the boundary contour pre-positioning information and curvature distribution in step one, with the number of cross-sections increased in areas of drastic curvature change. For each cross-sectional curve, a smooth fit is performed using the weighted normal vector and curvature information obtained in step (2.1), and its radian value is calculated, denoted as the longitudinal radian. and lateral curvature The radian value is used to characterize the overall curvature tendency of the nail in both the longitudinal and transverse directions.
[0022] (2.4) Based on The three-dimensional coordinates of each sampling point are used to calculate the height difference between the highest and lowest points on the nail surface. This serves as a parameter characterizing the overall surface undulation of the nail. Preferably, the selection of the highest and lowest points excludes outliers near the boundary contour to avoid the influence of edge noise on the height difference calculation.
[0023] (2.5) Pointing clouds from the curved surface of the fingernail The peripheral contour point set of the nail is extracted. Specifically, the method is as follows: First, a point cloud segmentation algorithm is used to segment the nail surface point cloud from the finger point cloud. This point cloud segmentation can be constrained by the structured light coding region information and phase position confidence from step one to improve segmentation accuracy. Then, the nail surface point cloud is flattened to obtain a planar nail point cloud. Finally, a boundary contour point group is extracted from the periphery of the planar point cloud. The boundary contour is represented by an ordered two-dimensional coordinate sequence, denoted as... Optionally, subpixel-level smoothing and closure processing can be performed on the boundary contours to eliminate jagged edges caused by the discreteness of the point cloud.
[0024] In this embodiment, the above-mentioned feature parameters Together, they form a set of micro-surface geometric features of the nail, which is then output to step three to construct a micro-surface geometric constraint model corresponding to the individual user's nail shape. Compared with the existing technology that uses uniform weight estimation or fixed neighborhood scale, this embodiment introduces the curvature adaptive sampling density field and phase position confidence from step one as weighting criteria, achieving high-precision and noise-resistant extraction of nail micro-surface geometric features under non-uniform point cloud conditions, especially improving the consistency of curvature estimation between high-curvature edge regions and sparse sampling regions in the middle.
[0025] Step 3: Construction of an individual nail microsurface geometric constraint model based on non-uniform sampling confidence-weighted curvature field and adaptive surface grading. In this embodiment, step three receives the nail surface point cloud data output from step one. The curvature adaptive sampling density field and phase position confidence, as well as the curvature of the central region output in step two. Edge curvature Longitudinal curvature Horizontal curvature Surface height difference Boundary contour Using multi-scale weighted normal vectors, a micro-surface geometric constraint model corresponding to the individual user's nail shape is constructed. Unlike existing technologies that employ fixed mesh resolution, uniform interpolation, and fixed strip division, this embodiment introduces the sampling density field from step one and the confidence information from step two to achieve high-precision surface reconstruction, curvature field construction, and adaptive surface grading under non-uniform point cloud conditions. Specifically, it includes the following sub-steps: (3.1) Using the nail surface point cloud obtained in step one Based on this, and combining the curvature adaptive sampling density field output from step one and the multi-scale curvature estimation confidence level output from step two, an adaptive triangulation method is used to construct a three-dimensional mesh surface model of the nail. Specifically, in the low-curvature and sparse point cloud region of the nail's middle, a larger grid cell size is used to suppress sparse sampling noise and reduce data volume; in the high-curvature and dense point cloud region of the nail's edge, a smaller grid cell size is used to preserve edge micro-curvature details. The preferred grid cell size is 0.1mm~0.5mm, and can be adjusted according to the edge curvature output in step two. and the height difference of the curved surface Dynamic adjustments are made. Optionally, the boundary contour extracted in step two is used. This serves as a hard constraint boundary in the reconstruction process, preventing the mesh from overflowing into the finger skin area. Through this method, a 3D mesh surface model that conforms to the individual nail shape and retains complete edge details is obtained. .
[0026] (3.2) In Establish a curvature field Where (x, y) are the coordinates of the nail surface on the unfolded plane. This represents the surface curvature value at that location. Unlike existing technologies that directly perform uniform interpolation on discrete curvature parameters, this embodiment uses the weighted curvature estimate of each sampling point output in step two. As interpolation node values, and with comprehensive weights Weighted interpolation is performed. The comprehensive weight... The phase position confidence from step one, the sampling density compensation weight from step one, and the multi-scale curvature consistency weight from step two are jointly determined, thereby automatically reducing the contribution of unreliable nodes in sparse sampling regions and high-noise edge regions. Curvature field The expression is: Where M is the number of sampling points involved in the interpolation. This is the weighted curvature estimate of the i-th sampling point obtained in step two. For the overall weighting, Φ is the radial basis kernel function, and ‖·‖ represents the Euclidean distance between planar coordinates. Through this weighted interpolation method, the curvature field remains smooth and continuous in the gentle region of the nail center, and retains sharp details in the high curvature region at the edge, providing a reliable geometric constraint for subsequent pattern generation.
[0027] (3.3) Based on the curvature field K(x,y) obtained in step (3.2), and combined with the boundary profile output in step two, Central region curvature K_center, edge curvature Longitudinal curvature Horizontal curvature and the height difference of the curved surface The nail surface is adaptively divided into multiple curved regions. In this embodiment, N strip regions are divided along the width of the nail, where N≥3. However, the strip boundaries are not fixed and equal, but are determined according to the curvature field. The gradient distribution is adaptively determined by reducing the number of stripes in the central region where curvature changes gently and increasing the number of stripes in the edge region where curvature changes sharply. Each strip region is assigned a surface level value, which is divided into 5 stages: surface level 1 corresponds to a region with less curvature and overall flatness, surface level 5 corresponds to a region with greater curvature, and surface level 3 corresponds to a general standard surface. The central region of the nail typically corresponds to surface levels 1-2, and the edge region corresponds to surface levels 4-5. Optionally, a continuous transition zone is set between adjacent surface levels to make the surface level change smoothly from low to high, avoiding abrupt changes in subsequent pattern arrangement. The surface level classification result can be used as a soft constraint in the subsequent dual-drive generation operation, and also as the triggering basis for the edge adaptive shrinkage strategy.
[0028] (3.4) The above triangular mesh surface model Non-uniform sampling confidence-weighted curvature field Adaptive surface classification results, boundary contours The multi-scale weighted normal vectors and curvature gradient fields are integrated to form a micro-surface geometric constraint model. The aforementioned As geometric constraint boundary conditions for subsequent pattern generation, the boundary contour As a hard constraint, it is used to prevent pattern overflow; curvature field The surface level is used as a soft constraint to control the size, density, transparency, and arrangement of pattern elements. This is achieved by fusing the sampling density, phase position confidence, and multi-scale curvature information from steps one and two into... In this model, the true microsurface structure of an individual's nail can be reflected more accurately, especially improving the reliability of geometric constraints in high-curvature edge regions and sparsely sampled central regions.
[0029] (3.5) In the micro-surface geometric constraint model Based on this, an inner bonding layer is generated that conforms to the shape of the nail surface. The outer contour of the inner bonding layer is consistent with the boundary contour extracted in step two. Consistent with its inner surface and triangular mesh surface model Conformal design ensures that the generated pattern fits snugly against the user's natural nail surface after output. Optionally, the thickness and flexibility of the inner bonding layer adaptively change according to the surface level obtained in step (3.3): in the flat area in the middle of the nail, the bonding layer is uniformly thick and can be slightly thicker to provide stable support; in the high curvature area at the edge, the bonding layer can be thinned or a micro-stress relief structure can be set to reduce the risk of edge lifting and non-fitting during bonding. Through the above bonding layer modeling, this embodiment considers the individual nail micro-curved surface geometric constraints and the subsequent pattern generation, output bonding process in a unified manner from the design source, avoiding the deformation, lifting, and non-fitting problems caused by designing a planar pattern first and then adapting it to the curved surface later in the prior art. Finally, step three combines the micro-curved surface geometric constraint model The corresponding bonding layer model is output to step four, where it is used to perform dual-drive generation operations with the user's semantic parsing results.
[0030] Step 4: Integrating prior knowledge of micro-surface geometric constraints with multi-granular analysis of user semantics and generation of structured design parameters. In this embodiment, step four follows the micro-surface geometric constraint model output from step three. The Including triangular mesh surface model Non-uniform sampling confidence-weighted curvature field Adaptive surface classification results, boundary contours And the bonding layer model; and optionally, the phase position confidence, curvature adaptive sampling density field, and multi-scale geometric feature parameters output from step one. Step four is used to receive the natural language semantic description input by the user, and to perform multi-granularity analysis and structured design parameter generation under the prior constraints of the individual nail micro-surface geometric constraints. Specifically, step four includes the following sub-steps: (4.1) The user inputs a semantic description through text input, voice input, or multimodal interaction. In this embodiment, the semantic description input by the user is "fresh starry sky, light blue gradient, and fine starlight pattern". Optionally, the user input may also include auxiliary information such as preference weights, desired regions, or taboo elements.
[0031] (4.2) The system performs word segmentation on the input semantics and extracts a keyword sequence. For the example above, the extracted keywords are: fresh, starry sky, light blue, gradient, fragmented, starlight, and pattern. Furthermore, the system categorizes the keywords according to semantic granularity such as theme, style, color, gradient, density, element, and arrangement to form a multi-granularity semantic unit sequence.
[0032] (4.3) Based on the pre-built style mapping knowledge base, keywords are mapped to style dimensions. Specifically, "fresh" is mapped to style tags: light, soft, low density; "starry sky" is mapped to theme tag: starry sky theme. Unlike existing technologies that only perform static text-to-tag mapping, this embodiment introduces the curvature field output in step three during style feature recognition. Using adaptive surface levels as geometric constraint priors, style labels undergo generability verification and regional weight adjustment. For example, for regions with high curvature at the edges, the weights of "low density" and "lightweight" labels are automatically increased to reduce the risk of subsequent patterns deforming or overflowing in the edge regions.
[0033] (4.4) Map keywords to design element dimensions. "Light blue" maps to the main color scheme: light blue family, hue range between 200° and 220°; "gradient" maps to color transition method: gradient fill; "fragmented" maps to element density: low density, small size; "starlight" maps to pattern element type: dotted light spots; "pattern" maps to arrangement method: distributed arrangement. Furthermore, this is combined with the micro-curved surface geometric constraint model output from step three. The geometric feasibility range of the above element parameters is corrected: in the middle region with a lower surface level, the dot-shaped light spots are allowed to maintain the reference size and reference density; in the edge region with a higher surface level, the upper limit of the size and density of the dot-shaped light spots is automatically limited, and the lower limit of transparency is increased, so that the semantic parsing results are adapted to the micro-surface structure of the individual nail before generation.
[0034] (4.5) Integrate the above analytical results into a structured design parameter set. This includes: theme = starry sky, main color = light blue, gradient = light blue gradient, pattern type = scattered starlight, style = fresh, element density = low, element size = small, and arrangement = distributed. Preferably, Each design parameter also carries a weight obtained by fusing the semantic mapping score and the geometric feasibility score. In this embodiment, the fusion weight of the j-th structured design parameter satisfies: in, The fusion weight for the j-th structured design parameter, The semantic mapping score is obtained based on the style mapping knowledge base. For the micro-surface geometric constraint model based on step three medium curvature field The geometric feasibility score is calculated based on the surface level, where α and β are fusion coefficients, and σ is the normalization function. Using this fusion weight, the output of step four... It not only reflects the user's semantic intent, but also integrates the prior geometric constraints of the individual nail micro-surface, providing regionalized and generatively constrained input parameters for the semantic-to-design parameter depth mapping in step five and the dual-drive generation operation in step six.
[0035] Step 5: Regionalized numerical translation of design parameters based on micro-surface curvature field and semantic fusion weights In this embodiment, step five receives the structured design parameter set output from step four. and its fusion weight And it takes over the micro-surface geometric constraint model output from step three. The Including triangular mesh surface model Non-uniform sampling confidence-weighted curvature field Adaptive surface classification results Boundary contour And the bonding layer model. Step five is used to further translate the structured semantic parameters output from step four into a set of numerical design parameters that can be directly used by the pattern generation algorithm. Unlike existing technologies that use a globally unified translation method, this embodiment performs regionalized, curvature-adaptive translation, so that the translated numerical design parameters themselves carry the individual nail micro-surface geometric constraint information. Specifically, step five includes the following sub-steps: (5.1) Translate "light blue" into the primary color light blue RGB (173, 216, 230), and the gradient auxiliary color as dark blue RGB (70, 130, 180), with the gradient direction transitioning from the center of the nail to the edge. Furthermore, combine this with the adaptive surface level classification results output in step three. In the central area with a lower curvature level, the dominant light blue color is maintained, while in the edge area with a higher curvature level, the proportion of dark blue secondary color is appropriately increased to create a visual gradient consistent with the slight undulations of the individual nail surface. Optionally, the color parameter translation also incorporates the blending weights output from step four. Color parameters with high semantic mapping scores and high geometric feasibility are given higher priority.
[0036] (5.2) Regionalized translation of starlight element geometric parameters. The "fragmented starlight" is translated into the geometric parameters of point elements: the reference point diameter ranges from 0.3mm to 0.8mm, the reference point spacing ranges from 1.5mm to 3.0mm, and the point element shapes include both circular and quadrangular star-shaped spots, with a transparency range of 60% to 90%. Furthermore, this is combined with the curvature field output from step three. Adaptive surface classification results The system generates a regionalized point diameter field, a regionalized point spacing field, and a regionalized transparency field: a reference point diameter and a reference point spacing are used in the low curvature region in the middle of the nail; in the high curvature region at the edge of the nail, the point diameter is adaptively reduced, the point spacing is increased, and the transparency is reduced, thereby completing the edge anti-deformation pre-adaptation during the translation stage.
[0037] (5.3) Translate the "light blue gradient" into a mathematical expression of a gradient curve. In this embodiment, a linear gradient function is used. Where t is the normalized position parameter, C1 is light blue, and C2 is dark blue. Further, the globally normalized position parameter t is extended to be influenced by the curvature field of step three. The modulated regional position parameter t(x,y) makes the gradient transition gentler in flat areas of the surface and more concentrated in curved areas, thereby avoiding color transition distortion in edge areas.
[0038] (5.4) Translate the "fresh" style into an element distribution density coefficient Dstyle=0.3, an element size scaling coefficient Sstyle=0.7, and an overall transparency baseline value αbase=0.75. Further, combine the above style coefficients with the fusion weights output from step four. And the adaptive surface level classification results output in step three. The process involves fusion to generate a regionalized style coefficient field, maintaining a fresh, low-density, and uniform effect in the central area of the nail, while further reducing the density and size of the nail edge area.
[0039] (5.5) Integrate the above regionalized translation results into a numerical design parameter set. The aforementioned This includes global baseline parameters and regionalized parameter fields. In this embodiment, for any position (x, y) on the nail surface, the value P_j(x, y) of the j-th design parameter satisfies: in, This is the baseline value corresponding to the j-th structured semantic parameter output in step four. The curvature sensitivity coefficient is related to the parameter type. The fusion weights are the output of step four. For the curvature field based on step three The normalized curvature value is obtained through normalization. Using this formula, design parameters such as color, dot diameter, dot spacing, transparency, density, and size adaptively change with the curvature of the individual nail's micro-surface and are modulated by semantic fusion weights. This results in a set of numerical design parameters that both conform to the user's semantic intent and adapt to the individual nail's micro-surface geometry. This is used for the dual-drive generation operation in step six.
[0040] Step Six: Adaptive Generation of Geometric-Semantic Dual-Driven Pattern Elements and Fusion of Boundary Constraints Based on the Generative Potential Field of Micro-Surfaces In this embodiment, step six follows the micro-surface geometric constraint model output from step three. The Including triangular mesh surface model Non-uniform sampling confidence-weighted curvature field Adaptive surface classification results Boundary contour Multi-scale weighted normal vector field and inner bonding layer model; simultaneously receiving the regionalized numerical design parameter set output from step five. The This includes a color parameter field, a dot diameter field, a dot pitch field, a transparency field, a gradient parameter field, and a regional style coefficient field; and optionally, it can accept the semantic fusion weights output from step four. And the phase position confidence and sampling density compensation information output from steps one and two. Step six will... Import the pattern generation algorithm and load it simultaneously. The dual-drive generation operation, driven by both geometry and semantics, is initiated. Unlike existing technologies that simply multiply or weightedly add geometric constraints and semantic parameters, this embodiment constructs a micro-surface generative potential field, unifying curvature constraints, boundary constraints, surface levels, semantic fusion weights, and bonding layer stress constraints into a pattern element placement decision field. This achieves dual-drive fusion where generation is immediate adaptation and arrangement is immediately deformation-resistant. Specifically, step six includes the following sub-steps: (6.1) Construction of the potential field for the generation of micro-surfaces. Using a micro-surface geometric constraint model... curvature field in Adaptive surface level Boundary contour Based on the inner bonding layer model, a micro-surface generative potential field is constructed. The potential field This characterizes the comprehensive geometric generativeability of placing pattern elements at any position (x, y) on the nail surface. Specifically, a larger curvature value indicates a higher surface grade and lower generativeability; the closer to the boundary contour, the greater the risk of boundary overflow and the lower the generativeability; the generativeability also decreases accordingly in stress concentration areas of the bonding layer. The potential field... It serves as a unified geometric constraint for the size, density, transparency, and placement order of subsequent pattern elements, replacing the existing technology that uses only curvature values as a single constraint boundary, thus simultaneously addressing edge overflow prevention, surface deformation prevention, and edge warping prevention.
[0041] (6.2) Regionalized parameter field loading. Using the numerical design parameter set output from step five. As generation rules, the type, color, shape, transparency, distribution probability, and arrangement of pattern elements are determined. Specifically, for any position (x, y) on the nail surface, from... The system reads the corresponding regional point diameter, regional point distance, regional transparency, gradient color value, and style coefficient. The regional parameter field has already undergone curvature adaptive pre-translation in step five; therefore, the baseline parameters output by the semantically driven module already carry individual nail micro-surface geometric constraint information, rather than globally uniform parameters.
[0042] (6.3) Curvature-Semantic Coupling and Hard Boundary Constraint Fusion. A curvature-semantic coupling approach is used to perform collaborative computation between geometric and semantic driving. For the i-th pattern element to be placed, its semantic driving baseline parameter is denoted as... The Includes the element's base size, base density, base transparency, and base color. Geometry-driven positioning is based on the element's intended placement. A potential field can be generated on a micro-curved surface at a given location. A geometric correction coefficient is generated. This coefficient decreases monotonically with increasing normalized curvature, normalized surface level, boundary distance, and bonding layer stress. Simultaneously, the semantic fusion weights output from step four are introduced. Confidence enhancement is applied to semantically driven baseline parameters: design parameters with higher semantic mapping scores and geometric feasibility scores have greater weights and play a more dominant role in the fusion process. Furthermore, boundary contours... As a hard constraint, when the intended placement position of an element is less than the safe distance from the boundary, a forced size shrinkage, reduced transparency, and fine-tuning of the normal direction are triggered to ensure that the pattern does not overflow the nail boundary. In this embodiment, the final generation parameter Θ_i of the i-th pattern element satisfies the following formula: ; in, This is the final generation parameter vector for the i-th pattern element, containing the final size, final density, final transparency, and final color offset. A baseline parameter vector determined for semantic driving; For position The normalized curvature value at that point; Normalized surface grade value; For position To the boundary contour The shortest distance, To establish a preset safe distance; This represents the normalized value of the bonding layer stress. The semantic fusion weights are the output of step four; , , , These are the curvature sensitivity coefficient, surface level sensitivity coefficient, boundary distance sensitivity coefficient, and bonding layer stress sensitivity coefficient, respectively; η is the semantic weight enhancement coefficient. Through this formula, geometric constraints act on the semantic baseline parameters in an exponentially decaying manner. The greater the curvature, the higher the surface level, the closer to the boundary, and the more concentrated the bonding layer stress, the smaller the final size, the lower the density, the lower the transparency, and the more the color shift tends to converge towards the edge. The higher the semantic fusion weight, the more fully the semantic intent is preserved. The described dual-drive fusion strategy is no longer a simple size multiplication, but rather incorporates curvature, surface level, boundary distance, bonding layer stress, and semantic confidence into an exponential fusion framework, thereby simultaneously achieving semantic expression, surface adaptation, edge overflow prevention, and bonding warping prevention during the generation stage.
[0043] (6.4) After dual-drive fusion, the algorithm is applied to the nail surface model. Based on the generative potential field of the micro-curved surface Pattern elements are placed iteratively from high to low. Each placement calculates the final generation parameter Θ_i in real time based on the actual curvature value, surface level, boundary distance, and bonding layer stress at that location, and fine-tunes it along the multi-scale weighted normal vector direction to ensure the pattern element conforms to the surface curvature. For the central low-curvature, high-generability region, star elements are evenly and naturally arranged with a reference size and spacing; for the edge high-curvature, low-generability region, star elements automatically undergo size shrinkage, spacing increase, transparency reduction, and normal direction fine-tuning. The local generatorability potential field is updated after each placement to avoid element overlap or excessively high local density. Iteration continues until the entire nail surface area is covered or a preset number of elements is reached. Through this potential field-guided iterative generation, this embodiment adapts to the individual nail's micro-curved surface structure from the design source, avoiding deformation, lifting, and non-adherence issues during later bonding.
[0044] Step 7: Adaptive arrangement and edge stress relief correction of star patterns guided by the potential field gradient of micro-curved surfaces In this embodiment, step seven follows the iterative generation results of the pattern elements output in step six and the micro-surface generative potential field constructed in step six. And further call the micro-surface geometric constraint model output in step three. curvature field in Adaptive surface classification results Boundary contour The multi-scale weighted normal vector field and inner bonding layer model, as well as the regionalized numerical design parameter set output from step five. Step seven is used to adaptively adjust the arrangement and correct edge deformation of the star pattern based on the curvature distribution characteristics of the nail surface and the stress distribution characteristics of the bonding layer during and after the dual-drive generation operation. Unlike the existing technology that simply scales the pattern segment by curvature, this embodiment introduces a continuous arrangement correction mechanism guided by a generative potential field gradient and a bonding layer stress release mechanism, enabling a continuous transition of arrangement parameters between the center and edge of the nail, and achieving synergistic optimization of deformation suppression and stress release in the high curvature region at the edge. Specifically, step seven includes the following sub-steps: (7.1) The central region of the nail corresponds to surface level 1~2 and a generative potential field. In the high-value area, the starlight pattern in this area follows the regionalized numerical design parameter set output in step five. The reference size, reference spacing, and reference transparency are uniformly and naturally arranged. Specifically, the dot-shaped light spots are distributed with reference size S_base and reference spacing D_base, while maintaining the semantic design density D_semantic unchanged. Simultaneously, based on the multi-scale weighted normal vector field output in step three, the dot-shaped light spots are kept aligned with the normal direction of the central region to ensure visual uniformity in the central region. Optionally, the arrangement order in the central region follows the generative potential field. Place them in order from high to low, prioritizing the arrangement quality of the visual center area.
[0045] (7.2) The surface level corresponding to the edge region of the nail is 4~5, and the potential field is generative. In the low-value region, the starlight pattern is adaptively adjusted according to four rules: size shrinkage, spacing increase, transparency reduction, and normal direction fine-tuning. Each adjustment is based on the final generation parameter Θ_i output from step six and guided by the gradient of the generative potential field, avoiding abrupt arrangement changes caused by fixed stripe threshold switching in existing technologies. Specifically: Size shrinkage: The size of the dotted light spot is determined according to... To contract, among which Based on the standard dimensions, For the curvature field based on step three The normalized curvature value is obtained by normalization, where α is the contraction coefficient, and its value ranges from 0.3 to 0.7.
[0046] Increased spacing: The spacing between the dotted light spots is increased according to... Increase, among which β is the baseline spacing, and β is the spacing adjustment coefficient, with a value range of 0.2 to 0.5.
[0047] Reduced transparency: The transparency of the dotted light spots at the edges is adjusted according to... To reduce, among which The baseline transparency is γ, which is the transparency adjustment coefficient, ranging from 0.1 to 0.3, to make the edge pattern transition naturally visually.
[0048] Fine-tuning of normal direction: The pattern elements in the edge region are fine-tuned along the direction of the multi-scale weighted normal vector output in step three, so that the pattern fits the curvature of the surface and avoids the pattern projection deviation caused by the curvature of the surface.
[0049] Furthermore, the aforementioned edge adjustments are not solely based on normalized curvature. Instead, it simultaneously combines the micro-surface generative potential field constructed in step six. The gradient information and the stress distribution information of the bonding layer output in step three are used. When the potential gradient of the generative potential field at a certain edge position is large or the stress of the bonding layer is concentrated, the size shrinkage range, the spacing increase range, and the transparency decrease range are automatically increased, thereby releasing the edge bonding stress in the generation stage and reducing the risk of edge warping later.
[0050] (7.3) A transition region is set between the central region and the edge region. The width and position of the transition region are determined by the generative potential field in step six. The gradient is adaptively determined, rather than fixedly divided equally. Within the transition region, a smooth interpolation method based on the potential field gradient is used to achieve a continuous transition of the arrangement parameters from the baseline value to the edge adjustment value, avoiding abrupt changes in arrangement and visual discontinuities. Specifically, within the transition region, the arrangement parameters change continuously along the direction of the generative potential field gradient according to a smooth function, so that the size, spacing, and transparency of the star pattern form a natural gradient in space.
[0051] (7.4) During the arrangement of pattern elements, it is determined in real time whether the elements exceed the boundary contour extracted in step two and introduced as a hard constraint in step three. For elements near the boundary, automatic clipping or shrinking is performed to ensure the pattern does not overflow the nail boundary. Furthermore, the inner bonding layer model output from step three is combined with the generative potential field from step six to perform stress relief co-correction on the edge region: at the boundary contour... A stress relief zone is set up nearby. Within the stress relief zone, the size, density, and transparency of the dotted light spots are determined according to the generative potential field. The stress distribution in the bonding layer is attenuated in a coordinated manner. In this embodiment, for the i-th pattern element within the stress relief zone, its comprehensive correction coefficient satisfies the following formula: ; in, This is the comprehensive correction coefficient for the i-th pattern element, used to simultaneously correct its size, density, and transparency; For position The normalized curvature value at that point; For a generative potential field at position The normalized gradient magnitude at the location; \tilde{S}_i is the normalized stress value of the bonding layer; For position To the boundary contour The shortest distance, To establish a preset safe distance; These are the curvature sensitivity coefficient, potential field gradient sensitivity coefficient, bonding layer stress sensitivity coefficient, and boundary distance sensitivity coefficient, respectively. According to this formula, the greater the geometric curvature, the steeper the generative potential field gradient, the more concentrated the bonding layer stress, and the closer to the boundary, the smaller the overall correction coefficient. This results in a more significant attenuation of pattern element size, density, and transparency, thus simultaneously achieving edge deformation prevention, overflow prevention, and edge lifting prevention within the same correction framework. This method adapts to the individual nail's micro-curved surface structure from the design source, avoiding deformation, lifting, and non-adherence issues during later bonding.
[0052] Step 8: Conformal unfolding and multimodal printing data output based on the synergy of generative potential field and bonding layer stress. In this embodiment, step eight takes the pattern element data output from step seven after adaptive arrangement and edge anti-deformation correction, and further calls the micro-curved surface geometric constraint model output from step three. The Including triangular mesh surface model Non-uniform sampling confidence-weighted curvature field Adaptive surface classification results Boundary contour Multi-scale weighted normal vector field and inner bonding layer model; simultaneously calling the micro-surface generative potential field constructed in step six. and the regionalized numerical design parameter set output in step five. Step eight converts the pattern data corrected in step seven into a final, outputtable nail art pattern. During unfolding and output, it maintains the visual proportions of the pattern on the curved surface and reduces stress concentration in the adhesive layer, thus ensuring that the printed design does not deform or curl. Specifically, step eight includes the following sub-steps: (8.1) Integrate all pattern elements generated by the dual-drive mechanism and adaptively corrected in step seven into a complete pattern dataset. The pattern dataset contains the following information for each element: three-dimensional spatial coordinates (x, y, z), color value, size, shape type, transparency value, normal direction, and the generative potential field value corresponding to that location. The normalized stress value of the bonding layer and the semantic fusion weights output from step four. By attaching the generative potential field value and the bonding layer stress value to each pattern element, subsequent unfolding and printing output can perceive the geometric constraints of the individual nail's micro-curved surface and the bonding stress distribution, rather than passively transforming it based solely on geometric coordinates.
[0053] (8.2) The three-dimensional curved surface pattern data is topologically unfolded into two-dimensional pattern data, establishing the correspondence between each point of the pattern and each point of the nail surface, as well as the correspondence between the color of each point of the pattern and each point of the nail. Unlike the simple equal-area unfolding or uniform parameterized unfolding methods used in the prior art, this embodiment uses stress-sensing area-preserving topological unfolding. During the unfolding process, the micro-surface generative potential field output in step six is used. Based on the stress distribution of the inner bonding layer output in step three, active compensation is performed for the local scaling of the unfolded mapping. Specifically, in the high-curvature edge region where the generative potential field is low and the bonding layer stress is concentrated, the local area compensation factor of the unfolded mapping is appropriately increased so that the pattern area of this region on the two-dimensional plane is slightly larger than its geometric projection area, in order to compensate for the stretching deformation during subsequent bonding of the curved surface; in the flat central region where the generative potential field is high and the bonding layer stress is low, the area compensation factor is kept close to 1 to ensure that the visual proportion is not distorted. In this embodiment, the unfolded mapping from the three-dimensional curved surface point (x,y,z) to the two-dimensional plane point (u,v) satisfies the following local area compensation relationship: ; in, To expand the Jacobian matrix of the mapping, This is the local area scaling factor; The potential field for the generation of micro-surfaces output in step six; ε is the area compensation strength coefficient, with a value ranging from 0.1 to 0.5; ε is a small value to prevent division by zero, with a value ranging from 10⁻. 6 ~10⁻³. This formula ensures that the unfolded 2D pattern achieves adequate area compensation in high-stress areas at the edges, maintaining visual proportions consistent with the design after fitting to the curved surface. This avoids visual compression or stretching of the edge pattern due to surface curvature. The unfolding process also maintains topological continuity, ensuring a one-to-one correspondence between each point of the pattern and each point on the nail surface.
[0054] (8.3) Convert the unfolded 2D pattern data into a print data format executable by the target device. Specifically, this includes: converting the print data to CMY or CMYK color channels to adapt to UV printers or inkjet printers; generating inkjet path data to determine the spatial 3D position of each graphic element and the driving instructions of the coating mechanism; and for 3D printing devices, generating 3D model data containing pattern layers. Optionally, the local area compensation factor obtained in step (8.2) can be added to the print data to enable the printing device to automatically adjust the ink droplet density or spray volume in the edge area, further compensating for visual deformation during surface bonding.
[0055] (8.4) Before outputting, generate a preview image of the nail surface pattern for user confirmation. The preview image is based on the triangular mesh surface model output in step three. The model is rendered along with the inner bonding layer model to present a realistic visual representation of the pattern on the curved surface. Optionally, a generative potential field heat map and a bonding layer stress heat map can be overlaid, allowing users to intuitively understand the arrangement and adjustment of the edge areas. After user confirmation, the final print data is output.
[0056] Step Nine: Multimodal Interactive Closed-Loop Optimization Based on Digital Twin Quality Assessment and Potential Field Feedback In this embodiment, step nine takes the final printed data and preview results output from step eight and further calls the micro-surface geometric constraint model output from step three. Step 6: Generative potential field of micro-surfaces and the semantic fusion weights output in step four Step nine provides a multimodal interaction correction and closed-loop feedback mechanism during pattern generation and output, and achieves continuous optimization of the generation strategy through digital twin quality assessment. Specifically, step nine includes the following sub-steps: (9.1) During the preview stage, users can modify the generated pattern via touch, voice, or text. Modification types include: adjusting the main color tone, modifying the gradient direction, increasing or decreasing starlight density, and adjusting the element size range. After receiving the modification command, the system parses it into modifications to the semantic parameters of step four and the design parameter set of step five. Alternatively, step six can generate a potential field. The adjustment amount. Specifically, if the correction involves changes in semantic intent, return to step four to re-parse the semantic parameters; if the correction involves fine-tuning of numerical parameters, return to step five to modify the design parameter set; if the correction involves edge arrangement morphology, directly adjust the generative potential field in step six. Perform local corrections and re-execute the generation process from steps six to eight. By mapping user interaction corrections to potential field adjustment quantities, the interaction corrections and geometric constraints are coordinated, rather than simply overwriting the generated results.
[0057] (9.2) The system automatically evaluates the quality of the generated pattern. The evaluation indicators include: edge overflow rate, which is the percentage of the pattern area that exceeds the boundary to the total area of the pattern; surface adaptation, which is the matching degree between the size of the pattern element and the curvature of its location; semantic consistency, which is the matching degree between the generated pattern and the user's semantic description; and bonding stress concentration, which is the statistical peak value of the normalized stress of the bonding layer in the edge region. The system constructs a digital twin quality score based on the above indicators and compares the score with a preset threshold. When the evaluation indicators are lower than the preset threshold, the system automatically adjusts the dual-drive fusion parameters, including the curvature sensitivity coefficient λ_K, surface level sensitivity coefficient λ_L, boundary distance sensitivity coefficient λ_B, bonding layer stress sensitivity coefficient λ_S, and semantic weight enhancement coefficient η in step six, and re-executes the generation operations of steps six to eight.
[0058] (9.3) The system records user correction records and quality assessment results for each generation, forming a mapping dataset of generation parameters and user feedback. During subsequent generation, the system automatically optimizes the weighting coefficients, correction function parameters, and the generative potential field from step six in the dual-drive fusion strategy based on this dataset. The system constructs parameters to continuously improve the quality of generated nails. Optionally, the system constructs a digital twin model of each individual nail, storing the surface geometric constraints, semantic parameters, potential field distribution, bonding layer stress, and quality assessment results associated with each generation. This allows subsequent generation for the same user to directly call upon historical optimization results, enabling the continuous evolution of personalized generation strategies. Through the above closed-loop optimization, this embodiment not only adapts to the micro-curved surface structure of individual nails from the design source, avoiding deformation, lifting, and non-adherence issues during later bonding, but also continuously improves generation accuracy and user experience with increased usage.
[0059] On the other hand, this embodiment also provides an electronic device, including a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.
[0060] On the other hand, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.
[0061] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An adaptive nail art pattern generation method based on nail micro-surfaces and semantic-driven principles, characterized in that, include: Acquire three-dimensional point cloud data of the user's natural nail surface, and simultaneously acquire sampling density information and phase position reliability information during the acquisition process of this three-dimensional point cloud data; Based on the three-dimensional point cloud data, the sampling density information, and the phase position confidence information, multi-scale geometric features of the user's natural nail surface are extracted; Based on the three-dimensional point cloud data, the sampling density information, the phase position confidence information, and the multi-scale geometric features, a micro-surface geometric constraint model of the user's natural nail is constructed. The system receives semantic descriptions input by the user and performs multi-granularity analysis on the semantic descriptions based on the micro-surface geometric constraint model to generate structured design parameters. Based on the micro-surface geometric constraint model and the structured design parameters, regionalized numerical design parameters are generated; Based on the microsurface geometric constraint model and the regionalized numerical design parameters, a microsurface generative potential field is constructed, and a dual-driven pattern element generation based on the microsurface generative potential field is performed using both geometric and semantic driving methods. Based on the potential field of the micro-surface and the stress information of the bonding layer in the geometric constraint model of the micro-surface, the generated pattern elements are adaptively arranged and edge-corrected. The corrected pattern element data is mapped to the micro-surface geometric constraint model, and shape-preserving unfolding is performed to output the printing data.
2. The method according to claim 1, characterized in that, The acquisition of three-dimensional point cloud data of the user's natural nail surface includes: Structured light stripes are projected onto the surface of the user's natural nails using a structured light projection camera device; Based on the pre-collected coarse positioning information or prior nail morphology model, the curvature distribution of the nail surface is estimated, and according to the curvature distribution, a lower spatial frequency and wider stripes are used in the middle region of the nail, and a higher spatial frequency and narrower stripes are used in the edge region of the nail. The deformed stripe image modulated on the nail surface is acquired, the phase is calculated, and the three-dimensional coordinates of each sampling point on the nail surface are obtained by combining the system calibration parameters to generate nail surface point cloud data. Image frame registration and motion compensation are performed during the acquisition process.
3. The method according to claim 2, characterized in that, Extracting multi-scale geometric features from the surface of the user's natural nails, including: Taking each sampling point in the nail surface point cloud data as the center, the local neighborhood scale is adaptively determined based on the sampling density information; A comprehensive weight is constructed based on distance weight, phase position confidence weight, and sampling density compensation weight, and a weighted covariance matrix is then constructed. The weighted covariance matrix is decomposed into eigenvalues to obtain the local normal vector and principal curvature direction, and the maximum and minimum curvatures are calculated. The curvature parameters of the central region and the edge curvature parameters are obtained based on the maximum curvature and the minimum curvature; The cross-sectional curves are extracted along the longitudinal and transverse directions of the nail, and the longitudinal and transverse radii are obtained by fitting based on the local normal vector and curvature information; The surface elevation difference is calculated based on the nail surface point cloud data, and the boundary contour is extracted after segmentation and flattening from the nail surface point cloud data.
4. The method according to claim 3, characterized in that, Constructing the micro-surface geometric constraint model of the user's natural nail includes: Based on the nail surface point cloud data, the sampling density information and the multi-scale curvature estimation confidence, an adaptive triangulation method is used to construct a three-dimensional mesh surface model, wherein the central low curvature region uses a larger mesh cell size and the edge high curvature region uses a smaller mesh cell size, and the boundary contour is used as a hard constraint boundary. On the three-dimensional mesh surface model, the weighted curvature estimate of each sampling point is used as the interpolation node, and weighted interpolation is performed using a comprehensive weight determined by phase position confidence, sampling density compensation weight and multi-scale curvature consistency weight to construct the curvature field; Based on the gradient distribution of the curvature field, multiple strip regions are adaptively divided along the width direction of the nail, and a surface level is assigned to each strip region; A microsurface geometric constraint model is generated based on the three-dimensional mesh surface model, the curvature field, the surface level, the boundary contour, and the multi-scale weighted normal vector; An inner bonding layer model conforming to the nail surface is generated based on the micro-curved surface geometric constraint model.
5. The method according to claim 4, characterized in that, Based on the micro-surface geometric constraint model, the semantic description is analyzed at multiple granularities to generate structured design parameters, including: The semantic description input by the user is segmented and keywords are extracted, and then classified according to at least one semantic granularity among theme, style, color, gradient, density, element and layout to obtain a multi-granularity semantic unit sequence. Map keywords to style tags and / or topic tags based on the style mapping knowledge base; Based on the curvature field and surface level in the microsurface geometric constraint model, the style tags and / or topic tags are adjusted with regionalized weights. Keywords are mapped to design element parameters, and the geometric feasibility range of the design element parameters is corrected according to the micro-surface geometric constraint model. The adjusted and corrected results are integrated into a set of structured design parameters, and each structured design parameter is assigned a fusion weight obtained by fusing semantic mapping scores and geometric feasibility scores.
6. The method according to claim 5, characterized in that, Based on the micro-surface geometric constraint model and the structured design parameters, regionalized numerical design parameters are generated, including: The color parameters in the structured design parameters are translated into color values, and a regionalized color parameter field is generated based on the surface level and the fusion weight. The element parameters in the structured design parameters are translated into reference point diameter, reference point distance, and reference transparency, and a regionalized point diameter field, a regionalized point distance field, and a regionalized transparency field are generated based on the curvature field and the surface level. The gradient parameters are translated into gradient functions, and the globally normalized position parameters are modulated into regionalized position parameters according to the curvature field. The style parameters are translated into element distribution density coefficients, element size scaling coefficients, and overall transparency baseline values, and then combined with the fusion weights and the surface level to generate a regionalized style coefficient field. A numerical design parameter set is generated based on the regionalized color parameter field, the regionalized point diameter field, the regionalized point distance field, the regionalized transparency field, the regionalized position parameter, and the regionalized style coefficient field.
7. The method according to claim 6, characterized in that, The construction of a micro-surface generative potential field, and the generation of dual-driven pattern elements based on the micro-surface generative potential field using both geometric and semantic driving methods, includes: Based on the curvature field, surface level, boundary contour, and inner bonding layer model in the micro-surface geometric constraint model, a micro-surface generative potential field is constructed to characterize the degree to which pattern elements can be placed at various positions on the nail surface. The larger the curvature value, the higher the surface level, the closer to the boundary contour, or the more concentrated the stress in the bonding layer, the lower the micro-surface generative potential field. The type, color, shape, transparency, distribution probability, and arrangement of pattern elements are determined based on the numerical design parameter set. For each pattern element to be placed, a geometric correction coefficient is generated based on the micro-surface generative potential field at its intended placement location. The confidence of the semantically driven benchmark parameters is enhanced based on the fusion weight. The boundary contour is used as a hard constraint. When the intended placement location is less than the safe distance from the boundary, size shrinkage, transparency reduction, and normal direction fine-tuning are triggered. Based on the corrected and enhanced parameters, pattern elements are iteratively placed on the three-dimensional mesh surface model in descending order of the microsurface generative potential field, and the local microsurface generative potential field is updated after each placement.
8. The method according to claim 1, characterized in that, The adaptive arrangement and edge correction of the generated pattern elements include: In the central region where the surface level is low and the potential field for micro-surface generation is high, the pattern elements are arranged according to the reference size, reference spacing and reference transparency, and maintain a consistent orientation along the multi-scale weighted normal vector direction; In the edge region where the surface level is high and the potential field for microsurface generation is low, the pattern elements are controlled to perform size shrinkage, spacing increase, transparency decrease and normal direction fine adjustment based on the normalized curvature value and the gradient of the potential field for microsurface generation. In the transition region between the central and edge regions, smooth interpolation is performed based on the gradient of the potential field that can generate micro-surfaces, so that the arrangement parameters change continuously. A stress relief zone is set near the boundary contour. Based on the normalized curvature value, the gradient modulus of the potential field for micro-curved surface generation, the normalized stress value of the bonding layer, and the distance to the boundary contour, the size, density, and transparency of the pattern elements within the stress relief zone are collaboratively corrected.
9. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, characterized in that, When the processor executes the computing program, it implements the method of any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-8.
