Figure posture data synchronization method and device and storage medium
The joint position data is obtained through the graphic recognition device, and the compression and Kalman filtering algorithm are used for smoothing processing, which solves the problem of picture lag caused by data synchronization in virtual reality and augmented reality applications, achieving efficient real-time synchronization and smooth user experience.
Patent Information
- Application Number
- CN202411550697.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-03-18
AI Technical Summary
The existing data synchronization technology causes unsmooth and lag in virtual reality and augmented reality applications to be unsmooth and stuttering, affecting the user experience.
The joint position data of the character is obtained through the graphic recognition device, the target features of the animation data are extracted using PCA technology for compression, low-dimensional action data is generated, and the synchronization mechanism based on the timestamp is sent to the receiver. The receiver reconstructs the action data through the target feature and uses the Kalman filtering algorithm for smoothing.
Real-time synchronization in network communication is achieved, reducing the burden of data transmission, avoiding picture lag, improving user experience, and ensuring picture quality during transmission.
Smart Images

Figure CN119653150A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communications, and in particular to a method, device and storage medium for synchronizing character posture data. Background Art
[0002] With the rapid development of virtual reality and augmented reality technologies, these technologies have put forward higher requirements for the real-time synchronization of character posture data. In VR / AR applications, users expect to have a more realistic and smooth interactive experience, which requires the system to be able to transmit and synchronize character posture data in real time and accurately.
[0003] However, although the existing data synchronization technology can solve the problem of data synchronization, it often causes problems such as unsmooth and stuck images during the synchronization process due to network delays or large amounts of data being transmitted, which seriously affects the user experience. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a method, device and storage medium for synchronizing character posture data.
[0005] The technical solution provided in this application is described below:
[0006] The first aspect of the present application provides a method for synchronizing character posture data, comprising:
[0007] Acquiring animation data through a graphic recognition device, wherein the animation data includes joint position data of a character;
[0008] Extracting target features of the animation data using PCA technology, and compressing the animation data according to the target features to obtain low-dimensional motion data;
[0009] The low-dimensional motion data is sent to the receiving end based on a timestamp synchronization mechanism, so that after receiving the low-dimensional motion data, the receiving end reconstructs and restores the low-dimensional motion data through the target features to obtain the character motion data, and uses the Kalman filter algorithm to smooth the character motion data to obtain the target motion data.
[0010] Optionally, the PCA technology is used to extract the target features of the animation data, including:
[0011] Convert the animation data into a PCA processing format to obtain animation position data;
[0012] Centralizing the animation position data to obtain position change data;
[0013] constructing the position change data into a covariance matrix;
[0014] Performing eigendecomposition on the covariance matrix to obtain eigenvalues and eigenvectors;
[0015] According to the feature value, one or more of the feature vectors are selected as animation data target features.
[0016] Optionally, converting the animation data into a PCA processing format to obtain animation position data includes:
[0017] Determining whether there is rotation information in the animation data;
[0018] If yes, the rotation information is converted into a unified coordinate system to obtain rotation position data;
[0019] The rotation position data and the joint position data are converted into a PCA processing format to obtain animation position data.
[0020] Optionally, after determining whether the animation data contains rotation information, the method further includes:
[0021] If not, the joint position data is converted into a PCA processing format to obtain animation position data.
[0022] Optionally, the character motion data is smoothed using a Kalman filter algorithm to obtain target motion data, including:
[0023] Define a Kalman filter model;
[0024] Setting the initial value of the state vector, the initial covariance matrix, the process noise covariance matrix and the measurement noise covariance matrix in the Kalman filter model;
[0025] For each frame of data, the state equation is used to predict the state vector and corresponding covariance matrix of the next frame of data to obtain the predicted state vector and predicted covariance matrix;
[0026] Inputting the predicted state vector into a measurement equation to obtain a predicted measurement value;
[0027] Calculating a Kalman gain according to the prediction covariance matrix and the measurement noise covariance matrix;
[0028] Using the Kalman gain to fuse the predicted state vector and the measurement value to obtain a target Kalman filter model;
[0029] The character motion data is input into the target Kalman filter model for data smoothing to obtain target motion data.
[0030] Optionally, after acquiring animation data through a graphic recognition device, wherein the animation data includes joint positions and rotation information of a character, the method further includes:
[0031] A timestamp is set for each frame of the animation data.
[0032] Optionally, the animation data is obtained through a graphic recognition device, including:
[0033] Obtaining the joint position information and action posture information of the person captured by the graphic recognition device;
[0034] The character joint position information and the posture information are converted into a BVH file format to obtain animation data.
[0035] A second aspect of the present application provides a device for synchronizing character posture data, the device comprising:
[0036] An acquisition unit, used for acquiring animation data through a graphic recognition device, wherein the animation data includes joint position data of a character;
[0037] A compression unit, used for extracting target features of the animation data using PCA technology, and compressing the animation data according to the target features to obtain low-dimensional motion data;
[0038] A sending unit is used to send the low-dimensional action data to a receiving end based on a timestamp synchronization mechanism, so that after receiving the low-dimensional action data, the receiving end reconstructs and restores the low-dimensional action data through the target features to obtain character action data, and uses a Kalman filter algorithm to smooth the character action data to obtain target action data.
[0039] A third aspect of the present application provides a device for synchronizing character posture data, the device comprising:
[0040] Processor, memory, input-output unit, and bus;
[0041] The processor is connected to the memory, the input and output unit, and the bus;
[0042] The memory stores a program, and the processor calls the program to execute the first aspect and any optional method in the first aspect.
[0043] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method in the first aspect.
[0044] It can be seen from the above technical solutions that this application has the following advantages:
[0045] 1. This application ensures real-time synchronization of data transmission by setting up a timestamp synchronization mechanism, providing a guarantee for subsequent animation data compression transmission processing.
[0046] 2. By using PCA technology to extract the target features of the animation data and compressing the animation data according to the target features, the amount of data in data transmission is reduced, the burden of data transmission is effectively reduced, and the screen freeze problem caused by excessive data flow or network delay is avoided.
[0047] 3. By using the Kalman filter algorithm to smooth the character motion data at the receiving end, the smoothness of the target motion data is improved, the quality loss caused by compression is reduced, and the picture quality is ensured not to be affected during the transmission process. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solution in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 A flowchart of an embodiment of a method for synchronizing character posture data provided by the present application;
[0050] Figure 2 A flowchart of another embodiment of the method for synchronizing character posture data provided by the present application;
[0051] Figure 3 A flowchart of another embodiment of the method for synchronizing character posture data provided by the present application;
[0052] Figure 4 A flowchart of another embodiment of the method for synchronizing character posture data provided by the present application;
[0053] Figure 5 A flowchart of another embodiment of the method for synchronizing character posture data provided by the present application;
[0054] Figure 6 A flowchart of an embodiment of a device for synchronizing character posture data provided by the present application;
[0055] Figure 7 A flowchart of another embodiment of the device for synchronizing character posture data provided in this application. DETAILED DESCRIPTION
[0056] It should be noted that the character posture data synchronization method provided by the present application can be applied to a terminal, a system, or a server. For example, the terminal can be a computer, a tablet computer, a portable computer terminal, or a fixed terminal such as a desktop computer. For the convenience of explanation, the present application uses the terminal as an example for explanation.
[0057] See also Figure 1 The present application first provides an embodiment of a method for synchronizing character posture data, the embodiment comprising:
[0058] S101, acquiring animation data through a graphic recognition device, where the animation data includes joint position data of a character;
[0059] Graphics recognition devices, such as Kinect, are advanced technology devices that integrate multiple sensors. They can capture color images through RGB cameras and measure depth information using infrared sensors, thereby accurately identifying and capturing a person's joint position information and motion posture information. Animation data is obtained by processing the captured joint position information and motion posture information of a person. It includes the person's joint position data and rotation information. These information data are usually saved in the BVH file format.
[0060] In this embodiment, animation data is obtained through a graphic recognition device, mainly by using an RGB camera to capture color images, and using an internal depth sensor to capture depth information with millimeter-level accuracy. Furthermore, the depth information is measured by an infrared sensor to capture the character's joint position information and movement posture information, and then these information data are processed internally by Kinect to obtain animation data.
[0061] In practical applications, graphic recognition devices acquire animation data and are widely used in the fields of virtual reality or augmented reality. Taking the field of virtual reality as an example, the user wears a VR helmet and is in the space of the graphic recognition device. The RGB camera on the helmet captures the user's color image, and the depth sensor and infrared sensor measure the distance between the user and the device with millimeter-level accuracy, capturing the user's joint position information and movement posture information. These information data are then processed by the graphic recognition device to generate animation data.
[0062] S102, extracting target features of the animation data using PCA technology, and compressing the animation data according to the target features to obtain low-dimensional motion data;
[0063] PCA technology is principal component analysis technology, a commonly used data dimensionality reduction technology, which can be based on linear transformation and aims to map high-dimensional data to low-dimensional space while maintaining the main information of the data. The target feature is used to reflect the key information in the animation data, mainly through the PCA technology to analyze and extract the main components in the animation data. Low-dimensional motion data refers to the low-dimensional data obtained after compression by PCA technology. Compared with the original high-dimensional animation data, low-dimensional motion data only retains the main information in the data, which makes low-dimensional motion data easier to store, process and transmit.
[0064] In this embodiment, in order to obtain low-dimensional motion data, the animation data must first be converted into a PCA processing format to obtain animation position data, and then the animation position data must be centralized to ensure the accuracy of the PCA technology. The centralized animation position data is then used to construct a covariance matrix. Furthermore, the covariance matrix is feature decomposed to obtain eigenvalues and eigenvectors, and then one or more of the most representative eigenvectors are selected as target features based on the size of the eigenvalues. Finally, the animation data is mapped to the target features to obtain low-dimensional motion data.
[0065] In practical applications, PCA technology is widely used in technical fields such as animation production and virtual reality. Taking the field of virtual reality as an example, when users are experiencing VR, the animation data generated after their action information is processed by the graphic recognition device will be converted into the PCA processing format, and then the eigenvalues and eigenvectors in the animation data will be identified through centralization processing and covariance matrix construction. Furthermore, after the covariance matrix is feature decomposed, the most important one or more eigenvectors are selected as important features of the animation data. Finally, the original animation data is mapped to the important features to obtain low-dimensional action data. This process reduces the burden of data transmission.
[0066] S103, sending the low-dimensional motion data to the receiving end based on the timestamp synchronization mechanism, so that after receiving the low-dimensional motion data, the receiving end reconstructs and restores the low-dimensional motion data through the target features to obtain the character motion data, and uses the Kalman filter algorithm to smooth the character motion data to obtain the target motion data.
[0067] The timestamp synchronization mechanism is a mechanism that ensures that data is transmitted in a consistent time sequence, and is used to ensure that data arrives from the sender to the receiver in the original order, thereby achieving accurate synchronization of data transmission. Kalman filtering is an efficient recursive filter that can estimate the state of a dynamic system from a series of noisy measurements. In this embodiment, Kalman filtering is used to smooth the reconstructed and restored character motion data to improve the fluency and accuracy of the synchronization process.
[0068] In this embodiment, before the receiving end obtains the target action data, it first uses a timestamp-based synchronization mechanism to send the low-dimensional action data to the receiving end in the form of a time series. After receiving the low-dimensional action data, the receiving end obtains the target features extracted by the PCA technology, and then reconstructs and restores the low-dimensional action data through the target features, thereby restoring the original character action animation data. In order to further improve the accuracy of the data, the receiving end uses the Kalman filtering algorithm to smooth the reconstructed and restored character action data to obtain more accurate target action data.
[0069] In practical applications, data reconstruction, restoration and smoothing are mainly used in fields such as virtual reality and animation production. Taking the field of virtual reality as an example, when a user moves in a VR environment, his or her motion data is captured and converted into low-dimensional data, and sent to the VR device through a timestamp synchronization mechanism. The VR device uses the target features extracted by PCA technology to restore the motion data, and then smoothes the data through the Kalman filter algorithm to ensure that the user's motion data can be accurately and smoothly displayed in the VR environment.
[0070] In this embodiment, by setting a timestamp synchronization mechanism, real-time synchronization of data transmission is ensured, which provides a guarantee for the subsequent compression and transmission of animation data. By using PCA technology to extract the target features of the animation data and compressing the animation data according to the target features, the amount of data in data transmission is reduced, the burden of data transmission is effectively reduced, and the problem of screen freeze caused by excessive data flow or network delay is avoided. By using the Kalman filter algorithm in the receiving end to smooth the character action data, the smoothness of the target action data is improved, the quality loss caused by compression is reduced, and the picture quality is ensured to be unaffected during the transmission process.
[0071] The following is an explanation of the process of extracting target features from animation data. Figure 2 , Figure 2 Another embodiment of a method for synchronizing character posture data provided by the present application includes:
[0072] S201, converting the animation data into a PCA processing format to obtain animation position data;
[0073] PCA processing format refers to converting the acquired data into a form that can be analyzed and processed by PCA technology.
[0074] In this embodiment, before obtaining the animation position data, it is first necessary to collect the animation data given in the form of a time series, wherein the animation data contains the joint position data and rotation information of all characters at each time point, and then organize the animation data, extract the position data and construct it into a two-dimensional matrix form, in which each row represents the joint position coordinates of a frame in the animation data, and each column represents a specific dimension, such as X, Y, and Z coordinates. The two-dimensional matrix form obtained by this process is represented as the animation position data.
[0075] In practical applications, this embodiment is suitable for animation production, motion capture, virtual reality, augmented reality and other fields. Taking virtual reality as an example, when a user wears a VR device and performs actions in a virtual environment, the VR system will capture the user's joint position data and rotation information in real time. After being sorted, these data are constructed into animation position data in the form of a two-dimensional matrix.
[0076] S202, centrally process the animation position data to obtain position change data;
[0077] In this embodiment, the animation position data is centralized. First, for each joint in the animation position data, its average position in 25 frames per second is calculated, and then the position of the joint in each frame time is subtracted from the average position to obtain the position change data.
[0078] In this embodiment, the position change data is obtained by calculating the average position of each joint in 25 frames of data per second and subtracting the position data of each frame from it. This process effectively reduces the floating point error of the data and provides a basis for subsequent data processing and analysis. At the same time, it also improves the accuracy of PCA analysis, providing strong support for subsequent target feature extraction and PCA compression data.
[0079] S203, constructing the position change data into a covariance matrix;
[0080] The position change data is constructed as a covariance matrix, where the covariance matrix is used to represent the correlation between joint positions. Specifically, each element of the covariance matrix represents the covariance between two joint positions. Covariance is an indicator of how two variables change together.
[0081] In this embodiment, after the animation position data is processed centrally to obtain the position change data, the covariance between different position changes needs to be calculated first. Specifically, the position change data of each frame is regarded as a vector, and the covariance between these vectors is calculated. Then, these covariance values are constructed into a matrix, where each element of the matrix represents the covariance between two position variables.
[0082] S204, performing eigendecomposition on the covariance matrix to obtain eigenvalues and eigenvectors;
[0083] In this embodiment, before the constructed covariance matrix is subjected to eigendecomposition, first, all eigenvalues and corresponding eigenvectors of the covariance matrix are calculated. Then, these eigenvalues and eigenvectors are arranged in a certain order, specifically, they are sorted from large to small according to the size of the eigenvalues. Finally, the eigendecomposition result of the covariance matrix is obtained, i.e., the set of eigenvalues and eigenvectors.
[0084] S205, selecting one or more feature vectors as animation data target features according to the feature values;
[0085] In this embodiment, in order to obtain the target features of the animation data, they are first sorted according to the size of the eigenvalue, where the eigenvalue represents the importance of the eigenvector. The larger the eigenvalue, the more important the corresponding eigenvector. Then, the eigenvectors corresponding to the most important one or more eigenvalues are selected according to the size of the eigenvalue. These eigenvectors represent the most important data in the animation data, that is, the target features of the animation data.
[0086] In practical applications, suppose there is position data of an animated character. After PCA analysis, the eigenvalues and eigenvectors of the covariance matrix are obtained. In order to obtain the target features of the animated character, the eigenvalues are sorted and it is found that the first two eigenvalues are much larger than the other eigenvalues, which means that the eigenvectors corresponding to the first two eigenvalues are the most important. Further, the most important N eigenvectors are selected from all the corresponding eigenvectors as the target features of the animation data.
[0087] In this embodiment, by converting the animation data into the PCA processing format and performing centralization processing, not only the floating point error of the data is reduced, but also the position change data is made clearer. The position change data is constructed as a covariance matrix, which provides the correlation between the variables in the animation data and provides strong support for feature decomposition. After the covariance matrix is feature decomposed, the target feature vector selected according to the eigenvalue can accurately capture the main feature data of the animation data and retain the key data of the animation data. This not only improves the processing efficiency of the animation data, but also provides strong support for subsequent data compression and reconstruction.
[0088] The following describes the process of obtaining animation position data. Figure 3 , Figure 3 Another embodiment of a method for synchronizing character posture data provided by the present application includes:
[0089] S301, determining whether there is rotation information in the animation data;
[0090] In this embodiment, before converting the animation data into the PCA processing format, it is necessary to determine whether there is rotation information in the animation data, wherein the rotation information refers to the data or parameters related to the rotational motion of an object or figure when describing the state of the object or figure in space. Specifically, the rotation information may include elements such as the rotation center, rotation angle, rotation direction, rotation matrix, and rotation axis. First, check each joint position data in the animation data to see whether there are parameters such as the rotation center, rotation angle, rotation direction, rotation matrix, and rotation axis in addition to the position coordinates. If it is determined that the animation data contains rotation information, execute step S302. Otherwise, if there is no rotation information in the animation data, execute step S304.
[0091] S302, converting the rotation information into a unified coordinate system to obtain rotation position data;
[0092] In this embodiment, if there is rotation information in the animation data, starting from the root joint, all joints in the animation are traversed step by step, and the rotation matrix of each joint is multiplied by the rotation matrix of its parent joint, and this is recursively performed until the rotation information of all joints is converted to the coordinate system of the root joint, thereby obtaining unified rotation position data.
[0093] S303 , converting the rotation position data and the joint position data into a PCA processing format to obtain animation position data.
[0094] In this embodiment, the obtained rotational position data and joint position data are integrated to form a complete animation position data set, which is then constructed into a two-dimensional matrix form. The obtained two-dimensional matrix form is used to represent the animation position data.
[0095] S304, converting the joint position data into a PCA processing format to obtain animation position data;
[0096] In this embodiment, if there is no rotation information in the animation data, the character's joint position data is directly constructed into a two-dimensional matrix form, and the obtained two-dimensional matrix form is used to represent the animation position data.
[0097] In this embodiment, by determining whether there is rotation information in the animation data, it is ensured that no key data is missed when processing the animation data, thereby improving the integrity and accuracy of the data. The rotation information is converted into a unified coordinate system so that the motion trajectory and posture changes of the characters or objects in the animation can be clearly displayed. The rotation position data and the joint position data are converted into a PCA processing format to obtain the animation position data, which helps to remove noise and redundancy in the data, improves the quality of the data, and provides favorable support for feature extraction and data compression of subsequent data.
[0098] The following is an explanation of the process of obtaining the target action data. Figure 4 , Figure 4 Another embodiment of a method for synchronizing character posture data provided by the present application includes:
[0099] S401, defining a Kalman filter model;
[0100] In this embodiment, when defining the Kalman filter model, it is necessary to clarify data such as the state vector, state equation, measurement equation, and covariance thereof. The state vector includes the angle, velocity, and acceleration of the joint, etc. The state equation is used to predict the state vector and the corresponding covariance matrix of the next frame of data, while the measurement equation is used to describe how to obtain the measurement value from the state vector.
[0101] S402, setting the initial value of the state vector, the initial covariance matrix, the process noise covariance matrix and the measurement noise covariance matrix in the Kalman filter model;
[0102] The initial value of the state vector is an estimate of the initial state of the Kalman filter model. The initial covariance matrix is used to represent the uncertainty of the initial state estimate. The process noise covariance matrix is used to describe the uncertainty in the state transfer process. The measurement noise covariance matrix is used to describe the uncertainty in the measurement process.
[0103] In this embodiment, after defining a Kalman filter model, it is necessary to set the initial value of the state vector, which represents the initial state of the Kalman filter model. Then, an initial covariance matrix is defined to describe the uncertainty of the initial state. Furthermore, a process noise covariance matrix and a measurement noise covariance matrix are defined.
[0104] S403, for each frame of data, using the state equation to predict the state vector and the corresponding covariance matrix of the next frame of data, to obtain a predicted state vector and a predicted covariance matrix;
[0105] In this embodiment, for each frame of data, the state equation is first used to predict the state vector of the next frame of data based on the state vector and covariance matrix of the current frame. Then, the state equation will update the covariance matrix corresponding to the next frame of data to obtain the predicted covariance matrix. Finally, the predicted state vector and the predicted covariance matrix together constitute a preliminary estimate of the state of the next frame of data.
[0106] S404, inputting the predicted state vector into the measurement equation to obtain the predicted measurement value;
[0107] In this embodiment, after the state vector of the next frame is predicted using the state equation based on the state vector of the previous frame, the predicted state vector of the next frame will be input into the measurement equation. Further, the measurement equation will calculate the measurement value of the predicted state vector of the next frame based on the predicted state vector of the next frame.
[0108] S405, calculating the Kalman gain according to the prediction covariance matrix and the measurement noise covariance matrix;
[0109] The Kalman gain is a matrix or vector that is used to fuse the state estimate within the model with the measured value to obtain a more accurate state estimate. It determines the weights of the predicted value and the measured value when updating the state estimate.
[0110] In this embodiment, in order to obtain the Kalman gain, first, the prediction covariance matrix is used to describe the uncertainty of the predicted state, while the measurement noise covariance matrix describes the uncertainty in the measurement process. Then, the relative reliability between the prediction and the observation is evaluated by the operation of these two matrices. Specifically, the calculation of the Kalman gain is based on the operation result of the inverse of the two covariance matrices and the transpose of the measurement matrix and their product. Finally, the obtained Kalman gain is a weight matrix, which determines the weights that should be given to the predicted values and the observed values when updating the state estimate.
[0111] S406, using the Kalman gain to fuse the predicted state vector and the measured value to obtain a target Kalman filter model;
[0112] In this embodiment, in order to obtain the target Kalman filter model, the Kalman gain is mainly used to fuse the predicted state vector and the measured value. Specifically, the Kalman gain is used as a weight matrix to adjust the predicted state vector to make it closer to the actual measured value while maintaining reasonable consideration of the predicted state vector. Through this adjustment process, a target Kalman filter model with an optimized data state can be generated.
[0113] S407, inputting the character action data into the target Kalman filter model for data smoothing processing to obtain target action data;
[0114] In this embodiment, in order to obtain the target motion data, the reconstructed and restored character motion data is first input into the constructed target Kalman filter model. Further, the model uses the principle of the Kalman filter algorithm to dynamically adjust the weights of the predicted state vector and the measured value according to the uncertainty of the prediction and the size of the measurement noise, thereby gradually reducing the noise and jitter in the character motion data. Finally, after multiple iterations, the model outputs smooth and continuous target motion data.
[0115] In the present embodiment, by defining the joint parameters in the target Kalman filter model, efficient help is provided for the model to carry out data smoothing. Specifically, the target Kalman filter model provides an efficient state estimation method for the model to carry out data smoothing by defining its internal state vector, initial covariance matrix, process noise covariance matrix and measurement noise covariance matrix. And the model can effectively optimize the accuracy of the data by calculating the Kalman gain fusion prediction state vector and the measured value, which not only improves the stability of the model, but also enables the model to still keep accurate tracking of the data state in an environment with noise and uncertainty. Further, the reconstructed and restored character action data is input into the target Kalman filter model for data smoothing to obtain the target action data. This operation reduces the quality loss caused by the compressed character action data, improves the smoothness and continuity of the character action data, and can accurately show the character's action in the receiving end.
[0116] The following is an explanation of the process of setting the timestamp synchronization mechanism. A timestamp is set for each frame of animation data. Specifically, in this embodiment, before setting a timestamp for each frame of animation data, a unique and ordered timestamp needs to be generated for each frame of animation data, where a timestamp is usually a value representing a time point, which can be milliseconds, seconds, or other time units since a fixed time point. Further, the generated timestamp is associated with the animation data in the corresponding frame, and finally the animation data with the timestamp is stored.
[0117] In this embodiment, a timestamp is set for each frame of animation data, which ensures the timing accuracy of the animation data, ensures the real-time synchronization of data transmission, and provides a guarantee for subsequent compression transmission processing of the animation data.
[0118] The following describes the process of obtaining animation data. Figure 5 , Figure 5 Another embodiment of a method for synchronizing character posture data provided by the present application includes:
[0119] S501, obtaining the joint position information and action posture information of the person captured by the graphic recognition device;
[0120] The position information of human joints refers to the location of key joints in human images or videos through image recognition technology and the acquisition of their position information. These joints usually include the main joints of the human body, such as the head, neck, shoulders, elbows, wrists, waist, knees, ankles, etc. The action posture information is based on the acquisition of the position information of human joints, and further analyzes the movement trajectory and angle changes of the joints to infer the action posture of the human body. This includes the overall movement state of the human body, such as standing, walking, running, jumping, etc.
[0121] In this embodiment, to obtain the character's joint position information and motion posture information, first, the Kinect device will locate the main joints of the human body, such as the head, limb joints, etc., and update the position data of these joints at a frequency of 25FPS. Then, the Kinect device will analyze the position data of these joints, and further analyze the movement trajectory and angle changes of these joints to obtain the joint position information and motion posture information.
[0122] S502, converting character joint position information and posture information into a BVH file format to obtain animation data;
[0123] The BVH file format is a file format used to represent motion capture data. It is stored in text form and contains the bone hierarchy, joint rotation angles, and time information of the action frame. This format is widely used in animation software, game development, virtual reality, and augmented reality, such as 3DMax. BVH files can be imported into various animation software to drive the actions of 3D models.
[0124] In this embodiment, the acquired character joint information and posture information will be input into a specific animation production software, and then a bone hierarchy will be constructed based on the BVH annotation. The rotation angle of each joint of the character and the timestamp encoding of the action frame will be set to text format and stored in a BVH file to obtain animation data.
[0125] In practical applications, converting character joint position and posture information into BVH file format is widely used in the field of animation production. Taking the animation production scene as an example, the staff used the Kinect device to capture the performance of an actor. The Kinect device recorded the actor's joint position and posture information, and converted this data into BVH file format through specific production software.
[0126] This embodiment obtains animation data by capturing character joint position information and motion posture information at a frequency of 25FPS using an image device and converting it into a BVH file format. This process not only improves the accuracy and efficiency of the data, but also provides a guarantee for subsequent data compression, synchronous transmission, and data reconstruction and restoration. The BVH file format makes data compression more efficient, significantly reduces the amount of data, and improves data accuracy.
[0127] See also Figure 6 , Figure 6 A character posture data synchronization device provided by the present application comprises:
[0128] An acquisition unit 601 is used to acquire animation data through a graphic recognition device, wherein the animation data includes joint position data of a character;
[0129] A compression unit 602 is used to extract target features of the animation data using PCA technology, and compress the animation data according to the target features to obtain low-dimensional motion data;
[0130] The sending unit 603 is used to send the low-dimensional action data to the receiving end based on the timestamp synchronization mechanism, so that after receiving the low-dimensional action data, the receiving end reconstructs and restores the low-dimensional action data through the target features to obtain the character action data, and uses the Kalman filter algorithm to smooth the character action data to obtain the target action data.
[0131] See also Figure 7 The present application also provides a character posture data synchronization device, comprising:
[0132] Processor 701, memory 702, input and output unit 703, bus 704;
[0133] The processor 701 is connected to the memory 702, the input and output unit 703 and the bus 704;
[0134] The memory 702 stores a program, and the processor 701 calls the program to execute any of the above methods.
[0135] The present application also relates to a computer-readable storage medium on which a program is stored, wherein when the program is run on a computer, the computer is caused to execute any of the above methods.
[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0137] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, 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, such as 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0138] 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.
[0139] In addition, each functional unit in each embodiment of the present application 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.
[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for synchronizing character posture data, characterized in that: The method comprises: Acquiring animation data through a graphic recognition device, wherein the animation data includes joint position data of a character; Extracting target features of the animation data using PCA technology, and compressing the animation data according to the target features to obtain low-dimensional motion data; The low-dimensional motion data is sent to the receiving end based on a timestamp synchronization mechanism, so that after receiving the low-dimensional motion data, the receiving end reconstructs and restores the low-dimensional motion data through the target features to obtain the character motion data, and uses the Kalman filter algorithm to smooth the character motion data to obtain the target motion data.
2. The method for synchronizing character posture data according to claim 1, characterized in that: The PCA technology is used to extract the target features of the animation data, including: Convert the animation data into a PCA processing format to obtain animation position data; Centralizing the animation position data to obtain position change data; constructing the position change data into a covariance matrix; Performing eigendecomposition on the covariance matrix to obtain eigenvalues and eigenvectors; According to the feature value, one or more of the feature vectors are selected as animation data target features.
3. The method for synchronizing character posture data according to claim 2, characterized in that: Convert the animation data into a PCA processing format to obtain animation position data, including: Determining whether there is rotation information in the animation data; If yes, the rotation information is converted into a unified coordinate system to obtain rotation position data; The rotation position data and the joint position data are converted into a PCA processing format to obtain animation position data.
4. The method for synchronizing character posture data according to claim 3, characterized in that: After determining whether the animation data contains rotation information, the method further includes: If not, the joint position data is converted into a PCA processing format to obtain animation position data.
5. The method for synchronizing character posture data according to claim 2, characterized in that: The character motion data is smoothed using a Kalman filter algorithm to obtain target motion data, including: Define a Kalman filter model; Setting the initial value of the state vector, the initial covariance matrix, the process noise covariance matrix and the measurement noise covariance matrix in the Kalman filter model; For each frame of data, the state equation is used to predict the state vector and corresponding covariance matrix of the next frame of data to obtain the predicted state vector and predicted covariance matrix; Inputting the predicted state vector into a measurement equation to obtain a predicted measurement value; Calculating a Kalman gain according to the prediction covariance matrix and the measurement noise covariance matrix; Using the Kalman gain to fuse the predicted state vector and the measurement value to obtain a target Kalman filter model; The character motion data is input into the target Kalman filter model for data smoothing to obtain target motion data.
6. The method for synchronizing character posture data according to claim 1, characterized in that: After acquiring the animation data by the graphic recognition device, wherein the animation data includes the joint positions and rotation information of the character, the method further includes: A timestamp is set for each frame of the animation data.
7. The method for synchronizing character posture data according to claim 1, characterized in that: Obtain animation data through graphic recognition equipment, including: Obtaining the joint position information and action posture information of the person captured by the graphic recognition device; The character joint position information and the posture information are converted into a BVH file format to obtain animation data.
8. A device for synchronizing character posture data, characterized in that: The device comprises: An acquisition unit, used for acquiring animation data through a graphic recognition device, wherein the animation data includes joint position data of a character; A compression unit, used for extracting target features of the animation data using PCA technology, and compressing the animation data according to the target features to obtain low-dimensional motion data; A sending unit is used to send the low-dimensional action data to a receiving end based on a timestamp synchronization mechanism, so that after receiving the low-dimensional action data, the receiving end reconstructs and restores the low-dimensional action data through the target features to obtain character action data, and uses a Kalman filter algorithm to smooth the character action data to obtain target action data.
9. A character posture data synchronization device, characterized in that: The device comprises: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 7.