Processing method and device for transferring and fusing local features of three-dimensional model and storage medium

By combining SVD and Taubin bidirectional smoothing algorithms with adjacency list caching, the problems of registration accuracy and efficiency in local feature transfer of 3D models are solved, realizing high-precision and automated local feature transfer and fusion of 3D models while maintaining the geometric continuity and data integrity of the model.

CN121746594BActive Publication Date: 2026-07-03TIANXIANG RUIYI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIANXIANG RUIYI
Filing Date
2025-12-18
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing methods for transferring local features of 3D models suffer from problems such as low registration accuracy, poor computational efficiency, model shrinkage, geometric discontinuities, and difficulty in parameter adjustment, making it difficult to meet the requirements of high precision, high efficiency, and automation.

Method used

Singular Value Decomposition (SVD) is used to achieve globally optimal rigid registration. Combined with Taubin's bidirectional smoothing algorithm and adjacency list caching mechanism, high-precision and automated local feature transfer and fusion of 3D models are achieved through centroid normalization, covariance matrix construction, multi-level region expansion and bidirectional smoothing iteration.

Benefits of technology

It achieves high-precision model registration, improves computational efficiency, prevents model shrinkage, maintains geometric continuity and data integrity, reduces human intervention, is highly adaptable, and is suitable for irregular grids and noisy data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746594B_ABST
    Figure CN121746594B_ABST
Patent Text Reader

Abstract

This invention discloses a method for local feature transfer and fusion of a 3D model, belonging to the field of 3D reconstruction technology. The method includes: loading and parsing the original model and the target model; constructing and caching a mesh topology adjacency list to achieve O(1) complexity neighbor lookup; selecting the corresponding boundary control circle and performing centroid normalization; calculating the optimal rotation matrix through singular value decomposition of the covariance matrix, and constructing a rigid transformation matrix by combining an adaptive scaling factor; replacing the vertices of the local region of the transformed target model with those of the original model to generate a fused model; performing multi-level expansion of the splicing region based on the adjacency list, and applying Taubin forward and reverse smoothing iterations to eliminate seams. This invention ensures registration accuracy and global optimality through SVD decomposition, effectively prevents model volume shrinkage through Taubin bidirectional smoothing, and significantly improves computational efficiency through the adjacency list caching mechanism, achieving high-quality, high-efficiency, and automated local feature transfer and fusion of a 3D model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer graphics and 3D reconstruction technology, and specifically relates to a method for processing local feature transfer and fusion of 3D models. Background Technology

[0002] With the rapid development of technologies such as virtual reality, digital humans, and metaverse, the demand for personalized customization of 3D models is increasing. In fields such as game development, film and television special effects, and medical image processing, it is often necessary to accurately transfer local features (such as facial features and body parts) of one 3D model to another model while maintaining geometric continuity and visual naturalness.

[0003] Traditional methods for transferring regions of a 3D model mainly include direct replacement, deformation-based methods, and registration-based methods.

[0004] While the direct replacement method is simple to implement, it can cause obvious geometric breaks at the seams, resulting in abrupt changes in normals and discontinuities in curvature, leading to serious visual defects during rendering, such as the boundary between light and shadow.

[0005] Deformation-based methods achieve region fusion through mesh deformation, but they are poorly adaptable to models with complex topologies and are difficult to adjust parameters, requiring a lot of manual intervention.

[0006] Registration-based methods use the Iterative Closest Point (ICP) algorithm for alignment, but they suffer from slow convergence, are prone to getting trapped in local optima, and have high computational costs. They are inefficient when dealing with large-scale models and cannot meet the needs of real-time applications.

[0007] In terms of smoothing, while traditional Laplacian smoothing algorithms can eliminate geometric discontinuities, they cause vertices to move towards their neighboring centroids, leading to significant model volume shrinkage and severe loss of geometric details after iterations. Existing methods also lack effective anti-shrinkage mechanisms; after multiple iterations, the model surface noticeably shrinks, especially in high-curvature regions. Furthermore, traditional algorithms require repeated calculations of mesh topology and adjacency information, necessitating data structure reconstruction for each operation, resulting in significant repetitive computation and a time complexity as high as O(n²). For a 5000-vertex model, a single registration takes approximately 0.5 seconds, severely impacting real-time performance and interactivity. Moreover, the lack of adaptive mechanisms makes parameter tuning difficult. Parameters such as smoothing intensity and iteration count need to be manually adjusted for each model, heavily relying on human experience and making it difficult to guarantee consistent quality during batch processing. Regarding data integrity, traditional methods only save vertex coordinates and face relationships, losing texture coordinates, normals, and material information, requiring subsequent UV unwrapping and texture baking. They also perform poorly on irregular meshes and noisy models, are sensitive to topological errors, lack fault tolerance mechanisms, and have limited applicability.

[0008] Therefore, there is an urgent need for a method that can achieve high-precision, high-efficiency, and automated local feature transfer and fusion of 3D models to overcome the above-mentioned shortcomings. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a processing method, device and storage medium for local feature transfer and fusion of three-dimensional models, so as to solve the technical problems of low registration accuracy, poor computational efficiency, model shrinkage, geometric discontinuity and difficulty in parameter adjustment in traditional methods.

[0010] To achieve the aforementioned objectives, a first aspect of the present invention provides a method for processing local feature transfer and fusion of a three-dimensional model. This method achieves globally optimal rigid registration through singular value decomposition (SVD), effectively prevents model shrinkage using the Taubin bidirectional smoothing algorithm, and significantly improves computational efficiency by introducing an adjacency list caching mechanism. The method mainly includes the following steps:

[0011] I. Data Loading and Parsing: Obtain the OBJ files of the original model and the target model, parse the vertex coordinates and face information, and perform data validity verification.

[0012] II. Adjacency List Construction and Caching: The grid topology adjacency list is constructed and cached in one go, optimizing the time complexity of vertex neighbor lookup to O(1).

[0013] III. Boundary and Region Definition: Select the corresponding boundary control circles in the original model and the target model, and verify the legality of the transfer region index.

[0014] IV. Centroid Normalization: Calculate the centroid of the boundary control circle and perform coordinate system decentering to eliminate translation components.

[0015] V. SVD Optimal Registration: Construct the covariance matrix of the source and target point sets, and perform singular value decomposition (SVD) to calculate the optimal rotation matrix. And perform orthogonality verification and mirror correction.

[0016] VI. Adaptive Scaling: The scaling factor is adaptively calculated based on the ratio of the Frobenius norms of the point sets, and a coefficient is introduced. Avoid excessive expansion of boundaries.

[0017] VII. Rigid Transformation and Application: Combine rotation, scaling and translation to construct a complete rigid transformation matrix and apply it to the original model.

[0018] 8. Region Replacement and Fusion: Replace the vertices of local regions of the transformed target model with the corresponding positions of the original model to generate a fused model.

[0019] 9. Multi-level smooth region expansion: Based on a cached adjacency list, multi-level region expansion is performed starting from the splicing boundary to determine the smooth range.

[0020] 10. Taubin bidirectional smoothing: Alternating Taubin forward smoothing iterations over the smoothed region. and reverse smoothing iteration , This eliminates seams while maintaining the model's volume.

[0021] XI. Effect Verification and Saving: Verify the geometric continuity, curvature consistency and volume retention of the smoothing effect, and finally save the blended model, fully preserving the original normals, textures and other additional information.

[0022] A second aspect of the present invention provides an electronic device, comprising: a processor, and a memory connected to the processor; the memory storing instructions executable by the processor, wherein the instructions, when executed by the processor, implement the steps of the processing method for local feature transfer and fusion of a three-dimensional model as described in the first aspect above.

[0023] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program causing a computer to perform the steps of the three-dimensional model local feature transfer and fusion processing method described in the first aspect.

[0024] Compared with existing technologies, the processing method, device, and storage medium for local feature transfer and fusion of three-dimensional models disclosed in this invention achieve the following technical effects:

[0025] 1. High-precision and deterministic registration: Global optimal rigid registration is achieved through SVD decomposition, overcoming the problems of ICP algorithm being sensitive to initial position and easily getting trapped in local optima.

[0026] 2. Significantly improved computational efficiency: By building and caching the adjacency table once, the neighbor query is optimized to O(1) time complexity, avoiding repeated calculations, reducing the total processing time and improving registration efficiency.

[0027] 3. Effectively prevents model shrinkage: Taubin forward and reverse smoothing iterations are adopted. Forward smoothing eliminates high-frequency noise, and reverse smoothing compensates for volume loss, so that the volume change rate of the model is small after smoothing and the geometric details are preserved.

[0028] 4. Achieve natural geometric transition: Through multi-level region expansion and bidirectional smoothing, a continuous and smooth transition at the splicing boundary is achieved, eliminating abrupt changes in normals and visual seams.

[0029] 5. Strong adaptability: The scaling factor and smoothing parameter can be adaptively calculated according to the geometric characteristics of the model, reducing the reliance on manual intervention and ensuring the consistency of batch processing quality.

[0030] 6. Good data integrity: During the processing, only the geometric vertex coordinates are replaced, while the model's normal vectors, texture coordinates, material information, etc. are fully preserved, ensuring the compatibility of subsequent processing.

[0031] 7. High robustness: This method has good adaptability to irregular grids and noisy data, and has a wide range of applications. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating the method for processing local feature transfer and fusion of a three-dimensional model in an embodiment of the present invention.

[0033] Figure 2 This is a schematic diagram comparing the original model and the target model in an embodiment of the present invention.

[0034] Figure 3 This is a comparative schematic diagram of the boundary control circle and the transfer region in an embodiment of the present invention.

[0035] Figure 4 This is a schematic diagram of the region replacement and fusion process in an embodiment of the present invention.

[0036] Figure 5 This is the final effect diagram after smooth fusion in an embodiment of the present invention.

[0037] Figure 6 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. Detailed Implementation

[0038] The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention. Certain terms are used in the specification and claims to refer to specific components. Those skilled in the art will understand that hardware or software manufacturers may use different names to refer to the same component. This specification and claims do not distinguish components based on differences in name, but rather on differences in function. The following descriptions of preferred embodiments of the present invention are intended to illustrate the general principles of the invention and are not intended to limit the scope of the invention. The scope of protection of the present invention shall be determined by the appended claims.

[0039] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Example 1

[0040] Please see Figure 1Embodiment 1 of this invention provides a method for processing local feature transfer and fusion of 3D models. This method uses rigid transformation as its core, obtaining the optimal rotation matrix through centroid normalization, covariance matrix construction, and singular value decomposition, and combining adaptive scaling and translation to achieve geometric alignment between the source and target regions. To eliminate abrupt transitions at the joints, a multi-level smoothing strategy based on adjacency lists is introduced, and forward and reverse iterations ensure the naturalness and volume preservation of the surface. The overall process covers steps such as data parsing, topology construction, constraint setting, rigid registration, region replacement and fusion, smoothing, and verification, ensuring both theoretical rigor and improving the stability and efficiency of the method in practical applications. A typical application scenario of this method is to naturally fuse the mouth and nose regions of a target 3D face model into a source human model, which includes the following steps:

[0041] Step 1: Loading and parsing 3D model data.

[0042] Use a standard OBJ file parser to retrieve and load the corresponding 3D models, including the original model and the target model files, and complete the basic data parsing. For example... Figure 1 As shown, the left side is the original model, and the right side is the target model. OBJ files, as a common 3D model storage format, have the advantages of strong versatility and clear structure. During parsing, the vertex coordinate data is first read and represented as... Triplet, let the total number of vertices be . The vertex set can be represented as ,in Simultaneously, it reads the facet information; each facet consists of several vertex indices, such as a triangle facet. In OBJ files, indices typically start counting from 1, while computer array structures require starting from 0. Therefore, a uniform conversion is necessary to maintain consistency. During the indexing process, data validity checks are also performed, specifically checking for out-of-bounds indexes, degenerate faces, and redundant vertex definitions. After rigorous data filtering and conversion, the vertex count is obtained. With the number of pieces This serves as input for subsequent methods.

[0043] Step 2: Grid topology adjacency list construction and cache optimization.

[0044] To quickly access vertex neighbor relationships during the smoothing and region processing stages, an adjacency list needs to be constructed for the mesh. This involves traversing all faces and building an index list of neighboring vertices for each vertex. The adjacency list is defined as follows:

[0045] ,

[0046] In the formula: Represents the vertex index; Represents the vertex Adjacent vertex indices; This represents a set of facets.

[0047] The adjacency list is constructed all at once after the data is loaded and cached as a list or hash table. In this way, vertex neighbor queries can be completed in O(1) time complexity, significantly reducing the overhead of repeated calculations in subsequent smoothing operations.

