A three-dimensional model processing method, device and storage medium
By selecting the nearest point pairs and performing iterative optimization in 3D model processing, the problems of inaccurate matching and distortion in existing 3D model processing technologies are solved, achieving 3D model processing with high matching and detail integrity.
Patent Information
- Application Number
- CN201910794934.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-27
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2039-09-24
AI Technical Summary
Existing technologies are prone to problems such as premature matching, premature convergence, or inaccurate matching during the processing of 3D models, resulting in 3D models with distortions, unclear details, and local flaws.
By finding the target point in the 3D model of the target object that is closest to the vertex in the reference 3D model, the direction and normal direction of the closest point pair are determined, the closest point pairs with an angle less than or equal to a preset angle threshold are selected, the reference 3D model is updated using the point-to-surface constraint formula, and iterative optimization is performed until the preset convergence condition is met.
It achieves high matching accuracy, detail integrity, and standard topology of 3D models, effectively reduces model distortion rate, and avoids premature matching and premature convergence.
Smart Images

Figure CN110675507B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a three-dimensional model processing method, device and storage medium. Background Art
[0002] With the continuous advancement of computer technology, the processing technology of three-dimensional models has become more and more mature, including the reconstruction and deformation of three-dimensional models, and has been widely used in various industries, such as face modeling, face recognition, animation and movie special effects production.
[0003] The 3D model processing process usually involves technical contents such as nearest point search and constraint condition selection. The technical solutions adopted by the existing technology often have problems such as early matching, premature convergence or inaccurate matching in the above process, resulting in the 3D model being deformed, unclear details and local defects. Figure 7 Therefore, it is necessary to provide a more reliable or more effective solution to solve the above technical problems in the three-dimensional model processing in the prior art. Summary of the invention
[0004] The present invention provides a method, device and storage medium for processing a three-dimensional model, which can obtain a three-dimensional model with complete details and high matching standards.
[0005] In one aspect, the present invention provides a three-dimensional model processing method, the method comprising:
[0006] Acquire a target object three-dimensional model and a reference three-dimensional model;
[0007] Finding target points in the target object three-dimensional model that are closest to vertices in the reference three-dimensional model to obtain a first set of closest point pairs;
[0008] Determine the closest point pair direction of the vertex between each closest point pair in the first closest point pair set toward the target point and the normal direction corresponding to the target point in the closest point pair;
[0009] The closest point pairs corresponding to which the angle between the direction of the closest point pair and the normal direction is less than or equal to a preset angle threshold are taken as the second closest point pair set;
[0010] Determine an updated reference three-dimensional model according to the second closest point pair set and the point-to-plane constraint formula;
[0011] Performing iterative optimization based on the updated benchmark three-dimensional model until a preset convergence condition is reached;
[0012] Determine the target optimal solution of the point-to-plane constraint formula when the preset convergence condition is reached;
[0013] A target three-dimensional model matching the target object three-dimensional model is obtained according to the target optimal solution.
[0014] In another aspect, the present invention provides a three-dimensional model processing device, the device comprising:
[0015] Acquisition unit: used for acquiring the target object 3D model and the reference 3D model;
[0016] A first closest point determination unit is used to find a target point in the target object three-dimensional model that is the closest point to a vertex in the reference three-dimensional model, and obtain a first closest point pair set;
[0017] Angle determination unit: used for determining the closest point pair direction of the vertex between each closest point pair in the first closest point pair set toward the target point and the normal direction corresponding to the target point in the closest point pair;
[0018] A second closest point determination unit: configured to take the closest point pairs corresponding to the angle between the closest point pair direction and the normal direction being less than or equal to a preset angle threshold as the second closest point pair set;
[0019] A reference three-dimensional model updating unit: used for determining an updated reference three-dimensional model according to the second closest point pair set and the point-to-plane constraint formula;
[0020] Iterative optimization unit: performing iterative optimization based on the updated reference three-dimensional model until a preset convergence condition is reached;
[0021] 3D model deformation unit: used to determine the target optimal solution of the point-to-plane constraint formula when the preset convergence condition is reached; and
[0022] A target three-dimensional model matching the target object three-dimensional model is obtained according to the target optimal solution.
[0023] On the other hand, the present invention provides a computer storage medium, wherein the computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set enables the computer to execute the three-dimensional model processing method as described above.
[0024] The three-dimensional model processing method, device and storage medium provided by the present invention have the following technical effects:
[0025] The present invention can deform the reference three-dimensional model with the target object three-dimensional model as the input object, and obtain a three-dimensional model that is highly matched with the target object three-dimensional model, has complete details and a standard topological structure, avoids premature matching and premature convergence, and effectively reduces the distortion rate of the three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 It is a flowchart of a three-dimensional model processing method provided by an embodiment of the present invention;
[0028] Figure 2 It is a flowchart of a three-dimensional model processing method provided by an embodiment of the present invention;
[0029] Figure 3-7 It is a schematic diagram of the process and results of a three-dimensional model processing method using face model deformation as an application provided by an embodiment of the present invention;
[0030] Figure 8 is a structural schematic diagram of a three-dimensional model processing device provided by an embodiment of the present invention;
[0031] Fig. 9 It is a structural schematic diagram of a three-dimensional model processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0034] The following describes the three-dimensional model processing method, device and storage medium of the present invention with reference to the accompanying drawings. Before describing the embodiments of the present application in detail, for ease of understanding, common technical terms are first introduced:
[0035] Normal: refers to an imaginary line that is always perpendicular to a plane. In mathematical geometry, a normal is a line on a plane that is perpendicular to the tangent line of a curve at a certain point. For a three-dimensional (3D) model, it is a unit vector perpendicular to a 3D surface.
[0036] Standard topology: In this article, it refers to the number of vertices and the connection relationship between vertices in a 3D model. Standard topology refers to a pre-set topology, that is, the number of vertices and the connection relationship between vertices are fixed.
[0037] Three-dimensional reconstruction: refers to the establishment of a mathematical model suitable for computer representation and processing of three-dimensional objects. It is the basis for processing, operating and analyzing its properties in a computer environment. It is also a key technology for establishing virtual reality in computers to express the objective world.
[0038] Principal Component Analysis (PCA): It is a statistical method that transforms a set of variables that may be correlated into a set of linearly uncorrelated variables through orthogonal transformation. The transformed set of variables is called principal components. Principal component analysis tries to regroup the original numerous variables with certain correlation (such as P indicators) into a new set of unrelated comprehensive indicators to replace the original indicators. It is a multivariate statistical method to examine the correlation between multiple variables. It studies how to reveal the internal structure of multiple variables through a few principal components, that is, to derive a few principal components from the original variables so that they retain as much information of the original variables as possible and are uncorrelated with each other.
[0039] The following describes the three-dimensional model processing method of the present invention. Please refer to Figure 1 , Figure 1 It is a flowchart of a three-dimensional model processing method provided by an embodiment of the present invention. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 1 As shown, the method may include:
[0040] S110: Acquire a target object three-dimensional model and a reference three-dimensional model.
[0041] In the embodiments of this specification, the target object 3D model may be a 3D reconstructed model based on a scanned image of the target object, and different target object 3D models may have different numbers of vertices and faces, as well as connection relationships between vertices. The reference 3D model may be a predefined model with a standard topological structure.
[0042] In practical applications, the reference three-dimensional model is calculated with the target object three-dimensional model as input, and the deformation of the reference three-dimensional model is guided by the calculation result to obtain a three-dimensional model with a standard topological structure that is highly matched with the target object three-dimensional model.
[0043] In a specific embodiment, Figure 3 As shown, taking the benchmark 3D model of the human face as an example, Figure 3 a is a 3D model of the target face object reconstructed through 3D scanning. Figure 3 b is a predefined reference three-dimensional model of a human face, and the connection relationship between points in its standard topological model can be a triangle connection relationship.
[0044] In addition, it should be noted that in the embodiments of this specification, the target object 3D model and the reference 3D model may also be buildings, other human organs, animals or plants, etc. Figure 3 The limits shown are as follows.
[0045] S120: Searching for target points in the target object three-dimensional model that are closest to vertices in the reference three-dimensional model, and obtaining a first set of closest point pairs.
[0046] In the embodiments of this specification, the nearest point search can be performed using a point-to-plane constraint method, and the nearest point matching can be performed using the nearest point distance and bidirectional nearest point search conditions to reduce the problems of early matching and premature convergence, thereby reducing the problem of deformity in the final target three-dimensional model.
[0047] In practical applications, firstly, the distance condition and the two-way closest point search condition can be used to search in the target object three-dimensional model the target point that is the closest point to the vertex in the reference three-dimensional model. The target point and the vertex on the reference three-dimensional model are matched one-to-one.
[0048] In a specific embodiment, the method for searching the nearest point includes but is not limited to the nearest neighbor method.
[0049] S130: Determine the normal direction corresponding to the target point in the closest point pair, and the closest point pair direction between each closest point pair in the first closest point pair set, wherein the closest point pair direction is toward the target point.
[0050] In the embodiment of this specification, the closest point pair direction is a direction from a vertex on the target object three-dimensional model toward a target point corresponding to the vertex on the reference three-dimensional model.
[0051] In practical applications, the specific process of determining the above direction can be: obtain a vector formed by the mutually matching vertices and target points in the first nearest point pair set, the direction of the vector is toward the target point on the three-dimensional model of the target object, and the direction of the vector is the nearest point pair direction; obtain the normal vector of the surface corresponding to the target point on the three-dimensional model of the target object, and the direction of the normal vector is the normal direction.
[0052] S140: The closest point pairs corresponding to the angle between the direction of the closest point pair and the normal direction is less than or equal to a preset angle threshold are taken as the second closest point pair set.
[0053] In the embodiments of the present specification, the preset angle threshold may be a preset fixed value, and different preset angle thresholds may be set for different three-dimensional models of target objects.
[0054] In practical applications, the preset angle threshold may be 15° to 45°.
[0055] In a specific embodiment, the first set of closest point pairs is determined based on step S120, that is, the closest point pairs that meet the distance condition and the bidirectional search condition are preliminarily determined. Furthermore, the first set of closest point pairs is screened by the normal condition based on the preset angle threshold, and the closest point pairs with angles greater than the preset angle threshold are removed to obtain the second set of closest point pairs.
[0056] In this way, it is possible to avoid the area with large noise on the surface of the target object three-dimensional model affecting the deformation of the reference three-dimensional model, causing the final target three-dimensional model to be deformed or wrinkled.
[0057] In a specific embodiment, Figure 3-Figure 6 As shown, the preset angle threshold can be set to 30° in the deformation of the face reference 3D model. Please refer to Figure 5 b. The area enclosed by the dotted box in the figure is the area with high noise during the scanning and reconstruction process of the 3D model of the target object, showing many wrinkles. If the points in this area are used as the target points of the vertices on the reference 3D model, the obtained vector directions and normal directions are messy, so the nearest point pairs formed by the points in this area are removed.
[0058] S150: Determine an updated reference three-dimensional model according to the second closest point pair set and the point-to-plane constraint formula.
[0059] In the embodiment of this specification, the point-to-plane constraint method includes the point-to-plane constraint formula.
[0060] In practical applications, the updated baseline three-dimensional model can be determined based on all the closest point pairs and point-to-plane constraint formulas in the second closest point pair set; or the updated baseline three-dimensional model can be determined based on some of the closest point pairs and point-to-plane constraint formulas in the second closest point pair set.
[0061] S160: Performing iterative optimization based on the updated reference three-dimensional model until a preset convergence condition is reached.
[0062] In an embodiment of the present specification, if it is determined based on the point-to-plane constraint formula that the preset convergence condition has not been met this time, iterative optimization is performed based on the updated baseline three-dimensional model, and the nearest point search and normal condition screening are performed again based on the updated baseline three-dimensional model and the target object three-dimensional model, and it is judged whether this iterative optimization has met the preset convergence condition based on the point-to-plane constraint condition.
[0063] S170: Determine the target optimal solution of the point-to-plane constraint formula when the preset convergence condition is reached.
[0064] S180: Obtaining a target three-dimensional model that matches the target object three-dimensional model according to the target optimal solution.
[0065] In the embodiment of this specification, if it is determined based on the point-to-plane constraint formula that this iterative optimization reaches a preset convergence condition, the updated reference three-dimensional model determined based on this result is the final target three-dimensional model.
[0066] Through the above-mentioned three-dimensional model processing method, the reference three-dimensional model can be deformed with the target object three-dimensional model as the input object, so as to obtain a three-dimensional model that is highly matched with the target object three-dimensional model, has complete details and a standard topological structure, thereby avoiding premature matching and premature convergence and effectively reducing the distortion rate of the three-dimensional model.
[0067] Based on the above specific implementation, please refer to Figure 2 In the embodiment of this specification, the step S120 may include:
[0068] S121: Finding a preliminarily selected closest point whose distance between a vertex on the target object three-dimensional model and a vertex on the reference three-dimensional model is less than or equal to a preset threshold.
[0069] In a specific embodiment, when searching for the target point that is the closest point to a vertex, the maximum distance allowed between the closest point and the vertex can be pre-set, that is, a preset threshold can be set, and the corresponding closest point can only be found in the area within the preset threshold range from a vertex.
[0070] In practical applications, firstly, a preliminary nearest point whose distance to the vertex is within a preset threshold range is searched on the three-dimensional model of the target object, and more than one preliminary nearest point may be obtained.
[0071] In some embodiments, the method for determining the preset threshold of the maximum distance may be: find the nearest point on the complete three-dimensional model of the target object, for example, find a nearest point for all vertices, sort the distances between all vertices and the nearest point from small to large, and take a certain distance value in the distance sorting as the preset threshold. For example, take the distance value corresponding to 10% from large to small in the distance sorting as the preset threshold.
[0072] Furthermore, in some embodiments, for a certain target object three-dimensional model, the preset threshold may be fixed.
[0073] Furthermore, in other embodiments, for a certain target object three-dimensional model, the preset threshold may be re-determined during each iterative optimization process and may be recalculated in each iteration, that is, the preset threshold is constantly changing during the deformation of the baseline three-dimensional model.
[0074] S122: Reversely search for a reverse nearest point on the reference three-dimensional model whose distance to the initially selected nearest point is less than or equal to a preset threshold.
[0075] In a specific embodiment, the maximum distance value allowed in the nearest point search process is also set as a preset threshold value. After the initial nearest point is determined, the reverse nearest point corresponding to the initial nearest point is searched again on the reference three-dimensional model.
[0076] S123: Determine whether the reverse nearest point is the vertex corresponding to the initially selected nearest point.
[0077] S124: If the judgment result is yes, determine that the initially selected closest point is the target point that is the closest point to the vertex.
[0078] In a specific embodiment, it is determined whether the reverse nearest point corresponding to the initially selected nearest point is the vertex corresponding to the reference three-dimensional model at the beginning. If so, the vertex and the initially selected nearest point are matched one-to-one, that is, the initially selected nearest point is determined to be the target point.
[0079] In addition, if the judgment result is no, the vertex and the initially selected closest point are not a pair of closest points to each other, and thus the vertex is not classified into the first closest point pair set.
[0080] Based on the above specific implementation, in the embodiment of this specification, before step S150, the method may further include:
[0081] S1401: Calculating an initial weight value of the nearest point in the second set of closest point pairs according to a preset distance weight condition;
[0082] S1402: Calculate the weight value of the nearest point in the second nearest point pair set according to the preset neighborhood point weight condition and the initial weight value.
[0083] In a specific embodiment, after determining the second set of closest point pairs, a weight value of a single closest point is calculated separately to ensure the accuracy of the deformation of the reference three-dimensional model.
[0084] In practical applications, the maximum distance among all the closest point pairs in the second closest point pair set may be calculated; and all the closest point pairs may be sorted according to the distance based on the calculation result.
[0085] In some embodiments, a weight value of each closest point in the second set of closest point pairs may be calculated.
[0086] In some other embodiments, weight values of some of the closest points in the second closest point pair set may be calculated, for example, by sorting by distance and taking 80% of the closest point pairs with the smallest distance in the second closest point pair set for weight calculation.
[0087] Through the above two-step weight condition calculation, the accuracy of the weight in the three-dimensional model deformation can be improved, and part of the noise caused by the single weight calculation method can be removed.
[0088] Based on the above specific implementation, in the embodiment of this specification, the preset distance weight condition includes the formula: ω i '=e -di / dmax ; Among them, ω i ' represents the initial weight value, d i represents the distance value between the second closest point pair set and the i-th closest point pair used for weight calculation, d max represents the maximum distance value between all the nearest point pairs used for weight calculation in the second nearest point pair set;
[0089] The preset neighborhood point weight condition includes the formula:
[0090] Among them, ω i Represents the weight value, N neigh Represents the number of neighboring points of a nearest point, ω j Represents the initial weight value of each neighborhood point.
[0091] In practical applications, in the preset distance weight condition, when d i =d max ,ω i '=1 / e, if d i=0, then ω i '=1, so the initial weight value range is [1 / e 1]. Intuitively, the smaller the distance between the closest point pairs, the larger the initial weight value.
[0092] The nearest points found for similar vertices on a three-dimensional model are also relatively close, so the weight values calculated should also be relatively close. If only the preset distance weight condition is used, the weight values of the nearest points corresponding to similar vertices may differ greatly. The use of preset neighborhood point weight conditions can effectively avoid this result, remove noise, and have a smoothing effect.
[0093] Furthermore, in a three-dimensional model, a point may have multiple neighborhood points. For example, in a three-dimensional model with a standard topological model structure, the connection relationship between points can be a triangular structure. A point may be on many triangles at the same time, and other points on the same triangle are all neighborhood points of the point. In the preset neighborhood point weight condition, the initial weight value is used as the input value, and the weight value of the nearest point is obtained by calculating the average weight value of all neighborhood points, and then the weight value is substituted into the point-to-plane constraint formula for calculation.
[0094] Based on the above specific implementations, in some embodiments of this specification, the reference 3D model may include a preset 3D model corresponding to the target object 3D model, that is, a preset 3D model is transformed into a target 3D model based on the target object 3D model.
[0095] Further, in some embodiments, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, Represents the normal vector of the i-th closest point on the 3D model of the target object, v i represents the optimal solution to be solved, Represents the i-th closest point on the 3D model of the target object.
[0096] In practical applications, v i The optimal solution represented by can characterize the vertices on the updated reference 3D model corresponding to this iteration.
[0097] Furthermore, in some other embodiments, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, Δv i represents the optimal solution to be solved, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
[0098] In practical applications, assuming that this is the fourth iteration optimization, Δv i It represents the change between the vertices on the updated benchmark 3D model after the fourth iteration optimization and the third iteration optimization. Indicates the change between the vertices on the updated reference 3D model after the third iteration optimization and the second iteration optimization. For example, it is the coordinate difference between the vertices obtained twice, representing a vector.
[0099] Based on the above specific implementation methods, in other embodiments of the present specification, the baseline three-dimensional model includes M preset three-dimensional models with a unified topological structure corresponding to the target object three-dimensional model; before the step S120, the method also includes: using a principal component analysis algorithm (PCA) to reduce the dimension of the M preset three-dimensional models with a unified topological structure to obtain a statistical three-dimensional model.
[0100] In practical applications, the PCA method is used to reduce the dimension of M preset three-dimensional models, and the obtained statistical three-dimensional model is an average model, which reduces the amount of data and reduces the computational cost while ensuring the core valid data.
[0101] For example, the reference 3D model includes a data set of 200 preset 3D models of human faces, each of which has the same number of vertices and facet connection relationship. The 200 preset 3D models of human faces are reduced in dimension by the PCA method, and finally a statistical 3D model of an average human face and K feature vectors are obtained, such as 50 feature vectors.
[0102] Further, in some embodiments, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, p i represents the average model of the statistical three-dimensional model, It represents the coordinate value of the position of the i-th vertex in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total. Represents the i-th closest point on the 3D model of the target object.
[0103] Furthermore, in some other embodiments, the point-to-plane constraint formula includes: Among them, Ep2plane represents the energy value, ω i Represents the weight value of the i-th closest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, Represents the coordinate value of the i-th vertex position in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total, d' k represents the optimal solution obtained in the previous iteration, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
[0104] In practical applications, the energy value E p2plane The smaller it is, the better the result of this iteration.
[0105] In a specific embodiment, the above point-to-plane constraint formula can be solved by the least squares method to obtain the energy value E p2plane The smallest optimal solution is substituted into the point-to-surface constraint formula to obtain the energy value E p2plane , and then determine whether the preset convergence condition is met.
[0106] In a specific embodiment, taking a 3D face model as an example, the PCA method may specifically include:
[0107] First, calculate formula 2 through formula 1;
[0108]
[0109] Among them, B represents the vertex matrix composed of the preset 3D models of all human faces in the benchmark 3D model, with a total of m rows, m = the number of vertices of a single Blendshape model * 3, and a total of n columns, indicating that there are a total of n preset 3D models of human faces, represents the x-coordinate value of the vertex in the i-th row and j-th column. is the average value of the preset 3D models of all faces, calculated by the mean of each row in B
[0110] Further, by subtracting the mean of formula 2 from B in formula 1 Get the result of B' (Formula 3);
[0111]
[0112] Furthermore, the eigenvector after PCA dimension reduction is obtained;
[0113] Among them, B' T is the transposed matrix of B', and C is the obtained covariance matrix.
[0114] Use SVD decomposition to calculate the eigenvalues and eigenvectors of C. There are n eigenvectors and n eigenvalues in total. Each eigenvector is an nX1 vector. The eigenvalue is a constant. Each eigenvalue and eigenvector are one-to-one corresponding, as shown below:
[0115]
[0116] Where P is the K eigenvectors obtained by SVD decomposition, and λ is the K eigenvalues.
[0117] Further, the obtained eigenvalues are arranged from small to large, the largest K eigenvalues are selected as the final effective values, and K eigenvectors are selected as the final effective eigenvectors. Preferably, the selection criterion may be: the sum of the selected K eigenvalues divided by the sum of all eigenvalues is greater than a certain eigenvalue threshold.
[0118] Point-to-plane constraint formula For example, where p i That is, corresponding to the i-th vertex in B', is the coordinate value of the i-th vertex position in the k-th eigenvector of the selected K eigenvectors. Solve for the optimal solution d that meets the point-to-surface constraint formula, and finally The updated reference 3D model can be calculated.
[0119] Based on the above specific implementation methods, in some embodiments of the present specification, reaching the preset convergence condition includes determining in the following manner: obtaining the change between the energy value of this iteration and the energy value obtained last time based on the point-to-plane constraint formula; judging whether the change is less than or equal to a change threshold; if the judgment result is yes, determining that the preset convergence condition is reached.
[0120] In practical applications, the change amount between the energy value of this iteration and the energy value obtained last time can be determined by obtaining the difference between the energy value of this iteration and the energy value obtained last time, and calculating the percentage of the difference in the energy value of this iteration or the energy value obtained last time. If it is determined that the percentage is less than or equal to the change amount threshold, the preset convergence condition is met.
[0121] Based on the above specific implementation, in some other embodiments of this specification, reaching the preset convergence condition includes determining in the following manner: determining whether the current number of iterative optimization times is greater than or equal to the maximum number of iterations; if the judgment result is yes, determining that the preset convergence condition is reached.
[0122] The following is an introduction to the 3D model processing method provided by the embodiment of this specification in conjunction with the target object 3D model and the reference 3D model being a face. Please refer to Figure 3-Figure 7 :
[0123] Please refer to Figure 3 , Figure 3 a shows a target object 3D model of a human face, which is obtained by 3D scanning and reconstruction. Figure 3 b shows the baseline 3D model of the human face, which has a standard topological structure based on Figure 3 The three-dimensional model in a is an object pair Figure 3 The reference 3D model in b is deformed to obtain the target 3D model.
[0124] First, determine the preset threshold and find the closest point within the preset threshold range. Figure 4 , Figure 4 b shows a top view after the target object 3D model and the reference 3D model are fitted together. Figure 4 a shows Figure 4 b is a visual representation of the box area, where g represents the g surface of the target three-dimensional model in the box area, and h represents the h surface of the reference three-dimensional model in the box area. Point 1 on the h surface is found by the nearest point, for example, within the distance range of a preset threshold, the distances between multiple points on the g surface and point 1 are sorted, and point 3 on the g surface is found by the shortest distance, and point 3 is used as the initial nearest point. Then, the nearest point of point 3 on the reference three-dimensional model can be reversely searched in the same way, and point 1 is determined to be the reverse nearest point of point 3. Then, point 3 can be obtained as the target point of point 1, that is, point 1 and point 3 are the nearest points to each other, forming a pair of nearest points in the first nearest point pair set.
[0125] At the same time, point 2 on the h-plane finds point 3 as its initial nearest point through the shortest distance, but point 3 and point 1 are the closest points to each other, so point 3 is not the target point of point 2, that is, the pairing of point 3 and point 2 is an incorrect match, and this pairing is not selected in this nearest point search process. Point 4 should be the target point of point 2, and the match of this pair of nearest points can be further determined in the subsequent iterative optimization process. By determining the first nearest point pair set through a bidirectional search, the occurrence of premature registration is effectively eliminated, and the occurrence of deformities such as face squashing is avoided. Please refer to Figure 7 , Figure 7 The large box in a shows the face flattening phenomenon caused by premature registration. Figure 7 b is a three-dimensional model of the human face target obtained by using the three-dimensional model processing method of this specification.
[0126] Further, the first closest point pair set is filtered by the normal condition, please refer to Figure 5 , Figure 5The dotted box in b shows the surface wrinkles of the target object's 3D model. This area has a lot of noise and is not suitable for finding the nearest point. It is easy to cause distortion or distortion of the model details after the transformation. Figure 7 The area shown by the two boxes in a. Therefore, the closest point pair formed by the points in this part is removed through the normal condition to avoid distortion.
[0127] Specifically, refer to Figure 5 a, taking the closest point pair 5 and 6 as an example, the vector from point 5 to point 6 is formed At the same time, determine the normal vector of point 6 on the g surface Calculate the angle between the two vectors. If the angle value is less than or equal to the preset angle threshold, retain the closest point pair formed by point 5 and point 6. If the angle value is greater than the preset angle threshold, remove the closest point pair, and determine the second closest point pair set in this way. The preset angle threshold here can be 30°.
[0128] Furthermore, after the two steps of searching for the nearest point, a valid set of nearest point pairs is obtained. The weight values of the valid nearest points need to be further calculated. The specific calculation method can be: 1) Calculate the distances between all the nearest point pairs; 2) Sort all the nearest point pairs according to the calculated distances; 3) Take the 80% nearest point pairs with the smallest distances in the distance sorting for weight calculation; 4) Based on the formula ω in the preset distance weight condition i '=e -di / dmax Calculate the initial weight value, where d max The maximum distance value among 80% of the closest point pairs; 5) Based on the formula in the preset neighborhood point weight condition Calculate the weight value. Assume that the closest point with the first distance has 4 neighboring points, then N neigh =4,ω i =(ω 1 '+ω 2 '+ω 3 '+ω 4 ') / 4.
[0129] Furthermore, the second closest point pair set and the corresponding weight values obtained above are substituted into the point-to-plane constraint formula to calculate the initial optimal solution and the initial energy value. The reference 3D model is deformed according to the initial optimal solution to obtain an updated reference 3D model.
[0130] Furthermore, the nearest point search is performed again based on the updated reference 3D model and the target object 3D model to determine a new valid set of nearest point pairs. The weight value is calculated based on the new valid set of nearest point pairs. After substituting the point-to-surface constraint formula, the current optimal solution and the current energy value after iteration are calculated. The difference between the current energy value and the initial energy value can be calculated, and the percentage of the difference to the current energy value can be used to determine whether the preset convergence condition is met. If it is determined that the preset convergence condition is met, the current optimal solution can be determined as the target optimal solution. The optimal solution can be obtained based on the target optimal solution. Figure 3 The target 3D model is matched with the target object 3D model of the face in a. If it is determined that it has not been reached, the iterative optimization process is repeated until the preset convergence condition is reached, and the current optimal solution when the convergence condition is reached is determined to be the target optimal solution, and then the target 3D model is obtained, such as Figure 6 As shown, Figure 6 a and Figure 6 b are the front view and top view of the target 3D model, respectively.
[0131] It can be seen from the technical solutions provided in the embodiments of this specification that, in the embodiments of this specification, the three-dimensional model of the target object is used as the object, the nearest point matching is performed through the bidirectional nearest point search method and the normal condition, the weight value of the effective nearest point pair is calculated, and the constraint method of the point-to-plane constraint formula is used for iterative optimization, and finally the reference three-dimensional model is deformed to obtain the target three-dimensional model. The technical solutions provided in the embodiments of this specification can be used to obtain a three-dimensional model that is highly matched with the three-dimensional model of the target object, has complete details, and has a standard topological structure, avoiding the occurrence of premature matching and premature convergence, and effectively reducing the distortion rate of the three-dimensional model.
[0132] An embodiment of the present invention provides a three-dimensional model processing server, which includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the three-dimensional model processing method provided in the above method embodiment.
[0133] An embodiment of the present invention provides a three-dimensional model processing device, which includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the three-dimensional model processing method provided in the above method embodiment.
[0134] In the embodiments of this specification, the memory can be used to store software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, application programs required for functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0135] The embodiment of the present invention also provides a three-dimensional model processing device, such as Figure 8 As shown, the device may include:
[0136] An acquisition unit 310 may acquire a target object 3D model and a reference 3D model;
[0137] The first closest point determination unit 320 may be used to find target points in the target object three-dimensional model that are closest to vertices in the reference three-dimensional model, and obtain a first set of closest point pairs.
[0138] The angle determination unit 330 may be used to determine the normal direction corresponding to the target point in the closest point pair and the closest point pair direction between each closest point pair in the first closest point pair set, wherein the closest point pair direction is toward the target point.
[0139] The second closest point determination unit 340 can be used to take the closest point pairs corresponding to the angle between the closest point pair direction and the normal direction less than or equal to a preset angle threshold as the second closest point pair set.
[0140] The reference three-dimensional model updating unit 350 can be used to determine an updated reference three-dimensional model according to the second closest point pair set and the point-to-plane constraint formula.
[0141] Iterative optimization unit 360: can be used to perform iterative optimization based on the updated reference three-dimensional model until a preset convergence condition is reached.
[0142] 3D model deformation unit 370: can be used to determine the target optimal solution of the point-to-plane constraint formula when the preset convergence condition is reached; and
[0143] A target three-dimensional model matching the target object three-dimensional model is obtained according to the target optimal solution.
[0144] Based on the above specific implementation, in some embodiments, such as Fig. 9As shown, the first closest point determination unit 320 may include:
[0145] The preliminary nearest point determination subunit 3201 can be used to find the preliminary nearest point whose distance between the vertex on the target object three-dimensional model and the vertex on the reference three-dimensional model is less than or equal to a preset threshold;
[0146] The reverse closest point determination subunit 3202 can be used to reversely search for a reverse closest point on the reference three-dimensional model whose distance to the initially selected closest point is less than or equal to a preset threshold;
[0147] The nearest point determination subunit 3203 can be used to determine whether the reverse nearest point is the vertex corresponding to the initially selected nearest point;
[0148] The target point determination subunit 3204 can be used to determine, if the judgment result is yes, that the initially selected nearest point is the target point that is the nearest point to the vertex.
[0149] Based on the above specific implementation methods, in some embodiments, the device also includes a weight value calculation unit: it can be used to calculate the initial weight value of the second closest point pair set and the nearest point in it according to a preset distance weight condition; calculate the weight value of the second closest point pair set and the nearest point in it according to a preset neighborhood point weight condition and the initial weight value.
[0150] Based on the above specific implementation, in some embodiments, the preset distance weight condition includes the formula: i '=e -dj / dmax ; Among them, ω i ' represents the initial weight value, d i represents the distance value between the second closest point pair set and the i-th closest point pair used for weight calculation, d max represents the maximum distance value between all the nearest point pairs used for weight calculation in the second nearest point pair set;
[0151] The preset neighborhood point weight condition includes the formula: Among them, ω i Represents the weight value, N neigh Represents the number of neighboring points of a nearest point, ω j Represents the initial weight value of each neighborhood point.
[0152] Based on the above specific implementation manner, in some embodiments, the reference three-dimensional model includes a preset three-dimensional model corresponding to the target object three-dimensional model; the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, v i represents the optimal solution to be solved, Represents the i-th closest point on the 3D model of the target object.
[0153] Based on the above specific implementation manner, in some other embodiments, the reference three-dimensional model includes a preset three-dimensional model corresponding to the target object three-dimensional model; the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, Δv i represents the optimal solution to be solved, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
[0154] Based on the above specific implementation methods, in some embodiments, the baseline three-dimensional model includes M preset three-dimensional models with a unified topological structure corresponding to the target object three-dimensional model; the device also includes a dimensionality reduction unit: it can be used to use a principal component analysis algorithm to reduce the dimensionality of the M preset three-dimensional models with a unified topological structure to obtain a statistical three-dimensional model.
[0155] Further, in some embodiments, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, p i represents the average model of the statistical three-dimensional model, It represents the coordinate value of the position of the i-th vertex in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total. Represents the i-th closest point on the 3D model of the target object.
[0156] Furthermore, in some other embodiments, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th closest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, Represents the coordinate value of the i-th vertex position in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total, d' k represents the optimal solution obtained in the previous iteration, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
[0157] Based on the above specific implementation methods, in some embodiments, reaching the preset convergence condition includes determining in the following manner: obtaining the change between the energy value of this iteration and the energy value obtained last time based on the point-to-plane constraint formula; judging whether the change is less than or equal to a change threshold; if the judgment result is yes, determining that the preset convergence condition is reached.
[0158] Based on the above specific implementation methods, in other embodiments, reaching the preset convergence condition includes determining in the following manner: determining whether the current number of iterative optimization times is greater than or equal to the maximum number of iterations; if the judgment result is yes, determining that the preset convergence condition is reached.
[0159] The device and method embodiments in the described device embodiments are based on the same inventive concept.
[0160] An embodiment of the present invention also provides a computer storage medium, wherein the computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set enables the computer to execute the three-dimensional model processing method as described above.
[0161] It can be seen from the embodiments of the method, device, terminal, server or system for determining location information provided by the present invention that in the embodiments of this specification, the three-dimensional model of the target object is taken as the object, the nearest point matching is performed through the bidirectional nearest point search method and the normal condition, the weight value of the effective nearest point pair is calculated, and finally iterative optimization is performed through the constraint method of the point-to-plane constraint formula, and finally the reference three-dimensional model is deformed to obtain the target three-dimensional model. The technical solution provided in the embodiments of this specification can be used to obtain a three-dimensional model that is highly matched with the three-dimensional model of the target object, has complete details, and has a standard topological structure, avoids premature matching and premature convergence, and effectively reduces the distortion rate of the three-dimensional model.
[0162] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0163] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, system and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0164] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0165] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A three-dimensional model processing method, It is characterized in that The method comprises: Acquire a target object three-dimensional model and a reference three-dimensional model; Finding target points in the target object three-dimensional model that are closest to vertices in the reference three-dimensional model to obtain a first set of closest point pairs; Determine the normal direction corresponding to the target point of the closest point pair in the first set of closest point pairs, and the closest point pair direction between each closest point pair in the first set of closest point pairs, wherein the closest point pair direction is toward the target point; The closest point pairs corresponding to which the angle between the direction of the closest point pair and the normal direction is less than or equal to a preset angle threshold are taken as the second closest point pair set; Calculate the initial weight value of the closest point in the second closest point pair set according to a preset distance weight condition; Calculate the weight value of the nearest point in the second set of nearest point pairs according to the preset neighborhood point weight condition and the initial weight value, and use the weight value as an input of the point-to-plane constraint formula; Determine an updated reference three-dimensional model according to the second closest point pair set and the point-to-plane constraint formula; Performing iterative optimization based on the updated benchmark three-dimensional model until a preset convergence condition is reached; Determine the target optimal solution of the point-to-plane constraint formula when the preset convergence condition is reached; Obtaining a target three-dimensional model that matches the target object three-dimensional model according to the target optimal solution; Wherein, the preset distance weight condition includes the formula: ω i '=e -di / dmax ; Among them, ω i ' represents the initial weight value of the i-th closest point in the second closest point pair set, d i represents the distance value between the i-th closest point pair in the second closest point pair set used for weight calculation, d max Represents the maximum distance value between all nearest point pairs in the second nearest point pair set used for weight calculation; in the preset neighborhood point weight condition, the initial weight values of each neighborhood point of the nearest point are used as input values to calculate the weight value average to obtain the weight value of the nearest point.
2. The method according to claim 1, It is characterized in that The step of searching for a target point in the target object three-dimensional model that is the closest point to a vertex in the reference three-dimensional model comprises: Finding a preliminarily selected closest point whose distance between a vertex on the target object three-dimensional model and a vertex on the reference three-dimensional model is less than or equal to a preset threshold; Reversely searching for a reverse nearest point on the reference three-dimensional model whose distance to the initially selected nearest point is less than or equal to a preset threshold; Determine whether the reverse closest point is the vertex corresponding to the initially selected closest point; If the judgment result is yes, the initially selected closest point is determined to be the target point that is the closest point to the vertex.
3. The method according to claim 1, It is characterized in that The preset neighborhood point weight condition includes the formula: Among them, ω i represents the weight value of the i-th closest point in the second closest point pair set, N neigh represents the number of neighboring points of the i-th nearest point, ω i ' j Represents the initial weight value of the jth neighboring point of the i-th nearest point.
4. The method according to claim 1, It is characterized in that The reference three-dimensional model includes a preset three-dimensional model corresponding to the target object three-dimensional model; The point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, v i represents the first optimal solution to be solved, represents the i-th closest point on the 3D model of the target object; Alternatively, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, Δv i represents the second optimal solution to be solved, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
5. The method according to claim 1, It is characterized in that The reference three-dimensional model includes M preset three-dimensional models with a unified topological structure corresponding to the target object three-dimensional model; before searching for target points in the target object three-dimensional model that are closest to vertices in the reference three-dimensional model to obtain a first set of closest point pairs, the method further includes: The principal component analysis algorithm is used to reduce the dimension of the M preset three-dimensional models with a unified topological structure to obtain a statistical three-dimensional model.
6. The method according to claim 5, It is characterized in that The point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, p i represents the average model of the statistical three-dimensional model, It represents the coordinate value of the position of the i-th vertex in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total. represents the i-th closest point on the 3D model of the target object; Alternatively, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th closest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, It represents the coordinate value of the position of the i-th vertex in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total, d′ k represents the optimal solution obtained in the previous iteration, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
7. The method according to any one of claims 1 to 6, It is characterized in that The reaching of the preset convergence condition includes determining in the following manner: Based on the point-to-plane constraint formula, the change between the energy value of this iteration and the energy value obtained last time is obtained; Determine whether the change is less than or equal to a change threshold; If the judgment result is yes, it is determined that the preset convergence condition is met; or, Determine whether the current number of iterative optimizations is greater than or equal to the maximum number of iterations; If the judgment result is yes, it is determined that the preset convergence condition is met.
8. A three-dimensional model processing device, It is characterized in that The device comprises: Acquisition unit: used for acquiring the target object 3D model and the reference 3D model; A first closest point determination unit is used to find the target point in the target object three-dimensional model that is the closest point to the vertex in the reference three-dimensional model, and obtain a first closest point pair set; An angle determination unit: used to determine the normal direction corresponding to the target point of the closest point pair in the first closest point pair set, and the closest point pair direction between each closest point pair in the first closest point pair set, wherein the closest point pair direction is toward the target point; A second closest point determination unit: configured to take the closest point pairs corresponding to the angle between the closest point pair direction and the normal direction being less than or equal to a preset angle threshold as the second closest point pair set; A weight value calculation unit: used to calculate the initial weight value of the nearest point in the second nearest point pair set according to a preset distance weight condition; calculate the weight value of the nearest point in the second nearest point pair set according to a preset neighborhood point weight condition and the initial weight value, and the weight value is used as an input to the point-to-plane constraint formula; A reference three-dimensional model updating unit: used for determining an updated reference three-dimensional model according to the second closest point pair set and the point-to-plane constraint formula; Iterative optimization unit: performing iterative optimization based on the updated reference three-dimensional model until a preset convergence condition is reached; 3D model deformation unit: used to determine the target optimal solution of the point-to-plane constraint formula when the preset convergence condition is reached; and Obtaining a target three-dimensional model that matches the target object three-dimensional model according to the target optimal solution; Wherein, the preset distance weight condition includes the formula: ω i '=e -di / dmax ; Among them, ω i ' represents the initial weight value of the i-th closest point in the second closest point pair set, d i represents the distance value between the i-th closest point pair in the second closest point pair set used for weight calculation, d max Represents the maximum distance value between all nearest point pairs in the second nearest point pair set used for weight calculation; in the preset neighborhood point weight condition, the initial weight values of each neighborhood point of the nearest point are used as input values to calculate the weight value average to obtain the weight value of the nearest point.
9. The device according to claim 8, It is characterized in that The first closest point determination unit comprises: A preliminary closest point determination subunit is used to find a preliminary closest point whose distance between the vertex on the target object three-dimensional model and the vertex on the reference three-dimensional model is less than or equal to a preset threshold; A reverse closest point determination subunit is used to reversely search for a reverse closest point on the reference three-dimensional model whose distance to the initially selected closest point is less than or equal to a preset threshold; The nearest point judgment subunit is used to judge whether the reverse nearest point is the vertex corresponding to the initial nearest point; Target point determination subunit: used for determining the initially selected closest point as the target point that is the closest point to the vertex if the judgment result is yes.
10. The device according to claim 8, It is characterized in that The preset neighborhood point weight condition includes the formula: Among them, ω i represents the weight value of the i-th closest point in the second closest point pair set, N neigh represents the number of neighboring points of the i-th nearest point, ω i i j Represents the initial weight value of the jth neighboring point of the i-th nearest point.
11. The device according to claim 8, It is characterized in that The reference three-dimensional model includes a preset three-dimensional model corresponding to the target object three-dimensional model; The point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, Represents the normal vector of the i-th closest point on the 3D model of the target object, v i represents the first optimal solution to be solved, represents the i-th closest point on the 3D model of the target object; Alternatively, the point-to-plane constraint formula includes: ; Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, Δv i represents the second optimal solution to be solved, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
12. The device according to claim 8, It is characterized in that The reference three-dimensional model includes M preset three-dimensional models with a unified topological structure corresponding to the target object three-dimensional model; the device also includes: Dimensionality reduction unit: used for finding the target points in the three-dimensional model of the target object that are the closest points to the vertices in the reference three-dimensional model, and before obtaining the first set of closest point pairs, using a principal component analysis algorithm to reduce the dimensions of the M preset three-dimensional models with a unified topological structure to obtain a statistical three-dimensional model.
13. The device according to claim 12, It is characterized in that The point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th nearest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, p i represents the average model of the statistical three-dimensional model, It represents the coordinate value of the position of the i-th vertex in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total. represents the i-th closest point on the 3D model of the target object; Alternatively, the point-to-plane constraint formula includes: Among them, E p2plane represents the energy value, ω i represents the weight value of the i-th closest point, represents the normal vector of the i-th closest point on the 3D model of the target object, d k represents the optimal solution to be solved, It represents the coordinate value of the position of the i-th vertex in the k-th eigenvector obtained after dimensionality reduction using the principal component analysis algorithm. There are K eigenvectors in total, d′ k represents the optimal solution obtained in the previous iteration, It represents the amount of change between the vertices on the updated reference 3D model obtained in the previous iteration and the vertices on the updated reference 3D model obtained in the previous iteration.
14. The device according to any one of claims 8 to 12, It is characterized in that The reaching of the preset convergence condition includes determining in the following manner: Based on the point-to-plane constraint formula, the change between the energy value of this iteration and the energy value obtained last time is obtained; Determine whether the change is less than or equal to a change threshold; If the judgment result is yes, it is determined that the preset convergence condition is met; or, Determine whether the current number of iterative optimizations is greater than or equal to the maximum number of iterations; If the judgment result is yes, it is determined that the preset convergence condition is met.
15. A computer storage medium, It is characterized in that The computer storage medium stores at least one instruction, and the at least one instruction enables the computer to execute the three-dimensional model processing method as described in any one of claims 1-7.
16. A three-dimensional model processing device, It is characterized in that The three-dimensional model processing device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the three-dimensional model processing method as described in any one of claims 1-7.
Citation Information
Patent Citations
Full-automatic modeling approach of three dimensional faces based on phase deviation scanning
CN102663810A
Point cloud automatic registering method based on point characteristic histogram
CN105976312A
Data matching and merging method and device for three-dimensional point cloud, and readable medium
CN109493375A
Method and system for detection of three dimension face model
KR1020180082170A
Edge preserving color smoothing of 3D models
US20170032580A1
