A 2D digital human action choreography method and device, terminal equipment and storage medium
By dividing 2D digital human videos into action and inaction zones, and randomly selecting target video frames and directions based on frame states, the problem of unsmooth action transitions is solved, and smooth switching of digital human actions is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG KAMFU TECH CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technology results in uneven transitions and abrupt jumps when switching between actions in 2D digital humans.
The digital human video is divided into action and non-action zones, and the boundary frame images of all zones are kept consistent. By judging the state of the current frame and the next video frame, the target video frame and playback direction are randomly selected to achieve smooth switching.
It achieves a smooth transition between the digital human's action and inaction zones, avoiding screen jumps and unnatural transitions.
Smart Images

Figure CN122093631A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and in particular to a method, apparatus, terminal device, and storage medium for choreographing 2D digital human motion. Background Technology
[0002] With the advent of the artificial intelligence era, AI applications are emerging in an endless stream, and AI digital humans are one of them. AI digital humans, with their anthropomorphic and highly interactive characteristics, have wide applications in areas such as guided tours and live streaming. Similar to real people, body movements are an important way for digital humans to convey information. Typically, when audio is input, the 2D digital human needs to perform actions, and when there is no audio input, the 2D digital human's actions need to stop. However, current technology, in controlling the 2D digital human, directly switches the currently moving video frame to a static video frame when switching from audio input to no audio input. If, when switching from no audio input to audio input, the static video frame is directly switched to the moving video frame, this results in an uneven transition of the digital human's movements, producing a jarring, abrupt feeling. Summary of the Invention
[0003] This invention provides a 2D digital human motion choreography method, apparatus, terminal device, and storage medium, which can solve the problem of uneven transitions in the entire digital human motion, resulting in a stiff and abrupt feeling.
[0004] An embodiment of the present invention provides a 2D digital human motion choreography method, including: acquiring a pre-shot digital human video, and dividing the digital human video into several motion intervals and several non-motion intervals; wherein, the boundary frames of all intervals are the same, the boundary frames include the start frame and the end frame of the interval, and the frame images within the same motion interval are the frame images formed after the digital human performs a complete action; Get the currently playing frame and determine if the current frame is in a no-action zone; If so, determine whether the next video frame in the current playback direction is still in the no-action interval. If it is determined that the next video frame in the current playback direction is not in the no-action interval and does not need to remain silent, randomly select the starting frame of an action interval as the target video frame and take the positive playback direction as the target playback direction. If not, then if it is determined that it is necessary to switch to mute mode, determine whether the current frame is the boundary frame of the current action zone. If the current frame is the boundary frame of the current action zone, then randomly select a start frame without an action zone as the target video frame, and take the positive playback direction as the target playback direction. Playback is performed according to the target playback direction and the target video frame.
[0005] Furthermore, it also includes: when the current frame is in an inactive zone, the next video frame in the current playback direction is not in an inactive zone, and it is necessary to keep the sound muted, the previous video frame in the current playback direction is taken as the target video frame, and the opposite direction to the current playback direction is taken as the target playback direction.
[0006] Furthermore, it also includes: when the current frame is in a no-action zone and the next video frame in the current playback direction is in a no-action zone, the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
[0007] Furthermore, it also includes: when the current frame is not in an inactive zone, does not need to be switched to a mute state, and the next video frame in the current playback direction is still in the current action zone, the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
[0008] Furthermore, it also includes: when the current frame is not in the no-action zone, does not need to switch to a mute state, the next video frame in the current playback direction is not in the current action zone, and the next video frame in the current playback direction has exceeded the boundaries of all action zones, the previous video frame in the current playback direction is taken as the target video frame, and the opposite direction to the current playback direction is taken as the target playback direction.
[0009] Furthermore, it also includes: when the current frame is not in the no-action zone, does not need to be switched to a mute state, the next video frame in the current playback direction is not in the current action zone, and the next video frame in the current playback direction does not exceed the boundaries of all action zones, the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
[0010] Furthermore, if the current frame is not in an inactive zone and needs to be switched to a mute state, and the current frame is not a boundary frame of the current active zone, then the boundary frame closest to the current frame in the current active zone is taken as the target boundary frame, the direction from the current frame to the target boundary frame is taken as the target playback direction, and the next video frame under the target playback direction is taken as the target video frame.
[0011] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments; One embodiment of the present invention provides a 2D digital human motion choreography device, including: a digital human video processing module, a current frame determination module, a first playback parameter setting module, a second playback parameter setting module, and a playback control module; The digital human video processing module is used to acquire a pre-recorded digital human video and divide the digital human video into several action intervals and several no-action intervals; wherein, the boundary frames of all intervals are the same, and the boundary frames include the start frame and the end frame of the interval. The frame images within the same action interval are the frame images formed after the digital human performs a complete action. The current frame determination module is used to obtain the currently playing frame and determine whether the current frame is in a no-action interval. The first playback parameter setting module is used to determine whether the next video frame under the current playback direction is still in the no-action interval when it is determined that the current frame is in the no-action interval. When it is determined that the next video frame under the current playback direction is not in the no-action interval and does not need to be kept silent, the module randomly selects the start frame of an action interval as the target video frame and takes the positive playback direction as the target playback direction. The second playback parameter setting module is used to determine whether the current frame is the boundary frame of the current action zone when it is determined that the current frame is not in the no-action zone and needs to be switched to the mute state. If the current frame is the boundary frame of the current action zone, a starting frame of the no-action zone is randomly selected as the target video frame, and the positive playback direction is taken as the target playback direction. The playback control module is used to play the video according to the target playback direction and the target video frame.
[0012] Based on the above-described method embodiments, the present invention provides another embodiment; Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the 2D digital human motion choreography method provided in any of the above-described method embodiments of the present application.
[0013] Based on the embodiments of the method of the present invention, the present invention provides another embodiment: Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute the 2D digital human motion choreography method provided in any of the above-described method embodiments of the present invention.
[0014] The embodiments of the present invention have the following beneficial effects: This invention provides a 2D digital human motion choreography method, apparatus, terminal device, and storage medium. The method first acquires pre-recorded digital human video, then divides it into motion and non-motion intervals, and sets the boundary frames of all intervals to be consistent; that is, the start and end frames within the same interval are identical, the start frames between different intervals are identical, and the end frames between different intervals are also identical. Next, the currently playing frame is judged. If the current frame is in a non-motion interval, the next video frame in the current playback direction is not in a non-motion interval, and there is no need to maintain a silent state, then the start frame of an motion interval is randomly selected as the target video frame, and the current playback direction is set as the target playback direction. Subsequently, based on the target playback direction and... The target video frame is played. In this scenario, the current frame is in a no-action zone, while the next video frame in the current playback direction is not in the no-action zone. This means that the current frame is the boundary frame of the current no-action zone. Since it is not necessary to maintain a silent state, it means that it is necessary to switch from the no-action state to the action state. At this time, a start frame of the action zone is randomly selected as the target video frame, and the positive playback direction is taken as the target playback direction. Since all start frames and end frames are the same in this invention, the current frame and the target video frame are the same. Therefore, after the current frame is played, there will be no screen jump when the target video frame is played immediately. At the same time, the switch from the no-action zone to the action zone is completed, so that the digital human transitions smoothly when switching from the no-action zone to the action zone. Similarly, when the current frame is not in the no-action zone, needs to switch to a silent state, or is the boundary frame of the current action zone, a start frame of the no-action zone will be randomly selected as the target video frame, and the positive playback direction will be used as the target playback direction. In this way, at the next playback moment, the current frame located at the boundary of the action zone will switch to the start frame of any no-action zone, so that the digital human can switch from the action zone to the no-action zone without any screen jumps, and the transition is smooth. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a 2D digital human motion choreography method provided in an embodiment of the present invention.
[0016] Figure 2 This is another flowchart illustrating a 2D digital human motion choreography method provided in an embodiment of the present invention.
[0017] Figure 3 This is a schematic diagram of the structure of a 2D digital human motion choreography device provided in an embodiment of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0020] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0022] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0023] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0024] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0025] See Figure 1 This is a flowchart illustrating a 2D digital human motion choreography method according to an embodiment of the present invention, which includes at least: Step S1: Acquire a pre-recorded digital human video and divide the digital human video into several action intervals and several no-action intervals; wherein, the boundary frames of all intervals are the same, the boundary frames include the start frame and end frame of the interval, and the frame images within the same action interval are the frame images formed after the digital human performs a complete action.
[0026] For S1, the subject is first filmed using a camera device to generate a digital human video. During the filming process, the subject needs to complete several actions according to the set action requirements, and the start and end of each action must be consistent. The filming process also requires filming videos of periods without action. At the beginning of the video of a period without action, the subject needs to maintain the same posture as at the end of each action. This is to ensure that the images of the start and end frames of each interval can be consistent when dividing the action interval into non-action intervals. After capturing the digital human video, the entire video is divided into several action zones and several inactive zones. Each action zone is defined by all frames captured after the digital human performs a complete action, and the boundary frames of all zones are identical. For illustration, the captured frames sequentially perform the following actions: Action A - Inactive B - Action C, with the start and end actions of A being identical. After action A ends, the digital human maintains the same posture for a period to complete inactive B, then begins action C. The start and end actions of C are identical, and the start action of C is consistent with the start action of A. Therefore, the final digital human video will contain two action zones A1 (A1 contains all video frames captured during the execution of the entire action A). The video frames are defined as follows: A1 contains all video images captured during the execution of action C, and B1 contains no-action intervals (video images within the no-action duration). Assume that the boundary frames of A1 include start frame a1 and end frame a2; the boundary frames of C include start frame c1 and end frame c2; and the boundary frames of B include start frame b1 and end frame b2. In this case, the content of a1, a2, c1, c2, b1, and b2 is identical. Furthermore, the unprocessed playback direction of the captured digital human video is set to positive, meaning the positive playback direction of the digital human video is along A1-B1-C1. Each video frame is assigned an index frame, and each action interval or non-action interval forms a corresponding index value range based on the index value of its boundary frames.
[0027] In other alternative embodiments, if the photographer needs to complete each action according to the set action requirements, and the start and end of the action are not kept consistent, a transition frame can be generated to make the start and end frames of the action completely consistent.
[0028] Step S2: Obtain the currently playing frame and determine whether the current frame is in a no-action interval.
[0029] Specifically, by obtaining the index value of the current frame and comparing it with the pre-stored index value ranges of each interval (action interval or no-action interval), it can be determined whether the current frame is in the no-action interval or the action interval. Step S3: If yes, determine whether the next video frame under the current playback direction is still in the no-action interval. If it is determined that the next video frame under the current playback direction is not in the no-action interval and does not need to remain silent, randomly select the starting frame of an action interval as the target video frame and take the positive playback direction as the target playback direction.
[0030] Specifically, if the current frame is in a motionless zone, it is further determined whether the next video in the current playback direction corresponding to the current frame is still in the motionless zone. If not, it means that the current frame is the boundary frame of the current motionless zone. If it is not necessary to maintain a silent state, it means that the digital human needs to switch from a motionless state to an active state. At this time, a start frame of an active zone is randomly selected as the target video frame, and the positive playback direction is taken as the target playback direction. Since all start frames and end frames are the same in this invention, the current frame and the target video frame are the same. Therefore, after the current frame is played, there will be no screen jump when the target video frame is played immediately. At the same time, the switch from the motionless zone to the active zone is completed, so that the digital human transitions smoothly when switching from the motionless zone to the active zone.
[0031] It should be noted that initially, the playback direction of the initial frame is the forward playback direction, and the initial frame can be any frame.
[0032] Step S4: If not, if it is determined that it is necessary to switch to the mute state, determine whether the current frame is the boundary frame of the current action interval. If the current frame is the boundary frame of the current action interval, randomly select a start frame without an action interval as the target video frame, and take the positive playback direction as the target playback direction.
[0033] Specifically, when the current frame is not in the no-action zone, needs to switch to a silent state, or is the boundary frame of the current action zone, a start frame of the no-action zone will be randomly selected as the target video frame, and the positive playback direction will be used as the target playback direction. In this way, at the next playback moment, the current frame located at the boundary of the action zone will switch to the start frame of any no-action zone, so that the digital human can switch from the action zone to the no-action zone without any screen jumps, and the transition is smooth.
[0034] Step S5: Play the video according to the target playback direction and the target video frame.
[0035] Specifically, after following the steps above, playback is performed according to the determined target playback direction and target video frame, thereby achieving smoothness in the switching process between the digital human's action and non-action zones and avoiding screen jumps.
[0036] To further illustrate the solution of the present invention in detail, other preferred embodiments have been used to define other situations, resulting in an overall solution as follows: Figure 2 As shown.
[0037] In a preferred embodiment, the method further includes: when the current frame is in an inactive zone, the next video frame in the current playback direction is not in an inactive zone, and a silent state needs to be maintained, the previous video frame in the current playback direction is taken as the target video frame, and the opposite direction to the current playback direction is taken as the target playback direction.
[0038] Specifically, when the current frame is in an inactive zone, the next video frame in the current playback direction is not in an inactive zone, and it is necessary to remain silent, it means that the current digital human is in an inactive state. If playback continues in the current direction, the current digital human will switch to an active state in the next video frame. However, it is still necessary to remain silent at this time. Therefore, the next video frame cannot be played directly in the current playback direction. Instead, the current playback direction is flipped, and the previous video frame is played at the next moment, thus keeping the digital human in an inactive state, which is consistent with the current actual scenario.
[0039] In a preferred embodiment, the method further includes: when the current frame is in a no-action interval and the next video frame in the current playback direction is in a no-action interval, taking the next video frame in the current playback direction as the target video frame and the current playback direction as the target playback direction.
[0040] Specifically, when the current frame is in a motionless zone, and the next video frame in the current playback direction is also in a motionless zone, regardless of whether the mute state needs to be maintained, the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction. On the one hand, if the mute state needs to be maintained, since the next video frame in the current playback direction is in a motionless zone, directly playing the next video frame will not cause a sudden screen switch and will also conform to the actual mute scenario. If the mute state does not need to be maintained, directly switching to the action zone would cause a screen jump and an unsmooth transition. To avoid this problem, this invention selects to control the continued playback of the video in the motionless zone until the boundary frame, and then switches to the action zone according to the method of this application to ensure a smooth overall screen transition. It should be noted that, to avoid the problem of long-term mismatch between the digital human's image and the non-mute scene, in actual operation, the motionless zone time of this application is very short, usually only 90-150 frames (30 frames per second), thus avoiding long-term inconsistencies.
[0041] In a preferred embodiment, the method further includes: when the current frame is not in an inactive zone, does not need to be switched to a mute state, and the next video frame in the current playback direction is still in the current active zone, the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
[0042] Specifically, if the current frame is not in the no-action zone, does not need to be switched to a mute state, and the next video frame in the current playback direction is still in the current action zone, it means that the digital human is in an action state in the current frame. Since it does not need to be switched to a mute state, the digital human needs to be in an action state in the next moment as well. Since the next video frame in the current playback direction is still in the current action zone, the next video frame can be played directly in the current playback direction, which meets the above actual scenario.
[0043] In a preferred embodiment, the method further includes: when the current frame is not in an inactive zone, does not need to be switched to a mute state, the next video frame in the current playback direction is not in the current action zone, and the next video frame in the current playback direction has exceeded the boundaries of all action zones, the previous video frame in the current playback direction is taken as the target video frame, and the opposite direction to the current playback direction is taken as the target playback direction.
[0044] If the current frame is not in a no-action zone and does not need to switch to a mute state, and the next video frame in the current playback direction is not in the current action zone and has exceeded the boundaries of all action zones, it means that the digital human is in action mode in the current frame. Since switching to a mute state is not required, the digital human needs to remain in action mode in the next moment. However, since the next video frame in the current playback direction is not in the current action zone and has exceeded the boundaries of all action zones, it means that there are no more video frames corresponding to action zones after the current frame. If the next video frame is played directly in the current playback direction, it would not conform to the scenario where switching to a mute state is not required, and it would also cause a sudden change in the picture. Therefore, in this case, the previous video frame in the current playback direction is taken as the target video frame, and the opposite direction to the current playback direction is taken as the target playback direction. This ensures that the picture does not change abruptly and that the digital human remains in action mode, conforming to the scenario where switching to a mute state is not required.
[0045] In a preferred embodiment, the method further includes: when the current frame is not in an inactive zone, does not need to be switched to a mute state, the next video frame in the current playback direction is not in the current action zone, and the next video frame in the current playback direction does not exceed the boundaries of all action zones, the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
[0046] Specifically, if the current frame is not in a no-action zone and does not need to be switched to a mute state, and the next video frame in the current playback direction is not in the current action zone and does not exceed the boundaries of all action zones, it means that the digital human is in an action state in the current frame. Since it does not need to be switched to a mute state, the digital human needs to be in an action state in the next moment as well. However, since the next video frame in the current playback direction is not in the current action zone and does not exceed the boundaries of all action zones, it means that there are still video frames corresponding to action zones after the current frame. At this time, the next video frame in the current playback direction can be directly taken as the target video frame, and the current playback direction can be taken as the target playback direction.
[0047] In a preferred embodiment, the method further includes: if the current frame is not in an inactive zone, needs to be switched to a mute state, and the current frame is not a boundary frame of the current active zone, then the boundary frame closest to the current frame in the current active zone is taken as the target boundary frame, the direction from the current frame to the target boundary frame is taken as the target playback direction, and the next video frame under the target playback direction is taken as the target video frame.
[0048] Specifically, if the current frame is not in the inactive zone and needs to switch to a silent state, and the current frame is not a boundary frame of the current active zone, it means the digital human needs to switch from an active state to an inactive state. Since the current frame is not at the boundary of the active zone, directly switching to the inactive zone would cause a sudden change in the image. To avoid this problem, this invention first determines the boundary frame in the current active zone relative to the current frame, then uses the direction from the current frame to the target boundary frame as the target playback direction, and uses the next video frame in the target playback direction as the target video frame for playback. This allows the digital human to switch to the inactive state in the shortest possible time while maintaining a smooth transition. It is understood that this invention prioritizes ensuring a smooth image transition before ensuring synchronization between the audio state and the digital human's posture, allowing for a slight delay between the audio state and the digital human's posture.
[0049] Furthermore, the need to maintain a silent state is determined by checking if there is audio input at the current frame. If there is, it is determined that the silent state does not need to be maintained; otherwise, it is determined that the silent state needs to be maintained.
[0050] Based on the above-described method implementations, the present invention provides corresponding device embodiments; like Figure 3 As shown, an embodiment of the present invention provides a 2D digital human motion choreography device, including: a digital human video processing module, a current frame determination module, a first playback parameter setting module, a second playback parameter setting module, and a playback control module; The digital human video processing module is used to acquire a pre-recorded digital human video and divide the digital human video into several action intervals and several no-action intervals; wherein, the boundary frames of all intervals are the same, and the boundary frames include the start frame and the end frame of the interval. The frame images within the same action interval are the frame images formed after the digital human performs a complete action. The current frame determination module is used to obtain the currently playing frame and determine whether the current frame is in a no-action interval. The first playback parameter setting module is used to determine whether the next video frame under the current playback direction is still in the no-action interval when it is determined that the current frame is in the no-action interval. When it is determined that the next video frame under the current playback direction is not in the no-action interval and does not need to be kept silent, the module randomly selects the start frame of an action interval as the target video frame and takes the positive playback direction as the target playback direction. The second playback parameter setting module is used to determine whether the current frame is the boundary frame of the current action zone when it is determined that the current frame is not in the no-action zone and needs to be switched to the mute state. If the current frame is the boundary frame of the current action zone, a starting frame of the no-action zone is randomly selected as the target video frame, and the positive playback direction is taken as the target playback direction. The playback control module is used to play the video according to the target playback direction and the target video frame.
[0051] It should be noted that the device embodiments described above are merely illustrative. The units / modules described as separate components may or may not be physically separate. The components shown as units / modules may or may not be physical units / modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided by this invention, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort. The schematic diagrams are merely examples of a 2D digital human motion choreography device and do not constitute a limitation on the 2D digital human motion choreography device. It may include more or fewer components than shown, or combine certain components, or use different components.
[0052] Based on the above-described method embodiments, another embodiment is provided; Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the 2D digital human motion choreography method provided in any of the above-described method embodiments of the present invention.
[0053] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0054] The terminal device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that, for example, the terminal device may also include input / output devices, network access devices, buses, etc.
[0055] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0056] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound display function, image display function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0057] Based on the above embodiments of the invention, corresponding embodiments of storage media are provided; Another embodiment of the present invention provides a storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute the 2D digital human motion choreography method provided in any of the above-described method embodiments of the present invention.
[0058] Wherein, the storage medium is a computer storage medium. If the modules / units integrated in the device / terminal equipment are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0059] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for choreographing 2D digital human motion, characterized in that, include: Acquire a pre-recorded digital human video and divide the digital human video into several action intervals and several no-action intervals; wherein, the boundary frames of all intervals are the same, the boundary frames include the start frame and the end frame of the interval, and the frame images within the same action interval are the frame images formed after the digital human performs a complete action. Get the currently playing frame and determine if the current frame is in a no-action zone; If so, determine whether the next video frame in the current playback direction is still in the no-action interval. If it is determined that the next video frame in the current playback direction is not in the no-action interval and does not need to remain silent, randomly select the starting frame of an action interval as the target video frame and take the positive playback direction as the target playback direction. If not, then if it is determined that it is necessary to switch to mute mode, determine whether the current frame is the boundary frame of the current action interval. If the current frame is the boundary frame of the current action interval, then randomly select a start frame without an action interval as the target video frame, and take the positive playback direction as the target playback direction. Playback is performed according to the target playback direction and the target video frame.
2. The 2D digital human motion choreography method as described in claim 1, characterized in that, Also includes: When the current frame is in an inactive zone, the next video frame in the current playback direction is not in an inactive zone, and the system needs to remain silent, the previous video frame in the current playback direction is taken as the target video frame, and the opposite direction to the current playback direction is taken as the target playback direction.
3. The 2D digital human motion choreography method as described in claim 2, characterized in that, Also includes: If the current frame is in a no-action zone and the next video frame in the current playback direction is also in a no-action zone, then the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
4. The 2D digital human motion choreography method as described in claim 3, characterized in that, Also includes: If the current frame is not in the no-action zone, does not need to be switched to mute mode, and the next video frame in the current playback direction is still in the current action zone, then the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
5. The 2D digital human motion choreography method as described in claim 4, characterized in that, Also includes: If the current frame is not in an inactive zone, does not need to be switched to a mute state, the next video frame in the current playback direction is not in the current action zone, and the next video frame in the current playback direction has exceeded the boundaries of all action zones, then the previous video frame in the current playback direction is taken as the target video frame, and the opposite direction to the current playback direction is taken as the target playback direction.
6. The 2D digital human motion choreography method as described in claim 5, characterized in that, Also includes: If the current frame is not in an inactive zone, does not need to be switched to a mute state, the next video frame in the current playback direction is not in the current action zone, and the next video frame in the current playback direction does not exceed the boundaries of all action zones, then the next video frame in the current playback direction is taken as the target video frame, and the current playback direction is taken as the target playback direction.
7. The 2D digital human motion choreography method as described in claim 6, characterized in that, It also includes the following: if the current frame is not in the no-action zone, needs to be switched to a mute state, and the current frame is not the boundary frame of the current action zone, then the boundary frame closest to the current frame in the current action zone is taken as the target boundary frame, the direction from the current frame to the target boundary frame is taken as the target playback direction, and the next video frame under the target playback direction is taken as the target video frame.
8. A 2D digital human motion choreography device, characterized in that, include: The system includes a digital human video processing module, a current frame determination module, a first playback parameter setting module, a second playback parameter setting module, and a playback control module. The digital human video processing module is used to acquire a pre-recorded digital human video and divide the digital human video into several action intervals and several no-action intervals; wherein, the boundary frames of all intervals are the same, and the boundary frames include the start frame and the end frame of the interval. The frame images within the same action interval are the frame images formed after the digital human performs a complete action. The current frame determination module is used to obtain the currently playing frame and determine whether the current frame is in a no-action interval. The first playback parameter setting module is used to determine whether the next video frame under the current playback direction is still in the no-action interval when it is determined that the current frame is in the no-action interval. When it is determined that the next video frame under the current playback direction is not in the no-action interval and does not need to be kept silent, the module randomly selects the start frame of an action interval as the target video frame and takes the positive playback direction as the target playback direction. The second playback parameter setting module is used to determine whether the current frame is the boundary frame of the current action interval when it is determined that the current frame is not in the no-action interval and it is necessary to switch to the mute state. If the current frame is the boundary frame of the current action interval, a starting frame of the no-action interval is randomly selected as the target video frame, and the positive playback direction is taken as the target playback direction. The playback control module is used to play the video according to the target playback direction and the target video frame.
9. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the 2D digital human motion choreography method according to any one of claims 1-7.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform the 2D digital human motion choreography method according to any one of claims 1-7.