Three-dimensional model acquisition method and device, electronic equipment, chip and storage medium
By matching and updating the feature point location data of the 3D model, the construction process of the 3D face model is simplified, the problems of complex operation and difficult subsequent processing are solved, and convenient 3D face model editing and development are realized.
Patent Information
- Application Number
- CN202210726274.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-23
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-06-23
AI Technical Summary
Existing methods for constructing 3D face models are complex and inconvenient to operate, and cannot be directly processed, increasing the difficulty of processing.
By acquiring a preset first 3D model and a second 3D model, matching the mapping relationship of their feature points, updating the position data of feature points in the first 3D model according to the mapping relationship, estimating the position data of other vertices, and obtaining the target 3D model.
It simplifies the process of building 3D face models, making subsequent editing and interactive development easier and improving development efficiency.
Smart Images

Figure CN115205453B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, chip, and storage medium for acquiring three-dimensional models. Background Technology
[0002] Currently, there are two main methods for constructing 3D face models. One method involves capturing images of a stationary face using multiple 3D cameras from various angles, then stitching the images together to create a 3D model. The other method uses surface contour scanning to construct the 3D model. While both methods reconstruct 3D face models to some extent, they are complex and inconvenient to operate. Furthermore, when further processing of these 3D face models is required, they cannot be directly manipulated, increasing the processing difficulty. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, chip, and storage medium for acquiring three-dimensional models to address the shortcomings of related technologies.
[0004] According to a first aspect of the present disclosure, a method for obtaining a three-dimensional model is provided, comprising:
[0005] Obtain a preset first 3D model and a preset second 3D model. The first 3D model refers to the model created by a 3D modeling tool, and the second 3D model refers to the model reconstructed by a preset reconstruction tool.
[0006] Match the feature points of the first 3D model and the second 3D model to obtain the mapping relationship between the feature points in the first 3D model and the second 3D model;
[0007] The position data of each feature point in the first three-dimensional model is updated to the position data of the feature points in the second three-dimensional model according to the mapping relationship.
[0008] The position data of other vertices in the first three-dimensional model are estimated based on the position data of each feature point in the first three-dimensional model to obtain the target three-dimensional model.
[0009] Optionally, a preset first 3D model is obtained, including:
[0010] Create an initial 3D model and unify the normal direction of each vertex in the initial 3D model;
[0011] Each vertex in the initial 3D model is retained in its current spatial position, and the operation records of each vertex are deleted.
[0012] Create a human skeleton data framework and match the human skeleton data framework with the initial 3D model;
[0013] Create the control relationship between each vertex in the initial 3D model and each bone in the human skeleton data framework to obtain the preset first 3D model.
[0014] Optionally, a preset second three-dimensional model is obtained, including:
[0015] Obtain the original image containing the object to be reconstructed;
[0016] The original image is input into a preset reconstruction model to obtain a second three-dimensional model containing the object to be reconstructed, which is output by the preset reconstruction model.
[0017] Optionally, matching feature points of the first 3D model and the second 3D model to obtain the mapping relationship between feature points in the first 3D model and the second 3D model includes:
[0018] Obtain the first index value of each feature point in the first three-dimensional model; the first index value maintains a one-to-one correspondence with the spatial position of each feature point.
[0019] The first index value of each feature point is matched sequentially with the second index value of each feature point in the second 3D model; the second index value maintains a one-to-one correspondence with the spatial position of each feature point;
[0020] If the first index value and the second index value are not equal, continue matching the next second index value; if the first index value and the second index value are equal, associate the first index value and the second index value.
[0021] Once all feature points of the first 3D model and the second 3D model are associated, the mapping relationship between the feature points in the first 3D model and the second 3D model is obtained.
[0022] Optionally, the position data of other vertices in the first three-dimensional model are estimated based on the position data of each feature point in the first three-dimensional model to obtain the target three-dimensional model, including:
[0023] Obtain the preset radial basis function, and obtain the weight values of each vertex and related feature point in the first three-dimensional model;
[0024] For each vertex in the first 3D model, the position data of the vertex is obtained based on the position data of the vertex-related feature points, the weight values of the vertex and the related feature points, and the radial basis function, thus obtaining the target 3D model.
[0025] According to a second aspect of the present disclosure, a three-dimensional model acquisition device is provided, comprising:
[0026] The 3D model acquisition module is used to acquire a preset first 3D model and a preset second 3D model. The first 3D model refers to a model created by a 3D modeling tool, and the second 3D model refers to a model reconstructed by a preset reconstruction tool.
[0027] The mapping relationship acquisition module is used to match the feature points of the first 3D model and the second 3D model to obtain the mapping relationship between the feature points in the first 3D model and the second 3D model.
[0028] The location data update module is used to update the location data of each feature point in the first three-dimensional model to the location data of the feature points in the second three-dimensional model according to the mapping relationship.
[0029] The target model acquisition module is used to estimate the position data of other vertices in the first three-dimensional model based on the position data of each feature point in the first three-dimensional model, so as to obtain the target three-dimensional model.
[0030] Optionally, the 3D model acquisition module includes:
[0031] An initial model creation unit is used to create an initial 3D model and unify the normal direction of each vertex in the initial 3D model;
[0032] An operation record elimination unit is used to retain each vertex in the initial 3D model at its current spatial position and eliminate the operation record of each vertex.
[0033] A human skeleton data framework creation unit is used to create a human skeleton data framework and match the human skeleton data framework with the initial three-dimensional model;
[0034] The first model acquisition unit is used to create the control relationship between each vertex in the initial three-dimensional model and each bone in the human skeleton data framework, so as to obtain the preset first three-dimensional model.
[0035] Optionally, the 3D model acquisition module includes:
[0036] The original image acquisition unit is used to acquire the original image containing the object to be reconstructed.
[0037] The second model acquisition unit is used to input the original image into a preset reconstruction model to obtain a second three-dimensional model containing the object to be reconstructed, which is output by the preset reconstruction model.
[0038] Optionally, the mapping relationship acquisition module includes:
[0039] The first index value acquisition unit is used to acquire the first index value of each feature point in the first three-dimensional model; the first index value maintains a one-to-one correspondence with the spatial position of each feature point.
[0040] The index value matching unit is used to sequentially match the first index value of each feature point with the second index value of each feature point in the second 3D model; the second index value and the spatial position of each feature point maintain a one-to-one correspondence.
[0041] The mapping relationship acquisition unit is used to continue matching the next second index value when the first index value and the second index value are not equal; to associate the first index value and the second index value when the first index value and the second index value are equal; and to obtain the mapping relationship between the feature points in the first three-dimensional model and the second three-dimensional model after all feature points of the first three-dimensional model and the second three-dimensional model are associated.
[0042] Optionally, the target model acquisition module includes:
[0043] The function acquisition unit is used to acquire preset radial basis functions;
[0044] The weight value acquisition unit is used to acquire the weight values of each vertex and related feature points in the first three-dimensional model.
[0045] The target model acquisition unit is used to acquire the position data of each vertex in the first three-dimensional model based on the position data of the vertex-related feature points, the weight values of the vertex and the related feature points, and the radial basis function, so as to obtain the target three-dimensional model.
[0046] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0047] Processor and memory for storing executable instructions;
[0048] The processor reads executable instructions from the memory to implement the steps of the method described in any of the first aspects.
[0049] According to a fourth aspect of the present disclosure, a chip is provided, comprising:
[0050] A processor and a memory for storing an executable program; the processor reads the executable program from the memory to implement the steps of the method described in any of the first aspects.
[0051] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer-executable program is stored, which, when executed, implements the steps of the method described in any of the first aspects.
[0052] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0053] As can be seen from the above embodiments, the solution provided in this disclosure can obtain a preset first 3D model and a preset second 3D model. The first 3D model refers to a model created using a 3D modeling tool, and the second 3D model refers to a model reconstructed using a preset reconstruction tool. Then, feature points of the first 3D model and the second 3D model are matched to obtain a mapping relationship between the feature points in the first 3D model and the second 3D model. Afterward, the position data of each feature point in the first 3D model is updated to the position data of the feature points in the second 3D model according to the mapping relationship. Finally, the position data of other vertices in the first 3D model is estimated based on the position data of each feature point in the first 3D model to obtain the target 3D model. Thus, in this embodiment, updating the position data of feature points in the first 3D model to the position data of feature points in the second 3D model allows the position data of other vertices in the first model to be estimated using the position data of feature points in the second 3D model, thereby obtaining a target 3D model that matches the object to be reconstructed. This facilitates subsequent editing and interactive development on the target 3D model, improving development efficiency.
[0054] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0055] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0056] Figure 1 This is a flowchart illustrating a method for obtaining a three-dimensional model according to an exemplary embodiment.
[0057] Figure 2 This is a flowchart illustrating an exemplary embodiment of obtaining a first three-dimensional model.
[0058] Figure 3 This is a flowchart illustrating an exemplary embodiment of obtaining a second three-dimensional model.
[0059] Figure 4 This is a flowchart illustrating a method for obtaining the mapping relationship of feature points according to an exemplary embodiment.
[0060] Figure 5 This is a flowchart illustrating an example of obtaining a target 3D model.
[0061] Figure 6This is a schematic diagram illustrating a face reconstruction failure when the corresponding steps are not performed, according to an exemplary embodiment.
[0062] Figure 7 This is a schematic diagram illustrating a marker feature point according to an exemplary embodiment.
[0063] Figure 8 This is a block diagram illustrating a three-dimensional model acquisition device according to an exemplary embodiment.
[0064] Figure 9 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0065] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described below by way of example do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatus consistent with some aspects of this disclosure as detailed in the appended claims. It should be noted that, without conflict, the following embodiments and features in the implementation methods can be combined with each other.
[0066] Currently, there are two main methods for constructing 3D face models. One method involves capturing images of a stationary face using multiple 3D cameras from various angles, then stitching the images together to create a 3D model. The other method uses surface contour scanning to construct the 3D model. While both methods reconstruct 3D face models to some extent, they are relatively complex and inconvenient to operate. Furthermore, when there is a need for subsequent processing of these 3D face models, they cannot be directly manipulated, increasing the processing difficulty.
[0067] To address the aforementioned technical problems, this disclosure provides a method for acquiring a three-dimensional model, which can be applied to electronic devices. Figure 1 This is a flowchart illustrating a method for obtaining a three-dimensional model according to an exemplary embodiment.
[0068] See Figure 1 A method for obtaining a three-dimensional model, comprising steps 11 to 14.
[0069] In step 11, a preset first three-dimensional model and a preset second three-dimensional model are obtained. The first three-dimensional model refers to a model created by a three-dimensional modeling tool, and the second three-dimensional model refers to a model reconstructed by a preset reconstruction tool.
[0070] In this embodiment, the electronic device can acquire a preset first three-dimensional model, which refers to a model created using a three-dimensional modeling tool. This three-dimensional modeling tool may include, but is not limited to, 3DS MAX software or MAYA software. Alternatively, it can be a three-dimensional model created by the user using a three-dimensional modeling tool installed on the electronic device, which only contains the relative position data set for each vertex during the creation process.
[0071] In one example, the first 3D model can be obtained through the following steps, see [link to example]. Figure 2 This includes steps 21 to 24.
[0072] In step 21, the electronic device can create an initial three-dimensional model and unify the normal directions of each vertex in the initial three-dimensional model.
[0073] In this step, the initial 3D model is a pre-generated and created data format used to describe the coordinate positions of each vertex on the surface of an object in 3D space, as well as information such as the shape, color, and lighting of the object's surface, for offline or real-time rendering and display.
[0074] In this step, the vertex data of each vertex in the initial 3D model includes the normal direction of that vertex. The electronic device can unify the normal directions of all vertices to the same direction; for example, adjusting the normal directions of all vertices to the same value will achieve direction unification. In this way, unifying the normal directions of vertices in this step can ensure the accuracy of subsequent indexing and labeling.
[0075] In step 22, the electronic device can retain each vertex in the initial 3D model in its current spatial position and delete the operation records of each vertex.
[0076] Considering that adjustments such as stretching and compression are performed on the initial 3D model during its creation, resulting in operation records, this step allows the electronic device to clear these operation records, or in other words, eliminate the operation records for each vertex. This process of eliminating operation records from the initial 3D model is also known as a model reset transformation. After eliminating the operation records, the positions of each vertex in the initial 3D model remain unchanged in their current spatial locations.
[0077] In this step, the electronic device can set a coordinate system for the initial 3D model, for example, specifying the center point of the initial 3D model as the origin of the 3D spatial coordinate system, so that each vertex in the initial 3D model has its own spatial position.
[0078] In step 23, the electronic device can create a human skeleton data framework and match the human skeleton data framework with the initial three-dimensional model.
[0079] In this step, the electronic device can create a human skeletal data framework. For example, based on user input, the electronic device can sequentially select the creation function, system function, and then select Biped skeleton to establish a bipedal skeletal data framework, i.e., a human skeletal data framework. Then, the electronic device can select the torso type to set the number of human bones, such as arms, neck links, spine links, leg links, tail links, pelvis, etc. Afterward, the electronic device can select the body shape mode and adjust the human skeletal data framework by scaling vertically, horizontally, and rotating.
[0080] In this step, the electronic device can move the aforementioned human skeleton data framework to the position of the initial 3D model for matching. For example, the initial 3D model can be adjusted to a semi-transparent state, and the aforementioned human skeleton data framework can be adjusted by translation, scaling, rotation, etc., until the human skeleton data framework matches the initial 3D model.
[0081] In step 24, the electronic device can create the control relationship between each vertex in the initial three-dimensional model and each bone in the human skeleton data framework to obtain the preset first three-dimensional model.
[0082] In this step, the electronic device can perform skinning operations on the aforementioned human skeletal data framework, selecting an initial 3D model. Within the modifier list of the initial 3D model, the skinning function is selected, and all bone joints are encapsulated. This associates each vertex in the initial 3D model with its corresponding bone and assigns weights, thereby creating the control relationship between each vertex in the initial 3D model and each bone in the human skeletal data framework. For example, a vertex in the skinning process can be controlled by a maximum of four bones. The electronic device can then select the "confirm" function to complete the matching process between the human skeletal data framework and the initial 3D model. Finally, the electronic device can synchronize the skinning parameter data to the initial 3D model to obtain a preset first 3D model.
[0083] In this embodiment, the electronic device can acquire a preset second three-dimensional model, which refers to a model reconstructed using a preset reconstruction tool. This preset reconstruction tool may include, but is not limited to, a neural network model. In one example, the second three-dimensional model can be acquired through the following steps, see [link to example]. Figure 3 This includes steps 31 to 32.
[0084] In step 31, the electronic device can acquire the original image containing the object to be reconstructed.
[0085] In this step, the electronic device can read a pre-stored original image from its local storage, which contains the object to be reconstructed, such as a human body. Alternatively, the camera within the electronic device can capture an image of the object to be reconstructed as the original image. Those skilled in the art can choose an appropriate method for acquiring the original image based on the specific scenario, and the corresponding solution falls within the protection scope of this disclosure.
[0086] In step 32, the electronic device can input the original image into a preset reconstruction model to obtain a second three-dimensional model containing the object to be reconstructed, which is output by the preset reconstruction model.
[0087] In this step, the electronic device stores a preset reconstruction model, which may include, but is not limited to, convolutional neural networks (CNN), fully connected neural networks (FCN), generative adversarial networks (GAN), recurrent neural networks (RNN), long short-term memory networks (LSTM), Hopfield networks, and Boltzmann machines. Those skilled in the art can select an appropriate preset reconstruction model according to the specific scenario, and the corresponding solution falls within the protection scope of this disclosure.
[0088] Understandably, the aforementioned preset reconstruction model is trained on image samples and can reconstruct the image from the image samples. Furthermore, the similarity between the reconstructed image and the object in the sample image exceeds a preset similarity threshold. In other words, the aforementioned preset reconstruction model is a model that has already been trained.
[0089] In this step, the electronic device can input the original image into a preset reconstruction model, which reconstructs the original image and outputs a second three-dimensional model containing the object to be reconstructed in the original image. This second three-dimensional model can also be called an algorithm model.
[0090] In step 12, feature points of the first 3D model and the second 3D model are matched to obtain the mapping relationship between feature points in the first 3D model and the second 3D model.
[0091] In this embodiment, a portion of the vertices of the first and second 3D models are designated as feature points, such as eyes, nose, mouth, and ears, which can be selected according to the specific scenario. In one example, a preset number (e.g., 10-100) of vertices on the face, such as eyes, nose, and mouth, can be designated as feature points; and the index value of each feature point maintains a one-to-one correspondence with the position of the feature point; or, in other words, the index value in each 3D model can include the order and position data of the feature points, such as 1001(x1,y1,z1), or the index value is a variation of the position data x1y1z1, which can be selected according to the specific scenario.
[0092] In this embodiment, the electronic device can match feature points of the first 3D model and the second 3D model, see [link / reference]. Figure 4 This includes steps 41 to 43.
[0093] In step 41, the electronic device can obtain the first index value of each feature point in the first three-dimensional model; the first index value maintains a one-to-one correspondence with the spatial position of each feature point.
[0094] In step 42, the electronic device can sequentially match the first index value of each feature point with the second index value of each feature point in the second three-dimensional model; the second index value and the spatial position of each feature point maintain a one-to-one correspondence.
[0095] In step 43, when the first index value and the second index value are not equal, the electronic device can continue to match the next second index value; when the first index value and the second index value are equal, the first index value and the second index value are associated; after all feature points of the first three-dimensional model and the second three-dimensional model are associated, the mapping relationship of feature points in the first three-dimensional model and the second three-dimensional model is obtained.
[0096] In step 13, the position data of each feature point in the first three-dimensional model is updated to the position data of the feature points in the second three-dimensional model according to the mapping relationship.
[0097] Given that there is a one-to-one correspondence between each feature point in the first 3D model and each feature point in the second 3D model, the electronic device can update the position data of each feature point in the first 3D model to the position data of the feature points in the second 3D model according to the mapping relationship. In other words, the electronic device can transfer the position data of the feature points in the second 3D model to the corresponding feature points in the first 3D model, thereby matching the first 3D model with the object to be reconstructed.
[0098] In step 14, the position data of other vertices in the first three-dimensional model are estimated based on the position data of each feature point in the first three-dimensional model to obtain the target three-dimensional model.
[0099] In this embodiment, the electronic device can estimate the position data of other vertices in the first three-dimensional model based on the position data of each feature point in the first three-dimensional model. See [link to previous document]. Figure 5 This includes steps 51 to 52.
[0100] In step 51, the electronic device can obtain a preset radial basis function and obtain the weight values of each vertex and related feature point in the first three-dimensional model.
[0101] In step 52, for each vertex in the first 3D model, the electronic device can obtain the vertex position data based on the position data of the vertex's related feature points, the weight values of the vertex and its related feature points, and the radial basis function. Once the position data of all vertices in the first 3D model are obtained, the electronic device can obtain the target 3D model.
[0102] Thus, the solution provided in this embodiment can obtain a preset first 3D model and a preset second 3D model. The first 3D model refers to a model created using a 3D modeling tool, and the second 3D model refers to a model reconstructed using a preset reconstruction tool. Then, feature points of the first and second 3D models are matched to obtain a mapping relationship between the feature points in the first and second 3D models. Afterward, the position data of each feature point in the first 3D model is updated to the position data of the feature points in the second 3D model according to the mapping relationship. Finally, the position data of other vertices in the first 3D model is estimated based on the position data of each feature point in the first 3D model to obtain the target 3D model. In this embodiment, updating the position data of feature points in the first 3D model to the position data of feature points in the second 3D model allows the position data of other vertices in the first model to be estimated using the position data of feature points in the second 3D model, thereby obtaining a target 3D model that matches the object to be reconstructed. This facilitates subsequent editing and interactive development on the target 3D model, improving development efficiency.
[0103] The following describes the combination in specific scenarios. Figure 1 The method for obtaining a 3D model shown includes:
[0104] (1) Unify the vertex normals of the initial 3D model to ensure that the vertex normal directions of the initial 3D model are consistent. Inconsistency will affect subsequent indexing.
[0105] (2) The initial 3D model needs to be reset and transformed, that is, the previous operation records of the initial 3D model are cleared, and the positions of all vertices in the initial 3D model are returned to their original positions without changing the current positions of the vertices. In addition, the center point of the initial 3D model is designated as the origin of the 3D spatial coordinate system, so that each vertex in the initial 3D model has its own actual spatial position. Step (2) is to prepare for marking the indexes of the initial 3D model and the second 3D model.
[0106] (3) In 3DSMAX or MAYA modeling software, create the human skeleton; the human skeleton needs to match the initial 3D model; then skinning is needed, and the number of vertices of the skin can be controlled by a maximum of 4 bones.
[0107] (4) Collapse To: All controllers in the initial 3D model are transferred to the initial 3D model, meaning the skin's position data is transferred to the initial 3D model. At this point, the vertex index values of the initial 3D model will change, resulting in the first 3D model. If steps (1) to (4) are not executed, the following will occur: Figure 6 The incorrect model shown caused subsequent face reconstruction to fail.
[0108] (5) The first three-dimensional model is matched with the second three-dimensional model. The faces of the first and second three-dimensional models are completely overlapped, including the eyes, nose, mouth, ears and other parts.
[0109] (6) Locate the feature points of the second 3D model's face on the face of the first 3D model, such as... Figure 7 Point A is shown in the left and right images, and the index value (or the order of the index values) is recorded.
[0110] (7) After completing the index matching, feature points are labeled in the BFM model and the original 3D model, and the mapping relationship of the feature points is generated. Then, the first 3D model with skin weight information is deformed using the radial basis function according to the above mapping relationship, and the shape of the face reconstruction model is mapped into the first 3D model to obtain the target 3D model.
[0111] Based on the three-dimensional model acquisition method provided in the embodiments of this disclosure, the embodiments of this disclosure also provide a three-dimensional model acquisition device, see [link to relevant documentation]. Figure 8 The device includes:
[0112] The 3D model acquisition module 81 is used to acquire a preset first 3D model and a preset second 3D model. The first 3D model refers to a model created by a 3D modeling tool, and the second 3D model refers to a model reconstructed by a preset reconstruction tool.
[0113] The mapping relationship acquisition module 82 is used to match the feature points of the first three-dimensional model and the second three-dimensional model to obtain the mapping relationship of the feature points in the first three-dimensional model and the second three-dimensional model.
[0114] The location data update module 83 is used to update the location data of each feature point in the first three-dimensional model to the location data of the feature points in the second three-dimensional model according to the mapping relationship.
[0115] The target model acquisition module 84 is used to estimate the position data of other vertices in the first three-dimensional model based on the position data of each feature point in the first three-dimensional model, so as to obtain the target three-dimensional model.
[0116] In one embodiment, the 3D model acquisition module includes:
[0117] An initial model creation unit is used to create an initial 3D model and unify the normal direction of each vertex in the initial 3D model;
[0118] An operation record elimination unit is used to retain each vertex in the initial 3D model at its current spatial position and eliminate the operation record of each vertex.
[0119] A human skeleton data framework creation unit is used to create a human skeleton data framework and match the human skeleton data framework with the initial three-dimensional model;
[0120] The first model acquisition unit is used to create the control relationship between each vertex in the initial three-dimensional model and each bone in the human skeleton data framework, so as to obtain the preset first three-dimensional model.
[0121] In one embodiment, the 3D model acquisition module includes:
[0122] The original image acquisition unit is used to acquire the original image containing the object to be reconstructed.
[0123] The second model acquisition unit is used to input the original image into a preset reconstruction model to obtain a second three-dimensional model containing the object to be reconstructed, which is output by the preset reconstruction model.
[0124] In one embodiment, the mapping relationship acquisition module includes:
[0125] The first index value acquisition unit is used to acquire the first index value of each feature point in the first three-dimensional model; the first index value maintains a one-to-one correspondence with the spatial position of each feature point.
[0126] The index value matching unit is used to sequentially match the first index value of each feature point with the second index value of each feature point in the second 3D model; the second index value and the spatial position of each feature point maintain a one-to-one correspondence.
[0127] The mapping relationship acquisition unit is used to continue matching the next second index value when the first index value and the second index value are not equal; to associate the first index value and the second index value when the first index value and the second index value are equal; and to obtain the mapping relationship between the feature points in the first three-dimensional model and the second three-dimensional model after all feature points of the first three-dimensional model and the second three-dimensional model are associated.
[0128] In one embodiment, the target model acquisition module includes:
[0129] The function acquisition unit is used to acquire preset radial basis functions;
[0130] The weight value acquisition unit is used to acquire the weight values of each vertex and related feature points in the first three-dimensional model.
[0131] The target model acquisition unit is used to acquire the position data of each vertex in the first three-dimensional model based on the position data of the vertex-related feature points, the weight values of the vertex and the related feature points, and the radial basis function, so as to obtain the target three-dimensional model.
[0132] It should be noted that the apparatus shown in this embodiment matches the content of the method embodiment, and the content of the above method embodiment can be referred to, which will not be repeated here.
[0133] In an exemplary embodiment, an electronic device is also provided, see [link to example]. Figure 9 ,include:
[0134] Processor 91; memory 92 for storing computer programs executable by the processor;
[0135] The processor is configured to execute a computer program in the memory to achieve, for example, Figures 1 to 7 The method described.
[0136] In an exemplary embodiment, a chip is also provided, comprising:
[0137] A processor and a memory for storing an executable program; the processor reads the executable program from the memory to perform, as... Figures 1 to 7 The method described.
[0138] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory including an executable computer program, which can be executed by a processor to achieve, for example... Figures 1 to 7 The method of the illustrated embodiment. The readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0139] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0140] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A three-dimensional model acquisition method characterized by comprising: The method comprises the following steps: obtaining a preset first three-dimensional model and a second three-dimensional model, wherein the first three-dimensional model is a model created by a three-dimensional modeling tool, and the second three-dimensional model is a model obtained by reconstructing an original image by a preset reconstruction tool, and the original image contains an object to be reconstructed; matching feature points of the first three-dimensional model and the second three-dimensional model to obtain a mapping relationship of the feature points in the first three-dimensional model and the second three-dimensional model; updating position data of each feature point in the first three-dimensional model to position data of a feature point in the second three-dimensional model according to the mapping relationship, so that the position data of each feature point in the first three-dimensional model becomes a spatial position of a feature point on the object to be reconstructed; estimating position data of other vertices in the first three-dimensional model according to the position data of each feature point in the first three-dimensional model to obtain a target three-dimensional model, wherein each feature point and other vertex of the target three-dimensional model are used to reconstruct a spatial shape of the object to be reconstructed; obtaining a preset first three-dimensional model, comprising: creating an initial three-dimensional model and unifying normal directions of each vertex in the initial three-dimensional model; keeping each vertex in the initial three-dimensional model at a current spatial position and eliminating operation records of each vertex; creating a human skeleton data framework and matching the human skeleton data framework with the initial three-dimensional model; creating a control relationship between each vertex in the initial three-dimensional model and each block of the human skeleton data framework to obtain the preset first three-dimensional model; obtaining a preset second three-dimensional model, comprising: obtaining an original image containing an object to be reconstructed; inputting the original image into a preset reconstruction model to obtain the second three-dimensional model containing the object to be reconstructed output by the preset reconstruction model.
2. The method of claim 1, wherein, matching feature points of the first three-dimensional model and the second three-dimensional model to obtain a mapping relationship of the feature points in the first three-dimensional model and the second three-dimensional model, comprising: obtaining first index values of each feature point in the first three-dimensional model; the first index values and the spatial positions of each feature point maintain a one-to-one correspondence relationship; sequentially matching the first index values of each feature point with second index values of each feature point in the second three-dimensional model; the second index values and the spatial positions of each feature point maintain a one-to-one correspondence relationship; when the first index value and the second index value are not equal, continue to match the next second index value; when the first index value and the second index value are equal, associate the first index value and the second index value; after all the feature points of the first three-dimensional model and the second three-dimensional model are associated, the mapping relationship of the feature points in the first three-dimensional model and the second three-dimensional model is obtained.
3. The method of claim 1, wherein, estimating position data of other vertices in the first three-dimensional model according to position data of each feature point in the first three-dimensional model to obtain a target three-dimensional model, comprising: obtaining a preset radial basis function and obtaining weight values of each vertex and related feature points in the first three-dimensional model; According to the position data of the vertex-related feature points, the weight value of the vertex and the related feature points and the radial basis function, position data of each vertex in the first three-dimensional model is obtained, and a target three-dimensional model is obtained.
4. A three-dimensional model acquisition apparatus characterized by comprising: Comprise: The three-dimensional model acquisition module is used for acquiring a preset first three-dimensional model and a second three-dimensional model, the first three-dimensional model refers to a model created by a three-dimensional modeling tool, and the second three-dimensional model refers to a model obtained by a preset reconstruction tool after reconstructing an original image; the original image contains an object to be reconstructed; The mapping relationship acquisition module is used for matching feature points of the first three-dimensional model and the second three-dimensional model, and obtaining a mapping relationship of the feature points in the first three-dimensional model and the second three-dimensional model; The position data updating module is used for updating position data of each feature point in the first three-dimensional model to position data of feature points in the second three-dimensional model according to the mapping relationship, so that the position data of each feature point in the first three-dimensional model becomes the spatial position of the feature points on the object to be reconstructed; The target model acquisition module is used for estimating position data of other vertices in the first three-dimensional model according to the position data of each feature point in the first three-dimensional model, and obtaining a target three-dimensional model, each feature point and other vertex of the target three-dimensional model are used to reconstruct the spatial shape of the object to be reconstructed; The three-dimensional model acquisition module comprises: The initial model creation unit is used for creating an initial three-dimensional model and unifying normal directions of each vertex in the initial three-dimensional model; The operation record elimination unit is used for keeping each vertex in the initial three-dimensional model at a current spatial position and eliminating operation records of each vertex; The human skeleton data framework creation unit is used for creating a human skeleton data framework and matching the human skeleton data framework with the initial three-dimensional model; The first model acquisition unit is used for creating control relationships between each vertex in the initial three-dimensional model and each block of the human skeleton data framework, and obtaining the preset first three-dimensional model; The three-dimensional model acquisition module comprises: The original image acquisition unit is used for acquiring an original image containing an object to be reconstructed; The second model acquisition unit is used for inputting the original image into a preset reconstruction model, and obtaining the second three-dimensional model containing the object to be reconstructed output by the preset reconstruction model.
5. The apparatus of claim 4, wherein, The mapping relationship acquisition module comprises: The first index value acquisition unit is used for acquiring first index values of each feature point in the first three-dimensional model; the first index values and the spatial positions of each feature point maintain a one-to-one correspondence relationship; The index value matching unit is used for sequentially matching the first index values of each feature point with second index values of each feature point in the second three-dimensional model; the second index values and the spatial positions of each feature point maintain a one-to-one correspondence relationship; The mapping relationship obtaining unit is configured to: when the first index value and the second index value are not equal, continue matching a next second index value; when the first index value and the second index value are equal, associate the first index value and the second index value; and when all feature points of the first three-dimensional model and the second three-dimensional model are associated, obtain a mapping relationship of the feature points in the first three-dimensional model and the second three-dimensional model.
6. The apparatus of claim 4, wherein, The target model obtaining module comprises: a function obtaining unit configured to obtain a preset radial basis function; a weight value obtaining unit configured to obtain a weight value of each vertex in the first three-dimensional model and a related feature point; a target model obtaining unit configured to, for each vertex in the first three-dimensional model, obtain position data of the vertex according to position data of the vertex-related feature point, the weight value of the vertex and the related feature point, and the radial basis function, to obtain a target three-dimensional model.
7. An electronic device, comprising: comprising: a processor and a memory for storing executable instructions; the processor reads the executable instructions from the memory to implement the steps of the method of any one of claims 1-3.
8. A chip, characterized by comprising: a processor and a memory for storing executable instructions; the processor reads the executable instructions from the memory to implement the steps of the method of any one of claims 1-3.
9. A non-transitory computer-readable storage medium having a computer-executable program stored thereon, characterized in that, the executable program, when executed, implements the steps of the method of any one of claims 1-3.
Citation Information
Patent Citations
Method, apparatus and electronic device for statically generating three-dimensional face model
CN109191505A