Human body joint inverse kinematics overall solution method, storage medium, equipment and product
By mapping the character action sequence to the virtual skeletal system, calculating the orientation and building the Jacobian matrix, and using the damping least squares method to solve the problems of high computational complexity and unstable solution in traditional inverse kinematics technology, achieving efficient and accurate human movement generation.
Patent Information
- Application Number
- CN202510044046.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-06
AI Technical Summary
Traditional reverse kinematics technology has high computational complexity in the generation of human body movements, which is prone to jitter and unstable solution results, especially when solving multi-joint data.
By obtaining the character action sequence and mapping it to the virtual skeletal system, calculating the orientation and building the Jacobian matrix, using the damping least squares method for iterative solution, and obtaining accurate joint angle data.
It improves the accuracy and efficiency of reverse kinematics solution, generates natural and smooth human movements, and reduces the computational complexity.
Smart Images

Figure CN119943272A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of human motion generation, and in particular to a method, storage medium, device and product for overall solution of inverse kinematics of human joints. Background Art
[0002] Inverse Kinematics (IK) is a technology used to calculate the end position and angle of a linkage system to achieve a target action. IK technology is widely used in robotic control, computer animation, virtual reality and other fields. In the solution of human body movements, IK is used to solve the joint rotation angle by setting the target position of the joint points, thereby generating movements that meet the kinematic constraints of the human body. Traditional IK technical solutions need to comprehensively consider the multi-degree-of-freedom characteristics of the human body to ensure that each joint moves within a reasonable range while maintaining the stability and accuracy of the end points. In the scenario of human motion generation, especially when multiple joint data need to be solved, the calculation complexity is very high, and it is easy to produce jittery and unstable solution results.
[0003] Therefore, how to provide a technical solution for an accurate overall solution of human joint inverse kinematics has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The purpose of some embodiments of the present application is to provide a method, storage medium, device and product for the overall solution of inverse kinematics of human joints. Through the technical solutions of the embodiments of the present application, the accuracy and efficiency of inverse kinematics solution can be improved, accurate joint angle data can be obtained, and natural and smooth human movements can be generated.
[0005] In a first aspect, some embodiments of the present application provide a method for overall solution of inverse kinematics of human joints, including: obtaining joint point position data of a current character's action sequence mapped to a virtual skeletal system; determining the orientation of the current character based on the joint point position data; constructing a Jacobian matrix based on the joint point position data and the joint point movement speed; and iteratively solving the character's posture using the damped least squares method to obtain the joint angle data of the current character, wherein the joint angle data is used to generate virtual action data.
[0006] Some embodiments of the present application obtain joint point position data by mapping the current character onto a virtual skeleton system, and then determine the orientation of the current character based on this data, thereby constructing a Jacobian matrix; the Jacobian matrix is iteratively solved by the damped least squares method to obtain joint angle data. Embodiments of the present application can improve the efficiency of solving the Jacobian matrix, obtain joint angle data with higher accuracy, and subsequently generate natural and smooth human body movements.
[0007] In some embodiments, obtaining the joint point position data mapped from the action sequence of the current character to the virtual skeleton system includes: capturing the initial key point sequence of the current character; filtering and smoothing the initial key point sequence to obtain the action sequence; and using a proportional skeleton calibration method to map the action sequence to the virtual skeleton system to obtain the joint point position data.
[0008] Some embodiments of the present application filter and smooth the captured initial key point sequence to obtain an action sequence, and then map it to a virtual skeleton system, so as to achieve standardized processing of character action data and accurately map it to a unified virtual skeleton system.
[0009] In some embodiments, determining the orientation of the current character based on the joint point position data includes: calculating the orientation of the current character through the joint point positions corresponding to the shoulders, hip joints, and head in the joint point position data.
[0010] Some embodiments of the present application calculate the orientation of the current character through relevant data in the joint point positions, providing data support for the subsequent solution of the Jacobian matrix.
[0011] In some embodiments, the use of damped least squares method to iteratively solve the Jacobian matrix to obtain the joint angle data of the current character includes: using the damped least squares method to iteratively solve the Jacobian matrix, and when a preset condition is met, outputting the joint angle data; wherein the virtual action data includes: bone structure, posture data, and rotation angle and position data of all joints; wherein the damping factor in the damped least squares method is adjusted in each iteration; the optimization objectives in the iterative solution process include: the mean error between the target joint position and the actual joint position, the joint movement speed and the direction; the preset condition is: the number of iterations reaches a preset value, or the error mean is lower than an error threshold.
[0012] Some embodiments of the present application iteratively solve the Jacobian matrix through the damped least squares method, output the globally optimal joint angle data, and improve the calculation accuracy and efficiency.
[0013] In some embodiments, when a preset condition is met, outputting the joint angle data includes: iteratively updating the angle of each joint by a gradient descent method, and outputting the optimal rotation angle of all the joints.
[0014] In some embodiments, the method further comprises: allocating the iterative solution task to multiple computing units for parallel processing.
[0015] Some embodiments of the present application can improve computing efficiency by processing iterative solution tasks in parallel.
[0016] In some embodiments, after acquiring the joint angle data of the current character, the method further includes: extracting and optimizing key frames corresponding to the joint angle data through motion curves of all joint points of the current character to generate a standard format animation sequence.
[0017] Some embodiments of the present application generate animation sequences by exporting joint angle data, thereby achieving accurate reproduction of actions in a virtual model.
[0018] In the second aspect, some embodiments of the present application provide a device for overall solution of inverse kinematics of human joints, including: a data mapping module, used to obtain the joint point position data mapped from the action sequence of the current character to the virtual skeletal system; an orientation calculation module, used to determine the orientation of the current character based on the joint point position data; a matrix construction module, used to construct a Jacobian matrix based on the joint point position data, the joint point movement speed and the orientation; a data acquisition module, used to iteratively solve the Jacobian matrix using the damped least squares method to obtain the joint angle data of the current character.
[0019] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.
[0020] In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement a method as described in any embodiment of the first aspect when executing the program.
[0021] In a fifth aspect, some embodiments of the present application provide a computer program product, wherein the computer program product comprises a computer program, wherein the computer program, when executed by a processor, can implement the method described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A system diagram of the overall solution of inverse kinematics of human joints provided for some embodiments of the present application;
[0024] Figure 2 One of the flow charts of the method for overall solution of inverse kinematics of human joints provided in some embodiments of the present application;
[0025] Figure 3 A second flow chart of a method for overall solution of inverse kinematics of human joints provided in some embodiments of the present application;
[0026] Figure 4 A block diagram of the device composition for overall solution of inverse kinematics of human joints provided in some embodiments of the present application;
[0027] Figure 5 A schematic diagram of an electronic device is provided for some embodiments of the present application. DETAILED DESCRIPTION
[0028] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.
[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0030] In the related art, traditional IK methods, such as FABRIK (Forward and Backward Reaching Inverse Kinematics) and CCD (Cyclic Coordinate Descent), have the following defects when solving complex human motion problems: FABRIK iteratively adjusts the joint position to make the end point close to the target point, but for complex human body movements, this method converges slowly, and it is difficult to find the global optimal solution when dealing with multi-degree-of-freedom joints. The CCD method gradually optimizes the angle of a single joint to make the end reach the target, but it also faces the problem of local minima, especially when multiple end points need to be used simultaneously for full-body solution, it is easy to fall into a local solution. In addition, when dealing with the whole-body motion solution of the human body, the FABRIK and CCD methods can usually only process a single target point. When it comes to multiple end points (such as controlling both hands and feet at the same time), it is difficult to coordinate and make the movements unnatural. In addition, it is difficult for traditional IK methods to achieve end-to-end conversion from 3D points to character FBX models. In most IK systems, the position data of 3D points needs to go through intermediate steps (such as data preprocessing or joint angle calculation) before it can be used to drive the virtual model. This step-by-step processing method increases the complexity of the system, and the final motion model cannot be generated directly from the input data, which reduces flexibility. Moreover, due to the accumulation of errors in these intermediate steps, the final controlled virtual character model may be significantly affected in terms of motion accuracy and smoothness, and cannot accurately express the captured motion data.
[0031] In view of this, some embodiments of the present application provide a method for overall solution of inverse kinematics of human joints, which can map the action sequence of the current character to a unified virtual skeleton system, and then calculate the orientation of the current character through the joint point position data on the virtual skeleton system, and then construct a Jacobian matrix; finally, the damped least squares method is used to solve the Jacobian matrix to obtain the global optimal joint angle data. Some embodiments of the present application can output joint angle data with higher accuracy, while improving the solution efficiency, reducing the calculation complexity, and having higher practicality.
[0032] The following is combined with Figure 1 The overall composition structure of the system for overall solution of inverse kinematics of human joints provided by some embodiments of the present application is exemplified.
[0033] like Figure 1As shown, some embodiments of the present application provide a system for overall solution of inverse kinematics of human joints, and the system for overall solution of inverse kinematics of human joints may include: a terminal 100 and a processing server 200. The terminal 100 may be connected to a human motion acquisition device (e.g., a camera). After the terminal 100 obtains the initial key point sequence of the current character collected by the human motion acquisition device, it is transmitted to the processing server 200. The initial key point sequence may be collected in real time or may be pre-collected and stored in the terminal 100. The built-in processing system of the processing server 200 may filter, smooth, map, and calculate the initial key point sequence to determine the joint point position data and orientation of the current character; then, a Jacobian matrix is constructed and the Jacobian matrix is iteratively solved to output the optimal joint angle data.
[0034] In some embodiments of the present application, the terminal 100 may be a mobile terminal or a non-portable computer terminal, which is not specifically limited in the embodiments of the present application.
[0035] In addition, the system for overall solution of inverse kinematics of human joints provided in the present application can realize the global overall solution of inverse kinematics of joints of the human body except hands.
[0036] The following is combined with Figure 2 The implementation process of the overall solution of inverse kinematics of human joints performed by the processing server 200 provided in some embodiments of the present application is exemplified.
[0037] Please see attached Figure 2 , Figure 2 A flow chart of a method for overall solution of inverse kinematics of human joints provided for some embodiments of the present application, the method for overall solution of inverse kinematics of human joints may include:
[0038] S210, obtaining the joint point position data mapped to the virtual skeleton system from the action sequence of the current character.
[0039] For example, in some embodiments of the present application, the action sequence captured by the current character is subjected to skeleton normalization so that the action sequence can be adapted to the skeleton structure of the target model (as a specific example of a virtual skeleton system). This normalization process can ensure that the action sequence can be accurately mapped to the virtual skeleton system regardless of the source of the original data.
[0040] In some embodiments of the present application, S210 may include:
[0041] S211, capturing the initial key point sequence of the current character; filtering and smoothing the initial key point sequence to obtain the action sequence.
[0042] For example, in some embodiments of the present application, the initial key point sequence is a 3D key point sequence. Through the markerless motion capture system, the 2D key point sequence is recognized by the collected 2D image posture, and then the 3D key point sequence is obtained through 3D reconstruction. The 3D key point sequence mainly includes the limbs, spine, head, neck, eyes, nose and ears of the human body.
[0043] After capturing the 3D key point sequence of the current character, the unreasonable frames in the 3D key point sequence are filtered and supplemented by interpolation through the previous and next frame data, the movement speed and position of each joint, and the limit of bone length in the 3D key point sequence. For example, the 3D key point sequence is smoothed using a weighted Butterworth filter to eliminate noise and instability caused by visual capture errors. This filtering technology can not only ensure data smoothness, but also retain motion details as much as possible under kinematic constraints, enhancing the model's ability to express fast motion.
[0044] Specifically, the source of unreasonable frames is the error caused by 2D detection and triangulation. Since the threshold of 2D detection is too low or occlusion cannot obtain 3D key points, a certain position in the 3D key point sequence in this case is null or 0. Another way to judge unreasonable frames is to judge by the constraints of human body dynamics. This method mainly includes two aspects: one is to limit the length of bones. First, the average value and variance of the currently captured human bones are obtained through the existing frames in the entire 3D key point sequence (null values are removed before calculation), and the average value and variance are used to filter out abnormal values (for example, the screening standard value is: average value ± 2.5 * variance). The other is to filter according to the joint movement speed and acceleration. A reasonable action sequence usually has a continuous and smooth acceleration (speed) curve. If there is an abnormal sharp peak in the acceleration, it will be filtered. In addition, there will be a limit on the acceleration (speed) range (which can be set as needed). One or more of the above methods can smoothly filter out unreasonable frames. In addition, interpolation mainly complements filtered frames or abnormal joint points through curve fitting.
[0045] S212, using a proportional skeleton calibration method, mapping the action sequence to the virtual skeleton system to obtain the joint point position data.
[0046] For example, in some embodiments of the present application, a proportional skeleton calibration method is used to standardize action sequences from different sources according to the proportions of a standard human skeleton, so that the action sequences of current characters of different statures can be accurately mapped to a unified virtual skeleton system. After the mapping is completed, the joint point position data of each joint point can be determined.
[0047] S220, determining the orientation of the current character based on the joint point position data.
[0048] For example, in some embodiments of the present application, the orientation of the current character can be determined by the joint position data, which can ensure that the model has the correct sense of direction when performing complex actions, thereby ensuring the authenticity and consistency of the action. In addition to determining the orientation, it can also provide accurate reference directions for specific actions (such as rotation or jumping, handstand somersaults, etc.).
[0049] In some embodiments of the present application, S220 may include: calculating the orientation of the current character through the joint point positions corresponding to the shoulders, hip joints, and head in the joint point position data.
[0050] For example, in some embodiments of the present application, the initial orientation of the current character is calculated by the joint positions of the shoulders, hip joints and head of the current character. For example, the horizontal orientation of the current character is calculated by the joint positions of the shoulders and hip joints, such as the average value of the two vectors of the left and right shoulders and the left and right hip joints, and a longitudinal vector is calculated by the joint points of the hip joints and the top of the head (such as the neck). The cross product of the last two vectors obtains a normal vector of the plane, which is used as the initial orientation of the current character of the current frame.
[0051] S230, constructing a Jacobian matrix based on the joint point position data, the joint point movement speed and the orientation.
[0052] For example, in some embodiments of the present application, a Jacobian matrix (as a specific example of a Jacobian matrix) is constructed based on the joint point position data, velocity (that is, the joint point movement speed) and the direction of the joint point of each joint in the virtual skeleton system. Each element of the Jacobian matrix represents the influence of a small change in the angle and velocity of the joint point on the end position. In addition, other constraints can be added when constructing the Jacobian matrix. For example, smoothing terms for the velocity and acceleration of the joint point can be added; ground constraints can also be added, that is, to ensure that the left and right foot joint points remain on the ground. In order to improve the overall smoothness, the Jacobian matrix is represented by a sparse matrix to reduce the complexity of the subsequent solution.
[0053] S240, using the damped least squares method to iteratively solve the Jacobian matrix to obtain joint angle data of the current character, wherein the joint angle data is used to generate virtual action data.
[0054] For example, in some embodiments of the present application, a highly optimized method is used in the IK solution stage, combining the Jacobian matrix and damped least squares method (DLS for short) to deal with complex motion solution problems, so as to obtain a global optimal solution (as a specific example of joint angle data).
[0055] In some embodiments of the present application, S240 may include: iteratively solving the Jacobian matrix using a damped least squares method, and outputting the joint angle data when a preset condition is met; wherein the virtual motion data includes: a skeletal structure, posture data, and rotation angles and position data of all joints. wherein the rotation angles of all joints may be represented using coordinates in a local coordinate system.
[0056] In some embodiments of the present application, a damping factor in the damped least squares method is adjusted at each iteration.
[0057] For example, in some embodiments of the present application, in order to avoid the instability of the results obtained near the singular point (or called abnormal point) when solving the Jacobian matrix, such as the problem of jump or abnormal angle, a damping factor is introduced in the pseudo-inverse calculation. The damping factor makes the solution process of the Jacobian matrix more stable, especially when encountering certain specific singular postures (for example, the shoulder, elbow and hand are collinear or nearly collinear, which will lead to the loss of the shoulder joint degree of freedom, or the slight position change caused by noise or critical value will cause a large change in angle, or the same posture can be obtained by different rotation methods, etc.) or rapidly changing target points, the damping factor can significantly improve the robustness of the entire solution system. The damping factor is a hyperparameter that can be adjusted according to the type of motion and plays a smoothing role. The damping factor can be understood as a regularization term. In the optimization problem of iterative solution, directly solving the Jacobian pseudo-inverse may lead to unstable solution results, especially when the system is close to the singular point. This is because the singular point will cause the condition number of the Jacobian matrix to be very high, which will cause numerical instability or explosion. The damping factor corrects the pseudo-inverse solution of the Jacobian matrix by introducing additional regularization terms, thereby improving the stability of the system. This application can improve the accuracy of the final joint angle data acquisition by applying the damped least squares method to the task of IK solution. Afterwards, the virtual action data obtained after encapsulating these joint angle data is output as animation data, so that the generated animation data can be directly used in various 3D engines, realizing a seamless connection from capture to application.
[0058] Moreover, in the iterative solution process, the damping factor needs to be adjusted in each iteration to balance the flexibility of the joints and the stability of the overall system. Among them, a higher damping coefficient can better suppress high-frequency noise and reduce the jitter of the final generated virtual image model, while a lower damping coefficient helps to improve the response speed of the system, making the model's movements more sensitive and natural.
[0059] In some embodiments of the present application, the optimization objectives in the iterative solution process include: the mean error between the joint target position and the actual joint position, the joint movement speed and the orientation. Among them, the method for overall solution of human joint inverse kinematics also includes: in the iterative solution process, iteratively updating the angle of each joint by gradient descent method, outputting the optimal rotation angle of all the joints; performing abnormal data detection on the result data after each iteration, and adjusting the abnormal data in the angle of each joint.
[0060] For example, in the iterative optimization process, in order to improve the efficiency of IK solution, the error between the target position output of each iteration (as a specific example of the target position of the joint point) and the actual joint position, the joint point movement speed and the initial orientation are used as optimization targets, and the angle of each joint point is iteratively updated using the gradient descent method.
[0061] In some embodiments of the present application, the preset conditions for iterative solution are: the number of iterations reaches a preset value, or the average error between the target position of the joint point and the actual joint position is lower than the error threshold.
[0062] For example, before iterative solution, the maximum number of iterations or the error threshold can be set. When any of these conditions is met, the iteration can be terminated and the global optimal solution can be output. The error mean refers to the average value of the errors of all relevant nodes in each frame of the entire key point sequence.
[0063] In addition, the Jacobian matrix in this application uses a sparse matrix representation to reduce computational complexity, which makes the calculation of the Jacobian matrix more efficient in high-degree-of-freedom skeletal systems.
[0064] In some embodiments of the present application, the method for overall solution of inverse kinematics of human joints further includes: allocating the task of the iterative solution to multiple computing units for parallel processing.
[0065] For example, in some embodiments of the present application, since the core bottleneck of the IK solution process lies in a large number of matrix operations, especially the inversion and optimization of the Jacobian matrix. Therefore, the present application uses the parallel computing capability of the GPU to accelerate the solution optimization process. The GPU distributes the calculation tasks of the Jacobian matrix solution optimization to multiple computing units for parallel processing. Compared with traditional CPU serial calculations, this method greatly reduces the calculation time, so that even in a high degree of freedom skeletal system, the IK solution can be completed in a shorter time.
[0066] In some embodiments of the present application, after executing S240, the method for overall solution of inverse kinematics of human joints also includes: extracting and optimizing the key frames corresponding to the joint angle data through the motion curves of all joint points of the current character, and generating a standard format animation sequence.
[0067] For example, in some embodiments of the present application, after the joint angle data of the current character is obtained through iterative solution, it can be converted into a standard format such as FBX, so as to achieve accurate reproduction of the action in the virtual model, support subsequent animation production and multi-platform use. Specifically, the process of exporting joint angle data combines the motion curves of all relevant nodes, extracts key frames and interpolates and optimizes the joint angle data to ensure that the final standard format animation sequence is not only accurate in the joint point position, but also has a high degree of fluency and naturalness in kinematic performance. This export method allows the generated animation to be directly used in various 3D engines, achieving a seamless connection from capture to application.
[0068] The following is combined with Figure 3 The specific process of overall solution of inverse kinematics of human joints provided by some embodiments of the present application is exemplified.
[0069] Please see attached Figure 3 , Figure 3 A flow chart of a method for overall solution of inverse kinematics of human joints provided for some embodiments of the present application.
[0070] The above process is explained below as an example.
[0071] S310, performing smoothing and filtering processing on the initial key point sequence capturing the current person to obtain an action sequence.
[0072] S320, using a proportional skeleton calibration method, mapping the action sequence to a virtual skeleton system to obtain joint point position data.
[0073] S330, calculating the orientation of the current character through the joint point positions corresponding to the shoulders, hip joints and head in the joint point position data.
[0074] S340, constructing a Jacobian matrix based on the joint point position data, the joint point movement speed and orientation.
[0075] S350, using the damped least squares method to iteratively solve the Jacobian matrix, and when the preset conditions are met, output the joint angle data.
[0076] S360, exports joint angle data and generates virtual motion data, and then generates standard format animation sequences.
[0077] It should be understood that the specific implementation process of S310 to S360 can refer to the method embodiment provided above, and in order to avoid repetition, the detailed description is appropriately omitted here.
[0078] Through some of the above-mentioned embodiments of the present application, it can be known that in the IK solution process, the present application effectively improves the stability and efficiency of the solution by combining Damped Least Squares (DLS) with the parallel solution technology of the GPU. DLS solves the stability problem of the traditional method at the singular point by introducing a damping factor in the pseudo-inverse calculation, so that the virtual skeleton system can still maintain a high solution accuracy when facing complex postures and rapid motion changes. At the same time, the GPU's ability to process a large number of matrix operations in parallel enables the entire solution process to be significantly accelerated, especially when dealing with a high degree of freedom virtual skeleton system, the GPU's advantages are more obvious, thereby achieving fast and stable motion generation.
[0079] In the optimization process, the initial posture and joint movement speed are added to the optimization target. By comprehensively considering these factors, the virtual skeleton system can not only better fit the target position, but also effectively reduce the abrupt changes in the action transition, thereby enhancing the naturalness and smoothness of the final action. By using sparse matrix representation, the computational complexity is further reduced and the efficiency of the solution is improved.
[0080] This application uses skeleton normalization technology so that action sequences from different sources can be adapted to a unified virtual model. Through the proportional skeleton calibration method, action sequences of different body shapes and sources can be standardized according to the proportions of the standard human skeleton. This method effectively ensures the consistency of cross-platform and cross-device action data, greatly reduces the adaptation work between different data sources, and enhances the adaptability and practicality of the system. This normalization not only ensures the physical consistency of the action, but also improves the visual consistency in the virtual environment, making the actions of the virtual character more natural and coherent.
[0081] In addition, during the processing and exporting of motion data, the system adopts a multi-step data optimization strategy to ensure high-quality performance of animation. For example, when exporting motion data, the key frame extraction and interpolation optimization are combined with the motion curve of the joint points, which not only improves the accuracy of the animation, but also ensures smoothness in kinematic performance. By exporting to a standard format (such as FBX), the animation can be seamlessly integrated into various 3D engines. This multi-step optimization ensures the versatility and high quality of the final output animation on different platforms, reducing the workload of subsequent adjustments.
[0082] Please refer to Figure 4 , Figure 4The block diagram of the composition of the device for overall solution of inverse kinematics of human joints provided by some embodiments of the present application is shown. It should be understood that the device for overall solution of inverse kinematics of human joints corresponds to the above method embodiment and can execute each step involved in the above method embodiment. The specific functions of the device for overall solution of inverse kinematics of human joints can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here.
[0083] Figure 4 The device for overall solution of inverse kinematics of human joints includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the device for overall solution of inverse kinematics of human joints. The device for overall solution of inverse kinematics of human joints includes: a data mapping module 410, used to obtain the joint point position data mapped from the action sequence of the current character to the virtual skeleton system; an orientation calculation module 420, used to determine the orientation of the current character based on the joint point position data; a matrix construction module 430, used to construct a Jacobian matrix based on the joint point position data, the joint point movement speed and the orientation; a data acquisition module 440, used to iteratively solve the Jacobian matrix using the damped least squares method to obtain the joint angle data of the current character, wherein the joint angle data is used to generate virtual action data.
[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.
[0085] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the operations of the method corresponding to any of the above methods provided in the above embodiments.
[0086] Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations corresponding to any of the above methods provided in the above embodiments.
[0087] like Figure 5 As shown, some embodiments of the present application provide an electronic device 500, which includes: a memory 510, a processor 520, and a computer program stored in the memory 510 and executable on the processor 520, wherein the processor 520 can implement a method as described in any of the above embodiments when reading the program from the memory 510 through a bus 530 and executing the program.
[0088] Processor 520 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 520 can be a microprocessor.
[0089] The memory 510 may be used to store instructions executed by the processor 520 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 520 of the disclosed embodiment may be used to execute instructions in the memory 510 to implement the method shown above. The memory 510 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.
[0090] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0091] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0092] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A method for overall solution of inverse kinematics of human joints, characterized in that: include: Get the joint position data mapped from the current character's action sequence to the virtual skeleton system; Determining the orientation of the current character based on the joint point position data; Constructing a Jacobian matrix based on the joint point position data, the joint point movement speed and the orientation; The Jacobian matrix is iteratively solved using the damped least squares method to obtain joint angle data of the current character, wherein the joint angle data is used to generate virtual action data.
2. The method according to claim 1, characterized in that The step of obtaining the joint point position data mapped to the virtual skeleton system from the action sequence of the current character includes: Capturing an initial key point sequence of the current character; Filtering and smoothing the initial key point sequence to obtain the action sequence; The motion sequence is mapped onto the virtual skeleton system using a proportional skeleton calibration method to obtain the joint point position data.
3. The method according to claim 1 or 2, characterized in that The determining the orientation of the current character based on the joint point position data includes: The orientation of the current character is calculated by using the joint point positions corresponding to the shoulders, hip joints and head in the joint point position data.
4. The method according to claim 1 or 2, characterized in that: The method of iteratively solving the Jacobian matrix using the damped least squares method to obtain the joint angle data of the current character includes: The Jacobian matrix is iteratively solved using the damped least squares method, and when a preset condition is met, the joint angle data is output; wherein the virtual motion data includes: bone structure, posture data, and rotation angle and position data of all joints; Among them, the damping factor in the damped least squares method is adjusted in each iteration; the optimization objectives in the iterative solution process include: the mean error between the target position of the joint point and the actual joint position, the joint point movement speed and the direction; the preset condition is: the number of iterations reaches the preset value, or the error mean is lower than the error threshold.
5. The method according to claim 4, characterized in that When the preset conditions are met, the joint angle data is output, including: The angle of each joint is iteratively updated through the gradient descent method, and the optimal rotation angle of all the joints is output.
6. The method according to any one of claims 1 to 2 and 5, characterized in that: The method further includes: allocating the iterative solution task to multiple computing units for parallel processing.
7. The method according to any one of claims 1 to 2 and 5, characterized in that: After acquiring the joint angle data of the current character, the method further includes: Through the motion curves of all joint points of the current character, the key frames corresponding to the joint angle data are extracted and optimized to generate a standard format animation sequence.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program executes the method according to any one of claims 1 to 7 when executed by a processor.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program executes the method according to any one of claims 1 to 7 when being run by the processor.
10. A computer program product, characterized in that The computer program product comprises a computer program, wherein the computer program executes the method according to any one of claims 1 to 7 when executed by a processor.