[0048] In 3D mesh processing, operations such as smoothing and region expansion heavily rely on querying the neighbor relationships of each vertex. Traditional methods dynamically calculate adjacency relationships by traversing the face list each time they are needed, which is an O(n) complexity operation (where n is the number of faces). In algorithms that require multiple iterations, such as smoothing, this operation is repeated, causing the overall complexity to soar to O(n²), becoming a major performance bottleneck. This invention constructs the adjacency list of the entire mesh at once during the data loading phase and caches it in an efficient data structure (such as a hash table). Ideally, a hash table can provide query performance with O(1) time complexity. This means that no matter how complex the mesh is (how large the number of vertices n is), querying the neighbor list of any vertex is completed almost in constant time. Compared to searching faces one by one, this method can effectively improve the overall running efficiency in large-scale meshes.

[0049] Step 3: Verify the boundary control circle and transfer region index.

[0050] During the region transfer process, accurate correspondence of the boundary sections is crucial for the geometric continuity of the splicing. Therefore, a set of corresponding boundary control points is selected in both the original and target models to form a closed boundary control loop. Let the number of points in the boundary control loop be... Its set is denoted as Simultaneously, it also loads a set of indices for local regions of the target model (such as the mouth and nose region). This is used to identify the range of vertices that need to be transferred. During processing, [the following is done / does not occur]... Each index in the vertex list is checked to ensure that it is within the valid vertex range. This avoids data out-of-bounds issues caused by indexing errors, thus ensuring the correctness of the input data. This verification guarantees a one-to-one correspondence between the original model and the target model under boundary constraints, providing a solid foundation for subsequent rigid transformations. A schematic diagram of the boundary control circle and the transition region is shown below. Figure 3 As shown, the left side is the boundary control zone, and the right side is the transfer area.

[0051] Step 4: Centroid calculation and coordinate system decentralization.

[0052] To eliminate the influence of translation on the registration calculation, it is necessary to calculate the centroid of the boundary rings and decenter the coordinate system, calculating the centroids of the boundary control rings of both the original model and the template model. The calculation formula is as follows:

[0053] ,

[0054] In the formula: For the boundary circle vertex coordinates This represents the number of vertices in the boundary cycle.

[0055] After obtaining the centroids, subtract the centroid vector of the model to which each vertex belongs from its coordinates to obtain the decentralized set of points:

[0056] ,

[0057] This process translates the centroid of the boundary loop point set to the origin, eliminating the overall translation component and making subsequent rotation and scaling solutions more stable. Through this normalization process, geometric matching is simplified to a pure rotation, scaling, and scalability problem, avoiding the interference of translation.

[0058] Step 5: Covariance matrix construction and singular value decomposition.

[0059] The calculation of the rotation matrix depends on the construction of the covariance matrix. We construct the covariance matrices of the source and target point sets, assuming the source point set is... The target point set is Then the covariance matrix is

[0060] ,

[0061] In the formula: This represents the point after the boundary cycle of the original model has been decentered. for transpose, This represents the point corresponding to the target model.

[0062] covariance matrix The linear correlation between the source and target point sets was captured. Singular Value Decomposition (SVD) was then performed on them.

[0063] ,

[0064] In the formula: It is an orthogonal matrix. yes The transpose of the matrix, It is a singular value matrix.

[0065] This decomposition provides the basis for solving the rotation matrix and ensures that the result is optimal in the least squares sense, that is, minimizing the Euclidean distance between the source point set and the target point set.

[0066] This invention employs Singular Value Decomposition (SVD) based on the covariance matrix. Mathematically, this method has been proven to be a closed-form solution for finding the optimal rigid transformation in the least squares sense. Instead of iteratively "approximating," it directly calculates the globally optimal solution through a set of deterministic mathematical operations (centroid normalization—constructing the covariance matrix—SVD decomposition—calculating the rotation matrix). The SVD method fundamentally avoids the iterative uncertainty and local optima trap of the ICP algorithm. As long as the input point set is valid, the output rotation and translation transformations are mathematically optimal, providing a deterministic and high-precision foundation for the solution presented in this invention.

[0067] Step 6: Calculate the rotation matrix and verify orthogonality.

