CN110858409A - Animation generation method and device - Google Patents
Animation generation method and device Download PDFInfo
- Publication number
- CN110858409A CN110858409A CN201810975738.8A CN201810975738A CN110858409A CN 110858409 A CN110858409 A CN 110858409A CN 201810975738 A CN201810975738 A CN 201810975738A CN 110858409 A CN110858409 A CN 110858409A
- Authority
- CN
- China
- Prior art keywords
- animation
- virtual object
- human hand
- configuration parameters
- acquiring
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [Three Dimensional] animation
- G06T13/40—3D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/006—Mixed reality
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/246—Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Architecture (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
Abstract
The disclosure discloses an animation generation method, an animation generation device, an electronic device and a computer-readable storage medium. The animation generation method comprises the following steps: acquiring a virtual object; acquiring a video acquired by an image sensor; identifying the hands in the video to obtain hand information; acquiring animation configuration parameters according to the hand information; and generating the animation related to the virtual object according to the animation configuration parameters. By adopting the technical scheme, the technical problem that animation control is not flexible in the prior art is solved.
Description
Technical Field
The present disclosure relates to the field of image processing, and in particular, to an animation generation method and apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of computer technology, the application range of the intelligent terminal is widely improved, for example, the intelligent terminal can listen to music, play games, chat on internet, take pictures and the like. For the photographing technology of the intelligent terminal, the photographing pixels of the intelligent terminal reach more than ten million pixels, and the intelligent terminal has higher definition and the photographing effect comparable to that of a professional camera.
At present, when an intelligent terminal is used for photographing, not only can photographing effects of traditional functions be realized by using photographing software built in when the intelligent terminal leaves a factory, but also photographing effects with additional functions can be realized by downloading an Application program (APP for short) from a network end, for example, the APP with functions of dark light detection, a beauty camera, super pixels and the like can be realized. The beautifying function of the intelligent terminal generally comprises beautifying processing effects of skin color adjustment, skin grinding, large eye, face thinning and the like, and can perform beautifying processing of the same degree on all faces recognized in an image. There are also applications that can implement simple animation functions, such as displaying a piece of animation at a fixed location on the screen.
However, the current animation function can only be displayed at a fixed position and a fixed time, and if the display or playing attribute of the animation needs to be changed, the animation itself needs to be directly modified, so that the control of the animation is very inflexible.
Disclosure of Invention
In a first aspect, an embodiment of the present disclosure provides an animation generation method, including: acquiring a virtual object; acquiring a video acquired by an image sensor; identifying the hands in the video to obtain hand information; acquiring animation configuration parameters according to the hand information; and generating the animation related to the virtual object according to the animation configuration parameters.
Further, the identifying the human hand in the video to obtain human hand information includes: identifying a human hand in the video; recording the motion trail of the human hand; analyzing the motion trail and recognizing the motion trail as a preset action; and taking the action as human hand information.
Further, the acquiring animation configuration parameters according to the human hand information includes: and acquiring the animation configuration parameters according to the type of the virtual object and the action, wherein the animation configuration parameters are used for rendering the animation.
Further, the virtual object type is an animation type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or the attributes of the animation of the virtual object.
Further, the virtual object type is a model type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or animation nodes of the virtual object.
Further, the acquiring animation configuration parameters according to the human hand information includes: reading an animation behavior configuration file, wherein animation configuration parameters related to the hand information are stored in the animation behavior configuration file; and acquiring the animation configuration parameters from the animation behavior configuration file according to the hand information.
Further, before the reading the animation behavior configuration file, the method further includes: and acquiring an animation behavior configuration file corresponding to the type according to the type of the virtual object.
Further, before the reading the animation behavior configuration file, the method further includes: and setting an animation behavior configuration file, and setting animation configuration parameters in the configuration file.
Further, the identifying the human hand in the video to obtain human hand information includes: identifying the human hand in the video to obtain identification result data; carrying out smoothing and coordinate normalization processing on the identification result data to obtain a processed human hand; and obtaining the hand information according to the processed hand.
Further, the generating an animation related to the virtual object according to the animation configuration parameter includes: and calculating the rendering position and the animation attribute of the virtual object according to the animation configuration parameters to generate the animation of the virtual object.
In a second aspect, an embodiment of the present disclosure provides an animation generation apparatus, including: the virtual object acquisition module is used for acquiring a virtual object; the video acquisition module is used for acquiring a video acquired by the image sensor; the human hand recognition module is used for recognizing human hands in the video to obtain human hand information; the animation configuration parameter acquisition module is used for acquiring animation configuration parameters according to the hand information; and the animation generation module is used for generating the animation related to the virtual object according to the animation configuration parameters.
Further, the human hand recognition module comprises: the first identification module is used for identifying human hands in the video; the recording module is used for recording the motion track of the human hand; the analysis and identification module is used for analyzing the motion trail and identifying the motion trail as a preset action; and the human hand information output module is used for taking the action as human hand information.
Further, the animation configuration parameter obtaining module: and the animation configuration parameters are used for obtaining the animation configuration parameters according to the type of the virtual object and the action, and the animation configuration parameters are used for rendering the animation.
Further, the virtual object type is an animation type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or the attributes of the animation of the virtual object.
Further, the virtual object type is a model type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or animation nodes of the virtual object.
Further, the animation configuration parameter obtaining module further includes: the reading module is used for reading an animation behavior configuration file, and animation configuration parameters related to the hand information are stored in the animation behavior configuration file; and the first acquisition module is used for acquiring the animation configuration parameters from the animation behavior configuration file according to the hand information.
Further, the animation configuration parameter obtaining module further includes: and the second acquisition module is used for acquiring the animation behavior configuration file corresponding to the type according to the type of the virtual object.
Further, the animation configuration parameter obtaining module further includes: and the animation behavior configuration file setting module is used for setting an animation behavior configuration file and setting animation configuration parameters in the configuration file.
Further, the human hand recognition module comprises: the identification result data acquisition module is used for identifying the human hand in the video and acquiring identification result data; the recognition result data processing module is used for carrying out smoothing and coordinate normalization processing on the recognition result data to obtain a processed hand; and the first hand information acquisition module is used for acquiring the hand information according to the processed hand.
Further, the animation generation module: and the animation configuration module is used for calculating the rendering position and the animation attribute of the virtual object according to the animation configuration parameters and generating the animation of the virtual object.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the animation generation method of any of the preceding first aspects.
In a fourth aspect, the present disclosure provides a non-transitory computer-readable storage medium, which stores computer instructions for causing a computer to execute the animation generation method according to any one of the first aspect.
The embodiment of the disclosure provides an animation generation method and device, electronic equipment and a computer-readable storage medium. The animation generation method comprises the following steps: acquiring a virtual object; acquiring a video acquired by an image sensor; identifying the hands in the video to obtain hand information; acquiring animation configuration parameters according to the hand information; and generating the animation related to the virtual object according to the animation configuration parameters. By adopting the technical scheme, the technical problem that animation control is not flexible in the prior art is solved.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained according to the drawings without creative efforts for those skilled in the art.
Fig. 1 is a flowchart of a first embodiment of an animation generation method provided in an embodiment of the present disclosure;
fig. 2a is a flowchart of step S104 in a second embodiment of an animation generation method provided in the embodiment of the present disclosure;
2b-2g are schematic diagrams of specific examples of animation generation methods provided by embodiments of the present disclosure;
fig. 3 is a schematic structural diagram of a first animation generation apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an animation configuration parameter obtaining module in a second embodiment of an animation generating apparatus according to an embodiment of the present disclosure
Fig. 5 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of a computer-readable storage medium provided in accordance with an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an animation generation terminal according to an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
Fig. 1 is a flowchart of a first embodiment of an animation generation method provided in the present disclosure, where the animation generation method provided in this embodiment may be executed by an animation generation apparatus, the animation generation apparatus may be implemented as software, or implemented as a combination of software and hardware, and the animation generation apparatus may be integrated in some device in an image processing system, such as an image processing server or an image processing terminal device. As shown in fig. 1, the method comprises the steps of:
step S101, acquiring a virtual object;
the virtual object herein may be any 2D or 3D virtual object, typically a virtual weapon such as a virtual sword, a virtual pistol, a virtual pen, a virtual book, a virtual wearable article such as a virtual glove, a virtual ring, etc., or a virtual rainbow, a virtual cloud, etc., without any specific limitation, and any virtual object may be incorporated into the present disclosure, and the virtual object may be of a type such as an animation type virtual object with an animation effect itself, typically a virtual cloud such as an animation type, which itself has a plurality of sequential frames, presenting an animation effect from a white cloud to a black cloud to a rain cloud; or the virtual object may be of a model type, such as the virtual sword described above, which does not have an animation effect itself, but may form a piece of animation effect by moving or the like. In this step, the type of the virtual object may be acquired while the virtual object is acquired, and the type of the acquired virtual object may be acquired directly from the attribute data of the virtual object, or the ID of the virtual object may be acquired, and the type of the ID is queried through the ID, and the type acquisition manner may be optional, and any manner may be applied to the present disclosure.
Step S102, acquiring a video collected by an image sensor;
the image sensor refers to various devices that can capture images, and typical image sensors are video cameras, and the like. In this embodiment, the image sensor may be a camera on a mobile terminal, such as a front-facing or rear-facing camera on a smart phone, and a video image acquired by the camera may be directly displayed on a display screen of the smart phone.
Step S103, identifying the hands in the video to obtain hand information;
when the human hand is recognized, the position of the human hand can be positioned by using the color features, the human hand is segmented from the background, and feature extraction and recognition are carried out on the found and segmented human hand image. Specifically, color information of an image and position information of the color information are acquired by using an image sensor; comparing the color information with preset hand color information; identifying first color information, wherein the error between the first color information and the preset human hand color information is smaller than a first threshold value; and forming the outline of the human hand by using the position information of the first color information. Preferably, in order to avoid interference of the ambient brightness to the color information, image data of an RGB color space acquired by the image sensor may be mapped to an HSV color space, information in the HSV color space is used as contrast information, and preferably, a hue value in the HSV color space is used as color information, so that the hue information is minimally affected by brightness, and the interference of the brightness can be well filtered. The position of the human hand is roughly determined by using the human hand outline, and then the key point extraction is carried out on the human hand. The method comprises the steps of extracting key points of a human hand on an image, namely searching corresponding position coordinates of each key point of a human hand outline in a human hand image, namely key point positioning, wherein the process needs to be carried out based on the corresponding characteristics of the key points, searching and comparing in the image according to the characteristics after the image characteristics capable of clearly identifying the key points are obtained, and accurately positioning the positions of the key points on the image. Since the keypoints only occupy a very small area (usually only a few to tens of pixels) in the image, the regions occupied by the features corresponding to the keypoints on the image are usually very limited and local, and there are two feature extraction methods currently used: (1) extracting one-dimensional range image features vertical to the contour; (2) and extracting the two-dimensional range image characteristics of the key point square neighborhood. There are many ways to implement the above two methods, such as ASM and AAM methods, statistical energy function methods, regression analysis methods, deep learning methods, classifier methods, batch extraction methods, and so on. The number, accuracy and speed of the key points used by the various implementation methods are different, and the method is suitable for different application scenes. Similarly, for other target objects, the same principles can be used to identify the target object.
After the human hand is recognized, a polygon is defined outside the outer contour of the human hand to serve as an external detection frame of the human hand, the external detection frame is used for replacing the human hand and describing the position of the human hand, a rectangle is taken as an example, after key points of the human hand are recognized, the width of the widest part of the human hand and the length of the longest part of the human hand can be calculated, and the external detection frame of the human hand is recognized according to the width and the length. One implementation of calculating the longest and widest points of the human hand is to extract the boundary key points of the human hand, calculate the difference between the X coordinates of the two boundary key points with the farthest X coordinate distance as the length of the rectangle width, and calculate the difference between the Y coordinates of the two boundary key points with the farthest Y coordinate distance as the length of the rectangle length. If the hand contracts into a fist shape, the external detection frame can be set to be a minimum circle covering the fist. Specifically, the center point of the external detection frame can be used as the position of the hand, and the center point of the external detection frame is the intersection point of the diagonals of the external detection frame; the centre of the circle may also be substituted for the location of the fist.
The human hand information further includes detected human hand key points, the number of the key points may be set, and generally, the human hand information may include key points and joint key points of a human hand contour, each key point has a fixed number, for example, the key points may be numbered from top to bottom according to the sequence of the contour key point, the thumb joint key point, the index finger joint key point, the middle finger joint key point, the ring finger joint key point, and the little finger joint key point, in a typical application, the number of the key points is 22, and each key point has a fixed number.
The human hand information may further include a motion of the human hand, which records a motion trajectory of the human hand and analyzes the motion trajectory to recognize. Specifically, the movement of the human hand needs to be tracked firstly by recording the movement track of the human hand, in the human hand movement recognition system based on vision, the tracking of the movement track of the human hand is to track the position change of a gesture in a picture sequence, so as to obtain the position information of the human hand in continuous time, and the quality of the tracking effect of the movement track of the human hand directly influences the effect of human hand movement recognition. Commonly used motion tracking methods include a particle filter algorithm, a Mean-shift algorithm, a kalman filter method, a skeletal tracking method, and the like.
The target tracking based on the particle filtering is a random search process for obtaining posterior probability estimation of target distribution in a random motion model, and the particle filtering mainly comprises two steps of primary sampling and repeated sampling. The preliminary sampling is to randomly place particles in an image, then calculate the similarity of each particle and the characteristics of a tracking target, and further obtain the weight of each particle. The resampling stage mainly changes the distribution of the particles according to the weight of the particles in the preliminary sampling. And repeating the processes of preliminary sampling and resampling until the target is tracked.
The Mean-shift method (Mean-shift) is a non-parametric probability density gradient estimation algorithm. Firstly, establishing a hand model, namely calculating the probability of characteristic values of pixels belonging to a hand in an initial image frame in a characteristic space; then establishing a model of the current frame, and calculating the probability of characteristic values of all pixels in a region where the human hand possibly exists; and finally, obtaining the human hand mean value drift amount by solving the similarity of the initial human hand model and the human hand model of the current frame. And according to the convergence of the mean shift algorithm, iteratively calculating the mean shift amount of the hand to achieve the aim of converging to the position of the hand in the current image frame.
Kalman filtering is the prediction of the state of a linear system in the present or future using a series of mathematical equations. In tracking the motion trajectory of the human hand, Kalman filtering is mainly used for observing the position information of the human hand in a series of image frames and then predicting the position of the human hand in the next frame. Because the kalman filtering is established on the assumption of posterior probability estimation of each time interval, the kalman filtering method can achieve a better tracking effect in a gaussian distribution environment. The method can remove noise and still obtain a good human hand tracking effect under the gesture deformation.
With the widespread application of Microsoft Kinect, many researchers use the skeletal point tracking specific to Microsoft Kinect sensors to conduct human hand tracking research. Within the field of view of the sensor, the Kinect can provide one or two complete skeletal tracings for the user, i.e. 20 joint points throughout the body. The skeletal point tracking is divided into active tracking and passive tracking, in the active tracking mode, two possible users are selected for tracking in a visual field, in the passive tracking mode, the skeletal points of at most 6 users can be tracked, and the redundant four users only perform position tracking. The principle of Kinect's skeleton tracking is that on the basis of the depth image that obtains, through the method of classifying and machine learning 32 parts of human body, the skeleton joint point information of each part is found.
Since key points of the human hand skeleton can be collected in this step, a human hand motion trajectory tracking method based on skeleton tracking can be preferentially used in the present disclosure. In the disclosure, the moving distance of a key point of a human hand in two consecutive frames of images can be calculated, when the distance is smaller than a preset threshold, the position of the key point is considered to be unchanged, when several preset consecutive frames of the key point are kept unchanged, the position of the hand is identified as the start point or the end point of the human hand, typically, the threshold can be set to 1cm, and when the position of the key point in 6 consecutive frames is not changed, the position of the human hand is taken as the start point or the end point of the human hand. And then calculating the positions of key points in the image frames between the starting point and the end point, wherein the tracks formed by the key points in all the image frames are the motion tracks of the human hand, comparing the motion tracks between the starting point and the end point with a preset motion track for identification, and identifying the motion tracks as the motion of the human hand when the similarity is greater than a preset similarity threshold. Finally, the hand motion is output to the next step as hand information.
In one embodiment, the human hand information may further include an angle of the human hand, which may include an angle of the human hand on the photographing plane, an angle in space, or a combination thereof. In one implementation, the angle may be described by using an external detection frame, on a shooting plane, an offset angle of the external detection frame with respect to an X axis may be calculated, in a space, a zoom degree of the external detection frame may be detected, and a rotation angle in the space may be determined according to a corresponding relationship between the zoom degree and the angle, for example, when a palm is facing a camera, the detected external detection frame has a maximum area, when the palm is rotated, the area of the external detection frame is gradually reduced, a relationship between a ratio of the reduction in the area and the angle may be preset, so that the rotation angle of the palm may be calculated by the area of the external detection frame. Of course, the angle can be obtained in a manner different from that of the embodiment, and any method capable of determining the angle of the human hand can be applied to the present disclosure, and the purpose here is only to obtain the angle of the human hand.
In one embodiment, before calculating the human hand information, the method further comprises the step of performing smoothing and coordinate normalization processing on the identification data of the human hand. Specifically, the smoothing process may be averaging images in the multi-frame video, taking the averaged image as an identified image, corresponding to a human hand in the present disclosure, identifying the human hand in the multi-frame image, then performing weighted averaging on the human hand image, taking the human hand image obtained after averaging as the identified human hand, and calculating the human hand information. The coordinate normalization processing is to unify the coordinate range, and if the coordinates of the hand image collected by the camera and the hand image displayed on the display screen are not unified, a mapping relation is needed to map the large coordinate system to the small coordinate system. And obtaining the information of the human hand after smoothing processing and normalization processing.
And step S104, acquiring animation configuration parameters according to the human hand information.
In this step, the animation configuration parameters may include a rendering position of the virtual object and a property of the animation. The rendering position of the virtual object may be associated with the position of the human hand, for example, the position of the human hand is determined by the central point of the external detection frame of the human hand in step S103, and the rendering position of the virtual object may directly coincide with the central point, and at this time, the central position of the virtual object may coincide with the central point of the external detection frame; or the rendering position of the virtual object may maintain a certain positional relationship with the central point, for example, the rendering position of the virtual object may be located at a position 1 length unit forward of the central point Y axis, and the length unit may be a self-defined length unit, for example, 1 length unit is equal to 1cm, and the like, which is not limited herein. In summary, the question of where the virtual object is displayed can be determined by a certain relationship with the rendering position of the virtual object. In order to make the rendering position more accurate, key points of the human hand can be added, at this time, a virtual object can be set to be mounted on some key points of the human hand, in one implementation manner, 3 points can be set on the virtual object, the 3 points correspond to the 3 key points of the human hand, and the rendering position of the virtual object can be determined through the corresponding relation.
The attributes of the animation define display attributes of the animation, such as size, rotation direction, playing behavior, nodes of the animation, and the like, of course, in practice, any attribute that can control the shape, playing, trajectory, and the like of the animation can be applied to the present disclosure, rather than the animation attributes listed in the above examples, which are listed as typical animation attributes for ease of understanding. For ease of understanding, the following specifically describes an example of association of the above-described typical animation attribute with human hand information.
In step S103, the positions of the left and right hands can be obtained, the motions of the left and right hands are recorded, and when the motions of the left and right hands merging to the middle are recognized, the distance between the left and right hands is calculated to find the size parameter of the animation corresponding to the distance
The hand information obtained in step S103 includes angle information of the hand, and when it is recognized that the angle of the hand changes, the rotation direction and the rotation angle of the animation corresponding to the angle can be searched according to the angle of the hand.
In step S103, the motion of the human hand can be recognized, and when the human hand is recognized to rotate clockwise, the animation is controlled to play in the forward direction; when the human hand is recognized to rotate anticlockwise, the animation is controlled to play reversely. Or when the human hand is recognized to slide transversely, the playing speed of the animation can be controlled according to the sliding speed of the human hand.
In one embodiment, the type of the virtual object needs to be determined first, and the type of the virtual object can be obtained at the same time when the virtual object is obtained in step S101. At this time, the animation configuration parameters may be obtained according to the type of the virtual object and the motion, and the animation configuration parameters are used for rendering the animation. If the virtual object type is a model type, acquiring animation configuration parameters corresponding to the action, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or animation nodes of the virtual object; and if the virtual object type is an animation type, acquiring animation configuration parameters corresponding to the action, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or the attribute of the animation of the virtual object. Of course, in practical application, the type of the virtual object may not be determined, and each human hand information may be corresponding to a unique animation parameter, so that only the human hand information capable of controlling the animation of the virtual object acts on different types of virtual objects, and the identification process can be simplified to a certain extent. For example, for a virtual object of an animation type, the playing of the animation may be controlled using human hand motions, such as when a human hand is recognized to make a lateral slide, the playing speed of the animation may be controlled according to the sliding speed of the human hand; for the model type virtual object, the animation node of the virtual object can be determined according to the motion track of the human hand action, the motion track of the virtual object is generated through the animation node, and the motion animation of the virtual object is generated according to the motion track. For example, the virtual object is a bird, and when the trajectory of the hand in the air is recognized as the character "8", an animation that the bird flies in the air with the trajectory "8" can be generated.
In another embodiment, the two different types of animation generation manners may be combined, for example, a cloud effect with an animation effect itself may be formed, and the cloud effect may change from white cloud to black cloud to rain cloud, so as to form a section of animation.
It should be noted that the animation configuration parameters obtained in this step may further include rendering parameters, which define how the animation and/or the human hand renders, and the rendering parameters will be specifically described below and will not be described herein again.
The description in this step is merely for the purpose of illustrating the process and manner of obtaining animation configuration parameters and does not constitute a limitation of the present disclosure. In fact, the core of this step is to obtain the animation configuration parameters corresponding to the hand information identified in step S103, and as to what kind of hand information corresponds to what kind of animation parameters, the present disclosure is not limited.
Step S105, generating the animation related to the virtual object according to the animation configuration parameters.
In this embodiment, the virtual object acquired in step S101 is processed to be an animation related to the virtual object according to the animation configuration parameters acquired in step S104.
For example, when the obtained animation configuration parameter is the playing speed, the playing speed parameter is used to control the playing speed of the animation, for example, if the obtained animation configuration parameter is that the playing speed is 2 times of the normal speed, the animation is sampled once every other frame from the initial frame of the animation, so as to obtain the effect of doubling the playing speed; for example, if the obtained animation configuration parameter is 0.5 times of the normal speed, starting from the start frame of the animation, each frame is played twice repeatedly and then the next frame is played, so as to obtain the effect of slowing down the playing speed.
For the parameter for generating the moving animation of the virtual object, generally, the positions of key points of the human hand, for example, a weighted average position of 3 keys in the human hand may be selected as a node of the animation, and in each frame of the human hand motion, the virtual object is rendered at the position of the animation node to form the moving animation of the virtual object. In order to increase the diversity, the bezier curve may also be used to generate an animation effect of the virtual object, and the nodes of the animation are used as key points of the bezier curve and substituted into the bezier curve formula to calculate the animation curve of the virtual object, and the specific calculation process is not repeated.
The description in this step is merely for the purpose of generating animation processes and ways and does not constitute a limitation of the present disclosure. In fact, the core of this step is to control or generate an animation according to the animation configuration parameters obtained in step S104, and as for a specific generation process, any specific generation manner in the art may be used, and this disclosure is not limited in particular.
The embodiment of the disclosure provides an animation generation method and device, electronic equipment and a computer-readable storage medium. The animation generation method comprises the following steps: acquiring a virtual object; acquiring a video acquired by an image sensor; identifying the hands in the video to obtain hand information; acquiring animation configuration parameters according to the hand information; and generating the animation related to the virtual object according to the animation configuration parameters. The configuration parameters of the animation are determined by acquiring the information of the human hand, so that the effect of the animation is related to the human hand, and the technical problem that the configuration or generation mode of the animation is not flexible in the prior art is solved.
As shown in fig. 2, in another embodiment of the animation generation method of the present disclosure, the step S104 of obtaining animation configuration parameters according to the human hand information includes:
step S201, reading an animation behavior configuration file;
step S202, the animation configuration parameters are obtained from the animation behavior configuration file according to the hand information.
The animation behavior configuration file can also comprise rendering parameters besides animation configuration parameters so as to enable the animation and the mixed image of the human hand to be more diverse.
The animation behavior configuration file stores the corresponding relationship between the hand information and animation configuration parameters, and the corresponding relationship can be a direct corresponding relationship, such as the corresponding relationship between the hand motion and the playing speed, and the playing speed corresponding to the hand motion is directly determined in a table look-up manner; the corresponding relationship may also be indirect, for example, the animation behavior configuration file stores a playing speed function corresponding to the motion of a human hand, and the playing speed may be calculated according to the direction or speed of the motion of the human hand. The correspondence relationship between the human hand information and the animation configuration parameters is not particularly limited, and in short, any method may be applied to the present disclosure as long as the animation configuration parameters can be obtained from the information stored in the animation behavior configuration file through the human hand information.
In this embodiment, for a virtual object of an animation type, a saving path of a sequence frame of the virtual object is saved in the animation behavior configuration file, a name or an ID of the virtual object is obtained in step S101, a sequence frame of the virtual object can be obtained in the configuration file according to the name or the ID, and all the sequence frames can form a complete virtual object. Specifically, parameters "range" [ idx _ start, idx _ end ] can be set in the animation behavior configuration file, which represent a continuous file starting from the idx _ start to the idx _ end in the list of files, and form the sequence frame; or setting parameters' idx0, idx1, … …, indicating the file idx0, idx1, … …, etc. in the list of files, and composing the sequence of frames in order.
The animation behavior configuration file also comprises associated parameters of the positions of the virtual objects, the associated parameters describe which hand key points are associated with the sequence frame, all key points can be associated by default, and a plurality of key points can be set to follow. In addition to the association parameters, the animation behavior configuration file also includes a position relationship parameter "point" of the virtual object and the key point, two groups of association points may be included in the "point" and "point0" represents a first group of association points, and "point1" represents a second group. For each group of associated points, "point" describes the anchor point position in the camera, and is obtained by calculating weighted average of a plurality of groups of key points and weights thereof; the sequence number of the key point is described by using the idx field, and for a human hand including the detection box, "toplex", "topright", "bottomleft" and "bottomright" can be used respectivelyThe corresponding hands are externally connected with four corners of the detection frame (or four corners of a screen of the foreground). For example, 4 key points of the virtual object following the human hand are set, namely key points No. 9, No. 10, No. 11 and No. 12, and the weight of each key point is 0.25, wherein the coordinate of each key point is (X) respectively9,Y9),(X10,Y10),(X11,Y11),(X12,Y12) Then, the X-axis coordinate of the anchor point followed by the virtual object can be obtained as Xa=X9*0.25+X10*0.25+X11*0.25+X120.25, the Y-axis coordinate of the anchor point is Ya=Y9*0.25+Y10*0.25+Y11*0.25+Y12*0.25. It is understood that any one set of association points may be included in "point" and is not limited to two sets. In the above specific example, two anchor points may be obtained, and the virtual object moves following the positions of the two anchor points. In practice, however, there may be more than two anchor points, depending on the number of sets of association points used. The coordinates of each key point can be obtained from the human hand information acquired in step S103.
The animation behavior configuration file may further include a relationship between a scaling degree of the virtual object and the key point, and the scaling requirements in the x and y directions are described by using parameters "scaleX" and "scaleY", respectively. For each direction, two parameters "start _ idx" and "end _ idx" are included, which correspond to two keypoints, and the distance between the two keypoints is multiplied by the value of "factor" to obtain the scaled intensity. The factor is a preset value, and may be any value. For zooming, if there is only one set of association points "point0" in "position", then the x-direction is the actual horizontal right direction; the y direction is an actual vertical downward direction; both "scaleX" and "scaleY" will be in effect, and if either is missing, the scaling is done in accordance with the parameter that exists, keeping the virtual object original aspect ratio. If "point0" and "point1" in "position" both exist, then the x direction is the vector direction obtained by point1.anchor-point0. anchor; the y direction is determined by clockwise rotation of 90 degrees from the x direction; "scaleX" is invalid and the scaling in the x-direction is determined by anchor point following. The 'scaleY' will take effect, if the 'scaleY' is missing, the original aspect ratio of the virtual object is kept for scaling.
The animation behavior configuration file may further include a rotation parameter "rotationtype" of the virtual object, which is effective only when there is only "point0" in the "position", and may include two values, i.e. 0 and 1, where: 0: rotation is not required; 1: it needs to rotate according to the relevant angle value of the key point.
The animation behavior configuration file may further include a rendering blending mode, where the rendering blending refers to blending two colors together, specifically, in the present disclosure, a color at a certain pixel position and a color to be drawn are blended together, so as to achieve a special effect, and the rendering blending mode refers to a mode used for blending, generally, the blending mode refers to calculating a source color and a target color to obtain a blended color, and in practical applications, a result obtained by multiplying the source color by a source factor and a result obtained by multiplying the target color by a target factor are often calculated to obtain a blended color, for example, the calculation is an addition, so that BLENDcolor is SRC _ color _ SCR _ factor + DST _ color _ DST _ factor, where SCR _ factor is equal to or greater than 0 and is equal to or less than 1, and DST _ factor is equal to or less than 0 and is equal to or less than 1. According to the above operation formula, it is assumed that the four components (red, green, blue, alpha value) of the source color are (Rs, Gs, Bs, As), the four components of the target color are (Rd, Gd, Bd, Ad), the source factor is (Sr, Sg, Sb, Sa), and the target factor is (Dr, Dg, Db, Da). The new color resulting from the mixing can be expressed as: (Rs Sr + Rd + Dr, Gs + Sg + Gd + Dg, Bs + Sb + Bd + Db, As + Sa + Ad + Da), wherein alpha value represents transparency, and 0 is not less than alpha and not more than 1. The above mixing method is only an example, and in practical applications, the mixing method can be defined or selected by itself, and the calculation can be addition, subtraction, multiplication, division, larger of the two, smaller of the two, and logical operation (sum, or, xor, etc.). The above mixing method is only an example, and in practical applications, the mixing method can be defined or selected by itself, and the calculation can be addition, subtraction, multiplication, division, larger of the two, smaller of the two, and logical operation (sum, or, xor, etc.).
The animation behavior configuration file can further comprise a rendering sequence, wherein the rendering sequence comprises two levels, one level is a rendering sequence between sequential frames of the virtual objects, the rendering sequence can be defined by using a parameter "zorder", and the smaller the value of the "zorder", the earlier the rendering sequence is represented; the second level is the rendering order between the virtual objects and the human hand, which can be determined in various ways, and typically, a human-first rendering or a virtual object-first rendering can be directly set, in a manner similar to "zorder". In an embodiment, the rendering order may also be determined by using a depth test, where the depth test specifically refers to setting a depth buffer corresponding to the color buffer, the depth buffer storing depth information of pixels, and the color buffer storing color information of pixels, when determining whether to draw a surface of an object, first comparing depth values of pixels corresponding to the surface with values stored in the depth buffer, and if the depth values are greater than or equal to a median value in the depth buffer, discarding the part; otherwise, the depth buffer area and the color buffer area are respectively updated by using the depth value and the color value corresponding to the pixel. This process is called Depth Testing. Before drawing the scene, when the color buffer is cleared, the depth buffer is cleared, when the depth buffer is cleared, the value of the depth buffer is set to 1, the maximum depth value is represented, the depth value ranges between [0,1], the smaller the value is, the closer the scene is to the observer, and the larger the value is, the farther the scene is from the observer. When the depth test is started, a comparison function of the depth test is also needed to be set, and a typical function is as follows: DF _ ALWAYS, ALWAYS pass the test, the same as the depth test is not started at this time, ALWAYS use the depth value and color value of the current pixel to update the depth buffer area and the color buffer area; DF _ NEVER, always fails the test, at this time the values in the depth buffer and color buffer are kept, i.e. any pixel will not be drawn on the screen; DF _ left, passed when current depth value < stored depth value; DF _ EQUAL, which passes when the current depth value is the stored depth value; DF _ LEQUAL, passing when the current depth value is less than or equal to the stored depth value; DF _ coarse, passed when current depth value > stored depth value; DF _ NOTEQUAL, which is passed when the current depth value is not equal to the stored depth value; DF _ GEQUAL, which is passed when current depth value > -stored depth value. The depth writing is associated with depth testing, and generally if the depth testing is started and the result of the depth testing is likely to update the value of the depth buffer, the depth writing needs to be started so as to update the value of the depth buffer. The following illustrates an image rendering process during the opening depth test and the depth writing, assuming that two color blocks are to be rendered, which are red and yellow, respectively, in the rendering queue, the red block is before the yellow block, the depth value of the red block is 0.5, the depth value of the yellow block is 0.2, the depth test comparison function used is DF _ leval, at this time, 0.5 is written into the depth buffer first, red is written into the color buffer, then when yellow is rendered, 0.2 < 0.5 is obtained through the comparison function, through the test, the value of the depth buffer is updated to 0.2, and the color buffer is updated to yellow, that is, because the depth of yellow is lighter, the color needs to be covered to the red with deeper depth. The rendering order of the human hand and the virtual object can be determined by using the method to form the effect of the composite image.
Further, before step S201, step S2001 may be further included: and acquiring an animation behavior configuration file corresponding to the type according to the type of the virtual object. In this step, the types of the virtual objects can be classified, and different animation behavior configuration files are obtained for different types of virtual objects, so that the efficiency of reading animation configuration parameters in the next step is higher.
Further, before step S201, step S2002 may be further included: and setting an animation behavior configuration file, and setting animation configuration parameters in the configuration file. In this step, animation configuration parameters of the animation behavior configuration file may be configured, where the animation configuration parameters may further include rendering parameters.
For ease of understanding, reference is made to fig. 2b-2g, which are specific examples of an animation generation method disclosed in the present disclosure. Referring to fig. 2b, in the initial state, no motion of any human hand is detected for a video frame in the video captured by the image sensor, so that no virtual object appears. Referring to fig. 2c and 2d, in the two frames of images, the circling motion of the human hand is detected, and at this time, a virtual object, namely a luminous track is triggered, and as shown in fig. 2e-2g, the luminous track makes a circling animation of the same track according to the motion track of the human hand.
Fig. 3 is a schematic structural diagram of a first embodiment of an animation generation apparatus 30 according to an embodiment of the disclosure, and as shown in fig. 3, the apparatus includes: the system comprises a virtual object acquisition module 31, a video acquisition module 32, a human-hand recognition module 33, an animation configuration parameter acquisition module 34 and an animation generation module 35. Wherein the content of the first and second substances,
a virtual object acquisition module 31 for acquiring a virtual object;
the video acquisition module 32 is used for acquiring a video acquired by the image sensor;
the hand recognition module 33 is used for recognizing the hands in the video to obtain hand information;
an animation configuration parameter obtaining module 34, configured to obtain animation configuration parameters according to the human hand information;
and the animation generation module 35 is configured to generate an animation related to the virtual object according to the animation configuration parameter.
Further, the hand recognition module 33 includes:
the first identification module is used for identifying human hands in the video;
the recording module is used for recording the motion track of the human hand;
the analysis and identification module is used for analyzing the motion trail and identifying the motion trail as a preset action;
and the human hand information output module is used for taking the action as human hand information.
Further, the animation configuration parameter obtaining module 34:
and the animation configuration parameters are used for obtaining the animation configuration parameters according to the type of the virtual object and the action, and the animation configuration parameters are used for rendering the animation.
Further, the virtual object type is an animation type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or the attributes of the animation of the virtual object.
Further, the virtual object type is a model type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or animation nodes of the virtual object.
Further, the hand recognition module 33 includes:
the identification result data acquisition module is used for identifying the human hand in the video and acquiring identification result data;
the recognition result data processing module is used for carrying out smoothing and coordinate normalization processing on the recognition result data to obtain a processed hand;
and the first hand information acquisition module is used for acquiring the hand information according to the processed hand.
Further, the animation generation module 35:
and the animation configuration module is used for calculating the rendering position and the animation attribute of the virtual object according to the animation configuration parameters and generating the animation of the virtual object.
The apparatus shown in fig. 3 can perform the method of the embodiment shown in fig. 1, and reference may be made to the related description of the embodiment shown in fig. 1 for a part of this embodiment that is not described in detail. The implementation process and technical effect of the technical solution refer to the description in the embodiment shown in fig. 1, and are not described herein again.
In a second embodiment of the animation generating apparatus provided in the embodiment of the present disclosure, as shown in fig. 4, the animation configuration parameter obtaining module 34 further includes: a reading module 41, configured to read an animation behavior configuration file, where animation configuration parameters associated with the hand information are stored in the animation behavior configuration file; a first obtaining module 42, configured to obtain the animation configuration parameters from the animation behavior configuration file according to the human hand information.
In this embodiment, the rendering information obtaining module 34 may further include: and a second obtaining module 43, configured to obtain, according to the type of the virtual object, an animation behavior configuration file corresponding to the type.
In this embodiment, the rendering information obtaining module 34 may further include: and an animation behavior configuration file setting module 44, configured to set an animation behavior configuration file, and set animation configuration parameters in the configuration file.
The apparatus in the second embodiment can perform the method of the embodiment shown in fig. 2, and reference may be made to the related description of the embodiment shown in fig. 2 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the description in the embodiment shown in fig. 2, and are not described herein again.
Fig. 5 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, an electronic device 50 according to an embodiment of the present disclosure includes a memory 51 and a processor 52.
The memory 51 is used to store non-transitory computer readable instructions. In particular, memory 51 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc.
The processor 52 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 50 to perform desired functions. In one embodiment of the present disclosure, the processor 52 is configured to execute the computer readable instructions stored in the memory 51, so that the electronic device 50 performs all or part of the steps of the animation generation method according to the embodiments of the present disclosure.
Those skilled in the art should understand that, in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus, an interface, and the like, and these well-known structures should also be included in the protection scope of the present invention.
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
Fig. 6 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. As shown in fig. 6, a computer-readable storage medium 60, having non-transitory computer-readable instructions 61 stored thereon, in accordance with an embodiment of the present disclosure. When executed by a processor, the non-transitory computer readable instructions 61 perform all or part of the steps of the animation generation method of the embodiments of the disclosure described above.
The computer-readable storage medium 60 includes, but is not limited to: optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or removable disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROMs (e.g., ROM cartridges).
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
Fig. 7 is a diagram illustrating a hardware structure of a terminal device according to an embodiment of the present disclosure. As shown in fig. 7, the animation generation terminal 70 includes the animation generation apparatus embodiment described above.
The terminal device may be implemented in various forms, and the terminal device in the present disclosure may include, but is not limited to, mobile terminal devices such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation apparatus, a vehicle-mounted terminal device, a vehicle-mounted display terminal, a vehicle-mounted electronic rear view mirror, and the like, and fixed terminal devices such as a digital TV, a desktop computer, and the like.
The terminal may also include other components as equivalent alternative embodiments. As shown in fig. 7, the animation generating terminal 70 may include a power supply unit 71, a wireless communication unit 72, an a/V (audio/video) input unit 73, a user input unit 74, a sensing unit 75, an interface unit 76, a controller 77, an output unit 78, a storage unit 79, and the like. Fig. 7 shows a terminal having various components, but it is to be understood that not all of the shown components are required to be implemented, and that more or fewer components may alternatively be implemented.
The wireless communication unit 72 allows, among other things, radio communication between the terminal 70 and a wireless communication system or network. The a/V input unit 73 is for receiving an audio or video signal. The user input unit 74 may generate key input data to control various operations of the terminal device according to a command input by a user. The sensing unit 75 detects a current state of the terminal 70, a position of the terminal 70, presence or absence of a touch input of the user to the terminal 70, an orientation of the terminal 70, acceleration or deceleration movement and direction of the terminal 70, and the like, and generates a command or signal for controlling an operation of the terminal 70. The interface unit 76 serves as an interface through which at least one external device is connected to the terminal 70. The output unit 78 is configured to provide output signals in a visual, audio, and/or tactile manner. The storage unit 79 may store software programs or the like for processing and controlling operations performed by the controller 77, or may temporarily store data that has been output or is to be output. The storage unit 79 may include at least one type of storage medium. Also, the terminal 70 may cooperate with a network storage device that performs a storage function of the storage unit 79 through a network connection. The controller 77 generally controls the overall operation of the terminal device. In addition, the controller 77 may include a multimedia module for reproducing or playing back multimedia data. The controller 77 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image. The power supply unit 71 receives external power or internal power and supplies appropriate power required to operate the respective elements and components under the control of the controller 77.
Various embodiments of the animation generation methods presented in this disclosure may be implemented using a computer-readable medium, such as computer software, hardware, or any combination thereof. For a hardware implementation, various embodiments of the animation generation method proposed by the present disclosure may be implemented by using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, various embodiments of the animation generation method proposed by the present disclosure may be implemented in the controller 77. For software implementations, various embodiments of the animation generation method presented in the present disclosure may be implemented with separate software modules that allow at least one function or operation to be performed. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory unit 79 and executed by the controller 77.
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
Also, as used herein, "or" as used in a list of items beginning with "at least one" indicates a separate list, such that, for example, a list of "A, B or at least one of C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the described example is preferred or better than other examples.
It is also noted that in the systems and methods of the present disclosure, components or steps may be decomposed and/or re-combined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
Various changes, substitutions and alterations to the techniques described herein may be made without departing from the techniques of the teachings as defined by the appended claims. Moreover, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. Processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.
Claims (13)
1.An animation generation method, comprising:
acquiring a virtual object;
acquiring a video acquired by an image sensor;
identifying the hands in the video to obtain hand information;
acquiring animation configuration parameters according to the hand information;
and generating the animation related to the virtual object according to the animation configuration parameters.
2. The animation generation method as claimed in claim 1, wherein the recognizing a human hand in the video to obtain human hand information comprises:
identifying a human hand in the video;
recording the motion trail of the human hand;
analyzing the motion trail and recognizing the motion trail as a preset action;
and taking the action as human hand information.
3. The animation generation method as claimed in claim 2, wherein said obtaining animation configuration parameters based on said human hand information comprises:
and acquiring the animation configuration parameters according to the type of the virtual object and the action, wherein the animation configuration parameters are used for rendering the animation.
4. A method of generating animation as claimed in claim 3, characterized by:
and the virtual object type is an animation type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or the attribute of the animation of the virtual object.
5. A method of generating animation as claimed in claim 3, characterized by:
and the virtual object type is a model type, and animation configuration parameters corresponding to the action are obtained, wherein the animation configuration parameters are used for controlling the rendering position of the virtual object and/or animation nodes of the virtual object.
6. The animation generation method as claimed in claim 1, wherein the acquiring animation configuration parameters based on the human hand information comprises:
reading an animation behavior configuration file, wherein animation configuration parameters related to the hand information are stored in the animation behavior configuration file;
and acquiring the animation configuration parameters from the animation behavior configuration file according to the hand information.
7. The animation generation method as recited in claim 6, further comprising, prior to the reading the animation behavior profile:
and acquiring an animation behavior configuration file corresponding to the type according to the type of the virtual object.
8. The animation generation method as recited in claim 6, further comprising, prior to the reading the animation behavior profile:
and setting an animation behavior configuration file, and setting animation configuration parameters in the configuration file.
9. The animation generation method as claimed in claim 1, wherein the recognizing a human hand in the video to obtain human hand information comprises:
identifying the human hand in the video to obtain identification result data;
carrying out smoothing and coordinate normalization processing on the identification result data to obtain a processed human hand;
and obtaining the hand information according to the processed hand.
10. The animation generation method as claimed in claim 1, wherein generating the animation associated with the virtual object according to the animation configuration parameters comprises:
and calculating the rendering position and the animation attribute of the virtual object according to the animation configuration parameters to generate the animation of the virtual object.
11. An animation generation device, comprising:
the virtual object acquisition module is used for acquiring a virtual object;
the video acquisition module is used for acquiring a video acquired by the image sensor;
the human hand recognition module is used for recognizing human hands in the video to obtain human hand information;
the animation configuration parameter acquisition module is used for acquiring animation configuration parameters according to the hand information;
and the animation generation module is used for generating the animation related to the virtual object according to the animation configuration parameters.
12. An electronic device, comprising:
a memory for storing non-transitory computer readable instructions; and
a processor for executing the computer readable instructions such that the processor when executing implements the animation generation method according to any of claims 1-10.
13. A computer-readable storage medium storing non-transitory computer-readable instructions that, when executed by a computer, cause the computer to perform the animation generation method of any of claims 1-10.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810975738.8A CN110858409A (en) | 2018-08-24 | 2018-08-24 | Animation generation method and device |
PCT/CN2018/123648 WO2020037924A1 (en) | 2018-08-24 | 2018-12-25 | Animation generation method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810975738.8A CN110858409A (en) | 2018-08-24 | 2018-08-24 | Animation generation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110858409A true CN110858409A (en) | 2020-03-03 |
Family
ID=69592192
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810975738.8A Pending CN110858409A (en) | 2018-08-24 | 2018-08-24 | Animation generation method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110858409A (en) |
WO (1) | WO2020037924A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111369687A (en) * | 2020-03-04 | 2020-07-03 | 腾讯科技(深圳)有限公司 | Method and device for synthesizing action sequence of virtual object |
WO2022227909A1 (en) * | 2021-04-25 | 2022-11-03 | 北京字跳网络技术有限公司 | Method and apparatus for adding animation to video, and device and medium |
WO2023097967A1 (en) * | 2021-11-30 | 2023-06-08 | 上海商汤智能科技有限公司 | Action detection method and apparatus, device, storage medium, and computer program product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123007A (en) * | 2014-07-29 | 2014-10-29 | 电子科技大学 | Multidimensional weighted 3D recognition method for dynamic gestures |
CN104474701A (en) * | 2014-11-20 | 2015-04-01 | 杭州电子科技大学 | Interactive system for promoting Taijiquan |
CN107707839A (en) * | 2017-09-11 | 2018-02-16 | 广东欧珀移动通信有限公司 | Image processing method and device |
CN107911614A (en) * | 2017-12-25 | 2018-04-13 | 腾讯数码(天津)有限公司 | A kind of image capturing method based on gesture, device and storage medium |
CN108388434A (en) * | 2018-02-08 | 2018-08-10 | 北京市商汤科技开发有限公司 | The generation of special efficacy program file packet and special efficacy generation method and device, electronic equipment |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105045373B (en) * | 2015-03-26 | 2018-01-09 | 济南大学 | A kind of three-dimension gesture exchange method of user oriented mental model expression |
CN105389005A (en) * | 2015-10-27 | 2016-03-09 | 武汉体育学院 | Three-dimensional interactive display method for twenty-four-form Tai Chi Chuan |
CN106709464B (en) * | 2016-12-29 | 2019-12-10 | 华中师范大学 | Tujia brocade skill limb and hand motion collection and integration method |
CN107024989A (en) * | 2017-03-24 | 2017-08-08 | 中北大学 | A kind of husky method for making picture based on Leap Motion gesture identifications |
CN107995097A (en) * | 2017-11-22 | 2018-05-04 | 吴东辉 | A kind of method and system of interaction AR red packets |
-
2018
- 2018-08-24 CN CN201810975738.8A patent/CN110858409A/en active Pending
- 2018-12-25 WO PCT/CN2018/123648 patent/WO2020037924A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123007A (en) * | 2014-07-29 | 2014-10-29 | 电子科技大学 | Multidimensional weighted 3D recognition method for dynamic gestures |
CN104474701A (en) * | 2014-11-20 | 2015-04-01 | 杭州电子科技大学 | Interactive system for promoting Taijiquan |
CN107707839A (en) * | 2017-09-11 | 2018-02-16 | 广东欧珀移动通信有限公司 | Image processing method and device |
CN107911614A (en) * | 2017-12-25 | 2018-04-13 | 腾讯数码(天津)有限公司 | A kind of image capturing method based on gesture, device and storage medium |
CN108388434A (en) * | 2018-02-08 | 2018-08-10 | 北京市商汤科技开发有限公司 | The generation of special efficacy program file packet and special efficacy generation method and device, electronic equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111369687A (en) * | 2020-03-04 | 2020-07-03 | 腾讯科技(深圳)有限公司 | Method and device for synthesizing action sequence of virtual object |
US11978142B2 (en) | 2020-03-04 | 2024-05-07 | Tencent America LLC | Method and device for synthesizing motion sequence of virtual object |
WO2022227909A1 (en) * | 2021-04-25 | 2022-11-03 | 北京字跳网络技术有限公司 | Method and apparatus for adding animation to video, and device and medium |
WO2023097967A1 (en) * | 2021-11-30 | 2023-06-08 | 上海商汤智能科技有限公司 | Action detection method and apparatus, device, storage medium, and computer program product |
Also Published As
Publication number | Publication date |
---|---|
WO2020037924A1 (en) | 2020-02-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110517319B (en) | Method for determining camera attitude information and related device | |
CN110072046B (en) | Image synthesis method and device | |
CN111243093B (en) | Three-dimensional face grid generation method, device, equipment and storage medium | |
CN108986016B (en) | Image beautifying method and device and electronic equipment | |
Wang et al. | Multi-cue based tracking | |
CN108830892B (en) | Face image processing method and device, electronic equipment and computer readable storage medium | |
US8983184B2 (en) | Vision image information storage system and method thereof, and recording medium having recorded program for implementing method | |
WO2017119940A1 (en) | Hand gesture recognition for cursor control | |
CN104508680B (en) | Improved video signal is tracked | |
KR20150108888A (en) | Part and state detection for gesture recognition | |
CN104583902A (en) | Improved identification of a gesture | |
CN110069125B (en) | Virtual object control method and device | |
US11282257B2 (en) | Pose selection and animation of characters using video data and training techniques | |
CN110858409A (en) | Animation generation method and device | |
CN112308977B (en) | Video processing method, video processing device, and storage medium | |
CN111199169A (en) | Image processing method and device | |
US10440313B2 (en) | Method, system and apparatus for spatially arranging a plurality of video frames for display | |
CN114390201A (en) | Focusing method and device thereof | |
WO2020001016A1 (en) | Moving image generation method and apparatus, and electronic device and computer-readable storage medium | |
CN110069126B (en) | Virtual object control method and device | |
Akman et al. | Multi-cue hand detection and tracking for a head-mounted augmented reality system | |
US20210158565A1 (en) | Pose selection and animation of characters using video data and training techniques | |
CN110941327A (en) | Virtual object display method and device | |
CN111258413A (en) | Control method and device of virtual object | |
CN108989681A (en) | Panorama image generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |