Three-dimensional model generation method and device
Patent Information
- Application Number
- CN202111132011.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2041-09-26
Smart Images

Figure CN113888696B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of human body models, and in particular to a method and device for generating a three-dimensional model. Background Art
[0002] In the related art, the three-dimensional human body model is usually only for the head model or the whole body model. The establishment of the human body model is usually based on the establishment of the key points of the skeleton. The three-dimensional human body model established only for the key points of the skeleton has low accuracy. Especially in video scenes, such as short videos or live broadcasts, when using three-dimensional special effects, due to the inaccurate establishment of the human body model, there will be a problem of mismatch between the special effects and the human body model.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The present disclosure provides a three-dimensional model generation method and device to at least solve the problem of low fit between special effects and models caused by low accuracy in establishing three-dimensional human body models in related technologies. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a three-dimensional model generation method is provided, comprising acquiring a target video frame including a target object; extracting two-dimensional coordinates of key positions on the body of the target object from the target video frame; performing matching calculations on the two-dimensional coordinates using a model database to obtain target posture transformation parameters matching the two-dimensional coordinates, wherein the model database comprises a plurality of sets of reference posture transformation parameters and reference three-dimensional coordinates having corresponding relationships, wherein the reference posture transformation parameters are used to indicate transformation parameters of the body posture of the reference object from an initial posture to a reference posture, and the reference three-dimensional coordinates are the three-dimensional coordinates of key positions on the body of the reference object in the reference posture; transforming a reference human body model corresponding to the reference object according to the target posture transformation parameters to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a three-dimensional human body model whose body posture is in the initial posture.
[0006] According to a second aspect of an embodiment of the present disclosure, a three-dimensional model generation device is provided, comprising an acquisition unit for acquiring a target video frame including a target object; an extraction unit for extracting two-dimensional coordinates of key positions on the body of the target object from the target video frame; a calculation unit for performing matching calculations on the two-dimensional coordinates using a model database to obtain target posture transformation parameters matching the two-dimensional coordinates, wherein the model database comprises a plurality of sets of reference posture transformation parameters and reference three-dimensional coordinates having a corresponding relationship, wherein the reference posture transformation parameters are transformation parameters indicating the body posture of the reference object from an initial posture to a reference posture, and the reference three-dimensional coordinates are the three-dimensional coordinates of the key positions on the body of the reference object in the reference posture; and a generation unit for transforming a reference human body model corresponding to the reference object according to the target posture transformation parameters to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a human body three-dimensional model whose body posture is in the initial posture.
[0007] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a three-dimensional model generating device, the three-dimensional model generating device is enabled to perform the three-dimensional model generating method.
[0008] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer program product, comprising a computer program / instructions, wherein the computer program / instructions implement the three-dimensional model generation method when executed by a processor.
[0009] According to a fifth aspect of an embodiment of the present disclosure, there is also provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the three-dimensional model generating method through the computer program.
[0010] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0011] By acquiring the two-dimensional coordinates of key positions in the two-dimensional video frame image, matching calculations are performed on the two-dimensional coordinates using a model database formed by multi-posture transformations of a reference human body model, and target posture transformation parameters corresponding to the target posture of the target object in the video frame are obtained. The reference human body model is subjected to posture changes according to the target posture transformation parameters to generate a target human body three-dimensional model corresponding to the target posture. In the process of generating the three-dimensional human body model, the posture change parameters are calculated using the two-dimensional coordinates of the key positions of the contour, and the transformation calculations of the key positions of the contour in the posture transformation are calculated in the target human body three-dimensional model, so that the generated target human body three-dimensional model has better contour features, and the accuracy of the human body three-dimensional model is improved, so that the human body three-dimensional model can be applied to special effects rendering to improve the fit with the special effects rendering effect.
[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0014] Figure 1 The figure is a schematic diagram of an application environment of a three-dimensional model generating method according to an exemplary embodiment.
[0015] Figure 2 The figure is a flow chart of a method for generating a three-dimensional model according to an exemplary embodiment.
[0016] Figure 3 The figure is a flow chart of a method for generating a three-dimensional model according to an exemplary embodiment.
[0017] Figure 4 The figure is a flow chart of a method for generating a three-dimensional model according to an exemplary embodiment.
[0018] Figure 5 The figure is a flow chart of a method for generating a three-dimensional model according to an exemplary embodiment.
[0019] Figure 6 The figure is a flow chart of a method for generating a three-dimensional model according to an exemplary embodiment.
[0020] Figure 7 The figure is a structural block diagram of a three-dimensional model generating device according to an exemplary embodiment.
[0021] Figure 8 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0022] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0024] According to one aspect of the exemplary embodiment, a three-dimensional model generation method is provided. Optionally, the three-dimensional model generation method can be applied to, but is not limited to, Figure 1 In the application environment shown, a target client for displaying a target object is running in the terminal device 102. The terminal device 102 exchanges data with the server 122 via the network 110, and displays an image corresponding to the three-dimensional human body model corresponding to the target object in the target client by processing a video frame showing the target object.
[0025] Specifically, it is not limited to using the processing engine 126 of the server 122 to obtain the video frame sent from the terminal device 102 from the data in the database 124. The video frame can be an image frame with default depth of field information. The processing engine 126 extracts the two-dimensional coordinates of the key position on the body of the target object from the video frame. The key position is the position of the contour point of the target part on the body of the target object. The two-dimensional coordinates are matched and calculated using the model database to obtain the posture transformation parameters matching the two-dimensional coordinates. The model database includes multiple groups of reference posture transformation parameters and reference three-dimensional coordinates with corresponding relationships. The reference posture transformation parameters are used to indicate the transformation parameters of the body posture of the reference object from the initial posture to the reference posture. The reference three-dimensional coordinates are the three-dimensional coordinates of the key position on the body of the reference object under the reference posture. According to the target posture transformation parameters, the reference human body model corresponding to the reference object is transformed to obtain a human body three-dimensional model matching the target object.
[0026] When a human body 3D model is generated, the human body 3D model can be directly sent to the terminal device 102 to realize displaying the target object with a clear outline in the target client. The display special effect of the target object in the current target client can also be obtained, and the human body 3D model is rendered using the rendering effect corresponding to the display special effect, so that the rendered human body 3D model is displayed in the target client.
[0027] Optionally, in this embodiment, the terminal device may be a terminal device configured with a target client, which may include but is not limited to at least one of the following: a mobile phone (such as an Android phone, an IOS phone, etc.), a laptop, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, etc. The target client may be a client with image display function such as a video client, an instant messaging client, a browser client, an educational client, etc. The network may include but is not limited to: a wired network, a wireless network, wherein the wired network includes: a local area network, a metropolitan area network and a wide area network, and the wireless network includes: Bluetooth, WIFI and other networks that realize wireless communication. The server may be a single server, or a server cluster consisting of multiple servers, or a cloud server. The above is only an example, and no limitation is made to this in this embodiment.
[0028] Figure 2 is a flow chart of a method for generating a three-dimensional model according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0029] Step S11, obtaining a target video frame including a target object.
[0030] Step S12, extracting the two-dimensional coordinates of key positions on the body of the target object from the target video frame.
[0031] Step S13, using the model database to perform matching calculation on the two-dimensional coordinates to obtain target posture transformation parameters that match the two-dimensional coordinates. The model database includes multiple sets of reference posture transformation parameters and reference three-dimensional coordinates with corresponding relationships, the reference posture transformation parameters are used to indicate the transformation parameters of the reference object's body posture from the initial posture to the reference posture, and the reference three-dimensional coordinates are the three-dimensional coordinates of the key positions on the body of the reference object in the reference posture.
[0032] Step S14, transforming the reference human body model corresponding to the reference object according to the target posture transformation parameter to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a human body three-dimensional model of the reference object in an initial posture.
[0033] Optionally, the target video frame may be an image frame of default depth of field information. The target video frame may be an image frame in a continuous video frame generated by the target object in a continuous time period, and the continuous video frames constitute a dynamic display effect of the target object in a continuous time period. For example, a continuous video frame is a video frame generated by a target object performing a live broadcast operation in a target client at the current time, and the posture corresponding to each frame of the target object is connected to constitute a dynamic posture of the target object in the current time period, and the target object is continuously displayed in the display interface of the target client. Each image frame contained in the continuous video frame may be a two-dimensional image of the default depth of field information.
[0034] Optionally, the key position can be the position of the contour point of the target part on the body of the target object. Extracting the two-dimensional coordinates from the target video frame can be limited to including determining the key position on the body of the object. Determine the target part on the body of the object, the target part can be a part where the contour position is more likely to produce posture change during the human body model generation process, such as: head, neck, shoulder, hand, elbow, wrist, leg, etc. The target part can be a combination of multiple parts, such as the head, neck and shoulder as the target part. When the target part is determined, determine the key position corresponding to the contour point of the target part. The key position can be a position point where the contour contained in the target part is flexible in posture change or important in posture change, such as the intersection of the neck and the shoulder, and the intersection of the neck and the head.
[0035] Optionally, extracting two-dimensional coordinates from the target video may be performed using, but not limited to, a coordinate extraction model. An initial coordinate extraction model is obtained, and the initial coordinate extraction model may use a convolutional neural network model, such as a CNN model. Key parameters corresponding to the key position are input into the initial coordinate extraction model. A large number of human body images containing target parts are used as model training data to train the initial coordinate extraction model to obtain a coordinate extraction model, which is a model for realizing two-dimensional coordinate extraction of key positions of the input image.
[0036] Optionally, the two-dimensional coordinates are matched and calculated using the model database, and the two-dimensional coordinates can be matched and compared with multiple groups of reference posture transformation parameters and reference three-dimensional coordinates stored in the model database, but are not limited to, to obtain target posture transformation parameters corresponding to the two-dimensional coordinates. The matching calculation results are updated and iterated using the model database to obtain target posture transformation parameters with higher accuracy, so that the target human body three-dimensional model can be more closely matched with the target video frame.
[0037] Optionally, the reference human body model is transformed according to the target posture transformation parameters, that is, the reference human body model is transformed from an initial posture to a target posture corresponding to the target posture parameters, thereby obtaining a target human body three-dimensional model in the target posture, thereby achieving a three-dimensional human body model with a high degree of posture fit with the video frame image.
[0038] In an embodiment of the present application, by acquiring the two-dimensional coordinates of key positions in a two-dimensional video frame image, a model database formed by multi-posture transformation of a reference human body model is used to perform matching calculations on the two-dimensional coordinates, and target posture transformation parameters corresponding to the target posture of the target object in the video frame are obtained. The reference human body model is subjected to posture changes according to the target posture transformation parameters to generate a target human body three-dimensional model corresponding to the target posture. In the process of generating the three-dimensional human body model, the posture change parameters are calculated using the two-dimensional coordinates of the key positions of the contour, and the transformation of the key positions of the contour in the posture transformation is calculated in the target human body three-dimensional model, so that the generated target human body three-dimensional model has better contour features, and the accuracy of the human body three-dimensional model is improved, so that the human body three-dimensional model can be applied to special effects rendering to improve the fit with the special effects rendering effect.
[0039] As an optional implementation, Figure 3 As shown, before acquiring the target video frame including the target object, the following steps are not limited to:
[0040] Step S01, generating a reference human body model corresponding to the reference object according to the skeleton model of the reference object;
[0041] Step S02, performing multiple posture transformation adjustments on the reference human body model to obtain reference posture transformation parameters of the reference human body model in each reference posture, and reference three-dimensional coordinates corresponding to the reference posture transformation parameters;
[0042] Step S03: constructing a model database based on the reference posture transformation parameters and the reference three-dimensional coordinates.
[0043] Optionally, the reference object can be, but is not limited to, an average human object, a three-dimensional model constructed based on a large number of human objects. The three-dimensional human model corresponding to the reference object is usually a skeleton model established based on skeleton key points, and the skeleton model is skinned and textured to obtain a reference human model. The reference human body model is an average human three-dimensional model with human body texture. The reference human body model is in the original posture without posture transformation. Posture transformation includes but is not limited to at least one of rotation, displacement, and scaling. Posture transformation is the simulation of the action of the human body object using the three-dimensional human body model.
[0044] Optionally, the posture transformation parameter is a parameter for indicating posture transformation, and is presented in the form of array or matrix data. Taking the rotation posture as an example, the posture transformation parameter can be an array or matrix consisting of the rotation angle corresponding to each dimension in the three-dimensional coordinates.
[0045] Optionally, the reference posture transformation parameters are multiple reference posture transformation parameters set according to a target interval, and the amount of data contained in the model database is adjusted by setting the target interval. Taking the rotation posture transformation as an example, the target interval is set to 30 degrees, and a reference posture transformation parameter is obtained for each dimension interval of 30 degrees. The reference human body model is subjected to posture transformation according to each reference posture transformation parameter, and the reference human body model is transformed from an initial posture to a reference posture. The initial posture can be an original posture without posture transformation, and the values of the posture transformation parameters corresponding to the original posture are all zero.
[0046] Optionally, obtaining the reference three-dimensional coordinates of the reference human body model in the reference posture may be, but is not limited to, obtaining a reference projection image of the reference human body model in the reference posture, where the reference projection image is a two-dimensional image obtained by using the projection principle of the reference human body model in the reference posture. Extracting the reference two-dimensional coordinates corresponding to the key position in the reference projection image, performing inverse projection processing on the reference two-dimensional icon, and obtaining the reference three-dimensional coordinates corresponding to the key position. Extracting the reference two-dimensional coordinates corresponding to the key position in the reference projection image may be, but is not limited to, implemented using the above-mentioned coordinate extraction model.
[0047] Optionally, constructing a model database using reference transformation parameters and reference three-dimensional coordinates may be, but is not limited to, storing the reference transformation parameters and reference three-dimensional coordinates having a corresponding relationship in the model database. The model database may be, but is not limited to, presented in the form of a data table. The reference three-dimensional coordinates corresponding to the reference transformation parameters may be found through the model database, and the reference transformation parameters corresponding to the reference three-dimensional coordinates may be found.
[0048] By constructing a model database including multiple sets of reference posture transformation parameters and reference three-dimensional coordinates corresponding to posture transformations, multiple sets of posture transformation data can be used to perform multiple matching calculations, update optimizations on the two-dimensional coordinates, thereby improving the calculation accuracy of the target posture transformation parameters and thus improving the accuracy of the generated target human body three-dimensional model.
[0049] As an optional implementation, Figure 4 As shown, the above-mentioned use of the model database to perform matching calculation on the two-dimensional coordinates to obtain the target posture transformation parameters matching the two-dimensional coordinates includes:
[0050] S131, performing coordinate transformation on the two-dimensional coordinates of the target object to obtain the three-dimensional coordinates of the target;
[0051] S132, obtaining the current three-dimensional coordinates to be matched from the reference three-dimensional coordinates included in the model database, and performing the following operations;
[0052] S133, comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain a first posture transformation parameter;
[0053] S134, when the first posture transformation parameter reaches a convergence condition, determining the first posture transformation parameter as a target posture transformation parameter matching the two-dimensional coordinate;
[0054] S135, when the first posture transformation parameter does not reach the convergence condition, obtain the next reference three-dimensional coordinate from the model database as the current three-dimensional coordinate.
[0055] Optionally, the coordinate transformation of the two-dimensional coordinates may be, but is not limited to, converting the two-dimensional coordinates into target three-dimensional coordinates using the back-projection principle. The target three-dimensional coordinates and the reference three-dimensional coordinates are in the same three-dimensional coordinate system, and are both used to represent the coordinate array or coordinate matrix of the key position point.
[0056] Optionally, the current three-dimensional coordinates to be matched may be three-dimensional coordinates having a corresponding relationship with the current transformation parameters to be matched. The current transformation parameters to be matched are determined according to the round of the current matching calculation. When the round of the current matching calculation is one, it indicates that the current matching calculation is the first time to compare the current three-dimensional coordinates with the target three-dimensional coordinates, and any reference transformation parameter contained in the model database may be used as the current transformation parameter. When the round of the current matching calculation is not one, it indicates that the current matching calculation is not the first time to compare the current three-dimensional coordinates with the target three-dimensional coordinates, and the reference transformation parameter contained in the model database that is closest to the posture transformation parameter calculated in the previous round may be used as the current transformation parameter. The posture transformation parameter calculated in the previous round is the posture transformation parameter obtained by comparing the reference three-dimensional coordinates in the previous round with the target three-dimensional coordinates. For example, if the current round is one, all reference transformation parameters contained in the model database can be used as the current transformation parameter, and any reference transformation parameter is selected from the model database as the current transformation parameter, and the reference three-dimensional coordinate corresponding to the current transformation parameter is used as the current three-dimensional coordinate. Taking the example that the posture transformation parameters are an array composed of three-dimensional rotation parameters, assuming that the current round is three, then obtain the first posture transformation parameters calculated in the second round, assuming it is {22, 39, 41}, and search the model database for the reference transformation parameters with the smallest numerical difference with the first posture transformation parameters, assuming it is {20, 40, 40}, then use {20, 40, 40} as the current transformation parameters, and use the reference three-dimensional coordinates corresponding to the current transformation parameters as the current three-dimensional coordinates.
[0057] In the embodiment of the present application, the first posture transformation parameter is obtained by comparing the current three-dimensional coordinates with the target three-dimensional coordinates, and whether the first posture transformation parameter corresponding to the current three-dimensional coordinate meets the requirements of the target transformation parameter is determined according to whether the first posture transformation parameter meets the convergence condition. If the convergence condition is not met, the next current coordinate closer to the target transformation parameter is continuously obtained until the target posture transformation parameter that meets the convergence condition is obtained. Through multiple iterative calculations, the accuracy of the final target transformation parameter is improved, thereby improving the accuracy of the generated target human body three-dimensional model.
[0058] As an optional implementation, Figure 5 As shown, comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain the first posture transformation parameter includes:
[0059] S1331, comparing the current three-dimensional coordinates with the target three-dimensional coordinates to obtain a current posture difference parameter, wherein the current posture difference parameter is used to indicate the difference in posture between the current three-dimensional coordinates and the target three-dimensional coordinates;
[0060] S1332, obtaining current posture transformation parameters corresponding to the current three-dimensional coordinates from the model database;
[0061] S1333, superimposing the current posture difference parameter on the current posture transformation parameter to obtain a first posture transformation parameter.
[0062] Optionally, comparing the current 3D coordinates with the target 3D coordinates may be, but is not limited to, obtaining a current posture difference parameter indicating the difference in posture between the current 3D coordinates and the target 3D coordinates. The current posture difference parameter is superimposed with the current posture transformation parameter corresponding to the current 3D coordinates to obtain the first posture transformation parameter.
[0063] By acquiring the current posture transformation parameters of the current three-dimensional coordinates from the model database, accumulating the current posture difference parameters between the current three-dimensional coordinates and the target three-dimensional coordinates, the first posture transformation parameters are used to indicate the posture estimation of the posture transformation parameters corresponding to the target three-dimensional coordinates. The posture estimation of the target three-dimensional coordinates is realized by using the model database, which simplifies the calculation steps of the posture estimation and can also improve the accuracy of the posture estimation.
[0064] As an optional implementation, after comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain the first posture transformation parameter, the method further includes:
[0065] Step S1, obtaining a second posture transformation parameter obtained before the first posture transformation parameter;
[0066] Step S2: determining whether the first posture transformation parameter reaches a convergence condition according to a first difference value between the first posture transformation parameter and the second posture transformation parameter.
[0067] Optionally, the second posture transformation parameter may be a posture transformation parameter obtained in the previous round of the round in which the first posture transformation parameter is located. For example, in the above example, for the first transformation parameter of the third round, the second posture transformation parameter may be the posture transformation parameter {22, 39, 41} calculated in the second round.
[0068] Optionally, the first difference value between the first posture transformation parameter and the second posture transformation parameter may be a difference in numerical calculation.
[0069] Whether the convergence condition is met is determined by the first difference value between the first posture transformation parameter and the second posture transformation parameter. The convergence judgment is made on the latest iterated first posture transformation parameter through the difference value of the posture transformation parameters estimated by two iterations. When the difference value meets the requirements, it is determined that the estimation of the posture transformation parameters has reached the accuracy convergence, thereby obtaining more accurate target posture transformation parameters and obtaining an accurate target three-dimensional model.
[0070] As an optional implementation manner, after obtaining the second posture transformation parameter obtained before the first posture transformation parameter, the method further includes:
[0071] Step S3, when the first difference value is less than the first threshold, determining that the first posture transformation parameter reaches a convergence condition;
[0072] Step S4: when the first difference value is greater than or equal to the first threshold, determining that the first posture transformation parameter has not reached the convergence condition.
[0073] Optionally, the first difference value is compared with the first threshold value to determine the comparison result of the first difference value and the first threshold value in terms of numerical value. When the first difference value is less than or equal to the first threshold value, it is determined that the first posture transformation parameter has reached the convergence condition. When the first difference value is greater than the first threshold value, it is determined that the first posture transformation parameter has not reached the convergence condition.
[0074] Optionally, when the convergence condition is not met, the next round is continued to be executed until the round reaches the round threshold, or the first posture transformation parameter reaches the convergence condition.
[0075] Optionally, a round threshold is set, and when the round reaches the round threshold, the first posture transformation parameter obtained in the current round is used as the target posture transformation parameter.
[0076] The convergence of the first posture transformation parameters obtained by the latest iteration is judged by using the first difference value of the posture transformation parameters estimated by two iterations. Only when the first difference value is less than the first threshold, it is determined that the estimation of the posture transformation parameters has reached accuracy convergence, and the iteration is stopped to obtain more accurate target posture transformation parameters, thereby improving the accuracy of the target three-dimensional model.
[0077] As an optional implementation manner, when the first posture transformation parameter reaches the convergence condition, it also includes:
[0078] Step S5, obtaining the historical posture transformation parameters corresponding to the previous video frame before the target video frame;
[0079] Step S6, obtaining a second difference value between the first posture transformation parameter and the historical posture transformation parameter;
[0080] Step S7, when the second difference value is less than a third threshold, determining the first posture transformation parameter as a target posture transformation parameter matching the two-dimensional coordinates;
[0081] Step S8: When the second difference value is greater than the third threshold, it is prompted that the two-dimensional coordinate matching calculation is abnormal.
[0082] Optionally, when the first posture transformation parameter is compared with the first threshold value and the convergence condition is determined, a second difference value between the first posture transformation parameter and the historical posture transformation parameter is calculated. The second difference value may be a difference between the first posture transformation parameter and the historical posture transformation parameter in numerical calculation.
[0083] Optionally, the second difference value and the third threshold value are compared to obtain a comparison result of the second difference value and the third threshold value. When the second difference value is less than or equal to the third threshold value, it indicates that the difference in posture between the target video frame and the previous video frame is small, and it is determined that the target video frame and the previous video frame have continuity in posture. The target human body three-dimensional model and the historical human body three-dimensional model can make a relatively smooth transition in posture change, which can avoid the incoherence of the model in display. When the second difference value is greater than the third threshold value, it indicates that the target video frame and the previous video frame have a large difference in posture. The target human body three-dimensional model and the historical human body three-dimensional model can be a relatively obvious change in posture change, which may cause discontinuity or jumping or freezing of the model in display, indicating abnormal two-dimensional coordinate matching.
[0084] The change in posture difference between the target video frame and the previous video frame is introduced through the second difference value. Therefore, when the target video frame is a continuous video frame, the target posture transformation parameters of the target video frame are verified by using the previous video frame. The rule that continuous frame images usually have no large posture transformation between adjacent frames is used to avoid large differences in posture transformation between target posture transformation parameters and historical posture transformation parameters, thereby avoiding discontinuities such as jumping and freezing in model display and ensuring the continuity of model display.
[0085] As an optional implementation, Figure 6 As shown, after obtaining the second posture transformation parameter obtained before the first posture transformation parameter, it also includes:
[0086] S21, obtaining historical posture transformation parameters corresponding to a previous video frame before the target video frame;
[0087] S22, obtaining a second difference value between the first posture transformation parameter and the historical posture transformation parameter;
[0088] S23, performing weighted calculation on the first difference value and the second difference value to obtain a calculation result;
[0089] S24: When the calculation result is less than the second threshold, determine whether the first posture transformation parameter reaches a convergence condition.
[0090] Optionally, when the first difference value is obtained, a second difference value between the first posture transformation parameter and the historical posture transformation parameter is calculated. The second difference value may be a difference between the first posture transformation parameter and the historical posture transformation parameter in numerical calculation.
[0091] Optionally, performing weighted calculation on the first difference value and the second difference value may include, but is not limited to, obtaining a first weight corresponding to the first difference value and a second weight corresponding to the second difference value, performing weighted summation on the first difference value and the second difference value according to the first weight and the second weight, and obtaining a calculation result of the weighted summation. The sum of the first weight and the second weight is one, but the specific values of the first weight and the second weight are not limited herein.
[0092] Optionally, the convergence condition of the first posture transformation parameter is adjusted by adjusting the first weight and the second weight. The first difference value is used to indicate the calculation difference between the current round and the previous round in the matching calculation round of the two-dimensional coordinates of the target video frame, representing the accuracy of the target posture transformation parameter corresponding to the target video frame. The second difference value is used to indicate the difference in posture transformation between the target video frame and the previous video frame, representing the stability of the posture transformation between the target video frame and the previous video frame.
[0093] The weighted calculation of the first difference value and the second difference value is used as the convergence condition of the posture transformation parameters, which balances the accuracy of the target video frame and the posture stability between the target video frame and the previous video frame, thereby ensuring the accuracy of the target human body three-dimensional model and the continuity of the target human body three-dimensional model and the historical human body three-dimensional model in posture transformation, thereby improving the accuracy of the human body three-dimensional model on the basis of model display consistency.
[0094] Figure 7 is a block diagram of a three-dimensional model generation device according to an exemplary embodiment. Figure 7 The device includes an acquisition unit 701, an extraction unit 702, a calculation unit 703, and a generation unit 704.
[0095] An acquisition unit 701 is configured to acquire a target video frame including a target object;
[0096] An extraction unit 702, configured to extract two-dimensional coordinates of key positions located on the body of the target object from the target video frame;
[0097] The calculation unit 703 is configured to use the model database to perform matching calculation on the two-dimensional coordinates to obtain target posture transformation parameters that match the two-dimensional coordinates, wherein the model database includes multiple sets of reference posture transformation parameters and reference three-dimensional coordinates that have corresponding relationships, the reference posture transformation parameters are used to indicate transformation parameters of the body posture of the reference object from the initial posture to the reference posture, and the reference three-dimensional coordinates are the three-dimensional coordinates of the key position on the body of the reference object in the reference posture;
[0098] The generation unit 704 is configured to transform the reference human body model corresponding to the reference object according to the target posture transformation parameters to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a human body three-dimensional model of the reference object in an initial posture.
[0099] Optionally, the calculation unit 703 includes:
[0100] A first transformation module is configured to transform the two-dimensional coordinates of the target object to obtain the three-dimensional coordinates of the target;
[0101] A first acquisition module is configured to acquire the current three-dimensional coordinates to be matched from the reference three-dimensional coordinates included in the model database, and perform the following operations;
[0102] A comparison module is configured to compare the current three-dimensional coordinates and the target three-dimensional coordinates to obtain a first posture transformation parameter;
[0103] A first determination module is configured to determine the first posture transformation parameter as a target posture transformation parameter matching the two-dimensional coordinate when the first posture transformation parameter reaches a convergence condition;
[0104] The second acquisition module is configured to acquire the next reference three-dimensional coordinate from the model database as the current three-dimensional coordinate when the first posture transformation parameter does not reach the convergence condition.
[0105] Optionally, the above-mentioned three-dimensional model generation device also includes a third acquisition module, which is configured to obtain the second posture transformation parameter obtained before the first posture transformation parameter after comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain the first posture transformation parameter; and determine whether the first posture transformation parameter reaches the convergence condition based on the first difference value between the first posture transformation parameter and the second posture transformation parameter.
[0106] Optionally, the above-mentioned three-dimensional model generation device also includes a fourth acquisition module, which is configured to determine that the first posture transformation parameter has reached the convergence condition after acquiring the second posture transformation parameter obtained before the first posture transformation parameter, when the first difference value is less than the first threshold; and determine that the first posture transformation parameter has not reached the convergence condition when the first difference value is greater than or equal to the first threshold.
[0107] Optionally, the three-dimensional model generation device further includes an acquisition unit configured to, after acquiring the second posture transformation parameter obtained before the first posture transformation parameter, include:
[0108] A first history acquisition module is configured to acquire a history posture transformation parameter corresponding to a previous video frame before the target video frame;
[0109] A first difference acquisition module is configured to acquire a second difference value between the first posture transformation parameter and the historical posture transformation parameter;
[0110] a calculation module, configured to perform weighted calculation on the first difference value and the second difference value to obtain a calculation result;
[0111] The convergence determination module is configured to determine whether the first posture transformation parameter reaches a convergence condition when the calculation result is less than a second threshold.
[0112] Optionally, the three-dimensional model generation device further includes a verification unit configured to, when the first posture transformation parameter reaches a convergence condition, include:
[0113] A second history acquisition module is configured to acquire a history posture transformation parameter corresponding to a previous video frame before the target video frame;
[0114] A second difference acquisition module is configured to acquire a second difference value between the first posture transformation parameter and the historical posture transformation parameter;
[0115] A matching module is configured to determine the first posture transformation parameter as a target posture transformation parameter matching the two-dimensional coordinate when the second difference value is less than a third threshold value.
[0116] The prompt module is configured to prompt that the two-dimensional coordinate matching calculation is abnormal when the second difference value is greater than a third threshold.
[0117] Optionally, the comparison module includes:
[0118] A first comparison module is configured to compare the current three-dimensional coordinates with the target three-dimensional coordinates to obtain a current posture difference parameter, wherein the current posture difference parameter is used to indicate the difference in posture between the current three-dimensional coordinates and the target three-dimensional coordinates;
[0119] A search module is configured to obtain current posture transformation parameters corresponding to current three-dimensional coordinates from a model database;
[0120] The superposition module is configured to superimpose the current posture difference parameter on the current posture transformation parameter to obtain the first posture transformation parameter.
[0121] Optionally, the three-dimensional model generation device further includes a construction unit configured to, before acquiring a target video frame including the target object, include:
[0122] A generation module, used to generate a reference human body model corresponding to the reference object according to the skeleton model of the reference object;
[0123] A transformation module is used to perform multiple posture transformation adjustments on the reference human body model to obtain reference posture transformation parameters of the reference human body model in each reference posture, and reference three-dimensional coordinates corresponding to the reference posture transformation parameters;
[0124] The building module is used to build a model database based on reference posture transformation parameters and reference three-dimensional coordinates.
[0125] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0126] In an embodiment of the present application, by acquiring the two-dimensional coordinates of key contour points in a two-dimensional video frame image, a model database formed by multi-posture transformation of a reference human body model is used to perform matching calculations on the two-dimensional coordinates, and target posture transformation parameters corresponding to the target posture of the target object in the video frame are obtained. The reference human body model is subjected to posture changes according to the target posture transformation parameters to generate a target human body three-dimensional model corresponding to the target posture. In the process of generating the three-dimensional human body model, the posture change parameters are calculated using the two-dimensional coordinates of the key positions of the contour, and the transformation calculation of the key positions of the contour in the posture transformation is performed in the target human body three-dimensional model, so that the generated target human body three-dimensional model has better contour features, and the accuracy of the human body three-dimensional model is improved, so that the human body three-dimensional model can be applied to special effects rendering to improve the fit with the special effects rendering effect.
[0127] According to another aspect of the exemplary embodiments of the present invention, an electronic device for implementing the above three-dimensional model generation method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a server as an example. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
[0128] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0129] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0130] S1, acquiring a target video frame including a target object;
[0131] S2, extracting the two-dimensional coordinates of key locations on the body of the target object from the target video frame;
[0132] S3, using the model database to perform matching calculation on the two-dimensional coordinates to obtain target posture transformation parameters that match the two-dimensional coordinates, wherein the model database includes multiple sets of reference posture transformation parameters and reference three-dimensional coordinates that have corresponding relationships, the reference posture transformation parameters are used to indicate transformation parameters of the reference object's body posture from the initial posture to the reference posture, and the reference three-dimensional coordinates are the three-dimensional coordinates of key positions on the reference object's body in the reference posture;
[0133] S4, transforming the reference human body model corresponding to the reference object according to the target posture transformation parameters to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a human body three-dimensional model of the reference object in an initial posture.
[0134] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an IOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 8 The structure of the electronic device is not limited. Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations shown.
[0135] Among them, the memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the three-dimensional model generation method and device in the embodiment of the present invention. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, realizing the above-mentioned three-dimensional model generation method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely located relative to the processor 804, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 can be specifically, but not limited to, used to store information such as video frames, two-dimensional coordinates, and model databases. As an example, if Figure 8 As shown, the memory 802 may include, but is not limited to, the acquisition unit 101, extraction unit 102, calculation unit 703 and generation unit 704 in the 3D model generation device. In addition, it may also include, but is not limited to, other module units in the 3D model generation device, which will not be described in detail in this example.
[0136] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0137] In addition, the electronic device further includes: a display 808 for displaying the target video frame and the target human 3D model; and a connection bus 810 for connecting various module components in the electronic device.
[0138] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes may form a peer-to-peer (P2P, Peer To Peer) network, and any form of computing device, such as a server, terminal and other electronic devices, may become a node in the blockchain system by joining the peer-to-peer network.
[0139] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations of the above-mentioned three-dimensional model generation. The computer program is configured to execute the steps of any of the above-mentioned method embodiments when it is run.
[0140] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0141] S1, acquiring a target video frame including a target object;
[0142] S2, extracting the two-dimensional coordinates of key locations on the body of the target object from the target video frame;
[0143] S3, using the model database to perform matching calculation on the two-dimensional coordinates to obtain target posture transformation parameters that match the two-dimensional coordinates, wherein the model database includes multiple sets of reference posture transformation parameters and reference three-dimensional coordinates that have corresponding relationships, the reference posture transformation parameters are used to indicate transformation parameters of the reference object's body posture from the initial posture to the reference posture, and the reference three-dimensional coordinates are the three-dimensional coordinates of key positions on the reference object's body in the reference posture;
[0144] S4, transforming the reference human body model corresponding to the reference object according to the target posture transformation parameters to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a human body three-dimensional model of the reference object in an initial posture.
[0145] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0146] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0147] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
[0148] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0149] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0151] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0152] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0153] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A three-dimensional model generation method, characterized in that: include: Acquire a target video frame including a target object; extracting two-dimensional coordinates of key locations on the body of the target object from the target video frame; Performing matching calculation on the two-dimensional coordinates using a model database to obtain target posture transformation parameters matching the two-dimensional coordinates, wherein the model database includes a plurality of groups of reference posture transformation parameters and reference three-dimensional coordinates having corresponding relationships, the reference posture transformation parameters are used to indicate transformation parameters of the body posture of the reference object from an initial posture to a reference posture, and the reference three-dimensional coordinates are the three-dimensional coordinates of key positions on the body of the reference object in the reference posture; Transforming the reference human body model corresponding to the reference object according to the target posture transformation parameters to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a human body three-dimensional model of the reference object in the initial posture; The method of using a model database to perform matching calculations on the two-dimensional coordinates to obtain target posture transformation parameters that match the two-dimensional coordinates includes: performing coordinate transformation on the two-dimensional coordinates of the target object to obtain target three-dimensional coordinates; obtaining current three-dimensional coordinates to be matched from the reference three-dimensional coordinates included in the model database, and performing the following operations; comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain first posture transformation parameters; when the first posture transformation parameters meet the convergence conditions, determining the first posture transformation parameters as the target posture transformation parameters that match the two-dimensional coordinates; when the first posture transformation parameters do not meet the convergence conditions, obtaining the next reference three-dimensional coordinates from the model database as the current three-dimensional coordinates.
2. The three-dimensional model generation method according to claim 1, characterized in that: After comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain the first posture transformation parameter, the method further includes: Acquire a second posture transformation parameter obtained before the first posture transformation parameter; Whether the first posture transformation parameter meets the convergence condition is determined according to a first difference value between the first posture transformation parameter and the second posture transformation parameter.
3. The three-dimensional model generation method according to claim 2, characterized in that: After acquiring the second posture transformation parameter obtained before the first posture transformation parameter, the method further includes: When the first difference value is less than a first threshold, determining that the first posture transformation parameter reaches the convergence condition; When the first difference value is greater than or equal to the first threshold, it is determined that the first posture transformation parameter does not meet the convergence condition.
4. The three-dimensional model generation method according to claim 2, characterized in that: After acquiring the second posture transformation parameter obtained before the first posture transformation parameter, the method further includes: Obtaining historical posture transformation parameters corresponding to a previous video frame before the target video frame; Acquire a second difference value between the first posture transformation parameter and the historical posture transformation parameter; Performing weighted calculation on the first difference value and the second difference value to obtain a calculation result; When the calculation result is less than a second threshold, it is determined that the first posture transformation parameter meets the convergence condition.
5. The three-dimensional model generation method according to claim 2, characterized in that: When the first posture transformation parameter reaches the convergence condition, the method further includes: Obtaining a historical transformation control parameter corresponding to a video frame before the target video frame; Acquire a second difference value between the first posture transformation parameter and the historical posture transformation parameter; When the second difference value is less than a third threshold, determining the first posture transformation parameter as the target posture transformation parameter matching the two-dimensional coordinate; When the second difference value is greater than the third threshold, it is prompted that the two-dimensional coordinate matching calculation is abnormal.
6. The three-dimensional model generation method according to claim 1, characterized in that: The comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain a first posture transformation parameter includes: Comparing the current three-dimensional coordinates with the target three-dimensional coordinates to obtain a current posture difference parameter, wherein the current posture difference parameter is used to indicate a difference in posture between the current three-dimensional coordinates and the target three-dimensional coordinates; Acquire current posture transformation parameters corresponding to the current three-dimensional coordinates from the model database; The current posture difference parameter is superimposed on the current posture transformation parameter to obtain the first posture transformation parameter.
7. The three-dimensional model generation method according to any one of claims 1 to 6, characterized in that: Before acquiring the target video frame including the target object, the method further includes: Generate the reference human body model corresponding to the reference object according to the skeleton model of the reference object; Performing multiple posture transformation adjustments on the reference human body model to obtain the reference posture transformation parameters of the reference human body model in each reference posture, and the reference three-dimensional coordinates corresponding to the reference posture transformation parameters; The model database is constructed based on the reference posture transformation parameters and the reference three-dimensional coordinates.
8. A three-dimensional model generating device, characterized in that: include: An acquisition unit, configured to acquire a target video frame including a target object; an extraction unit, configured to extract two-dimensional coordinates of key positions on the body of the target object from the target video frame; a calculation unit, configured to perform matching calculation on the two-dimensional coordinates using a model database to obtain target posture transformation parameters that match the two-dimensional coordinates, wherein the model database includes a plurality of groups of reference posture transformation parameters and reference three-dimensional coordinates having corresponding relationships, the reference posture transformation parameters are used to indicate transformation parameters of a reference object's body posture from an initial posture to a reference posture, and the reference three-dimensional coordinates are three-dimensional coordinates of a key position on the body of the reference object in the reference posture; A generating unit, configured to transform a reference human body model corresponding to the reference object according to the target posture transformation parameter to obtain a target human body three-dimensional model matching the target object, wherein the reference human body model is a human body three-dimensional model of the reference object in the initial posture; The calculation unit also includes: a first transformation module, which is used to perform coordinate transformation on the two-dimensional coordinates of the target object to obtain target three-dimensional coordinates; a first acquisition module, which is used to obtain the current three-dimensional coordinates to be matched from the reference three-dimensional coordinates included in the model database, and perform the following operations; a comparison module, which is used to compare the current three-dimensional coordinates and the target three-dimensional coordinates to obtain a first posture transformation parameter; a first determination module, which is used to determine the first posture transformation parameter as the target posture transformation parameter that matches the two-dimensional coordinate when the first posture transformation parameter reaches a convergence condition; and a second acquisition module, which is used to obtain the next reference three-dimensional coordinate from the model database as the current three-dimensional coordinate when the first posture transformation parameter does not reach the convergence condition.
9. The three-dimensional model generating device according to claim 8, characterized in that: The three-dimensional model generating device also includes: The third acquisition module is used to obtain the second posture transformation parameter obtained before the first posture transformation parameter is obtained after comparing the current three-dimensional coordinates and the target three-dimensional coordinates to obtain the first posture transformation parameter, and determine whether the first posture transformation parameter meets the convergence condition according to the first difference value between the first posture transformation parameter and the second posture transformation parameter.
10. The three-dimensional model generating device according to claim 9, characterized in that: The three-dimensional model generating device also includes: The fourth acquisition module is used to determine, after acquiring the second posture transformation parameter obtained before the first posture transformation parameter, that the first posture transformation parameter reaches the convergence condition when the first difference value is less than the first threshold; and determine that the first posture transformation parameter does not reach the convergence condition when the first difference value is greater than or equal to the first threshold.
11. The three-dimensional model generating device according to claim 9, characterized in that: The three-dimensional model generation device further includes an acquisition unit, which is used, after acquiring the second posture transformation parameter obtained before the first posture transformation parameter, to include: A first history acquisition module, used to acquire the historical posture transformation parameters corresponding to the previous video frame before the target video frame; A first difference acquisition module, used to acquire a second difference value between the first posture transformation parameter and the historical posture transformation parameter; a calculation module, configured to perform weighted calculation on the first difference value and the second difference value to obtain a calculation result; The convergence determination module is used to determine that the first posture transformation parameter meets the convergence condition when the calculation result is less than a second threshold.
12. The three-dimensional model generating device according to claim 9, characterized in that: The three-dimensional model generating device further includes, when the first posture transformation parameter reaches a convergence condition, comprising: A second history acquisition module is used to acquire the history transformation control parameter corresponding to the previous video frame before the target video frame; A second difference acquisition module, used to acquire a second difference value between the first posture transformation parameter and the historical posture transformation parameter; a matching module, configured to determine the first posture transformation parameter as the target posture transformation parameter matching the two-dimensional coordinate when the second difference value is less than a third threshold value; A prompt module is used to prompt that the two-dimensional coordinate matching calculation is abnormal when the second difference value is greater than the third threshold.
13. The three-dimensional model generating device according to claim 8, characterized in that: The comparison module comprises: a first comparison module, used for comparing the current three-dimensional coordinates with the target three-dimensional coordinates to obtain a current posture difference parameter, wherein the current posture difference parameter is used to indicate the difference in posture between the current three-dimensional coordinates and the target three-dimensional coordinates; A search module, used for acquiring current posture transformation parameters corresponding to the current three-dimensional coordinates from the model database; The superposition module is used to superimpose the current posture difference parameter on the current posture transformation parameter to obtain the first posture transformation parameter.
14. The three-dimensional model generating device according to any one of claims 8 to 13, characterized in that: The three-dimensional model generation device further includes a construction unit, which is used for, before acquiring a target video frame including the target object, comprising: A generating module, configured to generate the reference human body model corresponding to the reference object according to the skeleton model of the reference object; A transformation module, used for performing multiple posture transformation adjustments on the reference human body model to obtain the reference posture transformation parameters of the reference human body model in each reference posture, and the reference three-dimensional coordinates corresponding to the reference posture transformation parameters; A construction module is used to construct the model database based on the reference posture transformation parameters and the reference three-dimensional coordinates.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, and the program executes the method described in any one of claims 1 to 7 when executed.
16. A computer program product comprising a computer program / instructions, characterized in that The method according to any one of claims 1 to 7 is implemented when the computer program / instructions are executed by a processor.
17. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Rapid generating method for bird single feathers in three-dimensional animation
CN104574479A
Three-dimensional facial reconstruction method and apparatus, and electronic device and storage medium
WO2020140832A1