[0068] The optimal rotation matrix is ​​obtained from the results of singular value decomposition:

[0069] ,

[0070] Calculate the determinant of R. ,like This indicates that the result contains mirror components, in which case it is necessary to... Invert the last column to correct, then recalculate R so that the final rotation matrix satisfies The corrected matrix needs further verification of its orthogonality, i.e., checking... ,in It is the identity matrix. If the condition is met, the rotation matrix is ​​completely valid in a numerical sense and can be used for geometric transformations.

[0071] Step 7: Adaptive calculation of scaling factor.

[0072] Building upon rotation transformations, to ensure scale consistency (i.e., scale matching) between the source and target point sets, a scaling factor needs to be calculated. The Frobenius norm is introduced to measure the overall scale of the point sets:

[0073] ,

[0074] The scaling factor is defined as:

[0075] ,

[0076] In the formula, and Let Frobenius norms of the source and target point sets be respectively. This is the scaling factor, and its value range is... , These are the decentralized point sets of the source and target boundary cycles, respectively. Coefficients The optimal value is 0.99, which is an empirical value used to slightly reduce the source region. Its introduction can effectively avoid the interpenetration phenomenon caused by excessive expansion of the boundary, thereby ensuring geometric stability during the matching process.

[0077] Step 8: Construction and Application of the Rigid Transformation Matrix. After obtaining the rotation matrix and scaling factor, the translation vector needs to be calculated to complete the rigid transformation:

[0078] ,

[0079] In the formula: These are the centroids of the source point set and the target point set, respectively.

[0080] The final rigid transformation is

[0081] ,

[0082] This formula integrates rotation, scaling, and translation, ensuring that the source point set is strictly aligned with the target point set in space. This step provides a stable geometric basis for region replacement, applying this transformation matrix to all vertices of the entire local region in the original model that needs to be transferred.

[0083] Step 9: Replace vertex and merge regions of the original model.

[0084] After the rigid transformation, the vertex coordinates of the target region are replaced one by one with the corresponding indices in the original model. This process embeds the target region into the original model, thus completing the transfer of local regions. At this point, the original regions on the original model (such as the chin) are replaced by the mouth and nose regions of the target model, forming a preliminary fused model. Because the rigid transformation cannot completely resolve geometric differences at the boundaries, discontinuities or abrupt changes in normal direction may occur in the spliced ​​region. Therefore, further processing of the boundaries is required through a smoothing mechanism to ensure the continuity and visual naturalness of the overall surface. The fused model of the fixed region of the original model and the facial region of the target model is shown below. Figure 4 As shown, Figure 4 In the image, the left side represents the fixed region of the original model, the middle side represents the facial region of the target model, and the right side represents the fused model.

[0085] Step 10: Multi-level region expansion based on adjacency list.

[0086] In smoothing operations, processing only boundary points is often insufficient to achieve a natural transition. Therefore, a multi-level region expansion strategy based on adjacency lists is introduced. Starting with the boundary circle formed by splicing the boundaries, the neighbor point set is expanded outwards by 2-3 layers using a cached adjacency list, forming a smooth region containing more vertices. When the expansion layer is one, the region includes the boundary points and their first-order neighbors; when the expansion layer is two, it further includes second-order neighbors, and so on, until a preset number of layers is reached. For example, when the expansion layer is two, the smooth region will include the boundary vertices themselves, all their first-order neighbors, and all their second-order neighbors. This ensures the coverage of the smoothing range, making the transition more natural and avoiding local oversmoothing or abruptness.

[0087] Step 11: Smooth area quality inspection and preprocessing.

[0088] Before proceeding with the smoothing iteration, the quality of the selected region needs to be checked to ensure the effectiveness and stability of the smoothing process. The checks include the proportion of vertices (e.g., not exceeding 20% ​​of the total number of vertices in the model), the distribution of boundary vertices, whether the adjacency degrees are abnormal (checking for isolated points or vertices with anomalous degrees), and whether geometric degradation is present. If the checks indicate that the region is too large or too small, or that isolated points and degenerate patches exist, the smoothing parameters need to be adjusted or the region redefined. This preprocessing step reduces potential numerical instability during iteration, ensuring the smoothing process proceeds smoothly.

[0089] Step 12: Taubin Forward Smoothing Iteration. The Taubin algorithm is used in the smoothing process, and its forward iteration formula is as follows:

