Processing method and apparatus for motion capture data, and device and storage medium
Through motion capture analysis of objects in video frames and analysis of foot grounding status, iteratively optimizes video motion capture data, solving common foot mold-breaking and sliding problems in video motion capture technology, improving data quality and reducing repair costs. cost.
Patent Information
- Application Number
- PCT/CN2024/076583
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-29
- Filing Date
- 2024-02-07
- Publication Date
- 2024-10-03
AI Technical Summary
In existing video motion capture technology, there is a semantic gap between two-dimensional motion data and three-dimensional motion data, which leads to common foot mold-crossing and sliding problems in motion data, requiring animators to spend a lot of time and cost for post-production repairs.
Through motion capture analysis of objects in video frames, global displacement data and bone rotation data are determined, the grounding status of the feet is analyzed, and the degree of foot sinkage and sliding is calculated. Based on these data, iterative optimization is performed to reduce foot mold penetration and slippage. step loss to generate high-quality motion capture data.
It effectively reduces foot sliding and mold-crossing problems in video motion capture data, improves data quality, and reduces the repair cost and time of post-production animation.
Smart Images

Figure CN2024076583_03102024_PF_FP_ABST
Abstract
Description
Motion capture data processing method, device, equipment and storage medium
[0001] Related applications
[0002] This application claims priority to Chinese patent application number 2023103187273, filed on March 29, 2023, entitled “Method, device, apparatus and storage medium for processing motion capture data,” the entire text of which is hereby incorporated by reference. Technical Field
[0003] The embodiments of the present application relate to the field of video motion capture technology, and in particular to a method, apparatus, device, and storage medium for processing motion capture data. Background Art
[0004] Human motion capture technology can directly capture human movements and represent them digitally, allowing for applications in other fields. Video motion capture technology is the lowest-cost method for acquiring motion data and has broad application prospects.
[0005] However, due to the significant semantic gap between the planar motion data and three-dimensional action data in the video, the obtained action data is widely flawed, such as foot penetration and sliding problems. In related technologies, animators mainly perform post-processing to repair foot penetration and sliding problems in the action data, which requires a lot of time and money and is very costly.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a method, apparatus, device, and storage medium for processing motion capture data.
[0008] In one aspect, an embodiment of the present application provides a method for processing motion capture data, which is executed by a computer device, and the method includes:
[0009] Performing motion capture analysis on an object in a video to obtain first motion capture data, where the first motion capture data includes global displacement data and skeletal rotation data of the object in each video frame of the video, where the global displacement data represents the displacement of a representative skeletal node of the object;
[0010] Analyzing the foot grounding state of the subject to obtain foot grounding data of the subject in each video frame, wherein the foot grounding data represents the foot grounding mode of the subject;
[0011] Determining, based on the first motion capture data, the degree to which the foot of the subject sinks into the ground in each video frame, and determining the foot penetration loss of the subject in the video according to the degree to which the foot sinks into the ground;
[0012] Determining a foot sliding degree of the subject in each video frame based on the first motion capture data and the foot contact data, and determining a foot sliding loss of the subject in the video according to the foot sliding degree; and
[0013] Based on the foot penetration loss and the foot sliding loss, the first motion capture data is iteratively optimized to obtain second motion capture data of the object.
[0014] On the other hand, an embodiment of the present application provides a device for processing motion capture data, the device comprising:
[0015] a first analysis module, configured to perform motion capture analysis on an object in a video to obtain first motion capture data, wherein the first motion capture data includes global displacement data and skeletal rotation data of the object in each video frame of the video, wherein the global displacement data represents the displacement of a representative skeletal node of the object;
[0016] a second analysis module, configured to analyze the foot grounding state of the subject and obtain foot grounding data of the subject in each video frame, wherein the foot grounding data represents the foot grounding mode of the subject;
[0017] a loss determination module for determining, based on the first motion capture data, the degree to which the foot of the subject in each video frame sinks into the ground, and determining the foot penetration loss of the subject in the video according to the foot sinking degree; determining, based on the first motion capture data and the foot contact data, the degree to which the foot of the subject in each video frame slides, and determining the foot sliding loss of the subject in the video according to the foot sliding degree; and
[0018] An optimization module is used to iteratively optimize the first motion capture data based on the foot penetration loss and the foot sliding loss to obtain second motion capture data of the object.
[0019] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the motion capture data processing method as described in the above aspects.
[0020] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement the motion capture data processing method as described in the above aspects.
[0021] In another aspect, embodiments of the present application provide a computer program product comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for processing motion capture data provided in the above aspects.
[0022] The details of one or more embodiments of the present application are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the present application will become apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the disclosed drawings without any creative work.
[0024] FIG1 shows a processing framework diagram of motion capture data provided by an exemplary embodiment of the present application;
[0025] FIG2 is a schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application;
[0026] FIG3 shows a flow chart of a method for processing motion capture data provided by an exemplary embodiment of the present application;
[0027] FIG4 shows a flow chart of a method for processing motion capture data provided by another exemplary embodiment of the present application;
[0028] FIG5 shows a schematic structural diagram of determining two-dimensional key point information through a VIT model provided by an exemplary embodiment of the present application;
[0029] FIG6 shows a schematic structural diagram of determining foot contact data using a TCN model provided by an exemplary embodiment of the present application;
[0030] FIG7 is a schematic diagram showing a time-series differential relationship between a second horizontal-axis component and a second vertical-axis component for constructing global displacement data provided by an exemplary embodiment of the present application;
[0031] FIG8 shows a flowchart of phased iterative optimization provided by an exemplary embodiment of the present application;
[0032] FIG9 shows a flowchart of a method for processing motion capture data provided by yet another exemplary embodiment of the present application;
[0033] FIG10 shows a structural block diagram of a device for processing motion capture data provided by an exemplary embodiment of the present application;
[0034] FIG11 shows a schematic structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0036] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0037] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0038] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.
[0039] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0040] In the related art, after obtaining first motion capture data by performing video motion capture analysis on the video, an animation video is directly generated based on the first motion capture data. The animation post-production artist then performs post-processing on the foot penetration problem and foot sliding problem that appear in the animation video, which results in the animation post-production artist having to spend a long time and money, resulting in high costs.
[0041] In an embodiment of the present application, in addition to determining the first motion capture data based on the video, the foot grounding data of the object in each video frame is also determined based on the video, so that based on the first motion capture data and the foot grounding data, the foot penetration loss and foot sliding loss present in the first motion capture data are determined, and based on the foot penetration loss and foot sliding loss, the first motion capture data is iteratively optimized to obtain second motion capture data, and the data quality of the second motion capture data is higher than that of the first motion capture data.
[0042] Schematically, as shown in Figure 1, the computer device obtains video 101, thereby determining the first motion capture data through the video motion capture analysis module 103, determining the foot grounding data of the object in each video frame according to the grounding state analysis module 102, and then through the iterative optimization module 104, based on the foot penetration loss and the foot sliding loss, iteratively optimizes the first motion capture data to obtain the second motion capture data 105.
[0043] The solutions provided in the embodiments of this application involve technologies such as machine learning of artificial intelligence, which are specifically illustrated by the following embodiments.
[0044] Please refer to Figure 2, which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. The implementation environment includes a terminal 220 and a server 240. Data communication between the terminal 220 and the server 240 is performed via a communication network. Optionally, the communication network can be a wired network or a wireless network, and the communication network can be at least one of a local area network, a metropolitan area network, and a wide area network.
[0045] Terminal 220 is an electronic device installed with an application program capable of processing motion capture data. This motion capture data processing function can be a native application function within the terminal or a third-party application function. The electronic device can be a smartphone, tablet computer, personal computer, wearable device, or vehicle-mounted terminal. FIG2 illustrates terminal 220 as a personal computer, but this is not intended to be limiting.
[0046] Server 240 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. In the embodiment of the present application, server 240 can be a backend server for an application with motion capture data processing capabilities.
[0047] In one possible implementation, as shown in FIG2 , data exchange occurs between server 240 and terminal 220. After terminal 220 determines first motion capture data and foot contact data based on a video, terminal 220 sends the first motion capture data and foot contact data to server 240. Server 240 then determines foot penetration loss and foot sliding loss based on the first motion capture data and foot contact data. Based on the foot penetration loss and foot sliding loss, server 240 iteratively optimizes the first motion capture data to obtain second motion capture data, which it then sends to terminal 220. Terminal 220 can then generate an animation video based on the second motion capture data.
[0048] Please refer to Figure 3, which shows a flowchart of a method for processing motion capture data provided by an exemplary embodiment of the present application. This embodiment is described using the method for a computer device (including a terminal 220 and / or a server 240) as an example. The method includes the following steps.
[0049] Step 301 : Perform motion capture analysis on an object in a video to obtain first motion capture data. The first motion capture data includes global displacement data and skeletal rotation data of the object in each video frame of the video. The global displacement data represents the displacement of a representative skeletal node of the object.
[0050] The object is an object that can perform actions in the video. The object includes a torso and limbs connected to the torso. The limbs can rotate and bend relative to the torso, allowing the object to perform actions. Both the limbs and the torso have skeletons, and the skeletons of the limbs are connected to the skeleton of the torso through skeleton nodes. The limbs include lower limbs that contact the ground, and may also include upper limbs. The lower limbs include legs connected to the torso and feet connected to the legs, and the feet are used to contact the ground. The object can be a human body, a robot, or an animal. The first motion capture data is motion capture data obtained by performing motion capture analysis on the object. The first motion capture data includes global displacement data and skeletal rotation data of the object in each video frame. In the first motion capture data, there is a set of global displacement data and a set of skeletal rotation data corresponding to each video frame. The global displacement data and skeletal rotation data of each video frame in the first motion capture data can represent the motion changes of the object.
[0051] In one possible implementation, a computer device performs video motion capture analysis on an object and obtains first motion capture data. Optionally, the video motion capture analysis may be performed by real-time motion acquisition and data analysis of the object, or by directly performing motion capture data analysis on an offline video. This embodiment of the present application is not limited to this.
[0052] Optionally, the first motion capture data includes global displacement data and skeletal rotation data of the object in each video frame of the video, wherein the global displacement data represents the displacement of a representative bone node of the object, and the representative displacement may specifically include whether there is displacement, the direction of displacement, or the distance of displacement. The representative bone node is a point representing the position of the object, and in some embodiments, it may be the central bone node of the object. The representative bone node or the central bone node may be the center of gravity of the human pelvis, or may be other bone nodes of the human body; the bone rotation data represents the degree of rotation of each bone joint point of the object.
[0053] In one possible implementation, a computer device determines a fixed number of skeletal nodes corresponding to an object and performs video motion capture analysis on the object in the video, thereby determining the object's global displacement data based on the positions of representative skeletal nodes in each video frame; and determining the object's skeletal rotation data based on the positions of a fixed number of skeletal nodes in each video frame. The fixed number can be determined based on the skeletal structure required to describe the object's movement, including the number of required bones and the connection relationship between the required bones. The fixed number can be, for example, 24.
[0054] Step 302 : Analyze the foot grounding state of the subject to obtain foot grounding data of the subject in each video frame. The foot grounding data represents the foot grounding mode of the subject.
[0055] In the process of directly generating animation data based on the first motion capture data, due to the semantic gap between the planar motion data and the three-dimensional motion data in the video, the obtained motion data inevitably has defects, such as foot penetration problems and sliding problems. Therefore, in order to optimize the first motion capture data and improve the quality of the video motion capture data, the computer device can process the foot penetration problems and sliding problems in the first motion capture data based on the object's foot grounding data.
[0056] In one possible implementation, a computer device can analyze the subject's foot contact state based on a video, thereby obtaining foot contact data for each video frame. The foot contact data represents the subject's foot contact method. After analyzing the subject's foot contact state, each video frame corresponds to a set of foot contact data.
[0057] Optionally, the computer device may select four key points on the subject's foot, namely, the left toe, left heel, right toe, and right heel, and thereby obtain the subject's foot ground contact data by determining the ground contact patterns of the four key points in each video frame. The foot ground contact pattern may be data indicating the contact pattern between each key point of the foot and the ground, such as a set of data indicating that the left toe is in contact with the ground, the left heel is not in contact with the ground, the right toe is passing through the ground, and the right heel is not in contact with the ground. The foot ground contact pattern may include data indicating whether the subject is grounded, and may also include data indicating whether each key point of the foot is in contact with the ground.
[0058] Step 303 : determining the degree of foot sinking of the object in each video frame based on the first motion capture data, and determining the foot penetration loss of the object in the video according to the foot sinking degree.
[0059] Step 304 : determining the foot sliding degree of the object in each video frame based on the first motion capture data and the foot contact data, and determining the foot sliding loss of the object in the video according to the foot sliding degree.
[0060] In this embodiment, the computer device may determine foot penetration loss and foot sliding loss of the first motion capture data based on the first motion capture data and the foot contact data. The foot penetration loss indicates the degree to which the subject's foot sinks into the ground in each video frame, and the foot sliding loss indicates the degree to which the subject's foot slides while the foot is in contact with the ground. The foot penetration degree indicates the degree to which the subject's foot sinks into the ground, and the foot sliding degree indicates the degree to which the subject's foot slides along the ground.
[0061] Foot penetration refers to the situation where the foot sinks into the ground. The foot penetration loss can indicate whether the subject's foot is embedded in the ground in each video frame, and also the degree of penetration if the foot is embedded in the ground. Foot slip refers to the displacement of the subject's foot relative to the ground due to errors in motion capture.
[0062] In one possible embodiment, in order to reduce the foot penetration problem and foot sliding problem existing in the first motion capture data, the computer device can determine the foot penetration loss and foot sliding loss corresponding to the first motion capture data based on the first motion capture data and the foot grounding data.
[0063] The foot penetration loss represents the degree to which the subject's foot sinks into the ground in each video frame. Optionally, the computer device can determine the foot penetration loss in each video frame based on the degree to which the subject's four foot key points sink into the ground. The foot slip loss represents the degree to which the subject's foot slides when the subject's foot is grounded. Optionally, when the subject's foot is grounded, the computer device can determine the foot slip loss in the first motion capture data based on the displacement of the four foot key points between adjacent video frames.
[0064] Step 305 : Iteratively optimize the first motion capture data based on the foot penetration loss and the foot sliding loss to obtain second motion capture data of the object.
[0065] Among them, iterative optimization refers to fine-tuning the first motion capture data to reduce the foot penetration loss and the foot sliding loss, thereby reducing or eliminating the foot penetration and foot sliding.
[0066] In one possible embodiment, after determining the foot penetration loss and the foot sliding loss, the computer device iteratively optimizes the first motion capture data to obtain second motion capture data of the object, wherein the quality of the second motion capture data is higher than that of the first motion capture data, and the foot penetration problems and foot sliding problems in the second motion capture data are significantly less than those in the first motion capture data.
[0067] In one possible implementation, the computer device may first iteratively optimize the first motion capture data based on the foot penetration loss to obtain optimized video motion capture data, and then iteratively optimize the optimized video motion capture data based on the foot sliding loss to obtain the second motion capture data.
[0068] In summary, in the embodiment of the present application, the first motion capture data is obtained by performing motion capture analysis on the object in the video, and the foot grounding status of the object is analyzed according to the video to obtain the foot grounding data of the object in each video frame, so that the computer device can determine the foot sliding loss and the foot penetration loss based on the first motion capture data and the foot grounding data, and then iteratively optimize the first motion capture data according to the foot sliding loss and the foot penetration loss to obtain the second motion capture data. The solution provided in the embodiment of the present application can reduce the foot sliding problem and the foot penetration problem in the video motion capture data, improve the data quality of the video motion capture data, and reduce the repair work and repair cost of the later animation production.
[0069] In one possible embodiment, in order to improve the optimization accuracy of the foot penetration problem and the foot sliding problem in the first motion capture data, the computer device can first construct a parametric model of the object based on the first motion capture data, and then determine the global displacement data and the three-dimensional spatial coordinates of each foot bone node in the three-dimensional coordinate space based on the parametric model, thereby determining the foot penetration loss and the foot sliding loss, and iteratively optimize the first motion capture data.
[0070] Please refer to Figure 4, which shows a flowchart of a method for processing motion capture data provided by another exemplary embodiment of the present application. This embodiment uses the method for a computer device (including a terminal 220 and / or a server 240) as an example for explanation. The method includes the following steps.
[0071] Step 401 : Perform motion capture analysis on an object in a video to obtain first motion capture data. The first motion capture data includes global displacement data and skeletal rotation data of the object in each video frame of the video. The global displacement data represents the displacement of a representative skeletal node of the object.
[0072] The specific implementation of this step can refer to step 301, and this embodiment will not be described in detail here.
[0073] Step 402 : extract two-dimensional key points of the objects in each video frame to obtain two-dimensional key point information of the objects in each video frame.
[0074] In one possible implementation, a computer device extracts two-dimensional key points of objects in each video frame based on the video, wherein the number of two-dimensional key points may be the same as the number of skeleton nodes or may be more than the number of skeleton nodes, which is not limited in this embodiment of the present application.
[0075] Alternatively, the computer device can extract the two-dimensional key points of the object using a VIT (Vision Transformer) model. In one possible implementation, the computer device inputs a video into the VIT model, which encodes and decodes each video frame in the video, thereby outputting two-dimensional key point information for each video frame.
[0076] Schematically, as shown in FIG5 , a computer device inputs each video frame in a video 501 into a VIT model. The VIT model divides each video frame into patch images of a fixed size and inputs the patch embedding layer. The VIT model extracts feature points from each patch image through a transformer encoder 502, and then decodes the patch image after feature point extraction through a decoder 503, thereby obtaining two-dimensional key point information 504 in each video frame.
[0077] Step 403 : Determine the foot contact data of the object in each video frame based on the two-dimensional key point information.
[0078] In a possible implementation, the computer device determines the ground contact state of the object's foot key points based on the two-dimensional key point information of the object in each video frame, thereby obtaining the foot ground contact data.
[0079] In one possible implementation, the computer device determines the grounding status of the subject's foot skeletal nodes in each video frame based on the two-dimensional key point information, including the grounding status of the left toe, left heel, right toe, and right heel. The computer device then labels each foot skeletal node based on the grounding status to generate foot grounding data. For example, the computer device may label a grounded foot skeletal node as 1 and an ungrounded foot skeletal node as 0.
[0080] In a possible implementation, the computer device may also input the two-dimensional key point information of each video frame into a TCN (Temporal Convolutional Network) model, and obtain the foot contact data of the object in each video frame through the TCN model.
[0081] In one possible implementation, since the time series length of the TCN model is fixed, when the number of video frames is large, the computer device also needs to segment the video frames into sub-video frames of multiple time series lengths, and then input the two-dimensional key point information of each sub-video frame into the TCN model, and output the foot contact data in each video frame through the TCN model.
[0082] 6 , the computer device inputs sub-video frames with a time sequence length of L and two-dimensional key point information 601 of each sub-video frame into a TCN model 602 , and outputs foot contact data 603 of the object in each video frame through the TCN model 602 .
[0083] Step 404 : constructing a parametric model of the object based on the first motion capture data, where the parametric model is used to indicate the coordinates of the skeletal nodes of the object in the three-dimensional coordinate space.
[0084] In one possible embodiment, in order to determine the foot penetration loss and foot sliding loss in the first motion capture data, the computer device needs to first determine the spatial coordinates of the foot bone nodes of the object in each video frame in the three-dimensional coordinate space. Therefore, the computer device can first construct a parametric model of the object based on the first motion capture data. The parametric model is used to indicate the bone node coordinates of each bone node of the object in the three-dimensional coordinate space.
[0085] In one possible implementation, the computer device constructs a SMPL model (Skinned Multi-Person Linear Model) corresponding to the object based on the global displacement data and bone rotation data in the first motion capture data. The SMPL model can characterize the changes in the human body posture of the object, thereby obtaining the coordinates of each bone node and mesh coordinates corresponding to the object according to the SMPL model.
[0086] Step 405 : Based on the parameterized model, obtain the coordinates of the foot bone nodes of the object in each video frame.
[0087] Furthermore, the computer device obtains the foot bone node coordinates of the object in each video frame from the parametric model, including the left toe coordinates, the left heel coordinates, the right toe coordinates, and the right heel coordinates.
[0088] In one possible implementation, a computer device constructs an SMPL model corresponding to an object. The three-dimensional coordinates of each point on the SMPL model can be expressed as Q = smpl (Pose, T), where Pose refers to the object's skeletal rotation data, T refers to the object's global displacement data, and Q can be divided into three dimensions, namely Q x , Q y , Q z Represents the displacement of the point in three different directions.
[0089] Step 406 : Determine the foot sinking degree of the object in each video frame based on the foot bone node coordinates, and determine the foot penetration loss in each video frame according to the foot sinking degree.
[0090] In a possible implementation, after determining the foot bone node coordinates corresponding to the object in each video frame, the computer device may determine the foot penetration loss in each video frame based on the foot bone node coordinates.
[0091] In one possible implementation, considering that the foot penetration problem refers to the foot sinking into the ground, that is, in the three-dimensional coordinate space, it can be expressed as the coordinates of the foot bone node being lower than the ground in the vertical axis direction, the computer device can first determine the first vertical axis component of the foot bone node coordinates in each video frame, and then determine the foot penetration loss in each video frame based on the first vertical axis component.
[0092] In a possible implementation, for each video frame, the computer device determines the left toe coordinate, the left heel coordinate, the right toe coordinate, and the first vertical axis component of the right heel coordinate, respectively. The first vertical axis component can be expressed as Q y,i,t , represents the value of the i-th position of the t-th frame on the vertical axis y-axis, and then when the number of video frames is F, the foot penetration loss can be expressed as That is, in the three-dimensional space coordinates, the value of the ground in the vertical axis direction is 0. When the first vertical axis component of the foot bone node is negative, foot penetration loss occurs.
[0093] Step 407 : Determine the foot sliding degree of the object in each video frame based on the foot bone node coordinates and the foot contact data, and determine the foot sliding loss of the object in the video according to the foot sliding degree.
[0094] In a possible implementation, after determining the foot bone node coordinates corresponding to the object in each video frame, the computer device may determine the foot sliding loss in each video frame based on the foot bone node coordinates and the foot contact data.
[0095] In one possible implementation, considering that the foot sliding problem refers to the phenomenon of displacement when the foot is in a grounded state, that is, in the three-dimensional space coordinates, it can be expressed as the case where the foot is in a grounded state, the foot bone node coordinates between adjacent video frames are displaced in the horizontal direction, and the horizontal direction includes the horizontal axis direction and the vertical axis direction in the three-dimensional coordinate space. Therefore, the computer device can determine the foot sliding loss by calculating the difference between the foot bone node coordinates between adjacent frames in the horizontal axis direction and the vertical axis direction.
[0096] In one possible implementation, the computer device may first determine the first horizontal component and the first vertical component of the foot bone node coordinates in each video frame, and calculate the foot displacement difference corresponding to the object between adjacent video frames based on the first horizontal component and the first vertical component, thereby determining the foot sliding loss based on the foot displacement difference and the foot contact data.
[0097] In a possible implementation, the computer device represents the foot bone node coordinates as Q, and the first horizontal axis component of the foot bone node coordinates can be represented as Q x,i,t , the first vertical axis component can be expressed as Q z,i,t , so the foot displacement difference between adjacent video frames can be expressed as V i,t , that is, the foot displacement difference at the i-th position between the t-th frame and the t-1-th frame, and the foot contact data at the i-th position of the t-th frame can be expressed as S i,t , represented by 0 or 1, where 1 represents grounding and 0 represents not grounding. Then, when the number of video frames is F, the computer device can express the foot sliding loss as That is, when the foot is grounded, if there is a difference in foot displacement between adjacent video frames, foot slip loss occurs.
[0098] Step 408 : Determine a second vertical axis component of the global displacement data in the three-dimensional coordinate space based on the global displacement data and the parameterized model.
[0099] In one possible implementation, in order to improve the optimization efficiency of the foot penetration problem and the foot sliding problem existing in the first motion capture data, considering that the foot penetration loss is mainly reflected in the displacement in the vertical direction, therefore, for the foot penetration problem existing in the first motion capture data, the computer device can iteratively optimize the vertical axis component of the global displacement data in the three-dimensional coordinate space separately.
[0100] In one possible implementation, the computer device determines the second vertical axis component of the global displacement data in the three-dimensional coordinate space based on the global displacement data and the constructed parameterized model. Optionally, the global displacement data can be expressed as T, and the second vertical axis component can be expressed as T y .
[0101] Step 409 : Iteratively optimize the second vertical axis component based on the foot penetration loss.
[0102] In a possible implementation, after determining the foot penetration loss and the second vertical axis component of the global displacement data, the computer device iteratively optimizes the second vertical axis component according to the foot penetration loss.
[0103] In one possible implementation, the computer device may use an Adam optimizer to iteratively optimize the second vertical axis component using a foot penetration loss. For example, the learning rate of the Adam optimizer may be set to 0.001, and the number of iterations may be set to 200.
[0104] Step 410 : Based on the foot penetration loss and the foot sliding loss, the global displacement data and the bone rotation data are iteratively optimized to obtain the second motion capture data.
[0105] In one possible embodiment, after determining the foot penetration loss and the foot sliding loss, and iteratively optimizing the second vertical axis component of the global displacement data to reduce the foot penetration problem, the computer device also needs to optimize the foot sliding problem in the first motion capture data based on the foot sliding loss. In order to avoid causing the foot penetration problem again during the process of optimizing the foot sliding problem, the computer device can continue to optimize the second vertical axis component based on the foot penetration loss while optimizing the foot sliding problem based on the foot sliding loss.
[0106] In a possible implementation, the computer device iteratively optimizes the global displacement data T and the skeleton rotation data Pose according to the foot penetration loss and the foot sliding loss, thereby obtaining the second motion capture data.
[0107] In one possible implementation, the computer device may use an Adam optimizer to iteratively optimize the global displacement data and the bone rotation data through foot penetration loss and foot sliding loss. For example, the learning rate of the Adam optimizer may be set to 0.001, and the number of iterations may be set to 600.
[0108] In a possible implementation, since the second horizontal axis component and the second vertical axis component of the global displacement data vary greatly during the motion process, in order to reduce the difficulty of optimization, the computer device can also adjust the optimization parameters of the global displacement data, and adjust the absolute change of the second horizontal axis component T in the global displacement data to x and the second vertical axis component T z Adjusted to the relative change between adjacent video frames, the second horizontal axis component difference Δx i and the second vertical axis component difference Δz i , thereby speeding up the optimization and improving the optimization effect.
[0109] In one possible implementation, the computer device first determines the second horizontal-axis component and the second vertical-axis component of the global displacement data in the three-dimensional coordinate space based on the global displacement data and the parameterized model, and performs time-series difference construction on the second horizontal-axis component and the second vertical-axis component to obtain the second horizontal-axis component difference and the second vertical-axis component difference between adjacent video frames.
[0110] Schematically, as shown in FIG7 , the computer device constructs a time series difference relationship between the x and z dimensions in the global displacement data T and converts the absolute change in the global displacement data into the second horizontal axis component T x and the second vertical axis component T z Adjusted to the relative change between adjacent video frames, the second horizontal axis component difference Δx i and the second vertical axis component difference Δz i .
[0111] Furthermore, the computer device iteratively optimizes the second horizontal axis component difference, the second vertical axis component difference, the second vertical axis component and the bone rotation data based on the foot penetration loss and the foot sliding loss, wherein the optimization parameters composed of the second horizontal axis component difference, the second vertical axis component difference and the second vertical axis component can be expressed as [Δx, Δz, T y ], and then the computer device determines the optimized global displacement data according to the optimized second horizontal axis component difference, the second vertical axis component difference and the second vertical axis component, and obtains the second motion capture data according to the optimized global displacement data and the bone rotation data, wherein the optimized global displacement data can be expressed as The optimized bone rotation data can be expressed as
[0112] In the above embodiment, by constructing a parametric model of the object, the coordinates of the foot bone nodes are determined, and then the foot penetration loss is determined according to the second vertical axis component of the foot bone node coordinates in each video frame, and the foot displacement difference is determined according to the change value of the foot bone node coordinates between adjacent video frames, and then the foot sliding loss is obtained, which improves the efficiency and accuracy of loss calculation in the iterative optimization process.
[0113] In addition, the second vertical axis component is first iteratively optimized for the foot penetration problem, and then the global displacement data and bone rotation data are iteratively optimized for the foot sliding problem. During the iterative optimization process for the foot sliding problem, the iterative optimization of the second vertical axis component is continued, which improves the efficiency of the iterative optimization and enhances the optimization effect on the foot penetration problem and the foot sliding problem.
[0114] In a possible embodiment, in the process of iteratively optimizing the global displacement data and the bone rotation data for the foot penetration problem and the foot sliding problem, in order to avoid a large difference between the optimized global displacement data and the global displacement data before the optimization, especially when the optimization parameters are adjusted to the difference in coordinate components between adjacent video frames, cumulative errors may be generated, resulting in a large difference between the optimized global displacement data and the global displacement data before the optimization, the computer device can determine the global displacement loss based on the global displacement data before the optimization and the optimized global displacement data, and thus iteratively optimize the global displacement data and the bone rotation data based on the global displacement loss.
[0115] In one possible implementation, after optimizing the global displacement data based on the foot penetration loss and the foot sliding loss to obtain the optimized global displacement data, the computer device determines the global displacement loss based on the global displacement data before optimization and the optimized global displacement data.
[0116] In one possible implementation, considering that the cumulative error generally occurs after a plurality of video frames have been spaced apart, the computer device may select the global displacement data in the spaced video frames and calculate the global displacement difference between the global displacement data before optimization and the global displacement data after optimization in the spaced video frames, thereby determining the global displacement loss.
[0117] In one possible implementation, the computer device first determines the video frame interval of the video, and then determines the sampling video frame and the number of sampling video frames based on the video frame interval and the number of video frames of the video. Further, based on the global displacement data before optimization and the global displacement data after optimization, the global displacement difference between the global displacement data in each sampling video frame and the optimized global displacement data is determined, and then the global displacement loss is determined by the mean square error calculation formula based on the sampling video frame number and the global displacement difference.
[0118] In one possible implementation, the global displacement data before optimization can be expressed as T n , the optimized global displacement data can be expressed as The number of sampled video frames is J, and the global displacement loss can be expressed as loss3=
[0119] Furthermore, the computer device iteratively optimizes the global displacement data and the bone rotation data according to the foot penetration loss, the foot sliding loss and the global displacement loss to obtain the second motion capture data.
[0120] In the above embodiment, after the global displacement data is optimized according to the foot penetration loss and the foot sliding loss to obtain the optimized global displacement data, the global displacement difference between the global displacement data before optimization and the optimized global displacement data in the interval video frame is determined, and the global displacement loss is obtained by the mean square error formula, so that the global displacement loss is added to iteratively optimize the global displacement data and the bone rotation data, thereby avoiding the problem of a large displacement difference between the optimized global displacement data and the global displacement data before optimization, ensuring that the second motion capture data is as close as possible to the first motion capture data, and improving the efficiency of iterative optimization and the data quality of the second motion capture data.
[0121] In one possible implementation, in order to ensure a smooth animation effect based on the second motion capture data and avoid mutations between video frames, the computer device can also determine the global displacement speed loss between adjacent video frames based on the global displacement data, thereby iteratively optimizing the global displacement data and bone rotation data based on the foot penetration loss, foot sliding loss and global displacement speed loss to obtain the second motion capture data.
[0122] In a possible implementation, the global displacement speed difference between adjacent video frames can be expressed as A t , that is, the global displacement velocity difference between the t-th frame and the t-1-th frame, that is, the acceleration of the t-th frame, so when the number of video frames is F, the global displacement velocity loss can be expressed as
[0123] In the above embodiment, by adding global displacement speed loss in the iterative optimization process, the problem of sudden changes in global displacement data between video frames is reduced, the efficiency of iterative optimization is improved, and the smoothness of the animation obtained according to the second motion capture data is increased.
[0124] In a possible implementation, in order to perform targeted iterative optimization of the foot penetration problem and the foot sliding problem based on the foot penetration loss, the foot sliding loss, the global displacement loss, and the global displacement speed loss, and to improve the efficiency of the iterative optimization, the computer device can divide the iterative optimization process into two stages, and set different loss weights in the two stages.
[0125] In one possible embodiment, in the first stage, the computer device weights the foot penetration loss, foot sliding loss, global displacement loss and global displacement speed loss based on the first foot penetration loss weight, the first foot sliding loss weight, the first global displacement loss weight and the first global displacement speed loss weight to obtain a first weighted loss, and then iteratively optimizes the global displacement data based on the first weighted loss.
[0126] In one possible implementation, in the first stage, in order to address the foot penetration problem, the second vertical axis component in the global displacement data is iteratively optimized, and the first foot penetration loss weight can be set to be greater than the first foot sliding loss weight, the first global displacement loss weight, and the first global displacement speed loss weight.
[0127] In an illustrative example, the first foot penetration loss weight can be set to 100, and the first foot sliding loss weight, the first global displacement loss weight, and the first global displacement speed loss weight can all be set to 0.
[0128] In one possible embodiment, after completing the iterative optimization of the second vertical axis component in the global displacement data, in the second stage, the computer device weights the foot penetration loss, foot sliding loss, global displacement loss and global displacement speed loss based on the second foot penetration loss weight, the second foot sliding loss weight, the second global displacement loss weight and the second global displacement speed loss weight to obtain a second weighted loss, and then iteratively optimizes the global displacement data and the bone rotation data based on the second weighted loss to obtain second motion capture data.
[0129] In one possible implementation, in the second stage, since the iterative optimization based on the foot penetration loss is only to avoid increasing the foot penetration problem again in the process of optimizing the foot sliding problem, and the main purpose of the second stage is to iteratively optimize the global displacement data and bone rotation data for the foot sliding problem, the second foot penetration loss weight can be set to be smaller than the second foot sliding loss weight, the second global displacement loss weight, and the second global displacement speed loss weight.
[0130] In an illustrative example, the second foot penetration loss weight can be set to 100, and the second foot sliding loss weight, the second global displacement loss weight, and the second global displacement speed loss weight can all be set to 1000.
[0131] In one possible implementation, the computer device may represent the loss weights corresponding to the foot penetration loss, foot sliding loss, global displacement loss, and global displacement speed loss as w1, w2, w3, and w4, respectively, so that the weighted loss may be expressed as loss = w1*loss1+w2*loss2+w3*loss3+w4*loss4.
[0132] In the above embodiment, the global displacement data and the bone rotation data are iteratively optimized in stages, and the global displacement data and the bone rotation data are iteratively optimized according to different loss weights at different stages, thereby improving the efficiency of the iterative optimization and improving the data quality of the second motion capture data.
[0133] In one possible implementation, the entire process of iteratively optimizing global displacement data and bone rotation data can be regarded as a process of iteratively optimizing global displacement data and bone rotation data through an iterative optimization model. The iterative optimization model is divided into two stages. The input of the iterative optimization model is global displacement data, bone rotation data, and foot grounding data, and the output is optimized global displacement data and optimized bone rotation data.
[0134] Please refer to FIG8 , which shows a flowchart of phased iterative optimization provided by an exemplary embodiment of the present application.
[0135] Step 801: Determine global displacement data, bone rotation data, and foot contact data.
[0136] First, the computer device obtains global displacement data T and skeleton rotation data Pose according to the first motion capture data, and obtains foot grounding data S by analyzing the foot grounding state of the video.
[0137] Step 802 : Iteratively optimize the second vertical axis component in the global displacement data based on the first weighted loss.
[0138] Secondly, the computer device obtains the first foot penetration loss weight w1=100, the first foot sliding loss weight w2=0, the first global displacement loss weight w3=0, the first global displacement speed loss weight w4=0, and obtains the number of iterations as 200 times, and the learning rate of the Adam optimizer is 0.001, thereby optimizing the second vertical axis component T in the global displacement data based on the foot penetration loss loss1. y Perform iterative optimization.
[0139] Step 803: Iteratively optimize the global displacement data and the bone rotation data based on the second weighted loss.
[0140] After completing the second vertical axis component T y After iterative optimization, the computer device obtains the second foot penetration loss weight w1=100, the second foot sliding loss weight w2=1000, the second global displacement loss weight w3=1000, and the second global displacement speed loss weight w4=1000, and obtains the number of iterations as 600 times, and the learning rate of the Adam optimizer is 0.001, thereby based on the foot penetration loss loss1, the foot sliding loss loss2, the global displacement loss loss3 and the global displacement speed loss loss4, the adjusted global displacement data [Δx, Δz, T y ] and bone rotation data Pose for iterative optimization.
[0141] Step 804: Obtain optimized global displacement data and optimized bone rotation data.
[0142] After reaching the number of iterations, the computer device obtains the optimized global displacement data And optimized bone rotation data Thus, the second motion capture data is obtained.
[0143] Please refer to FIG9 , which shows a flowchart of a method for processing motion capture data provided by another exemplary embodiment of the present application.
[0144] First, a computer device performs video motion capture analysis on video 901 to obtain first motion capture data 902, wherein the first motion capture data 902 includes global displacement data 903 and skeletal rotation data 904 of the object in each video frame of the video, and the computer device performs foot grounding state analysis on video 901 to obtain foot grounding data 905 of the object in each video frame. Then, the computer device constructs a parametric model of the object based on the first motion capture data 902, and obtains foot skeletal node coordinates 906 of the object in each video frame based on the parametric model. Thus, the computer device determines the foot penetration loss 907 in the first motion capture data 902 in each video frame based on the foot skeletal node coordinates 906, and determines the foot sliding loss 908 in the first motion capture data 902 based on the foot skeletal node coordinates 906 and the foot grounding data 905. In order to improve the fluency of the animation video and reduce mutations, the computer device can also determine the global displacement speed loss 910 in the first motion capture data 902 based on the global displacement data 903.
[0145] Secondly, for the foot penetration problem in the first motion capture data 902, the computer device performs a first-stage iterative optimization, and iteratively optimizes the second vertical axis component 909 in the global displacement data 903 through the foot penetration loss 907 to obtain the optimized second vertical axis component 913. After completing the iterative optimization of the second vertical axis component 909, for the foot sliding problem in the first motion capture data 902, the computer device performs a second-stage iterative optimization, and in order to avoid increasing the foot penetration problem in the process of optimizing the foot sliding problem, the computer device can continue to optimize the foot penetration problem in the second-stage iterative optimization process, through the foot penetration loss 907, The foot sliding loss 908 and the global displacement speed loss 910 are used to iteratively optimize the global displacement data 903 and the bone rotation data 904. At the same time, in order to avoid large changes in the global displacement data before and after optimization, in each optimization process, the computer device can also determine the global displacement loss 912 based on the global displacement data 903 before optimization and the global displacement data 911 after optimization. Then, the computer device iteratively optimizes the global displacement data 903 and the bone rotation data 904 based on the foot penetration loss 907, the foot sliding loss 908, the global displacement loss 912 and the global displacement speed loss 910, and finally obtains the second motion capture data 914.
[0146] Please refer to FIG10 , which shows a structural block diagram of a device for processing motion capture data provided by an exemplary embodiment of the present application. The device includes:
[0147] A first analysis module 1001 is configured to perform motion capture analysis on an object in a video to obtain first motion capture data, where the first motion capture data includes global displacement data and skeletal rotation data of the object in each video frame of the video, where the global displacement data represents the displacement of a representative skeletal node of the object;
[0148] The second analysis module 1002 is configured to analyze the foot grounding state of the subject and obtain foot grounding data of the subject in each video frame, wherein the foot grounding data represents the foot grounding mode of the subject;
[0149] The loss determination module 1003 is configured to determine the degree of foot penetration of the subject in each video frame based on the first motion capture data and the foot contact data, and determine the foot penetration loss of the subject in the video based on the foot penetration degree; determine the degree of foot sliding of the subject in each video frame based on the first motion capture data and the foot contact data, and determine the foot sliding loss of the subject in the video based on the foot sliding degree;
[0150] The optimization module 1004 is configured to iteratively optimize the first motion capture data based on the foot penetration loss and the foot sliding loss to obtain second motion capture data of the object.
[0151] Optionally, the loss determination module 1003 includes:
[0152] A model building unit, configured to build a parametric model of the object based on the first motion capture data, wherein the parametric model is configured to indicate the coordinates of the skeletal nodes of the object in a three-dimensional coordinate space;
[0153] A coordinate acquisition unit, configured to acquire the coordinates of the foot bone nodes of the object in each video frame based on the parameterized model;
[0154] a first loss determination unit, configured to determine a foot penetration degree of an object in each video frame based on the foot bone node coordinates, and determine a foot penetration loss in each video frame according to the foot penetration degree;
[0155] The second loss determination unit is used to determine the degree of foot sinking of the object in each video frame based on the foot bone node coordinates and foot grounding data, and determine the foot penetration loss in each video frame according to the foot sinking degree.
[0156] Optionally, the first loss determining unit is configured to:
[0157] Determine the first vertical axis component of the foot bone node coordinates in each video frame based on the foot bone node coordinates;
[0158] Based on the first vertical axis component, the foot penetration loss in each video frame is determined.
[0159] Optionally, the second loss determination unit is configured to:
[0160] Determine, based on the foot bone node coordinates, a first horizontal axis component and a first vertical axis component of the foot bone node coordinates in each video frame;
[0161] determining a foot displacement difference of the object between adjacent video frames based on the first horizontal axis component and the first vertical axis component;
[0162] The foot slip loss is determined based on the foot displacement difference and the foot contact data.
[0163] Optionally, the optimization module 1004 includes:
[0164] a component determination unit, configured to determine a second vertical axis component of the global displacement data in a three-dimensional coordinate space based on the global displacement data and the parameterized model;
[0165] A first optimization unit is configured to iteratively optimize the second vertical axis component based on the foot penetration loss;
[0166] The second optimization unit is used to iteratively optimize the global displacement data and the bone rotation data based on the foot penetration loss and the foot sliding loss to obtain the second motion capture data.
[0167] Optionally, the second optimization unit is further configured to:
[0168] Based on the foot penetration loss and foot sliding loss, the global displacement data is optimized to obtain the optimized global displacement data;
[0169] determining a global displacement loss based on the global displacement data and the optimized global displacement data;
[0170] Based on the foot penetration loss, foot sliding loss and global displacement loss, the global displacement data and bone rotation data are iteratively optimized to obtain the second motion capture data.
[0171] Optionally, the second optimization unit is further configured to:
[0172] Determine the video frame interval of the video;
[0173] Determine the sampled video frame and the number of sampled video frames based on the video frame interval;
[0174] Determine, based on the global displacement data and the optimized global displacement data, a global displacement difference between the global displacement data in each sampled video frame and the optimized global displacement data;
[0175] The global displacement loss is determined based on the number of sampled video frames and the global displacement difference.
[0176] Optionally, the second optimization unit is further configured to:
[0177] Determining a global displacement velocity loss between adjacent video frames based on the global displacement data;
[0178] Based on the foot penetration loss, foot sliding loss, and global displacement velocity loss, the global displacement data and bone rotation data are iteratively optimized to obtain the second motion capture data.
[0179] Optionally, the second optimization unit is further configured to:
[0180] Determine a second horizontal axis component and a second vertical axis component of the global displacement data in a three-dimensional coordinate space based on the global displacement data and the parameterized model;
[0181] Performing temporal difference construction on the second horizontal axis component and the second vertical axis component to obtain a second horizontal axis component difference value and a second vertical axis component difference value between adjacent video frames;
[0182] Based on the foot penetration loss and foot sliding loss, iteratively optimize the second horizontal axis component difference, the second vertical axis component difference, the second vertical axis component, and the bone rotation data;
[0183] Determining optimized global displacement data based on the optimized second horizontal axis component difference, the second vertical axis component difference, and the second vertical axis component;
[0184] Second motion capture data is obtained based on the optimized global displacement data and the optimized skeletal displacement data.
[0185] Optionally, the device further comprises:
[0186] a first loss determination module, configured to weight the foot penetration loss, the foot sliding loss, the global displacement loss, and the global displacement velocity loss based on the first foot penetration loss weight, the first foot sliding loss weight, the first global displacement loss weight, and the first global displacement velocity loss weight to obtain a first weighted loss;
[0187] a second loss determination module, configured to weight the foot penetration loss, the foot sliding loss, the global displacement loss, and the global displacement velocity loss based on the second foot penetration loss weight, the second foot sliding loss weight, the second global displacement loss weight, and the second global displacement velocity loss weight to obtain a second weighted loss;
[0188] a first optimization unit, configured to iteratively optimize the global displacement data based on a first weighted loss;
[0189] The second optimization unit is used to iteratively optimize the global displacement data and the bone rotation data based on the second weighted loss after completing the iterative optimization of the global displacement data to obtain the second motion capture data.
[0190] Optional,
[0191] The first foot penetration loss weight is greater than the first foot sliding loss weight, the first global displacement loss weight, and the first global displacement speed loss weight;
[0192] The second foot penetration loss weight is less than the second foot sliding loss weight, the second global displacement loss weight, and the second global displacement speed loss weight.
[0193] Optionally, the second analysis module 1002 includes:
[0194] A key point extraction module is used to extract two-dimensional key points of objects in each video frame to obtain two-dimensional key point information of objects in each video frame;
[0195] The data determination module is used to determine the foot contact data of the object in each video frame based on the two-dimensional key point information.
[0196] Optionally, a data determination module is used to:
[0197] Determine the grounding status of each foot bone node of the object in each video frame based on the two-dimensional key point information;
[0198] Based on the grounding status of each foot bone node, each foot bone node in each video frame is marked to obtain foot grounding data.
[0199] In summary, in the embodiment of the present application, the first motion capture data is obtained by performing motion capture analysis on the object in the video, and the foot grounding status of the object is analyzed according to the video to obtain the foot grounding data of the object in each video frame, so that the computer device can determine the foot sliding loss and the foot penetration loss based on the first motion capture data and the foot grounding data, and then iteratively optimize the first motion capture data according to the foot sliding loss and the foot penetration loss to obtain the second motion capture data. The solution provided in the embodiment of the present application can reduce the foot sliding problem and the foot penetration problem in the video motion capture data, improve the data quality of the video motion capture data, and reduce the repair work and repair cost of the later animation production.
[0200] It should be noted that the apparatus provided in the above embodiments is merely exemplified by the division of the above functional modules. In actual applications, the above functions can be distributed among different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The implementation process is detailed in the method embodiments and will not be repeated here.
[0201] Please refer to Figure 11, which shows a schematic diagram of the structure of a computer device provided by an exemplary embodiment of the present application. Specifically, the computer device 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory 1102 and a read-only memory 1103, and a system bus 1105 connecting the system memory 1104 and the CPU 1101. The computer device 1100 also includes a basic input / output system (I / O system) 1106 that helps transfer information between various components within the computer, and a non-volatile storage device 1107 for storing an operating system 1113, application programs 1114, and other program modules 1115.
[0202] The basic input / output system 1106 includes a display 1108 for displaying information and an input device 1109 such as a mouse and keyboard for user input. The display 1108 and the input device 1109 are both connected to the central processing unit 1101 via an input / output controller 1110 connected to the system bus 1105. The basic input / output system 1106 may also include an input / output controller 1110 for receiving and processing input from a variety of other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1110 also provides output to a display screen, printer, or other types of output devices.
[0203] The non-volatile storage device 1107 is connected to the central processing unit 1101 via a storage controller (not shown) connected to the system bus 1105. The non-volatile storage device 1107 and its associated computer-readable medium provide non-volatile storage for the computer device 1100. In other words, the non-volatile storage device 1107 may include a computer-readable medium (not shown) such as a hard disk or drive.
[0204] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include random access memory (RAM), read-only memory (ROM), flash memory or other solid-state storage technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, tape cassettes, magnetic tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media are not limited to the above-mentioned ones. The above-mentioned system memory 1104 and non-volatile storage device 1107 can be collectively referred to as memory.
[0205] The memory stores one or more programs, and the one or more programs are configured to be executed by one or more central processing units 1101. The one or more programs contain instructions for implementing the above-mentioned methods. The central processing unit 1101 executes the one or more programs to implement the methods provided by the above-mentioned various method embodiments.
[0206] According to various embodiments of the present application, the computer device 1100 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1100 may be connected to the network 1111 via the network interface unit 1112 connected to the system bus 1105, or the network interface unit 1112 may be used to connect to other types of networks or remote computer systems (not shown).
[0207] An embodiment of the present application further provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement the motion capture data processing method described in the above embodiment.
[0208] Optionally, the computer-readable storage medium may include: ROM, RAM, solid state drives (SSDs) or optical disks, etc. Among them, RAM may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM).
[0209] The present invention provides a computer program product comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the motion capture data processing method described in the above embodiment.
[0210] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0211] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0212] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for processing motion capture data, executed by a computer device, the method comprising: Performing motion capture analysis on an object in a video to obtain first motion capture data, wherein the first motion capture data includes global displacement data and bone rotation data of the object in each video frame of the video, wherein the global displacement data represents the displacement of a representative bone node of the object; Analyze the foot grounding state of the object to obtain the foot grounding data of the object in each video frame, wherein the foot grounding data represents the foot grounding mode of the object; Determine, based on the first motion capture data, the degree to which the foot of the object in each video frame sinks into the ground, and determine the foot penetration loss of the object in the video according to the degree to which the foot sinks into the ground; Determine the foot sliding degree of the object in each video frame based on the first motion capture data and the foot contact data, and determine the foot sliding loss of the object in the video according to the foot sliding degree; Based on the foot penetration loss and the foot sliding loss, the first motion capture data is iteratively optimized to obtain second motion capture data of the object.
2. The method according to claim 1, wherein determining the degree of foot sinking of the object in each video frame based on the first motion capture data, and determining the foot penetration loss of the object in the video according to the foot sinking degree comprises: Based on the first motion capture data, construct a parameterized model of the object, wherein the parameterized model is used to indicate the coordinates of the skeletal nodes of each skeletal node of the object in a three-dimensional coordinate space; Based on the parameterized model, obtaining the coordinates of the foot bone nodes of the object in each video frame; Based on the foot bone node coordinates, the degree of foot sinking into the ground of the object in each video frame is determined, and the foot penetration loss in each video frame is determined according to the foot sinking into the ground.
3. The method according to claim 1 or 2, wherein determining the degree of foot sinking of the object in each video frame based on the foot bone node coordinates, and determining the foot penetration loss in each video frame according to the foot sinking degree comprises: Determine the first vertical axis component of the foot bone node coordinates in each video frame based on the foot bone node coordinates and the foot grounding data; Based on the first vertical axis component, the degree of foot sinking into the ground of the object in each video frame is determined, and the foot penetration loss in each video frame is determined according to the foot sinking into the ground.
4. The method according to any one of claims 1 to 3, wherein determining the foot sliding degree of the object in each video frame based on the first motion capture data and the foot contact data, and determining the foot sliding loss of the object in the video according to the foot sliding degree comprises: Based on the foot bone node coordinates and the foot grounding data, determine the first horizontal axis component and the first vertical axis component of the foot bone node coordinates in each video frame; Determine a foot displacement difference of the object between adjacent video frames based on the first horizontal axis component and the first vertical axis component; Based on the foot displacement difference, the foot sliding degree of the object in each video frame is determined, and the foot sliding loss is determined according to the foot sliding degree.
5. The method according to any one of claims 1 to 4, wherein the iterative optimization of the first motion capture data based on the foot penetration loss and the foot sliding loss to obtain the second motion capture data of the object comprises: Determine a second vertical axis component of the global displacement data in the three-dimensional coordinate space based on the global displacement data and the parameterized model; Iteratively optimizing the second vertical axis component based on the foot penetration loss; Based on the foot penetration loss and the foot sliding loss, the global displacement data and the bone rotation data are iteratively optimized to obtain the second motion capture data.
6. The method according to any one of claims 1 to 5, wherein the global displacement data and the bone rotation data are iteratively optimized based on the foot penetration loss and the foot sliding loss to obtain the second motion capture data, comprising: Based on the foot penetration loss and the foot sliding loss, the global displacement data is optimized to obtain optimized global displacement data; Determining a global displacement loss based on the global displacement data and the optimized global displacement data; Based on the foot penetration loss, the foot sliding loss and the global displacement loss, the global displacement data and the bone rotation data are iteratively optimized to obtain the second motion capture data.
7. The method according to any one of claims 1 to 6, wherein determining the global displacement loss based on the global displacement data and the optimized global displacement data comprises: Determining a video frame interval of the video; Based on the video frame interval, determining a sampled video frame and the number of sampled video frames; Based on the global displacement data and the optimized global displacement data, determining a global displacement difference between the global displacement data and the optimized global displacement data in each sampled video frame; The global displacement loss is determined based on the sampled video frame number and the global displacement difference.
8. The method according to any one of claims 1 to 7, wherein the global displacement data and the bone rotation data are iteratively optimized based on the foot penetration loss and the foot sliding loss to obtain the second motion capture data, comprising: Determining a global displacement speed loss between adjacent video frames based on the global displacement data; Based on the foot penetration loss, the foot sliding loss and the global displacement speed loss, the global displacement data and the bone rotation data are iteratively optimized to obtain the second motion capture data.
9. The method according to any one of claims 1 to 8, wherein the global displacement data and the bone rotation data are iteratively optimized based on the foot penetration loss and the foot sliding loss to obtain the second motion capture data, comprising: Based on the global displacement data and the parameterized model, determining a second horizontal axis component and a second vertical axis component of the global displacement data in the three-dimensional coordinate space; Performing time-series difference construction on the second horizontal axis component and the second vertical axis component to obtain a second horizontal axis component difference value and a second vertical axis component difference value between adjacent video frames; Iteratively optimizing the second horizontal axis component difference, the second vertical axis component difference, the second vertical axis component, and the bone rotation data based on the foot penetration loss and the foot sliding loss; Determine optimized global displacement data based on the optimized second horizontal axis component difference, the second longitudinal axis component difference and the second vertical axis component; The second motion capture data is obtained based on the optimized global displacement data and the optimized bone displacement data.
10. The method according to any one of claims 1 to 9, further comprising: Based on the first foot penetration loss weight, the first foot sliding loss weight, the first global displacement loss weight and the first global displacement speed loss weight, the foot penetration loss, the foot sliding loss, the global displacement loss and the global displacement speed loss are weighted to obtain a first weighted loss; Based on the second foot penetration loss weight, the second foot sliding loss weight, the second global displacement loss weight and the second global displacement speed loss weight, the foot penetration loss, the foot sliding loss, the global displacement loss and the global displacement speed loss are weighted to obtain a second weighted loss; Iteratively optimizing the global displacement data based on the first weighted loss; When the iterative optimization of the global displacement data is completed, the global displacement data and the bone rotation data are iteratively optimized based on the second weighted loss to obtain the second motion capture data.
11. According to the method described in any one of claims 1 to 10, the first foot penetration loss weight is greater than the first foot sliding loss weight, and is greater than the first global displacement loss weight, and is greater than the first global displacement speed loss weight.
12. According to the method described in any one of claims 1 to 11, the second foot penetration loss weight is smaller than the second foot sliding loss weight, and smaller than the second global displacement loss weight, and smaller than the second global displacement speed loss weight.
13. The method according to any one of claims 1 to 12, wherein analyzing the foot grounding state of the object to obtain the foot grounding data of the object in each video frame comprises: Extracting two-dimensional key points of the object in each video frame to obtain two-dimensional key point information of the object in each video frame; Based on the two-dimensional key point information, the foot contact data of the object in each video frame is determined.
14. The method according to claim 13, wherein determining the foot contact data of the object in each video frame based on the two-dimensional key point information comprises: Based on the two-dimensional key point information, determining the grounding state of each foot bone node of the object in each video frame; Based on the grounding status of each foot bone node, each foot bone node in each video frame is marked to obtain the foot grounding data.
15. A device for processing motion capture data, the device comprising: A first analysis module is used to perform motion capture analysis on an object in a video to obtain first motion capture data, wherein the first motion capture data includes global displacement data and bone rotation data of the object in each video frame of the video, wherein the global displacement data represents the displacement of a representative bone node of the object; A second analysis module is used to analyze the foot grounding state of the subject to obtain the foot grounding data of the subject in each video frame, wherein the foot grounding data represents the foot grounding mode of the subject; a loss determination module, for determining the degree of foot sinking of the object in each video frame based on the first motion capture data, and determining the foot penetration loss of the object in the video according to the foot sinking degree; for determining the degree of foot sliding of the object in each video frame based on the first motion capture data and the foot grounding data, and determining the foot sliding loss of the object in the video according to the foot sliding degree; The optimization module is used to iteratively optimize the first motion capture data based on the foot penetration loss and the foot sliding loss to obtain the second motion capture data of the object.
16. An electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the motion capture data processing method according to any one of claims 1 to 14.
17. A computer-readable storage medium storing at least one instruction, wherein the at least one instruction is used to be executed by a processor to implement the method for processing motion capture data according to any one of claims 1 to 14.
18. A computer program product, comprising at least one instruction, wherein the at least one instruction is used to be executed by a processor to implement the method for processing motion capture data according to any one of claims 1 to 14.
Citation Information
Patent Citations
Dynamic bone implementation method and device in animation
CN107067451A
Action data correction method and device, and electronic equipment
CN110738717A
Motion capture method and device, electronic equipment and computer readable storage medium
CN113033369A
Digital human motion control method and device, equipment, medium and product
CN115601482A
Motion capture data processing method and device, equipment and storage medium
CN116051699A
Cited By
Motion capture optimization method and model training method based on monocular video
CN119992651A
