A visual saliency-based character animation key frame reduction method and system
By extracting the position and rotation path of the character animation sequence, calculating and fusing the motion feature sequence, and selecting keyframes to minimize reconstruction error, the problem of loss of rotation feature information in existing technologies is solved, and high-quality animation reconstruction is achieved.
Patent Information
- Application Number
- CN202511609693.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-05-01
- Estimated Expiration
- 2045-11-05
AI Technical Summary
Existing keyframe simplification methods for character animation lack a unified measurement model when dealing with character rotational motion, resulting in the loss of rotational feature information and causing visual distortion.
By extracting the position and rotation paths from the character animation sequence, calculating the corresponding motion feature sequences, and generating a third motion feature sequence, key frames are selected with the goal of minimizing motion reconstruction error, and the contributions of position and rotation features are fused.
Accurately capture rotational angular velocity characteristics, avoid missing key rotational information, ensure that interpolation reconstruction can restore the key transition states in the angular momentum transfer chain, and improve the quality of animation reconstruction.
Smart Images

Figure CN121437701B_ABST
Abstract
Description
A method and system for simplifying keyframes in visually salient character animation Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method and system for simplifying keyframes in visually salient character animation. Background Technology
[0002] Character animation is widely used in games, film and television, virtual reality, and other fields. Motion capture technology provides a high-precision means of acquiring motion data for character animation production. Optical motion capture records character movement by tracking the three-dimensional spatial coordinates of reflective markers, generating a character animation sequence containing a complete skeletal hierarchy and motion data of each bone node. Because motion capture systems typically operate at high sampling rates, the original animation sequence contains a large number of redundant frames, requiring keyframe simplification to reduce storage costs and improve real-time rendering performance.
[0003] Existing keyframe simplification methods calculate the displacement distance of each skeleton node between adjacent time points and retain time points where the displacement exceeds a threshold as keyframes. These methods are based on the position measurement-driven nature of optical motion capture, using position coordinates as an evaluation index of motion salience. They select keyframe combinations through a position error minimization strategy, thus effectively identifying critical moments with significant positional changes when handling large translational motions.
[0004] However, when a character rotates around the center of a skeletal node, the displacement of the proximal marker is very small. Existing technologies determine that these time-frame movements are insignificant based on a displacement threshold and delete them, resulting in the loss of crucial pose information containing high rotational angular velocities. Due to the lack of a unified metric to simultaneously quantify the contributions of positional and rotational features, the simplified animation cannot restore key transient features that must be represented by a temporal composite of positional and rotational features when reconstructed through interpolation, causing visual distortion in rotation-dominated movements such as torso twisting. Summary of the Invention
[0005] In view of the aforementioned problems, this application is hereby filed.
[0006] Therefore, this application provides a method and system for simplifying keyframes in visually salient character animation, which can solve the problems mentioned in the background art.
[0007] To solve the above-mentioned technical problems, this application provides the following technical solution:
[0008] In a first aspect, this application provides a method for simplifying keyframes of visually salient character animation, including: acquiring a character animation sequence and extracting the position path and rotation path of each bone node in the character animation sequence in the time dimension;
[0009] Based on the position path of each skeletal node, calculate the corresponding first motion feature sequence;
[0010] Based on the rotation path of each bone node, calculate the corresponding second motion feature sequence;
[0011] The first motion feature sequence and the second motion feature sequence of each skeletal node are combined to generate a third motion feature sequence;
[0012] Based on the third motion feature sequence of all the skeletal nodes, with the optimization objective of minimizing the motion reconstruction error of the character animation sequence, a target keyframe sequence is selected from the original time points of the character animation sequence and the target keyframe sequence is output.
[0013] Preferably, the first motion feature sequence is used to characterize the geometric shape change or motion speed change of the position path; the second motion feature sequence is used to characterize the angular velocity change or angular acceleration change of the rotation path.
[0014] The generation of the third motion feature sequence includes:
[0015] Determine the position representation weight of the first motion feature corresponding to the first motion feature in the first motion feature sequence of each bone node at each original time point, and the rotation representation weight of the second motion feature corresponding to the second motion feature in the second motion feature sequence of each bone node at each original time point;
[0016] Based on the position representation weights, amplitude modulation processing is performed on the first motion feature to obtain the amplitude-modulated position feature;
[0017] Based on the rotation representation weights, amplitude modulation processing is performed on the second motion feature to obtain the amplitude-modulated rotation feature;
[0018] Based on the amplitude-modulated position features and the amplitude-modulated rotation features, a third motion feature of each bone node at each original time point is generated.
[0019] The third motion features of each skeletal node at all original time points are arranged in chronological order to form the third motion feature sequence of each skeletal node.
[0020] Preferably, the step of generating the third motion feature of each skeletal node at each original time point based on the amplitude-modulated position feature and the amplitude-modulated rotation feature includes:
[0021] Determine the amplitude comparison relationship between the amplitude-modulated position feature and the amplitude-modulated rotation feature. When the amplitude of the amplitude-modulated position feature is greater than the amplitude of the amplitude-modulated rotation feature, the amplitude-modulated position feature is used as the dominant feature component, and the amplitude-modulated rotation feature is used as the auxiliary feature component.
[0022] When the amplitude of the amplitude-modulated rotation feature is greater than the amplitude of the amplitude-modulated position feature, the amplitude-modulated rotation feature is used as the dominant feature component, and the amplitude-modulated position feature is used as the auxiliary feature component.
[0023] When the amplitude of the amplitude-modulated position feature and the amplitude of the amplitude-modulated rotation feature meet the preset amplitude balance condition, the amplitude-modulated position feature and the amplitude-modulated rotation feature are used as equally weighted feature components.
[0024] Based on the dominant feature component and the auxiliary feature component, or based on the equally weighted feature component, a third motion feature of each skeletal node at each original time point is generated.
[0025] Preferably, the calculation of the motion reconstruction error includes:
[0026] Based on the original time points corresponding to each candidate target keyframe in the candidate target keyframe sequence, the third motion features of each bone node in the third motion feature sequence at the original time points corresponding to each candidate target keyframe are extracted as candidate keyframe features.
[0027] For each skeletal node at each original time point, determine whether each original time point is located between two adjacent candidate target keyframes. When each original time point is located between two adjacent candidate target keyframes, perform interpolation reconstruction on the third motion features of each skeletal node at each original time point based on the candidate keyframe features of the two adjacent candidate target keyframes to obtain the reconstructed third motion features.
[0028] When each original time point coincides with a candidate target keyframe, the candidate keyframe features of the candidate target keyframe are used as the third motion features for the reconstruction of each skeleton node at each original time point.
[0029] The reconstructed third motion features of each skeletal node at all original time points are arranged in chronological order to form a sequence of reconstructed third motion features.
[0030] Preferably, after forming the reconstructed third motion feature sequence, the process includes:
[0031] For each bone node at each original time point, determine whether the degree of deviation between the reconstructed third motion feature of each bone node at each original time point and the third motion feature in the sequence of the third motion features of each bone node at each original time point exceeds a preset feature deviation threshold. When the degree of deviation exceeds the preset feature deviation threshold, record that each bone node has a reconstruction distortion mark at each original time point.
[0032] When the degree of deviation is less than or equal to the preset feature deviation threshold, the reconstruction distortion marker of each bone node at each original time point is not recorded;
[0033] The total number of time points in which the reconstruction distortion marker exists for all skeletal nodes across all original time points is counted, and this number is taken as the total number of distortion time points.
[0034] Based on the total number of distortion time points, the motion reconstruction error corresponding to the candidate target keyframe sequence is obtained.
[0035] Preferably, the third motion feature sequence based on all the skeletal nodes, with the goal of minimizing the motion reconstruction error of the character animation sequence, selects a target keyframe sequence from the original time points of the character animation sequence, including:
[0036] Set an upper limit on the number of keyframes contained in the target keyframe sequence;
[0037] Construct a keyframe selection status table; the keyframe selection status table records the current optimal keyframe combination from the initial original time point to each original time point under different keyframe quantity constraints, and the corresponding current minimum cumulative reconstruction error.
[0038] The initial candidate target keyframe sequence is constructed using the original starting time point;
[0039] Based on the initial candidate target keyframe sequence and the third motion feature sequence of each skeleton node, the initial cumulative reconstruction error is obtained;
[0040] The initial cumulative reconstruction error is recorded in the current minimum cumulative reconstruction error corresponding to the starting original time point in the keyframe selection status table.
[0041] Preferably, after recording the initial cumulative reconstruction error in the current minimum cumulative reconstruction error corresponding to the starting original time point in the keyframe selection status table, the process includes:
[0042] Starting from the next original time point after the initial original time point, traverse each original time point in turn. For each original time point, add each original time point to the current optimal candidate target keyframe sequence corresponding to the previous original time point to form a new candidate target keyframe sequence.
[0043] Based on the new candidate target keyframe sequence and the third motion feature sequence of each skeleton node, the candidate cumulative reconstruction error is obtained;
[0044] Determine whether the candidate cumulative reconstruction error is less than the current minimum cumulative reconstruction error corresponding to the previous original time point. When the candidate cumulative reconstruction error is less than the current minimum cumulative reconstruction error corresponding to the previous original time point, update the current optimal candidate target key frame sequence corresponding to each original time point in the key frame selection status table to a new candidate target key frame sequence, and update the current minimum cumulative reconstruction error corresponding to each original time point to the candidate cumulative reconstruction error.
[0045] When the candidate cumulative reconstruction error is greater than or equal to the current minimum cumulative reconstruction error corresponding to the previous original time point, the current optimal candidate target key frame sequence corresponding to each original time point in the key frame selection status table is kept to be the current optimal candidate target key frame sequence corresponding to the previous original time point, and the current minimum cumulative reconstruction error corresponding to each original time point is kept to be the current minimum cumulative reconstruction error corresponding to the previous original time point.
[0046] Preferably, after sequentially traversing each original time point, the process includes extracting the current optimal candidate target keyframe sequence from the keyframe selection state table, under the constraint of the upper limit of the number of keyframes, as the target keyframe sequence; wherein, the current optimal candidate target keyframe sequence is the candidate target keyframe sequence that minimizes the current minimum cumulative reconstruction error.
[0047] Preferably, the step of calculating the corresponding first motion feature sequence based on the position path of each of the skeletal nodes includes:
[0048] For each skeletal node, the displacement distance of each skeletal node at each original time point is obtained based on the position data of adjacent original time points in the position path of each skeletal node.
[0049] For each bone node, the turning degree of the motion direction of each bone node at each original time point is obtained based on the position change vector within the preceding and following time windows in the position path of each bone node.
[0050] Based on the displacement distance and the turning degree of the motion direction, a first motion feature sequence for each bone node is generated.
[0051] Secondly, this application also provides a visually salient character animation keyframe simplification system, including: an extraction module, used to acquire a character animation sequence and extract the position path and rotation path of each bone node in the character animation sequence in the time dimension;
[0052] The first calculation module calculates the corresponding first motion feature sequence based on the position path of each of the skeletal nodes;
[0053] The second calculation module calculates the corresponding second motion feature sequence based on the rotation path of each bone node.
[0054] The third calculation module is used to combine the first motion feature sequence and the second motion feature sequence of each bone node to generate a third motion feature sequence.
[0055] The optimization output module, based on the third motion feature sequence of all the bone nodes, selects a target keyframe sequence from the original time points of the character animation sequence with the optimization objective of minimizing the motion reconstruction error of the character animation sequence, and outputs the target keyframe sequence.
[0056] Implementing this application will have the following beneficial effects:
[0057] 1. This application extracts the position path and rotation path of each skeletal node separately, calculates the corresponding first motion feature sequence based on the position path of each skeletal node, and calculates the corresponding second motion feature sequence based on the rotation path of each skeletal node. For centripetal rotational motion scenarios such as torso rotation, even if the position displacement of the skeletal node is small, the second motion feature sequence can still accurately capture the rotational angular velocity features, avoiding the omission of key rotational information caused by position displacement threshold filtering in traditional methods.
[0058] 2. The third motion feature sequence of this application integrates the contributions of the first motion feature sequence and the second motion feature sequence, and establishes a unified and computable metric model to simultaneously quantify the contributions of position features and rotation features, ensuring that the feature fusion matches the true source of visual saliency.
[0059] 3. This application integrates the combined contributions of position and rotation features through the third motion feature, and simultaneously evaluates the position reconstruction quality and rotation reconstruction quality under the same optimization framework. It identifies key transient features that must be characterized by the temporal combination of position and rotation features, so that the interpolation reconstruction can restore the key transition states in the angular momentum transfer chain. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 is an overall flowchart of a visually salient character animation keyframe simplification method involved in this application;
[0062] Figure 2 is a schematic diagram of the interpolation reconstruction process of a visually salient character animation keyframe simplification method involved in this application;
[0063] Figure 3 is a schematic diagram of the overall structure of a visually salient character animation keyframe simplification system involved in this application;
[0064] Figure 4 is a computer device diagram of a visually salient character animation keyframe simplification method involved in this application. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] Existing techniques for keyframe simplification of character animation sequences lack a unified, computable metric model to simultaneously evaluate and quantify the feature contributions of translational motion (represented by positional paths) and rotational motion (represented by rotational paths) within the same optimization framework. This deficiency prevents existing techniques from establishing a unified optimization objective, leading to unbalanced simplification processes within limited keyframe budgets.
[0067] Alternatively, the optimization objective may be biased towards positional error, resulting in the incorrect smoothing or removal of key rotational features; or the optimization objective may be biased towards rotational error, resulting in the incorrect smoothing or removal of key translational features; or, after optimization, the two motions may be forcibly merged, disrupting the synchronization of the two motions on the time axis.
[0068] The end result is that the reconstructed animation loses the key transient features that must be represented by the temporal combination of positional and rotational features in the original motion, resulting in unacceptable perceptual distortion under limited data budget.
[0069] To address the aforementioned issues, this application proposes a visually salient keyframe simplification method for character animation. The method involves acquiring a character animation sequence and extracting the position and rotation paths of each bone node in the sequence along the time dimension. Based on the position path of each bone node, a first motion feature sequence is calculated. Based on the rotation path of each bone node, a second motion feature sequence is calculated. The first and second motion feature sequences of each bone node are combined to generate a third motion feature sequence. Based on the third motion feature sequences of all bone nodes, and with minimizing the motion reconstruction error of the character animation sequence as the optimization objective, a target keyframe sequence is selected from the original time points of the character animation sequence and output.
[0070] In an exemplary embodiment, as shown in Figure 1, a method for simplifying keyframes in visually salient character animation is provided, including steps 100 to 500. Wherein:
[0071] Step 100: Obtain the character animation sequence and extract the position and rotation paths of each bone node in the character animation sequence in the time dimension.
[0072] In some embodiments, step 100 includes steps 110 to 140:
[0073] Step 110: Obtain the character animation sequence.
[0074] A character animation sequence records the character's motion state at consecutive points in time. A character animation sequence contains N initial time points, denoted as t1, t2, ..., t... n N is a positive integer greater than 1.
[0075] The character animation sequence is stored in skeletal animation format, which records the character's skeletal hierarchy and the motion data of each bone node at each original time point.
[0076] Understandably, character animation sequences can be obtained from motion capture devices, such as optical motion capture systems or inertial motion capture systems, or imported from animation production software, such as 3D animation software like Maya and Blender, or read from animation databases, such as the CMU motion capture database or the Mixamo animation library.
[0077] Step 120: Identify each bone node in the character animation sequence.
[0078] Parse the skeletal hierarchy from the character animation sequence to obtain a set of bone nodes. The set of bone nodes contains M bone nodes, denoted as J1, J2, ..., J... m M is a positive integer greater than or equal to 1.
[0079] Within this structure, each skeletal node forms a hierarchical skeletal structure through parent-child relationships, and each skeletal node has a unique identifier within the hierarchical structure. The set of skeletal nodes includes a root node, trunk nodes, limb nodes, and end node. For example, the root node is the hip node, trunk nodes include spine nodes, chest nodes, neck nodes, and head nodes, limb nodes include shoulder nodes, elbow nodes, wrist nodes, hip nodes, knee nodes, and ankle nodes, and end node nodes include hand nodes and foot nodes.
[0080] Step 130: Extract the position path of each skeletal node in the time dimension.
[0081] In some embodiments, step 130 includes steps 131 to 132:
[0082] Step 131: Read the position data of each skeletal node at each original time point.
[0083] For any bone node J in the set of bone nodes i Read bone nodes J from the character animation sequence i Location data at each original time point.
[0084] Among them, skeletal node J i At the original time point t j Position data is represented as three-dimensional coordinates P i (t j )=(xi j y ij , z ij ). Three-dimensional coordinates P i (t j It can be defined in the world coordinate system, such as the global coordinate system with the scene center as the origin, or it can be defined in the local coordinate system, such as the relative coordinate system with the parent bone node as the origin.
[0085] Step 132: Arrange the position data in chronological order to form the position path of each skeletal node.
[0086] Arrange the position data of skeletal node Jᵢ in chronological order across all original time points to form skeletal node J. i Location path. Skeletal node J i The location path is represented as: {P i (t1), P i (t2), ..., P i (t n )}.
[0087] Understandably, skeletal node J i Location path description of skeletal node J iSpatial trajectory in the time dimension, skeletal node J i The position path reflects the skeletal nodes J during the character's movement. i The characteristics of translational motion.
[0088] Repeat steps 131 to 132 for each bone node in the bone node set to obtain the position path of each bone node.
[0089] Step 140: Extract the rotation path of each bone node in the time dimension.
[0090] In some embodiments, step 140 includes steps 141 to 142:
[0091] Step 141: Read the rotation data of each bone node at each original time point.
[0092] For any bone node J in the set of bone nodes i Read bone nodes J from the character animation sequence i Rotation data at each original time point.
[0093] Among them, the skeletal node Jᵢ at the original time point t j The rotation data can be represented as a quaternion Q. i (tⱼ)=(w ij x ij y ij , z ij For example, quaternion notation can be used to avoid gimbal lock problems, and it can also be represented as Euler angles R. i (t i )=(α ij ,β ij γ ij For example, XYZ Euler angles or ZYX Euler angles can be used.
[0094] It should be noted that the skeletal node J i At the original time point t j Rotational data characterizes the skeletal node J i The rotational pose relative to the parent bone node or the rotational pose relative to the world coordinate system. When bone node J... i When J is the root node, the skeletal node is... i At the original time point t j Rotational data characterizes the skeletal node J i Rotational attitude relative to the world coordinate system; when the skeleton node J i When J is a non-root node, the skeletal node is... i At the original time point t j Rotational data characterizes the skeletal node J i Rotational orientation relative to the parent bone node.
[0095] Step 142: Arrange the rotation data in chronological order to form the rotation path of each bone node.
[0096] bone node J i The rotation data at all original time points are arranged in chronological order to form the skeleton node J. i The rotation path. Skeleton node J i The rotation path is represented as: {Q i (t1), Q i (t2), ..., Q i (t n )} or {R i (t1), R i (t2), ..., R i (t n )}.
[0097] It is not difficult to understand that the skeletal node J i Rotation path description of bone node J i Pose changes over time, skeletal node J i The rotation path reflects the movement of the character's skeletal nodes J during the movement. i Its rotational motion characteristics.
[0098] Repeat steps 141 to 142 for each bone node in the bone node set to obtain the rotation path of each bone node.
[0099] Step 200: Calculate the corresponding first motion feature sequence based on the position path of each skeletal node.
[0100] The first motion feature sequence is used to characterize the geometric changes or speed changes of the position path.
[0101] In some embodiments, step 200 includes steps 210 to 230:
[0102] Step 210: For each bone node, based on the position data of adjacent original time points in the position path of each bone node, obtain the displacement distance of each bone node at each original time point.
[0103] For any bone node in the set of bone nodes, extract the position data of adjacent original time points from the position path of the bone node, and calculate the displacement distance of each original time point. Here, the displacement distance represents the amount of spatial displacement of the bone node from the previous original time point to the current original time point.
[0104] Step 211: For the skeletal node at the original time point, read the position data of the skeletal node at the original time point and the position data of the skeletal node at the previous original time point.
[0105] The position data of the skeletal nodes at the original time point are represented in three-dimensional coordinate form, including x-coordinate components, y-coordinate components and z-coordinate components.
[0106] Step 212: Based on the position data of the skeletal node at the original time point and the position data of the skeletal node at the previous original time point, calculate the position change vector of the skeletal node between the original time point and the previous original time point.
[0107] The position change vector is obtained by the difference between the position data of the current original time point and the position data of the previous original time point in each coordinate component. The position change vector includes x-direction component, y-direction component and z-direction component.
[0108] Step 213: Based on the three directional components of the position change vector, calculate the spatial distance of the position change vector to obtain the displacement distance of the bone node at the original time point.
[0109] The displacement distance is obtained by calculating the Euclidean norm of the position change vector, which represents the actual distance the skeletal node moves from the previous original time point to the current original time point in three-dimensional space.
[0110] Understandably, for character animation sequences captured by optical motion capture systems, displacement distance directly reflects the change in position of marker points in three-dimensional space, and the magnitude of displacement distance is proportional to the translational motion intensity of the skeletal nodes.
[0111] Repeat steps 211 to 213 for the skeletal node at each original time point to obtain the displacement distance of the skeletal node Ji at each original time point.
[0112] It should be noted that, for the initial original time point, since there is no previous original time point, the displacement distance of the bone node at the initial original time point is set to 0.
[0113] Repeat the above calculation process for each bone node in the bone node set to obtain the displacement distance of each bone node at each original time point.
[0114] Step 220: For each bone node, based on the position change vector within the preceding and following time windows in the position path of each bone node, obtain the turning degree of the motion direction of each bone node at each original time point.
[0115] In some embodiments, step 220 includes steps 221 to 224:
[0116] Step 221: For the skeletal nodes at the original time point, set the forward time window span and the backward time window span.
[0117] Among them, the forward time window span and the backward time window span represent the time range extending forward and backward from the original time point.
[0118] Step 222: Based on the position data of the skeletal node at the original time point and the position data of the skeletal node at the starting point of the forward time window, calculate the position change vector of the skeletal node within the forward time window.
[0119] Based on the position data of the skeletal node at the end of the backward time window and the position data of the skeletal node at the original time point, calculate the position change vector of the skeletal node within the backward time window.
[0120] Among them, the position change vector of the skeleton node within the forward time window represents the movement direction of the skeleton node Ji before the original time point, and the position change vector of the skeleton node within the backward time window represents the movement direction of the skeleton node after the original time point.
[0121] It is understandable that by using the position change vector within the forward time window and the position change vector within the backward time window, the trend of the movement direction change of the skeletal node before and after the original time point can be captured.
[0122] Step 223: Calculate the angle between the two position change vectors based on the position change vector of the skeleton node in the forward time window and the position change vector of the skeleton node Ji in the backward time window.
[0123] The included angle is obtained by calculating the relationship between the dot product of the two position change vectors and the norm of the two position change vectors.
[0124] Step 224: Based on the included angle, obtain the turning degree of the motion direction of the bone node at the original time point.
[0125] It should be noted that when the included angle is 0 degrees, it means that the bone node maintains a straight line movement before and after the original time point, and the turning degree of the movement direction is 0; when the included angle is 180 degrees, it means that the bone node reverses the movement direction at the original time point, and the turning degree of the movement direction is at its maximum value; when the included angle is 90 degrees, it means that the bone node turns vertically at the original time point, and the turning degree of the movement direction is at its intermediate value.
[0126] It's easy to understand that the larger the value of the direction of motion deflection, the greater the curvature of the skeletal node's trajectory at the original time point tj, and the more obvious the deflection of the direction of motion. For torso twisting scenes in martial arts movements, even if the displacement distance of the bones is small, the direction of motion deflection may be large, thus capturing the geometric shape change characteristics of translational motion.
[0127] Repeat steps 221 to 224 for each original time point to obtain the turning degree of the motion direction of the bone node at each original time point.
[0128] It should be noted that for some original time points at the beginning and end of the character animation sequence, since it is impossible to construct a complete time window before and after, the turning degree of the movement direction of the bone nodes at these original time points is set to 0.
[0129] Repeat the above calculation process for each bone node in the bone node set to obtain the turning degree of the motion direction of each bone node at each original time point.
[0130] Step 230: Based on the displacement distance and the turning degree of the motion direction, generate the first motion feature sequence of each bone node.
[0131] In some embodiments, step 230 includes steps 231 to 232:
[0132] Step 231: For the skeletal node at the original time point, calculate the first motion feature of the skeletal node at the original time point based on the displacement distance and the turning degree of the motion direction of the skeletal node at the original time point.
[0133] The first motion feature is obtained by combining the displacement distance and the turning degree of the motion direction after performing weighted processing respectively.
[0134] In one specific embodiment, the weighting factor corresponding to the displacement distance is set to 0.7, and the weighting factor corresponding to the turning degree of the motion direction is set to 0.3. For example, when the displacement distance is 10 mm and the turning degree of the motion direction is 0.5, the first motion feature is obtained based on the combination of the weighted value of the displacement distance and the weighted value of the turning degree of the motion direction.
[0135] It is understandable that displacement distance represents the change in motion velocity of a skeletal node at the original time point, while the turning angle of motion direction represents the change in geometric shape of the skeletal node at the original time point. By performing weighted processing on displacement distance and turning angle of motion direction respectively and then combining them, the first motion feature of the skeletal node at the original time point simultaneously captures the changes in motion velocity and geometric shape of the position path.
[0136] In other embodiments, the weighting factor corresponding to the displacement distance can also be set to 0.6, the weighting factor corresponding to the turning point of the motion direction can also be set to 0.4, or other combinations of values can be set, which are not limited here.
[0137] Step 232: Arrange the first motion features of the skeletal nodes at all original time points in chronological order to form the first motion feature sequence of the skeletal nodes.
[0138] Repeat steps 231 to 232 for each bone node in the bone node set to obtain the first motion feature sequence of each bone node.
[0139] Step 300: Calculate the corresponding second motion feature sequence based on the rotation path of each bone node.
[0140] The second motion feature sequence is used to characterize the changes in angular velocity or angular acceleration of the rotation path.
[0141] In some embodiments, step 300 includes steps 310 to 313:
[0142] Step 310: For each bone node, based on the rotation data of adjacent original time points in the rotation path of each bone node, obtain the rotation angle of each bone node at each original time point.
[0143] For any bone node in the set of bone nodes, extract the rotation data of adjacent original time points from the rotation path of the bone node, and calculate the rotation angle of each original time point.
[0144] The rotation angle represents the amount of rotational change of a bone node from the previous original time point to the current original time point.
[0145] In some embodiments, step 310 includes steps 311 to 313:
[0146] Step 311: For the bone node at the original time point, read the rotation data of the bone node at the original time point and the rotation data of the bone node at the previous original time point.
[0147] The rotation data is represented in quaternion form, which contains one real component and three imaginary components.
[0148] It should be noted that the quaternion form avoids the gimbal lock problem in Euler angle representation, providing continuity and stability of rotation data. For character animation sequences captured by optical motion capture systems, rotation data is calculated through the relative positional relationships of multiple marker points on the same bone node.
[0149] Step 312: Based on the rotation data of the bone node at the original time point and the rotation data of the bone node at the previous original time point, calculate the rotation increment of the bone node at the original time point.
[0150] The rotation increment is obtained through quaternion operations between the rotation data at the current original time point and the rotation data at the previous original time point, and the rotation increment is represented in quaternion form.
[0151] It is understandable that the rotation increment represents the relative rotational change of the skeletal node from the previous original time point to the current original time point. The rotation increment eliminates the influence of the initial posture of the skeletal node at the previous original time point and only retains the incremental rotation information.
[0152] Step 313: Based on the real component of the rotation increment, obtain the rotation angle of the bone node at the original time point.
[0153] The rotation angle is obtained by performing an inverse cosine function operation on the real component of the rotation increment, and the unit of the rotation angle is radians.
[0154] It should be noted that the magnitude of the rotation angle directly reflects the range of rotational change of the skeletal node at the original time point. For proximal rotational motion scenarios such as torso rotation, even if the displacement distance of the skeletal node is small, the rotation angle may be large, thus accurately capturing the rotational motion characteristics.
[0155] Repeat steps 311 to 313 for each original time point to obtain the rotation angle of the bone node at each original time point.
[0156] It should be noted that, for the initial original time point, since there is no previous original time point, the rotation angle of the bone node at the initial original time point is set to 0.
[0157] Repeat the above calculation process for each bone node in the bone node set to obtain the rotation angle of each bone node at each original time point.
[0158] Step 320: For each bone node, based on the rotation angle and time interval of each bone node at each original time point, obtain the rotation angular velocity of each bone node at each original time point.
[0159] In some embodiments, step 320 includes steps 321 to 322:
[0160] Step 321: For the skeletal node at the original time point, read the rotation angle of the skeletal node at the original time point, and read the time interval between the original time point and the previous original time point.
[0161] The time interval is obtained by the time difference between the original time point and the previous original time point. In a specific embodiment, the sampling rate of the character animation sequence is 120fps, and the time interval is 1 / 120 of a second. For example, the time interval from the original time point t5 to the original time point t6 is 1 / 120 of a second.
[0162] Step 322: Based on the rotation angle and time interval of the bone node at the original time point, obtain the rotation angular velocity of the bone node at the original time point.
[0163] Among them, rotational angular velocity represents the rotation rate of the bone node at the original time point, and the unit of rotational angular velocity is radians per second.
[0164] Understandably, a higher rotational angular velocity indicates more intense rotational motion of the skeletal nodes at the original time point. For character animation sequences captured by optical motion capture systems, rotational angular velocity can accurately quantify the intensity of rotational motion of skeletal nodes. Even if the displacement distance of the marker point is small, rotational angular velocity can still effectively characterize the rotational motion features.
[0165] Repeat steps 321 to 322 for each original time point to obtain the rotational angular velocity of the bone node at each original time point.
[0166] It should be noted that, for the initial original time point t1, the rotational angular velocity of the bone node at the initial original time point t1 is set to 0.
[0167] Repeat the above calculation process for each bone node in the bone node set to obtain the rotational angular velocity of each bone node at each original time point.
[0168] Step 330: Based on the rotational angular velocity, generate the second motion feature sequence for each bone node.
[0169] In some embodiments, step 330 includes steps 331 to 333:
[0170] Step 331: For the bone node at the original time point, read the rotational angular velocity of the bone node at the original time point and the rotational angular velocity of the bone node at the previous original time point.
[0171] Step 332: Calculate the rotational angular acceleration of the bone node at the original time point based on the rotational angular velocity of the bone node at the previous original time point.
[0172] The rotational angular acceleration is obtained by relating the difference between the rotational angular velocity of the bone node at the original time point and the rotational angular velocity of the bone node at the previous original time point to the time interval. The unit of rotational angular acceleration is radians per second².
[0173] It should be noted that rotational angular acceleration characterizes the change in the rotational rate of a skeletal node at the original time point. For torso rotation scenes in martial arts movements, rotational angular acceleration can capture changes in rotational rhythm such as acceleration during power accumulation, explosive rotation, and inertial deceleration. The peak moment of rotational angular acceleration often corresponds to the key transient characteristics of the movement.
[0174] Step 333: For the skeletal node at the original time point, calculate the second motion feature of the skeletal node at the original time point based on the rotational angular velocity and rotational angular acceleration of the skeletal node at the original time point.
[0175] The second motion feature is obtained by combining the absolute values of rotational angular velocity and rotational angular acceleration after weighting them respectively.
[0176] It is understandable that rotational angular velocity represents the intensity of the rotational motion of a skeletal node at the original time point, while rotational angular acceleration represents the rhythmic change of the rotational motion of the skeletal node at the original time point. By performing weighted processing on the absolute values of rotational angular velocity and rotational angular acceleration respectively and then combining them, the second motion feature of the skeletal node at the original time point simultaneously captures the changes in angular velocity and angular acceleration of the rotation path.
[0177] It's easy to understand that rotational angular acceleration can be positive or negative; a positive value indicates acceleration, and a negative value indicates deceleration. Using the absolute value of rotational angular acceleration allows us to capture both acceleration and deceleration changes in rotational rhythm simultaneously, avoiding the omission of features due to the cancellation of positive and negative values.
[0178] In other embodiments, the weighting factor corresponding to the rotational angular velocity can also be set to 0.7, and the weighting factor corresponding to the absolute value of the rotational angular acceleration can also be set to 0.3, or other combinations of values, which are not limited here.
[0179] Repeat steps 331 to 333 for the skeletal nodes at each original time point to obtain the second motion features of the skeletal nodes at each original time point.
[0180] It should be noted that, for the initial original time point t1 and the original time point t2, since the rotational angular acceleration cannot be calculated, the second motion feature of the bone node at the initial original time point t1 is set to 0, and the second motion feature of the bone node at the original time point t2 is obtained based on the weighted value of the rotational angular velocity of the bone node at the original time point t2.
[0181] The second motion features of the skeletal nodes at all original time points are arranged in chronological order to form the second motion feature sequence of the skeletal nodes.
[0182] Repeat the above calculation process for each bone node in the bone node set to obtain the second motion feature sequence of each bone node.
[0183] Preferably, steps 200 and 300 establish independent quantization channels for position and rotation paths by calculating the first motion feature sequence and the second motion feature sequence, respectively. The first motion feature sequence captures the translational motion features of the skeleton node on the spatial trajectory based on displacement distance and motion direction turning degree; the second motion feature sequence captures the rotational motion features of the skeleton node in posture changes based on rotational angular velocity and rotational angular acceleration. For centripetal rotational motion scenes in motion capture data, even if the displacement distance of the skeleton node is small, resulting in a low value for the first motion feature, the second motion feature sequence can still accurately quantify the intensity of the rotational motion through rotational angular velocity, avoiding the omission of key rotational information caused by traditional methods that rely solely on position displacement quantization, and providing a complete two-dimensional motion representation foundation for subsequent feature fusion and keyframe selection.
[0184] Step 400: Combine the first motion feature sequence and the second motion feature sequence of each skeletal node to generate the third motion feature sequence.
[0185] In some embodiments, step 400 includes steps 410 to 450:
[0186] Step 410: Determine the position representation weight of the first motion feature corresponding to the first motion feature sequence of each bone node at each original time point, and the rotation representation weight of the second motion feature corresponding to the second motion feature sequence of each bone node at each original time point.
[0187] Among them, the position representation weight is used to adjust the contribution of the first motion feature to visual saliency, and the rotation representation weight is used to adjust the contribution of the second motion feature to visual saliency.
[0188] In some embodiments, step 410 includes steps 411 to 413:
[0189] Step 411: Based on the node type of the bone node in the bone hierarchy, determine the position representation weight corresponding to the first motion feature of the bone node at the original time point.
[0190] The node types include root nodes, trunk nodes, limb nodes, and end nodes.
[0191] In one specific embodiment, when the skeletal node is a root node or a trunk node, the position representation weight is set to a lower value, such as 0.3, 0.2, or 0.4, without limitation; when the skeletal node is a limb node or an end node, the position representation weight is set to a higher value, such as 0.7, 0.6, or 0.8, without limitation.
[0192] It is understandable that root nodes and trunk nodes usually undergo rotational movements around their own center. For example, when the spine node and chest node rotate, the marker point is relatively close to the center of rotation, and the positional displacement is small, but the rotational movement contributes significantly to visual saliency. Therefore, a lower positional representation weight is assigned. On the other hand, limb nodes and end nodes usually undergo large-scale translational movements. For example, when the hand node and foot node kick, the positional displacement is large, and the translational movement contributes significantly to visual saliency. Therefore, a higher positional representation weight is assigned.
[0193] Step 412: Based on the node type of the bone node in the bone hierarchy, determine the rotation representation weight corresponding to the second motion feature of the bone node at the original time point.
[0194] In one specific embodiment, when the bone node is a root node or a torso node, the rotation representation weight is set to a higher value, such as 0.7, 0.8, or 0.6, without limitation; when the bone node is a limb node or an end node, the rotation representation weight is set to a lower value, such as 0.3, 0.2, or 0.4, without limitation.
[0195] Step 413: Adjust the position representation weights and rotation representation weights based on the values of the first motion feature of the bone node at the original time point and the values of the second motion feature of the bone node at the original time point.
[0196] In one specific embodiment, when the value of the first motion feature is significantly greater than the value of the second motion feature, for example, when the first motion feature is 15 and the second motion feature is 3, it indicates that the skeletal node mainly performs translational motion at the original time point. The position representation weight is adjusted upward, for example, from 0.3 to 0.5, and the rotation representation weight is adjusted downward, for example, from 0.7 to 0.5. When the value of the second motion feature is significantly greater than the value of the first motion feature, for example, when the first motion feature is 3 and the second motion feature is 15, it indicates that the skeletal node mainly performs rotational motion at the original time point. The rotation representation weight is adjusted upward, and the position representation weight is adjusted downward.
[0197] It is easy to understand that by determining the position representation weights and rotation representation weights based on node type and feature values, this application can adjust the contribution weights of position features and rotation features according to the actual motion patterns of the skeletal nodes at each original time point, thus avoiding the omission of rotation information caused by the fixed reliance on position features in traditional methods.
[0198] Repeat steps 411 to 413 for each bone node in the bone node set at each original time point to obtain the position representation weight and rotation representation weight of each bone node at each original time point.
[0199] Step 420: Perform amplitude modulation processing on the first motion feature based on the position representation weight to obtain the amplitude-modulated position feature.
[0200] The amplitude modulation process involves scaling the amplitude of the first motion feature based on the position representation weight, where the position representation weight controls the proportion of the first motion feature retained in the position feature after amplitude modulation.
[0201] It is understandable that when the position representation weight is high, such as 0.7, the position feature retains a larger proportion of the amplitude of the first motion feature after amplitude modulation, and the position feature contributes more to the third motion feature; when the position representation weight is low, such as 0.3, the position feature retains only a smaller proportion of the amplitude of the first motion feature after amplitude modulation, and the position feature contributes less to the third motion feature.
[0202] The above processing procedure is repeated for each bone node in the bone node set at each original time point to obtain the amplitude-modulated position features of each bone node at each original time point.
[0203] Step 430: Perform amplitude modulation processing on the second motion feature based on the rotation representation weights to obtain the amplitude-modulated rotation feature.
[0204] The amplitude modulation process involves scaling the second motion feature based on the rotation representation weights, where the rotation representation weights control the proportion of the second motion feature retained in the amplitude-modulated rotation feature.
[0205] The above processing procedure is repeated for each bone node in the bone node set at each original time point to obtain the amplitude-modulated rotation features of each bone node at each original time point.
[0206] Step 440: Based on the amplitude-modulated position features and amplitude-modulated rotation features, generate the third motion features of each bone node at each original time point.
[0207] Furthermore, step 440 includes steps 441 to 444:
[0208] Step 441: Determine the amplitude comparison relationship between the position feature after amplitude modulation and the rotation feature after amplitude modulation. When the amplitude of the position feature after amplitude modulation is greater than the amplitude of the rotation feature after amplitude modulation, the position feature after amplitude modulation is used as the dominant feature component and the rotation feature after amplitude modulation is used as the auxiliary feature component.
[0209] Step 442: When the amplitude of the amplitude-modulated rotation feature is greater than the amplitude of the amplitude-modulated position feature, the amplitude-modulated rotation feature is used as the dominant feature component and the amplitude-modulated position feature is used as the auxiliary feature component.
[0210] Step 443: When the amplitude of the position feature after amplitude modulation and the amplitude of the rotation feature after amplitude modulation meet the preset amplitude balance condition, the position feature after amplitude modulation and the rotation feature after amplitude modulation are used as equally weighted feature components.
[0211] Among them, the preset amplitude balance condition is used to determine whether the amplitude of the position feature after amplitude modulation and the amplitude of the rotation feature after amplitude modulation are in a balanced state, and the equal weight feature component represents the feature component that contributes equally to the third motion feature.
[0212] In one specific embodiment, the preset amplitude balance condition is that the absolute value of the difference between the amplitude of the amplitude of the position feature after amplitude modulation and the amplitude of the rotation feature after amplitude modulation is less than a preset threshold.
[0213] Step 444: Generate the third motion features of each skeletal node at each original time point based on the dominant feature components and auxiliary feature components, or based on the equally weighted feature components.
[0214] In some embodiments, step 444 includes steps 444a and 444b:
[0215] Step 444a: When using dominant feature components and auxiliary feature components, the dominant feature components are used as the main values of the third motion feature, and the auxiliary feature components are used as the supplementary values of the third motion feature. The third motion feature is generated based on the main values of the dominant feature components and the supplementary values of the auxiliary feature components.
[0216] Among them, the main values of the dominant feature components account for the majority of the third motion feature, while the supplementary values of the auxiliary feature components account for the minor proportion of the third motion feature.
[0217] In one specific embodiment, when the amplitude-modulated position feature is used as the dominant feature component and the amplitude-modulated rotation feature is used as the auxiliary feature component, the third motion feature mainly reflects the numerical characteristics of the amplitude-modulated position feature, while retaining some of the numerical characteristics of the amplitude-modulated rotation feature, thereby forming a comprehensive motion feature with position motion as the dominant feature and rotation motion as the supplement.
[0218] In another specific embodiment, when the amplitude-modulated rotation feature is used as the dominant feature component and the amplitude-modulated position feature is used as the auxiliary feature component, the third motion feature mainly reflects the numerical characteristics of the amplitude-modulated rotation feature, while retaining some of the numerical characteristics of the amplitude-modulated position feature, thereby forming a comprehensive motion feature with rotational motion as the dominant feature and positional motion as the supplement.
[0219] Step 444b: When using equal-weighted feature components, both the amplitude-modulated position feature and the amplitude-modulated rotation feature are treated as equal contribution values of the third motion feature, and the third motion feature is generated based on the equal contribution of the amplitude-modulated position feature and the amplitude-modulated rotation feature.
[0220] Among them, the positional features and rotational features after amplitude modulation account for the same proportion in the third motion features, and the third motion features reflect both positional motion characteristics and rotational motion characteristics.
[0221] Understandably, by distinguishing between dominant and auxiliary feature components, or by using equally weighted feature components, the third motion feature can flexibly adjust the contribution ratio of positional motion and rotational motion in the third motion feature based on the amplitude comparison relationship between the amplitude-modulated positional feature and the amplitude-modulated rotational feature, ensuring that the third motion feature accurately reflects the actual motion pattern of the skeletal node at each original time point.
[0222] Repeat steps 444a and 444b for each bone node in the bone node set at each original time point to obtain the third motion feature of each bone node at each original time point.
[0223] Preferably, steps 441 to 444 determine the dominant and auxiliary feature components by judging the amplitude comparison relationship between the amplitude-modulated position feature and the amplitude-modulated rotation feature. This application establishes a feature fusion rule based on the actual motion pattern. When the amplitude of the amplitude-modulated rotation feature is greater than the amplitude of the amplitude-modulated position feature, the amplitude-modulated rotation feature is used as the dominant feature component to ensure that the third motion feature can accurately capture the main contribution of rotational motion to visual saliency. When the amplitude of the amplitude-modulated position feature is greater than the amplitude of the amplitude-modulated rotation feature, the amplitude-modulated position feature is used as the dominant feature component to ensure that the third motion feature can accurately capture the main contribution of translational motion to visual saliency. This application avoids the feature contribution imbalance caused by the fixed weight configuration of traditional methods, enabling the third motion feature to truly reflect the actual contribution ratio of position and rotation features at each original time point.
[0224] Step 450: Arrange the third motion features of each skeletal node at all original time points in chronological order to form the third motion feature sequence of each skeletal node.
[0225] For skeletal nodes, the skeletal nodes will be displayed at all original time points t1 to t2. n The third motion features are arranged in chronological order to form a sequence of third motion features of the skeletal nodes.
[0226] Among them, the third motion feature sequence of the skeletal node contains the third motion features of the skeletal node at all original time points. The third motion feature sequence is used to characterize the comprehensive motion characteristics of the skeletal node in the time dimension.
[0227] Repeat the above arrangement process for each bone node in the bone node set to obtain the third motion feature sequence of each bone node.
[0228] Preferably, step 400 generates a third motion feature sequence by combining the first and second motion feature sequences of each skeletal node. This application establishes a unified and computable metric model to simultaneously quantify the contributions of position and rotation features. The third motion feature sequence integrates the translational motion features of the position path and the rotational motion features of the rotation path, enabling a complete representation of the composite motion pattern of skeletal nodes in the same feature space. For proximal rotational motion scenes in motion capture data, the third motion feature sequence ensures that the contribution of rotational motion to visual saliency is accurately reflected in the third motion feature by increasing the rotation representation weight and using amplitude-modulated rotation features as the dominant feature component. This provides a unified optimization objective for selecting target keyframe sequences based on the third motion feature sequence, avoiding the problems of separation between position and rotation feature optimization objectives and loss of key transient features caused by the lack of a unified metric model in traditional methods.
[0229] Step 500: Based on the third motion feature sequence of all bone nodes, with the optimization objective of minimizing the motion reconstruction error of the character animation sequence, select the target keyframe sequence from the original time points of the character animation sequence and output the target keyframe sequence.
[0230] It should be noted that the calculation of motion reconstruction error in step 500 includes steps A1 to A6:
[0231] Step A1: Based on the original time points corresponding to each candidate target keyframe in the candidate target keyframe sequence, extract the third motion features of each skeleton node in the third motion feature sequence corresponding to the original time points of each candidate target keyframe, and use them as candidate keyframe features.
[0232] Among them, the candidate target keyframe sequence is a sequence composed of some original time points selected from the original time points of the character animation sequence in chronological order, and the candidate target keyframe is each original time point in the candidate target keyframe sequence.
[0233] In some embodiments, step A1 includes steps A11 to A12:
[0234] Step A11: Read the original time points corresponding to each candidate target keyframe in the candidate target keyframe sequence.
[0235] Step A12: For the original time point corresponding to each candidate target keyframe, extract the third motion feature of each bone node at the original time point corresponding to each candidate target keyframe from the third motion feature sequence of each bone node, and use it as the candidate keyframe feature.
[0236] Repeat the above extraction process for each candidate target keyframe in each candidate target keyframe sequence to obtain the candidate keyframe features of each skeletal node in each candidate target keyframe.
[0237] Figure 2 shows a schematic diagram of the interpolation reconstruction process of this application, which intuitively demonstrates the process of reconstructing intermediate time point features based on key frame features.
[0238] Step A2: For each skeletal node at each original time point, determine whether each original time point is located between two adjacent candidate target keyframes.
[0239] When each original time point is located between two adjacent candidate target keyframes, the third motion features of each skeleton node at each original time point are reconstructed by interpolation based on the candidate keyframe features of the two adjacent candidate target keyframes, and the reconstructed third motion features are obtained.
[0240] When each original time point coincides with a candidate target keyframe, the candidate keyframe features of the candidate target keyframe are used as the third motion features for the reconstruction of each skeleton node at each original time point.
[0241] In some embodiments, step A2 includes steps A21 to A23:
[0242] Step A21: For a skeletal node at its original time point, determine whether the original time point coincides with the original time point corresponding to a candidate target keyframe in the candidate target keyframe sequence.
[0243] When the original time point coincides with the original time point corresponding to a candidate target keyframe, the candidate keyframe features of the candidate target keyframe are read and used as the third motion features of the skeleton node at the original time point.
[0244] Step A22: When the original time point does not coincide with the original time point corresponding to any candidate target key frame in the candidate target key frame sequence, determine that the original time point is located between two adjacent candidate target key frames in the candidate target key frame sequence, and read the original time points corresponding to the two adjacent candidate target key frames respectively.
[0245] Among them, two adjacent candidate target keyframes are the previous candidate target keyframe and the next candidate target keyframe, respectively. The original time point corresponding to the previous candidate target keyframe is earlier than the original time point, and the original time point corresponding to the next candidate target keyframe is later than the original time point.
[0246] Step A23: Based on the candidate keyframe features of the previous candidate target keyframe and the candidate keyframe features of the next candidate target keyframe, perform interpolation reconstruction on the third motion features of the skeleton node at the original time point to obtain the reconstructed third motion features of the skeleton node at the original time point.
[0247] The interpolation reconstruction process involves performing linear interpolation on the candidate keyframe features of the previous and subsequent candidate target keyframes based on the temporal position relationship between the original time points corresponding to the previous and subsequent candidate target keyframes, thereby obtaining the reconstructed third motion features.
[0248] It is understandable that when the original time point is close to the original time point corresponding to the previous candidate target keyframe, the reconstructed third motion feature is closer to the candidate keyframe feature of the previous candidate target keyframe; when the original time point is close to the original time point corresponding to the next candidate target keyframe, the reconstructed third motion feature is closer to the candidate keyframe feature of the next candidate target keyframe; when the original time point is located in the middle of the original time point corresponding to the previous candidate target keyframe and the original time point corresponding to the next candidate target keyframe, the reconstructed third motion feature is between the candidate keyframe feature of the previous candidate target keyframe and the candidate keyframe feature of the next candidate target keyframe.
[0249] It should be noted that traditional methods typically use a uniform interpolation algorithm to reconstruct all motion data after keyframe simplification, such as performing interpolation on position and rotation data separately. However, due to the lack of a unified metric model, inconsistencies may occur between position and rotation interpolation, leading to deviations in the temporal synchronization of position and rotation features in the reconstructed animation. This application ensures that position and rotation features maintain temporal synchronization in the same feature space by performing interpolation reconstruction based on a third motion feature sequence.
[0250] Repeat steps A21 to A23 for each bone node in the bone node set at each original time point to obtain the reconstructed third motion feature of each bone node at each original time point.
[0251] Step A3: Arrange the reconstructed third motion features of each skeletal node at all original time points in chronological order to form a sequence of reconstructed third motion features.
[0252] For skeletal nodes, the skeletal nodes will be displayed at all original time points t1 to t2. n The reconstructed third motion features are arranged in chronological order to form a sequence of reconstructed third motion features of skeletal nodes.
[0253] Repeat the above arrangement process for each bone node in the bone node set to obtain the reconstructed third motion feature sequence for each bone node.
[0254] Preferably, the beneficial effects of steps A1 to A3 are as follows:
[0255] By extracting candidate keyframe features from the candidate target keyframe sequence and performing interpolation reconstruction on the third motion features at each original time point based on these candidate keyframe features, this application can evaluate the reconstruction capability of the candidate target keyframe sequence for the original character animation sequence. The reconstructed third motion feature sequence represents the motion feature sequence reconstructed based on the candidate target keyframe sequence. By comparing the degree of deviation between the reconstructed third motion feature sequence and the original third motion feature sequence, the reconstruction quality of the candidate target keyframe sequence can be quantified. Since the third motion feature sequence has incorporated the contributions of position and rotation features, the interpolation reconstruction process can simultaneously reconstruct position and rotation motion in the same feature space, ensuring that the reconstructed motion features maintain consistency in the temporal synchronization of position and rotation features, avoiding the temporal synchronization deviation caused by the separate reconstruction of position and rotation data in traditional methods.
[0256] Step A4: For each skeletal node at each original time point, determine whether the degree of deviation between the reconstructed third motion feature of each skeletal node at each original time point and the third motion feature sequence of each skeletal node at each original time point exceeds the preset feature deviation threshold.
[0257] Here, the degree of deviation is the absolute value of the difference between the reconstructed third motion feature and the third motion feature in the third motion feature sequence. The degree of deviation characterizes the degree of difference between the reconstructed third motion feature and the original third motion feature, and the reconstruction distortion marker is used to indicate that the degree of deviation between the reconstructed third motion feature and the original third motion feature reaches the distortion standard.
[0258] When the deviation exceeds a preset feature deviation threshold, the reconstruction distortion markers for each bone node at each original time point are recorded. The preset feature deviation threshold is used to determine whether the deviation between the reconstructed third motion feature and the original third motion feature meets the distortion standard.
[0259] In one specific embodiment, the preset feature deviation threshold is set to 2.0. For example, when the deviation is 2.3, the deviation exceeds the preset feature deviation threshold of 2.0, and the bone node is recorded as having a reconstruction distortion mark at the original time point; when the deviation is 1.8, the deviation is less than the preset feature deviation threshold of 2.0, and the bone node is not recorded as having a reconstruction distortion mark at the original time point.
[0260] When the deviation is less than or equal to the preset feature deviation threshold, no reconstruction distortion marker is recorded for each bone node at each original time point.
[0261] It is easy to understand that when the deviation exceeds the preset feature deviation threshold, it means that the third motion feature reconstructed based on the candidate target keyframe sequence differs greatly from the original third motion feature, and cannot accurately restore the motion characteristics of the bone node at the original time point, resulting in reconstruction distortion; when the deviation is less than or equal to the preset feature deviation threshold, it means that the reconstructed third motion feature can better approximate the original third motion feature, and the reconstruction quality meets the requirements.
[0262] Step A5: Count the number of time points in which all skeletal nodes have reconstruction distortion markers in all original time points, and use this as the total number of distortion time points.
[0263] Iterate through each bone node in the bone node set across all original time points t1 to t2 in the character animation sequence. n The number of time points with reconstructed distortion markers is counted to obtain the total number of distorted time points.
[0264] The total number of distorted time points represents the number of time points in the candidate target keyframe sequence that exhibit distortion when reconstructing the character animation sequence.
[0265] For example, the skeleton node set contains M skeleton nodes, the character animation sequence contains N original time points, and the maximum value of the total number of distorted time points is the product of M and N. The smaller the total number of distorted time points, the higher the reconstruction quality of the candidate target keyframe sequence.
[0266] Step A6: Based on the total number of distortion time points, obtain the motion reconstruction error corresponding to the candidate target keyframe sequence.
[0267] In some embodiments, step A6 includes: taking the total number of distorted time points as the motion reconstruction error corresponding to the candidate target keyframe sequence.
[0268] Among them, motion reconstruction error characterizes the degree of distortion of the candidate target keyframe sequence when reconstructing the character animation sequence. The smaller the motion reconstruction error, the higher the reconstruction quality of the candidate target keyframe sequence.
[0269] In some other embodiments, step A6 includes: obtaining the motion reconstruction error corresponding to the candidate target keyframe sequence based on the ratio of the total number of distorted time points to the total number of all skeletal nodes at all original time points. For example, the motion reconstruction error is the percentage of the total number of distorted time points to the total number of all skeletal nodes at all original time points. Other calculation methods can also be used, which are not limited here.
[0270] Preferably, steps A4 to A6 involve recording a reconstruction distortion marker when the deviation exceeds a preset feature deviation threshold, indicating that the candidate target keyframe sequence cannot accurately reconstruct the motion characteristics of the skeletal nodes at the original time points. The total number of time points with reconstruction distortion markers for all skeletal nodes across all original time points is counted as the total number of distortion time points, directly reflecting the degree of reconstruction distortion in the candidate target keyframe sequence. The motion reconstruction error is obtained based on the total number of distortion time points, providing a comparable reconstruction quality evaluation index for the candidate target keyframe sequences. Since the preset feature deviation threshold remains constant throughout the target keyframe sequence selection process, the motion reconstruction errors of different candidate target keyframe sequences are comparable, providing a unified optimization objective for selecting the target keyframe sequence that minimizes the motion reconstruction error.
[0271] In some embodiments, step 500 includes steps 510 to 580:
[0272] Step 510: Set the upper limit for the number of keyframes contained in the target keyframe sequence.
[0273] The keyframe limit is used to restrict the number of keyframes contained in the target keyframe sequence. The keyframe limit is set according to the data compression requirements. In a specific embodiment, when the character animation sequence contains 240 original time points and it is desired to compress the data volume to 15% of the original, the keyframe limit is set to 36 frames. For example, the keyframe limit can be 30 frames or 40 frames, or it can be set to other values according to the storage space or real-time rendering performance requirements of the actual application scenario. No limitation is made here.
[0274] Step 520: Construct the keyframe selection state table.
[0275] The keyframe selection status table records the current optimal keyframe combination and the corresponding current minimum cumulative reconstruction error from the initial original time point to each original time point under different keyframe quantity constraints.
[0276] Understandably, the keyframe selection state table is used to store intermediate state information during the keyframe selection process. For each original time point in the character animation sequence, the keyframe selection state table records the keyframe combination that minimizes the cumulative reconstruction error from the initial original time point to each original time point, while satisfying the keyframe number constraint, as well as the corresponding cumulative reconstruction error value of the keyframe combination.
[0277] In one specific embodiment, the keyframe selection status table can be stored in the form of a two-dimensional table. For example, the rows of the table correspond to each original time point, the columns of the table correspond to different keyframe quantity constraints, and each cell in the table records the current optimal keyframe combination and the current minimum cumulative reconstruction error.
[0278] Step 530: Use the candidate target keyframe sequence containing the starting original time point as the initial candidate target keyframe sequence.
[0279] Among them, the candidate target keyframe sequence is a sequence composed of some original time points selected from each original time point in chronological order, and the candidate target keyframe is each original time point in the candidate target keyframe sequence.
[0280] In one specific embodiment, the starting original time point is the first original time point of the character animation sequence. The initial candidate target keyframe sequence only contains the starting original time point, indicating that the keyframe selection process begins from the starting original time point. It should be noted that the starting original time point, as the starting point of the character animation sequence, contains the character's initial posture information and must be retained as a keyframe. Traditional methods typically select keyframes by sorting them from largest to smallest position displacement, which may miss the starting original time point, causing the reconstructed animation to fail to restore the character's initial posture.
[0281] Step 540: Based on the initial candidate target keyframe sequence and the third motion feature sequence of each skeleton node, obtain the initial cumulative reconstruction error.
[0282] Specifically, step 540 includes: steps 541 to 547:
[0283] Step 541: Based on the original time points corresponding to each candidate target keyframe in the initial candidate target keyframe sequence, extract the third motion features of each skeleton node in the third motion feature sequence corresponding to the original time points of each candidate target keyframe, and use them as the initial candidate keyframe features.
[0284] Step 542: For each bone node at each original time point, determine whether each original time point is located between two adjacent candidate target keyframes. When each original time point is located between two adjacent candidate target keyframes, perform interpolation reconstruction on the third motion features of each bone node at each original time point based on the initial candidate keyframe features of the two adjacent candidate target keyframes to obtain the initial reconstructed third motion features.
[0285] Step 543: When each original time point coincides with a candidate target keyframe, the initial candidate keyframe features of the candidate target keyframe are used as the initial reconstruction third motion features of each skeleton node at each original time point.
[0286] Step 544: Arrange the initial reconstructed third motion features of each skeletal node at all original time points in chronological order to form the initial reconstructed third motion feature sequence.
[0287] Step 545: For each bone node at each original time point, determine whether the initial deviation between the initial reconstructed third motion feature of each bone node at each original time point and the third motion feature in the sequence of third motion features of each bone node at each original time point exceeds the preset feature deviation threshold. When the initial deviation exceeds the preset feature deviation threshold, record that each bone node has an initial reconstruction distortion mark at each original time point.
[0288] Step 546: Count the number of time points in which all skeletal nodes have initial reconstruction distortion markers in all original time points, and use this as the total number of initial distortion time points.
[0289] Step 547: Based on the total number of initial distortion time points, obtain the initial cumulative reconstruction error.
[0290] Step 550: Record the initial cumulative reconstruction error in the current minimum cumulative reconstruction error corresponding to the starting original time point in the keyframe selection status table.
[0291] The initial cumulative reconstruction error is recorded at the position corresponding to the starting original time point in the keyframe selection state table, and is used as the current minimum cumulative reconstruction error at the starting original time point.
[0292] Step 560: Starting from the next original time point after the initial original time point, traverse each original time point in turn. For each original time point, add each original time point to the current optimal candidate target keyframe sequence corresponding to the previous original time point to form a new candidate target keyframe sequence.
[0293] It should be noted that after traversing each original time point in sequence, the process includes: extracting the current optimal candidate target keyframe sequence from the keyframe selection state table under the constraint of the upper limit of the number of keyframes, and using it as the target keyframe sequence; wherein, the current optimal candidate target keyframe sequence is the candidate target keyframe sequence that minimizes the current minimum cumulative reconstruction error.
[0294] In some embodiments, step 560 includes steps 561 to 563:
[0295] Step 561: Starting from the next original time point t2 after the initial original time point t1, traverse the original time points t2, t3, and t4 sequentially until the final original time point t1. n .
[0296] Step 562: For the current original time point being traversed, read the current optimal candidate target keyframe sequence corresponding to the previous original time point from the keyframe selection status table.
[0297] Among them, the current optimal candidate target keyframe sequence corresponding to the previous original time point is the combination of keyframes that minimizes the cumulative reconstruction error from the starting original time point to the previous original time point, under the premise of satisfying the keyframe number constraint.
[0298] Step 563: Add the currently traversed original time point to the current optimal candidate target keyframe sequence corresponding to the previous original time point to form a new candidate target keyframe sequence.
[0299] It is easy to understand that by sequentially traversing each original time point and adding each original time point to the current best candidate target keyframe sequence corresponding to the previous original time point, this application constructs a keyframe sequence extension path from the initial original time point to the current original time point. For each original time point, the new candidate target keyframe sequence is based on the current best candidate target keyframe sequence corresponding to the previous original time point, with the current original time point added. By calculating the cumulative reconstruction error of the new candidate target keyframe sequence, the impact of adding the current original time point as a keyframe on the cumulative reconstruction error can be evaluated.
[0300] It should be noted that after traversing each original time point in sequence, the process includes: extracting the current optimal candidate target keyframe sequence from the keyframe selection state table under the constraint of the upper limit of the number of keyframes, and using it as the target keyframe sequence; wherein, the current optimal candidate target keyframe sequence is the candidate target keyframe sequence that minimizes the current minimum cumulative reconstruction error.
[0301] Step 570: Based on the new candidate target keyframe sequence and the third motion feature sequence of each bone node, obtain the candidate cumulative reconstruction error.
[0302] Specifically, step 570 includes: steps 571 to 575:
[0303] Step 571: Based on the original time points corresponding to each candidate target keyframe in the new candidate target keyframe sequence, extract the third motion features of each bone node in the third motion feature sequence corresponding to the original time points of each candidate target keyframe, and use them as candidate keyframe features.
[0304] Step 572: For each bone node at each original time point, determine whether each original time point is located between two adjacent candidate target keyframes. When each original time point is located between two adjacent candidate target keyframes, perform interpolation reconstruction on the third motion features of each bone node at each original time point based on the candidate keyframe features of the two adjacent candidate target keyframes to obtain the candidate reconstructed third motion features.
[0305] Step 573: When each original time point coincides with a candidate target keyframe, the candidate keyframe features of the candidate target keyframe are used as the candidate third motion features for each skeleton node at each original time point.
[0306] Step 574: Arrange the candidate reconstructed third motion features of each skeletal node in chronological order at all original time points to form a sequence of candidate reconstructed third motion features.
[0307] Step 575: For each skeletal node at each original time point, determine whether the candidate deviation between the candidate reconstructed third motion feature of each skeletal node at each original time point and the third motion feature in the sequence of third motion features of each skeletal node at each original time point exceeds the preset feature deviation threshold. When the candidate deviation exceeds the preset feature deviation threshold, record that each skeletal node has a candidate reconstruction distortion mark at each original time point.
[0308] It should be noted that in the calculation of motion reconstruction error, the same threshold parameter is used for both the preset feature deviation threshold used in step 545 when calculating the initial cumulative reconstruction error and the preset feature deviation threshold used in step 575 when calculating the candidate cumulative reconstruction error. The preset feature deviation threshold remains constant throughout the selection of the target keyframe sequence, and is used to uniformly determine whether the deviation between the reconstructed third motion feature and the original third motion feature reaches the distortion standard. By using the same feature deviation threshold in the error calculation of all candidate target keyframe sequences, the comparability of the initial cumulative reconstruction error and the candidate cumulative reconstruction error can be ensured, thereby accurately evaluating the reconstruction quality of different candidate target keyframe sequences. Finally, the target keyframe sequence that minimizes the motion reconstruction error can be selected. For example, when the preset feature deviation threshold is set to 2.0, all candidate target keyframe sequences use 2.0 as the distortion judgment standard when calculating the cumulative reconstruction error. Whether it is the initial candidate target keyframe sequence or a new candidate target keyframe sequence, as long as the deviation between the reconstructed third motion feature and the original third motion feature exceeds 2.0, a reconstruction distortion mark is recorded, ensuring the consistency of error calculation.
[0309] Step 576: Count the number of time points in which all skeletal nodes have candidate reconstruction distortion markers in all original time points, and use this as the total number of candidate distortion time points.
[0310] Step 577: Based on the total number of candidate distortion time points, obtain the candidate cumulative reconstruction error.
[0311] Preferably, steps 571 to 577 calculate the candidate cumulative reconstruction error based on the new candidate target keyframe sequence and the third motion feature sequence of each skeletal node, enabling this application to evaluate the impact of adding the current original time point to the candidate target keyframe sequence on the cumulative reconstruction error. This application can determine whether adding the current original time point as a keyframe can reduce the cumulative reconstruction error by comparing the candidate cumulative reconstruction error with the current minimum cumulative reconstruction error corresponding to the previous original time point. Since the preset feature deviation threshold remains constant in the error calculation of all candidate target keyframe sequences, the candidate cumulative reconstruction error is comparable to the initial cumulative reconstruction error, providing a unified evaluation standard for selecting the target keyframe sequence that minimizes the motion reconstruction error.
[0312] Step 580: Determine whether the candidate cumulative reconstruction error is less than the current minimum cumulative reconstruction error corresponding to the previous original time point.
[0313] When the candidate cumulative reconstruction error is less than the current minimum cumulative reconstruction error corresponding to the previous original time point, the current optimal candidate target key frame sequence corresponding to each original time point in the key frame selection status table is updated to the new candidate target key frame sequence, and the current minimum cumulative reconstruction error corresponding to each original time point is updated to the candidate cumulative reconstruction error.
[0314] When the candidate cumulative reconstruction error is greater than or equal to the current minimum cumulative reconstruction error corresponding to the previous original time point, the current optimal candidate target key frame sequence corresponding to each original time point in the key frame selection status table is kept to be the current optimal candidate target key frame sequence corresponding to the previous original time point, and the current minimum cumulative reconstruction error corresponding to each original time point is kept to be the current minimum cumulative reconstruction error corresponding to the previous original time point.
[0315] It is easy to understand that by judging the relationship between the candidate cumulative reconstruction error and the current minimum cumulative reconstruction error corresponding to the previous original time point, this application can selectively update the keyframe selection state table. When adding the current original time point as a keyframe can reduce the cumulative reconstruction error, the current optimal candidate target keyframe sequence and the current minimum cumulative reconstruction error are updated; when adding the current original time point as a keyframe cannot reduce the cumulative reconstruction error, the optimal state of the previous original time point is maintained to avoid the cumulative reconstruction error from increasing. By sequentially traversing each original time point and performing state table updates, this application constructs the optimal keyframe selection path from the starting original time point to the ending original time point, and finally selects the target keyframe sequence that minimizes the motion reconstruction error under the constraint of the upper limit of the number of keyframes.
[0316] Preferably, step 500 records the current optimal keyframe combination and the corresponding current minimum cumulative reconstruction error under different keyframe quantity constraints by constructing a keyframe selection state table. This application establishes a keyframe selection framework based on dynamic programming. Each original time point is sequentially traversed. For each original time point, it is added to the current optimal candidate target keyframe sequence corresponding to the previous original time point to form a new candidate target keyframe sequence. The candidate cumulative reconstruction error is calculated and compared with the current minimum cumulative reconstruction error corresponding to the previous original time point. When the candidate cumulative reconstruction error is smaller, the keyframe selection state table is updated; when the candidate cumulative reconstruction error is larger, the optimal state of the previous original time point is maintained. This state table update mechanism ensures that the keyframe selection process can search for the keyframe combination that minimizes motion reconstruction error globally, avoiding the global non-optimal problem caused by the traditional method's local greedy strategy for keyframe selection. Since the preset feature deviation threshold remains constant throughout the entire target keyframe sequence selection process, the cumulative reconstruction errors of different candidate target keyframe sequences are comparable. Finally, the candidate target keyframe sequence that minimizes the current minimum cumulative reconstruction error under the constraint of the upper limit of the number of keyframes is extracted from the keyframe selection status table as the target keyframe sequence, ensuring that the target keyframe sequence minimizes the motion reconstruction error of the character animation sequence while meeting the data compression requirements.
[0317] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0318] Based on the same inventive concept, this application also provides a visually salient character animation keyframe simplification system. The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations of one or more visually salient character animation keyframe simplification system embodiments provided below can be found in the limitations of the visually salient character animation keyframe simplification method described above, and will not be repeated here.
[0319] In an exemplary embodiment, as shown in Figure 3, a visually salient character animation keyframe simplification system is provided, comprising:
[0320] The extraction module is used to obtain the character animation sequence and extract the position and rotation paths of each bone node in the character animation sequence in the time dimension.
[0321] The first calculation module calculates the corresponding first motion feature sequence based on the position path of each skeletal node.
[0322] The second calculation module calculates the corresponding second motion feature sequence based on the rotation path of each bone node.
[0323] The third calculation module is used to combine the first motion feature sequence and the second motion feature sequence of each skeletal node to generate the third motion feature sequence.
[0324] The output module is optimized based on the third motion feature sequence of all bone nodes. With the goal of minimizing the motion reconstruction error of the character animation sequence, the target keyframe sequence is selected from the original time points of the character animation sequence and output as the target keyframe sequence.
[0325] The modules in the aforementioned simplified keyframe system for visually salient character animation can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0326] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram is shown in Figure 4. The computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method for simplifying keyframes in visually salient character animation. The display unit of the computer device is used to form a visually visible image and may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0327] Those skilled in the art will understand that the structure shown in Figure 4 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.
[0328] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0329] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0330] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0331] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0332] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0333] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 application.
[0334] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for simplifying keyframes in visually salient character animation, characterized in that, include: Obtain the character animation sequence and extract the position path and rotation path of each bone node in the character animation sequence in the time dimension; Based on the position path of each skeletal node, calculate the corresponding first motion feature sequence; The first motion feature sequence is used to characterize the geometric shape change or motion speed change of the position path; based on the rotation path of each bone node, the corresponding second motion feature sequence is calculated; the second motion feature sequence is used to characterize the angular velocity change or angular acceleration change of the rotation path; Combining the first motion feature sequence and the second motion feature sequence of each bone node to generate a third motion feature sequence includes: determining the position representation weight corresponding to the first motion feature in the first motion feature sequence of each bone node at each original time point, and the rotation representation weight corresponding to the second motion feature in the second motion feature sequence of each bone node at each original time point; performing amplitude modulation processing on the first motion feature based on the position representation weight to obtain amplitude-modulated position features; performing amplitude modulation processing on the second motion feature based on the rotation representation weight to obtain amplitude-modulated rotation features; generating the third motion feature of each bone node at each original time point based on the amplitude-modulated position feature and the amplitude-modulated rotation feature; and arranging the third motion features of each bone node at all original time points in chronological order to form the third motion feature of each bone node. The sequence; based on the third motion feature sequence of all the bone nodes, with the optimization objective of minimizing the motion reconstruction error of the character animation sequence, selects a target keyframe sequence from the original time points of the character animation sequence, including: setting an upper limit on the number of keyframes contained in the target keyframe sequence; constructing a keyframe selection state table; the keyframe selection state table records the current optimal keyframe combination from the starting original time point to each original time point under different keyframe number constraints and the corresponding current minimum cumulative reconstruction error; constructing an initial candidate target keyframe sequence based on the starting original time point; obtaining the initial cumulative reconstruction error based on the initial candidate target keyframe sequence and the third motion feature sequence of each bone node; recording the initial cumulative reconstruction error in the current minimum cumulative reconstruction error corresponding to the starting original time point in the keyframe selection state table; and outputting the target keyframe sequence.
2. The method for simplifying keyframes in visually salient character animation as described in claim 1, characterized in that: The step of generating a third motion feature for each skeletal node at each original time point based on the amplitude-modulated position feature and the amplitude-modulated rotation feature includes: determining the amplitude comparison relationship between the amplitude-modulated position feature and the amplitude-modulated rotation feature; when the amplitude of the amplitude-modulated position feature is greater than the amplitude of the amplitude-modulated rotation feature, using the amplitude-modulated position feature as the dominant feature component and the amplitude-modulated rotation feature as the auxiliary feature component; when the amplitude of the amplitude-modulated rotation feature is greater than the amplitude of the amplitude-modulated position feature, using the amplitude-modulated rotation feature as the dominant feature component and the amplitude-modulated position feature as the auxiliary feature component; when the amplitude of the amplitude-modulated position feature and the amplitude-modulated rotation feature satisfy a preset amplitude balance condition, using the amplitude-modulated position feature and the amplitude-modulated rotation feature as equally weighted feature components; and generating a third motion feature for each skeletal node at each original time point based on the dominant feature component and the auxiliary feature component, or based on the equally weighted feature component.
3. The method for simplifying keyframes in visually salient character animation as described in claim 2, characterized in that: The calculation of the motion reconstruction error includes: based on the original time points corresponding to each candidate target keyframe in the candidate target keyframe sequence, extracting the third motion features of each bone node in the third motion feature sequence at the original time points corresponding to each candidate target keyframe, as candidate keyframe features; for each bone node at each original time point, determining whether each original time point is located between two adjacent candidate target keyframes; when each original time point is located between two adjacent candidate target keyframes, performing interpolation reconstruction on the third motion features of each bone node at each original time point based on the candidate keyframe features of the two adjacent candidate target keyframes, obtaining reconstructed third motion features; when each original time point coincides with a certain candidate target keyframe, using the candidate keyframe features of a certain candidate target keyframe as the reconstructed third motion features of each bone node at each original time point; arranging the reconstructed third motion features of each bone node at all original time points in chronological order to form a reconstructed third motion feature sequence.
4. The method for simplifying keyframes in visually salient character animation as described in claim 3, characterized in that: After forming the reconstructed third motion feature sequence, the process includes: for each bone node at each original time point, determining whether the deviation between the reconstructed third motion feature of each bone node at each original time point and the third motion feature in the third motion feature sequence of each bone node at each original time point exceeds a preset feature deviation threshold; when the deviation exceeds the preset feature deviation threshold, recording that each bone node has a reconstruction distortion marker at each original time point; when the deviation is less than or equal to the preset feature deviation threshold, not recording that each bone node has a reconstruction distortion marker at each original time point; counting the number of time points at which all bone nodes have reconstruction distortion markers in all original time points, as the total number of distortion time points; and obtaining the motion reconstruction error corresponding to the candidate target keyframe sequence based on the total number of distortion time points.
5. The method for simplifying keyframes in visually salient character animation as described in claim 4, characterized in that: After recording the initial cumulative reconstruction error in the current minimum cumulative reconstruction error corresponding to the starting original time point in the keyframe selection status table, the process includes: starting from the next original time point after the starting original time point, sequentially traversing each original time point; for each original time point, adding each original time point to the current optimal candidate target keyframe sequence corresponding to the previous original time point to form a new candidate target keyframe sequence; obtaining the candidate cumulative reconstruction error based on the new candidate target keyframe sequence and the third motion feature sequence of each skeleton node; determining whether the candidate cumulative reconstruction error is less than the current minimum cumulative reconstruction error corresponding to the previous original time point; if the candidate cumulative reconstruction error is less than the current minimum cumulative reconstruction error corresponding to the previous original time point... When the minimum cumulative reconstruction error is reached at the starting time point, the current optimal candidate target keyframe sequence at each original time point in the keyframe selection state table is updated to a new candidate target keyframe sequence, and the current minimum cumulative reconstruction error at each original time point is updated to the candidate cumulative reconstruction error. When the candidate cumulative reconstruction error is greater than or equal to the current minimum cumulative reconstruction error at the previous original time point, the current optimal candidate target keyframe sequence at each original time point in the keyframe selection state table is kept to be the current optimal candidate target keyframe sequence at the previous original time point, and the current minimum cumulative reconstruction error at each original time point is kept to be the current minimum cumulative reconstruction error at the previous original time point.
6. The method for simplifying keyframes in visually salient character animation as described in claim 5, characterized in that: After sequentially traversing each original time point, the process includes: extracting the current optimal candidate target keyframe sequence from the keyframe selection state table under the constraint of the upper limit of the number of keyframes, as the target keyframe sequence; wherein, the current optimal candidate target keyframe sequence is the candidate target keyframe sequence that minimizes the current minimum cumulative reconstruction error.
7. The method for simplifying keyframes in visually salient character animation as described in claim 6, characterized in that: The step of calculating the corresponding first motion feature sequence based on the position path of each bone node includes: for each bone node, obtaining the displacement distance of each bone node at each original time point based on the position data of adjacent original time points in the position path of each bone node; for each bone node, obtaining the motion direction turning degree of each bone node at each original time point based on the position change vector within the preceding and following time windows in the position path of each bone node; and generating the first motion feature sequence of each bone node based on the displacement distance and the motion direction turning degree.
8. A keyframe simplification system for visually salient character animation, employing the keyframe simplification method for visually salient character animation as described in any one of claims 1 to 7, characterized in that, include: The extraction module is used to obtain the character animation sequence and extract the position path and rotation path of each bone node in the character animation sequence in the time dimension; The first calculation module calculates the corresponding first motion feature sequence based on the position path of each of the skeletal nodes; The first motion feature sequence is used to characterize the geometric changes or motion speed changes of the position path; The second calculation module calculates the corresponding second motion feature sequence based on the rotation path of each bone node. The second motion feature sequence is used to characterize the angular velocity change or angular acceleration change of the rotation path; The third calculation module is used to combine the first motion feature sequence and the second motion feature sequence of each bone node to generate a third motion feature sequence, including: determining the position representation weight corresponding to the first motion feature in the first motion feature sequence of each bone node at each original time point, and the rotation representation weight corresponding to the second motion feature in the second motion feature sequence of each bone node at each original time point; performing amplitude modulation processing on the first motion feature based on the position representation weight to obtain amplitude-modulated position features; performing amplitude modulation processing on the second motion feature based on the rotation representation weight to obtain amplitude-modulated rotation features; generating the third motion feature of each bone node at each original time point based on the amplitude-modulated position feature and the amplitude-modulated rotation feature; arranging the third motion features of each bone node at all original time points in chronological order to form the third motion feature of each bone node. The third motion feature sequence optimization module, based on the third motion feature sequence of all the bone nodes, with the optimization objective of minimizing the motion reconstruction error of the character animation sequence, selects a target keyframe sequence from the original time points of the character animation sequence, including: setting an upper limit on the number of keyframes contained in the target keyframe sequence; constructing a keyframe selection state table; the keyframe selection state table records the current optimal keyframe combination from the starting original time point to each original time point and the corresponding current minimum cumulative reconstruction error under different keyframe number constraints; constructing an initial candidate target keyframe sequence based on the starting original time point; obtaining the initial cumulative reconstruction error based on the initial candidate target keyframe sequence and the third motion feature sequence of each bone node; recording the initial cumulative reconstruction error in the current minimum cumulative reconstruction error corresponding to the starting original time point in the keyframe selection state table; and outputting the target keyframe sequence.
Citation Information
Patent Citations
Method and device for generating character animation, electronic equipment and storage medium
CN116503527A
Skeletal animation generation method and system
CN119338953A