[0090] ,

[0091] In the formula: As vertices The weighted average of the neighboring vertices; It is a positive smoothing factor.

[0092] Forward iteration can effectively eliminate high-frequency noise in the geometry, making the stitched areas smoother. However, because its iteration direction is a contractionary operation, multiple iterations will cause the overall model volume to shrink. Therefore, it is necessary to combine it with reverse smoothing for compensation.

[0093] Step 13: Taubin Reverse Smoothing Iteration. To address the volume shrinkage problem caused by forward smoothing, reverse iteration is introduced. This involves applying reverse smoothing to the vertices after forward smoothing to compensate for the volume shrinkage caused by forward smoothing. The formula is as follows:

[0094] ,

[0095] In the formula: As vertices The weighted average of the neighboring vertices, ,Pick Based on experience, the preferred option is... .

[0096] In a geometric sense, reverse iteration is equivalent to dilating the surface, complementing forward smoothing. By alternating between forward and reverse smoothing, noise can be eliminated while maintaining the model volume. This combined forward and reverse iterative approach avoids the shrinkage problem that occurs in traditional Laplacian smoothing, and is key to preserving geometric properties.

[0097] Traditional Laplacian smoothing can be understood as a simulation of surface tension or thermal diffusion. Vertices are constantly moved towards their centroid under the "pull" of their neighbors, which does smooth the surface but inevitably leads to overall inward shrinkage of the model. The Taubin smoothing method used in this invention introduces a bidirectional iterative mechanism: forward iteration (λ > 0): equivalent to traditional Laplacian smoothing, acting as a shrinkage / smoothing mechanism to eliminate high-frequency noise and seams; reverse iteration (μ < 0, and |μ| > |λ|): this is an expansion operation that pushes vertices in the opposite direction to their neighboring centroids. Viewing this process as a feedback control system, forward smoothing is the "negative feedback," designed to stabilize the system (smooth the surface); reverse smoothing introduces a controlled "positive feedback," specifically designed to compensate for the "overshoot" (i.e., volume shrinkage) caused by the negative feedback. By carefully setting parameters (e.g., μ = -1.05λ), the net shrinkage effect of a complete forward and reverse iteration is close to zero. This method can perfectly preserve the original volume and macroscopic geometric features of the model without sacrificing the smoothing effect.

[0098] Step 14: Smoothing effect verification and boundary continuity check.

[0099] After completing the smoothing process and repeating steps 12 and 13 several times (e.g., 5 times), the results are systematically verified. First, considering geometric continuity, the change in the normal direction of the boundary vertices is calculated to assess whether there are abrupt changes at the joint. If the normal change is gradual and the overall distribution is uniform, the boundary transition is natural. Second, the curvature consistency is analyzed. By statistically analyzing the mean and variance of curvature, it is determined whether the smoothed surface maintains good smoothness. When the curvature variance is small and uniformly distributed, the surface transition can be considered reasonable. Finally, volume preservation is also considered. By calculating the difference in the volume of the model bounding box (AABB) before and after smoothing, when the rate of change is less than a preset threshold, such as 1%, the overall volume is considered well preserved, indicating that the smoothing process suppresses noise without destroying the global geometric structure. The smoothed and blended model is as follows. Figure 5 As shown.

[0100] Step 15: Optimized streaming file saving and integrity verification.

[0101] After all processing is complete, the final fused model result needs to be saved as an OBJ file. During saving, only the geometric vertex coordinates are replaced, thus fully preserving the normal vectors, texture coordinates, material information, and group information read from the original model to ensure file compatibility. Saving uses a fixed decimal precision (e.g., 4 decimal places) to reduce the accumulation of floating-point errors and ensure correct loading of the file in other software. After saving, compare the number of vertices and faces in the output file with the original file to verify their consistency. If the numbers match perfectly, the integrity of the saved result can be confirmed, thus ensuring the reliability and stability of the method in practical applications.

[0102] Through the above steps, the present invention successfully transferred and fused the mouth and nose region of the target model to the original model with high precision and high quality, generating a new three-dimensional model that is visually natural and geometrically continuous.

[0103] Example 2

[0104] Corresponding to Embodiment 1, another embodiment of the present invention also provides a processing system for local feature transfer and fusion of a three-dimensional model, the system comprising:

[0105] The data loading and parsing module is configured to load the 3D model data of the original model and the target model, and parse the vertex coordinates and facet information;

[0106] The topology management module is configured to build and cache a mesh topology adjacency table for quick querying of vertex neighbor relationships;

[0107] The boundary and region processing module is configured to select the corresponding boundary control circles in the original model and the target model, and verify the validity of the transfer region index;

[0108] The registration calculation module is configured as follows:

[0109] Calculate the centroid of the boundary control circle and decenter the coordinate system;

[0110] Construct the covariance matrix of the source point set and the target point set, and perform singular value decomposition to calculate the rotation matrix;

[0111] A rigid transformation matrix is ​​constructed based on the rotation matrix and the adaptively calculated scaling factor;

[0112] The transformation and application module is configured to apply the rigid transformation matrix to the original model;

[0113] The region fusion module is configured to replace the vertices of local regions of the target model that has undergone rigid transformation with the corresponding positions of the original model to generate a fused model.

[0114] The smoothing module is configured to perform multi-level region expansion on the splicing region of the fusion model based on the adjacency list to determine the smooth region, and apply Taubin forward and reverse smoothing iterations to the smooth region;

[0115] The output module is configured to save the processed fusion model.

[0116] The system in Embodiment 2 of the present invention is used to execute the method in Embodiment 1. For details not covered herein, please refer to the method in Embodiment 1, which will not be repeated here.

[0117] Example 3

[0118] Please see Figure 6 , Figure 6 This is a schematic diagram of an embodiment of the electronic device of this application.

[0119] Electronic device 1000 includes memory 200, processor 300, and computer program 400 stored in memory 200 and executable on processor 300. When processor 300 executes computer program 400, it implements the steps described in the above embodiments, for example... Figure 1 The steps of the 3D model local feature transfer and fusion processing method are shown below. These steps may include: acquiring 3D model data of the original and target models, parsing vertex coordinates and facet information; constructing and caching a mesh topology adjacency list for quick vertex neighbor lookup; selecting corresponding boundary control circles in the original and target models and verifying the validity of the transfer region index; calculating the centroid of the boundary control circles and performing coordinate system decentralization; constructing the covariance matrix of the source and target point sets and performing singular value decomposition to calculate the rotation matrix; constructing a rigid transformation matrix based on the rotation matrix and an adaptively calculated scaling factor, and applying it to the original model; replacing the vertices of the local regions of the rigidly transformed target model with the corresponding positions in the original model to generate a fused model; expanding the splicing region of the fused model through multiple levels based on the adjacency list to determine the smooth region, and applying Taubin forward and reverse smoothing iterations to the smooth region; and saving the processed fused model.

[0120] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 1000 and does not constitute a limitation on the electronic device 1000. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device 1000 may also include input / output devices, network access devices, buses, etc.

[0121] Processor 300 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, a single-chip microcomputer, or any conventional processor.

[0122] The memory 200 can be used to store computer programs 400 and / or modules / units. The processor 300 implements various functions of the electronic device 1000 by running or executing the computer programs and / or modules / units stored in the memory 200 and by calling data stored in the memory 200. The memory 200 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 1000 (such as audio data), etc. In addition, the memory 200 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.

[0123] If the modules / units integrated in the electronic device 1000 are implemented as software functional units and sold or used as independent products, they can be stored in a storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can also be implemented by a computer program instructing related hardware, and the computer program can be stored in a storage medium. When executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The storage medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the storage medium can be appropriately added or subtracted according to the requirements of patent practice. For example, according to patent practice, the storage medium does not include electrical carrier signals and telecommunication signals.

[0124] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

[0125] This invention is not limited to the optional embodiments described above, and anyone can derive other various forms of products based on the inspiration of this invention. The specific embodiments described above should not be construed as limiting the scope of protection of this invention; the scope of protection of this invention should be determined by the claims, and the specification can be used to interpret the claims.

Claims

1. A processing method for local feature transfer fusion of a three-dimensional model, characterized in that, Includes the following steps: Obtain the 3D model data of the original model and the target model, and parse out the vertex coordinates and face information. The original model is a human model and the target model is a 3D human face model. A grid topology adjacency table is constructed and cached for fast querying of vertex neighbor relationships. The construction and caching of the grid topology adjacency table includes: defining the adjacency table as a mapping relationship between vertex indices and their adjacent vertex indices; constructing the adjacency table once after data loading is completed and caching it in the form of a list or hash table; and achieving a time complexity of O(1) for vertex neighbor query through the caching mechanism. Select the corresponding boundary control circles in the original model and the target model, and verify the validity of the transfer region index; Calculate the centroid of the boundary control circle and decenter the coordinate system; Construct the covariance matrix of the source point set and the target point set, and perform singular value decomposition to calculate the rotation matrix; A rigid transformation matrix is ​​constructed based on the rotation matrix and an adaptively calculated scaling factor, and then applied to the original model; wherein the adaptive calculation process of the scaling factor includes: Calculate the scaling factor based on the ratio of the Frobenius norms of the source and target point sets: , wherein, and respectively represent the Frobenius norm of the source point set and the target point set, is a scaling coefficient, and the value range is wherein, , respectively are the decentered point sets of the source and target boundary loops, represents the decentered point of the original model boundary loop, represents the corresponding point of the target model, is the number of boundary loop vertices; The vertices of a local region of the target model that has undergone rigid transformation are replaced with the corresponding positions of the original model to generate a fused model. The fusion model's splicing region is expanded in multiple levels based on an adjacency list to determine a smooth region, and Taubin forward and reverse smoothing iterations are applied to the smooth region. The multi-level region expansion based on the adjacency list includes: starting from the splicing boundary of the fusion model, expanding the neighbor point set layer by layer; the number of expansion layers is determined according to a preset value, including first-order neighbors, second-order neighbors and above; the smooth region is formed through multi-level expansion. Save the processed fusion model.

2. The fusion processing method according to claim 1, characterized in that, The calculation of the centroid of the boundary control circle and the decentering of the coordinate system include: Construct the formula for calculating the centroid: In the formula: For the boundary circle Vertex coordinates; Let be the number of vertices in the boundary cycle; after decentralization, the point set is: This causes the centroid of the boundary circle to translate to the origin of the coordinate system; The step of constructing the covariance matrix of the source point set and the target point set, and performing singular value decomposition to calculate the rotation matrix includes: Let the source set be The target point set is Then the covariance matrix is: , In the formula, This represents the point after the boundary cycle of the original model has been decentered. Indicates the point corresponding to the target model; For covariance matrix Performing singular value decomposition, we obtain: , In the formula, It is an orthogonal matrix. It is a singular value matrix; The rotation matrix is ​​obtained through singular value decomposition: , Perform orthogonality checks and corrections on the rotation matrix, including checking its determinant value. ,like If so, then the last column of matrix V is inverted.

3. The fusion processing method according to claim 1, characterized in that, The application of Taubin forward and reverse smoothing iterations to the smoothed region includes: First, perform a forward iteration. The forward iteration formula is: , In the formula: As vertices The weighted average of the neighboring vertices; It is a positive smoothing factor; Then perform reverse iteration, the reverse iteration formula is: , In the formula, As vertices The weighted average of the neighboring vertices, ,Pick ; The model size is maintained by alternating between forward and backward iterations.

4. The fusion processing method according to claim 1, characterized in that, Before applying the Taubin forward and reverse smoothing iterations, the process also includes quality checks and preprocessing of the smoothed region: Check for anomalies in the vertex count ratio, boundary vertex distribution, and adjacency degree. Detect the presence of geometric degradation and adjust the smoothing parameters or redefine the region based on the detection results.

5. The fusion processing method according to claim 1, characterized in that, Before saving the processed model, steps are included to verify the smoothing effect and boundary continuity: Calculate the change in the normal direction at the boundary vertices to assess geometric continuity; Statistical analysis of the mean and variance of curvature is used to determine the consistency of curvature. Calculate the rate of change of the bounding box volume of the model before and after smoothing. If the rate of change is less than a preset threshold, the volume is considered to be well maintained.

6. An electronic device, characterized in that, include: A processor, and a memory connected to the processor; The memory stores instructions that can be executed by the processor, which, when executed by the processor, implement the steps of the three-dimensional model local feature transfer and fusion processing method as described in any one of claims 1 to 5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program causes the computer to execute the steps of the three-dimensional model local feature transfer and fusion processing method according to any one of claims 1 to 5.