WO2020037924A1 - Animation generation method and apparatus - Google Patents

Animation generation method and apparatus Download PDF

Info

Publication number
WO2020037924A1
WO2020037924A1 PCT/CN2018/123648 CN2018123648W WO2020037924A1 WO 2020037924 A1 WO2020037924 A1 WO 2020037924A1 CN 2018123648 W CN2018123648 W CN 2018123648W WO 2020037924 A1 WO2020037924 A1 WO 2020037924A1
Authority
WO
WIPO (PCT)
Prior art keywords
animation
human hand
virtual object
generating
video
Prior art date
Application number
PCT/CN2018/123648
Other languages
French (fr)
Chinese (zh)
Inventor
杨辉
王沈韬
胡博远
Original Assignee
北京微播视界科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 北京微播视界科技有限公司 filed Critical 北京微播视界科技有限公司
Publication of WO2020037924A1 publication Critical patent/WO2020037924A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person

Definitions

  • the present disclosure relates to the field of image processing, and in particular, to a method, a device, an electronic device, and a computer-readable storage medium for generating an animation.
  • smart terminals can listen to music, play games, chat on the Internet, and take pictures.
  • the camera pixels have reached more than 10 million pixels, which has higher resolution and is comparable to that of professional cameras.
  • an additional function can be achieved by downloading an application (Application, abbreviated as APP) from the network side.
  • APP Application, abbreviated as APP
  • an app that can implement functions such as dark light detection, beauty camera and super pixel.
  • the beauty functions of smart terminals usually include beauty treatment effects such as skin tone adjustment, microdermabrasion, big eyes, and thin face, which can perform the same degree of beauty treatment on all faces that have been identified in the image.
  • APPs that can implement simple animation functions, such as displaying a section of animation at a fixed position on the screen.
  • the current animation function can only be displayed at a fixed position and time. If you need to change the display or playback properties of the animation, you need to directly modify the animation itself, so the control of the animation is very inflexible.
  • an embodiment of the present disclosure provides a method for generating an animation, including: obtaining a virtual object; obtaining a video collected by an image sensor; identifying a human hand in the video to obtain human hand information; and acquiring animation configuration parameters according to the human hand information Generating an animation related to the virtual object according to the animation configuration parameters.
  • the step of identifying the human hand in the video and obtaining the human hand information includes: identifying the human hand in the video; recording the motion trajectory of the human hand; analyzing the motion trajectory, and identifying the motion trajectory as a predetermined action Taking the action as human information.
  • obtaining the animation configuration parameters according to the human hand information includes: 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 of the animation.
  • the type of the virtual object is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an attribute of the animation of the virtual object itself.
  • the type of the virtual object is a model type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an animation node of the virtual object.
  • obtaining the animation configuration parameters according to the human hand information includes reading an animation behavior configuration file, and the animation behavior configuration file stores an animation configuration parameter associated with the human hand information; Obtain the animation configuration parameters in the animation behavior configuration file.
  • the method further includes: obtaining an animation behavior configuration file corresponding to the type according to the type of the virtual object.
  • the method further includes: setting an animation behavior configuration file, and setting animation configuration parameters in the configuration file.
  • the step of identifying the human hand in the video to obtain the human hand information includes: identifying the human hand in the video to obtain the recognition result data; performing smoothing and coordinate normalization processing on the recognition result data to obtain the processed human hand Obtaining the manpower information according to the processed manpower.
  • generating the animation related to the virtual object according to the animation configuration parameter includes: calculating a rendering position and an animation attribute of the virtual object according to the animation configuration parameter, and generating an animation of the virtual object. .
  • an embodiment of the present disclosure provides an animation generating device, including: a virtual object acquisition module for acquiring a virtual object; a video acquisition module for acquiring a video captured by an image sensor; a human hand recognition module for identifying all The human hand in the video obtains the human hand information; the animation configuration parameter acquisition module is used to obtain the animation configuration parameters according to the human hand information; the animation generation module is used to generate the animation related to the virtual object according to the animation configuration parameters.
  • the human hand recognition module includes: a first recognition module for identifying a human hand in the video; a recording module for recording a movement trajectory of the human hand; an analysis recognition module for analyzing the movement trajectory, and Identifying the motion trajectory as a predetermined action; a human hand information output module, configured to use the action as human hand information.
  • the animation configuration parameter obtaining module is configured to obtain the animation configuration parameters according to the type of the virtual object and the action, and the animation configuration parameters are used for rendering of the animation.
  • the type of the virtual object is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an attribute of the animation of the virtual object itself.
  • the type of the virtual object is a model type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an animation node of the virtual object.
  • the animation configuration parameter acquisition module further includes a reading module for reading an animation behavior configuration file, and the animation behavior configuration file stores an animation configuration parameter associated with the human hand information; a first acquisition module For acquiring the animation configuration parameters from the animation behavior configuration file according to the human hand information.
  • the animation configuration parameter acquisition module further includes: a second acquisition module, configured to acquire an animation behavior configuration file corresponding to the type according to the type of the virtual object.
  • the animation configuration parameter acquisition module further includes: an animation behavior configuration file setting module, configured to set an animation behavior configuration file, and set an animation configuration parameter in the configuration file.
  • the human hand recognition module includes: a recognition result data acquisition module for recognizing a human hand in the video to obtain recognition result data; a recognition result data processing module for smoothing and coordinate normalizing the recognition result data
  • the first human hand information acquisition module is configured to obtain the human hand information according to the processed human hand.
  • the animation generating module is configured to calculate a rendering position and animation attributes of the virtual object according to the animation configuration parameters, and generate an animation of the virtual object.
  • an embodiment of the present disclosure provides an electronic device including: at least one processor; and,
  • a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processing
  • the processor is capable of performing any one of the foregoing animation generating methods.
  • an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the foregoing first aspect. Any one of the animation generation methods.
  • Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer-readable storage medium for generating an animation.
  • the animation generating method includes: obtaining a virtual object; obtaining a video collected by an image sensor; identifying a human hand in the video to obtain human hand information; obtaining an animation configuration parameter according to the human hand information; and generating and Animation related to the virtual object.
  • the embodiment of the present disclosure solves the technical problem of inflexible animation control in the prior art by adopting this technical solution.
  • FIG. 1 is a flowchart of Embodiment 1 of a method for generating an animation according to an embodiment of the present disclosure
  • FIG. 2a is a flowchart of step S104 in the second embodiment of the animation generating method according to the embodiment of the present disclosure
  • 2b-2g are schematic diagrams of specific examples of an animation generating method according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic structural diagram of a first embodiment of an animation generating apparatus according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of an animation configuration parameter obtaining module in the second embodiment of an animation generating device provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of an animation generating terminal according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart of Embodiment 1 of an animation generation method provided by an embodiment of the present disclosure.
  • the animation generation method provided by this embodiment may be executed by an animation generation device, and the animation generation device may be implemented as software or as software In combination with hardware, the animation generating device may be integrated in a certain device in the image processing system, such as an image processing server or an image processing terminal device. As shown in Figure 1, the method includes the following steps:
  • Step S101 Obtain a virtual object.
  • the virtual objects here can be any 2D or 3D virtual objects, typically virtual weapons such as virtual swords and virtual pistols, virtual stationery such as virtual pens and books, virtual gloves such as virtual gloves and virtual rings. Wearable items, etc., or virtual rainbows, clouds, etc., are not specifically limited here. Any virtual object can be introduced into this disclosure.
  • the virtual object can have types, such as an animation type virtual with an animation effect itself.
  • the object is typically an animation type virtual cloud, which itself has multiple sequence frames, presenting an animation effect from white cloud to dark cloud to rain cloud; or the virtual object may be a model type, such as the above-mentioned virtual sword, It does not have an animation effect, but it can form a section of animation effect by moving and other methods.
  • the type of the virtual object can be obtained.
  • the type of the virtual object can be obtained directly from the attribute data of the virtual object, or the ID of the virtual object is obtained, and the type and type of the ID are queried by the ID.
  • the obtaining method of the method is optional, and any method can be applied to the present disclosure.
  • Step S102 Obtain a video collected by the image sensor
  • Image sensors refer to various devices that can capture images. Typical image sensors are cameras, cameras, cameras, and so on.
  • the image sensor may be a camera on a mobile terminal, such as a front or rear camera on a smart phone, and the video image collected by the camera may be directly displayed on the display screen of the mobile phone.
  • the image video captured by the image sensor is used to further identify the image in the next step.
  • Step S103 identify the human hand in the video, and obtain the human hand information
  • color features can be used to locate the position of the human hand, segment the human hand from the background, and perform feature extraction and recognition on the found and segmented human hand image.
  • an image sensor is used to obtain the color information of the image and the position information of the color information; compare the color information with preset color information of the human hand; identify the first color information, and the first color information and the preset color information The error of the color information of the human hand is less than the first threshold; the position information of the first color information is used to form the outline of the human hand.
  • the image data of the RGB color space collected by the image sensor can be mapped to the HSV color space, and the information in the HSV color space is used as comparison information.
  • the HSV color space is used.
  • the hue value in the color is used as the color information, and the hue information is least affected by the brightness, which can well filter the interference of the brightness.
  • the position of the key points is accurately located on the image. Because the key points occupy only a very small area in the image (usually only a few to tens of pixels in size), the area occupied by the features corresponding to the key points on the image is also usually very limited and local.
  • the features currently used There are two extraction methods: (1) one-dimensional range image feature extraction along the vertical contour; (2) two-dimensional range image feature extraction of the key point square neighborhood.
  • ASM and AAM methods statistical energy function methods, regression analysis methods, deep learning methods, classifier methods, batch extraction methods, and so on.
  • the number of key points, accuracy, and speed used by the above various implementation methods are different, which are suitable for different application scenarios. Similarly, for other target objects, the same principle can be used to identify target objects.
  • a polygon is circled outside the outer contour of the human hand as an external detection frame of the human hand.
  • the external detection frame is used to replace the human hand and describe the position of the human hand.
  • a rectangle is used as an example.
  • the width at the widest part of the human hand and the length at the longest part can be calculated, and the external detection frame of the human hand can be identified with the width and length.
  • One way to calculate the longest and widest points of the human hand is to extract the key points of the border of the human hand, calculate the difference between the X coordinates of the two key points with the furthest X coordinate distances, and calculate the Y coordinate distance as the length of the rectangle.
  • the external detection frame can be set to the smallest circle covering the fist.
  • the center point of the external detection frame may be used as the position of the hand, and the center point of the external detection frame is the intersection of the diagonals of the external detection frame; the position of the fist may also be replaced by the circular center of the circle.
  • the hand information also includes the detected key points of the hand.
  • the number of the key points can be set.
  • the key points of the hand contour and joint key points can be set.
  • Each key point has a fixed number.
  • the order of the key points of the thumb joint, the index finger, the middle knuckle, the ring finger, and the little finger is numbered from top to bottom. In a typical application, the key points are 22, each Each key point has a fixed number.
  • the human hand information may also include human hand movements, which record the movement trajectory of the human hand, and analyze the movement trajectory to identify. Specifically, recording the motion trajectory of a human hand first needs to track the movement of the human hand.
  • the tracking of the human hand trajectory is to track the position change of a gesture in a sequence of pictures and obtain the position information of the human hand in continuous time.
  • the pros and cons of the tracking effect of human motion directly affect the effect of human motion recognition.
  • Commonly used motion tracking methods include particle filtering algorithms, Mean-shift algorithms, Kalman filtering methods, and bone tracking methods.
  • particle filtering-based target tracking is a random search process that obtains the posterior probability estimates of the target distribution in a random motion model.
  • Particle filtering is mainly divided into two steps: preliminary sampling and repeated sampling.
  • the initial sampling is to randomly place particles in an image, then calculate the similarity between each particle and the tracking target feature, and then obtain the weight of each particle.
  • the resampling phase mainly changes the distribution of particles based on the weight of the particles in the preliminary sampling.
  • the process of preliminary sampling and resampling is repeated until the target is tracked.
  • Mean-shift is a non-parametric probability density gradient estimation algorithm.
  • the basic idea of using Mean-shift algorithm to track human hands is: first to build a model of the human hand, that is, to calculate the probability of the feature value of the pixels belonging to the hand in the initial image frame in the feature space; then establish the current frame's The model calculates the eigenvalue probability of all pixels in the area where the human hand may exist. Finally, the mean hand drift is obtained by finding the similarity between the initial human hand model and the current hand human model. According to the convergence of the mean shift algorithm, the mean shift of the hand is calculated iteratively to achieve the goal of converging to the position of the hand in the current image frame.
  • Kalman filtering uses a series of mathematical equations to predict the state of a linear system, now or in the future.
  • Kalman filtering mainly observes the position information of the hand in a series of image frames, and then predicts the position of the hand in the next frame. Because the Kalman filter is based on the assumption of the posterior probability estimation of each time interval, the Kalman filter method can achieve better tracking results in the Gaussian distribution environment. This method can remove noise, and still achieve better hand tracking effect under gesture deformation.
  • Kinect can provide complete bone tracking for one or two users, that is, tracking of 20 joint points throughout the body. Skeletal point tracking is divided into active tracking and passive tracking. In the active tracking mode, two possible users are selected for tracking in the field of view. In the passive tracking mode, a maximum of 6 user bone points can be tracked, and the remaining four For position tracking only.
  • the principle of Kinect's bone tracking is to find the bone joint point information of each part by classifying and machine learning the 32 parts of the human body based on the acquired depth image.
  • a human hand motion trajectory tracking method based on bone tracking can be preferentially used in the present disclosure.
  • the movement distance of the key points of the human hand in two consecutive frames of images can be calculated.
  • the key points are considered The position of the key remains the same.
  • the preset positions of the key points are kept the same for several consecutive frames, the position of the hand is recognized as the starting point or end point of the human hand movement.
  • the threshold can be set to 1 cm.
  • the position of the human hand is used as the starting point or end point of the human hand action.
  • the positions of the key points in the image frames between the starting point and the end point can be calculated.
  • the trajectories formed by the key points in all the image frames are the movement trajectories of the human hand.
  • the human hand motion is output as human hand information to the next step.
  • the human hand information may further include an angle of the human hand, and the angle may include an angle of the human hand on the shooting plane, or an angle in space, or a combination of the two.
  • the angle can be described using an external detection frame.
  • the offset angle of the external detection frame with respect to the X axis can be calculated.
  • the degree of zoom of the external detection frame can be detected.
  • the rotation angle in space is determined according to the corresponding relationship between the zoom level and the angle. For example, when the palm is facing the camera, the detected external detection frame has the largest area. When the palm is rotated, the area of the external detection frame gradually decreases.
  • the relationship between the area reduction ratio and the angle can be set in advance, so that the rotation angle of the palm can be calculated by the area of the external detection frame.
  • the angle is not limited to this one in the embodiment. Any method that can determine 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.
  • the method before calculating the human hand information, further includes the steps of smoothing and coordinate normalizing the recognition data of the human hand.
  • the smoothing process may be averaging the images in multiple frames of video, and using the averaged image as the recognized image, corresponding to the human hand in the present disclosure, and identifying the human hand in the multi-frame image, After that, the hand image is weighted averaged, and the hand image obtained after the averaging is used as the identified hand, and the hand information is calculated. In this way, the human hand can be determined even when some frames are lost or the images identified by some frames are not very clear. Image and calculate the information of the human hand.
  • the coordinate normalization process is to unify the coordinate range.
  • the coordinates of the human hand image collected by the camera and the human hand image displayed on the display screen are not uniform.
  • a mapping relationship is required to map the large coordinate system to a small coordinate. tie up. After smoothing and normalization, the information of human hands is obtained.
  • Step S104 Obtain animation configuration parameters according to the human hand information.
  • the animation configuration parameters may include the rendering position of the virtual object and the attributes of the animation.
  • the rendering position of the virtual object may be related to the position of the human hand. For example, the position of the human hand is determined by the center 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 center point.
  • the center position of the object coincides with the center point of the external detection frame; or the rendering position of the virtual object may maintain a certain positional relationship with the center point, for example, the rendering position of the virtual object may be located in the positive direction of the center point on the Y axis 1
  • the position of each length unit, the length unit may be a custom length unit, for example, one length unit is equal to 1 cm, etc., and is not limited herein.
  • a certain relationship can be used to determine the rendering position of the virtual object, and the question of where the virtual object is displayed.
  • you can set 3 points on the virtual object These 3 points The points correspond to the three key points on the human hand. Through this correspondence, the rendering position of the virtual object can be determined.
  • the properties of the animation define the display properties of the animation, such as the size of the animation, the rotation direction, the playing behavior, the nodes of the animation, and so on.
  • the attributes of morphology, playback, trajectory, etc. can be applied to the present disclosure.
  • the above examples are just typical animation attributes listed for easy understanding. In order to facilitate understanding, the following specifically describes an example of the association between the typical animation attributes and human hand information.
  • step S103 the positions of the left and right hands can be obtained, and the actions of the left and right hands can be recorded.
  • the distance between the left and right hands is calculated to find the animation size parameter corresponding to the distance.
  • the human hand information obtained in the step S103 includes angle information of the human hand.
  • angle information of the human hand When it is recognized that the angle of the human hand changes, the rotation direction and rotation angle of the animation corresponding to the angle can be found according to the angle of the human hand.
  • step S103 human hand movements can be identified.
  • the animation is controlled to play forward; when the clockwise rotation of the human hand is recognized, the animation is controlled to play backward. Or when it is recognized that a human hand is sliding horizontally, the playback speed of the animation can be controlled according to the sliding speed of the human hand.
  • the type of the virtual object needs to be determined first, and the type of the virtual object may be obtained together when the virtual object is obtained in step S101.
  • the animation configuration parameters may be obtained according to the type of the virtual object and the action, and the animation configuration parameters are used for rendering of the animation. If the virtual object type is a model type, obtain animation configuration parameters corresponding to the action, and the animation configuration parameters are used to control a rendering position of the virtual object and / or an animation node of the virtual object; if the virtual object is The type is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or a property of the animation of the virtual object itself.
  • each person's hand information can correspond to a unique animation parameter.
  • the recognition process can be simplified to some extent.
  • an animation type virtual object you can use human hand motion to control the animation playback.
  • the animation playback speed when a person's hand is recognized to make a horizontal slide, you can control the animation playback speed according to the human hand's sliding speed.
  • a model type virtual object you can The animation node of the virtual object is determined according to the movement trajectory of the human hand movement, the movement trajectory of the virtual object is generated through the animation node, and the movement animation of the virtual object is generated according to the movement trajectory.
  • the virtual object is a bird. When it is recognized that the trajectory of the human hand in the air is "8", an animation of the bird flying in the air with the "8" trajectory can be generated.
  • the animation generation methods of the two different types of virtual objects can be combined, such as a cloud effect with an animation effect, which can change from white clouds to dark clouds to rain clouds to form a section of animation.
  • the speed of the animation can be set by the lateral sliding motion, and on the other hand, the cloud can be moved along the arc by the arc motion of the human hand to form a moving animation.
  • a floating animation that constantly changes the shape of the clouds.
  • the animation configuration parameters obtained in this step may further include rendering parameters, which define how the animation and / or human hands are rendered.
  • the rendering parameters will be specifically described below, and will not be repeated here.
  • this step is only for explaining the process and manner of obtaining animation configuration parameters, and does not constitute a limitation on the present disclosure.
  • the core of this step is to obtain the animation configuration parameters corresponding to the information based on the human hand information identified in step S103. As for what kind of human hand information corresponds to what kind of animation parameters, this disclosure does not limit it.
  • Step S105 Generate an animation related to the virtual object according to the animation configuration parameters.
  • the virtual object obtained in step S101 is processed according to the animation configuration parameters obtained in step S104 to perform animation related to the virtual object.
  • the obtained animation configuration parameter is the playback speed
  • the positions of key points of the human hand are generally used. For example, three key weighted average positions of the human hand can be selected as the nodes of the animation. In each frame of the human hand's motion, the positions are at the nodes of the animation. Position the virtual object to form a moving animation of the virtual object. In order to increase the diversity, you can also use Bezier curves to generate the animation effect of the virtual object. Use the nodes of the animation as the key points of the Bezier curve and bring them into the Bezier curve formula to calculate the animation curve of the virtual object. The calculation process is not repeated here.
  • this step is only for generating an animation process and manner, and does not constitute a limitation on the present disclosure.
  • the core of this step is to control or generate the animation according to the animation configuration parameters obtained in step S104.
  • any specific generation method in the art may be used, and the disclosure does not specifically limit it.
  • Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer-readable storage medium for generating an animation.
  • the animation generating method includes: obtaining a virtual object; obtaining a video collected by an image sensor; identifying a human hand in the video to obtain human hand information; obtaining an animation configuration parameter according to the human hand information; and generating and Animation related to the virtual object.
  • the embodiment of the present disclosure determines the configuration parameters of the animation by acquiring information of the human hand, so that the effect of the animation is related to the human hand, and solves the technical problem of inflexible configuration or generation of the animation in the prior art.
  • the step S104 obtaining animation configuration parameters according to the human hand information, including:
  • Step S201 Read an animation behavior configuration file
  • Step S202 Acquire the animation configuration parameters from the animation behavior configuration file according to the human hand information.
  • the animation behavior configuration file may include rendering parameters in addition to the animation configuration parameters to make the mixed image of the animation and the human hand more diverse.
  • the animation behavior configuration file stores a correspondence between the human hand information and animation configuration parameters, and the correspondence may be a direct correspondence relationship, such as a correspondence between a human hand movement and a playback speed. Corresponding playback speed; the corresponding relationship may also be indirect, for example, the animation speed configuration file stores a playback speed function corresponding to a human hand motion, and the playback speed may be calculated from the direction or speed of the human hand motion.
  • the correspondence between human hand information and animation configuration parameters There is no specific limitation on the correspondence between human hand information and animation configuration parameters. In short, as long as it is through human hand information, the manner in which the animation configuration parameters can be obtained from the information stored in the animation behavior configuration file can be applied. Into this disclosure.
  • a save path of a sequence frame of the virtual object is saved in the animation behavior configuration file, and the name or ID of the virtual object is obtained in step S101.
  • Sequence frames of virtual objects are obtained in the configuration file. All sequence frames can form a complete virtual object.
  • the parameter "range” can be set in the animation behavior configuration file: [idx_start, idx_end], which means that the continuous files from the idx_start to the idx_end in the list of files constitute the sequence frame; or the parameter "idx ": [idx0, idx1, ...], which means that the idx0, idx1, ... and other files in the file list form the sequence frame in order.
  • the animation behavior configuration file further includes association parameters of the position of the virtual object, and the association parameters describe which key points of the human hand are associated with the sequence frame. By default, all key points can be associated, and several key points can be set to follow.
  • the animation behavior configuration file also includes the position relationship parameter "point" of the virtual object and the key point. "Point” may include two groups of association points, "point0" represents the first group of association points, and “point1” represents Second Group. For each group of related points, "point” describes the position of the anchor point in the camera. It is obtained by weighting the average of several groups of key points and their weights. The "idx" field is used to describe the number of the key points.
  • point may include any group of related points, and is not limited to two groups.
  • two anchor points can be obtained, and the virtual object moves following the positions of the two anchor points.
  • the coordinates of each key point can be obtained from the human hand information obtained in step S103.
  • the animation behavior configuration file may further include the relationship between the zoom level of the virtual object and the key point, and the parameters "scaleX” and “scaleY” are used to describe the scaling requirements in the x and y directions, respectively.
  • the parameters "scaleX” and “scaleY” are used to describe the scaling requirements in the x and y directions, respectively.
  • two parameters "start_idx” and “end_idx” are included, which correspond to two key points.
  • the distance between these two key points is multiplied by the value of "factor” to obtain the intensity of the scaling.
  • the factor is a preset value and can be any value. For scaling, if there is only a set of associated points "point0" in "position”, then the x direction is the actual horizontal right direction; the y direction is the actual vertical downward direction; both "scaleX” and “scaleY” take effect.
  • the original object's original aspect ratio is scaled according to the existing parameter. If “point0" and “point1" are both in “position”, the x direction is the vector direction obtained by point1.anchor-point0.anchor; the y direction is determined by rotating the x direction 90 degrees clockwise; “scaleX” is invalid and the x direction The scaling is determined by the anchor point following. “scaleY” will take effect. If “scaleY” is missing, the original aspect ratio of the virtual object will be scaled.
  • the animation behavior configuration file may further include a rotation parameter "rotationtype" of the virtual object, which takes effect only when there is only "point0" in "position”, which may include two values of 0 and 1, where: 0: No rotation is required; 1: Rotation is required based on the relevant angle value of the keypoint.
  • the animation behavior configuration file may further include a rendering blending mode.
  • the rendering blending refers to mixing two colors together. Specifically, in the present disclosure, it refers to mixing a color at a pixel position with a color to be painted on. Together to achieve special effects, and the rendering blending mode refers to the method used for blending. Generally speaking, the blending method refers to calculating the source color and the target color to obtain the mixed color. In actual applications, the source color is often used. The result obtained by multiplying the source factor and the result obtained by multiplying the target color by the target factor is calculated to obtain the mixed color.
  • BLENDcolor SRC_color * SCR_factor + DST_color * DST_factor, where 0 ⁇ SCR_factor ⁇ 1, 0 ⁇ DST_factor ⁇ 1.
  • the four components of the source color referring to red, green, blue, and alpha values
  • the four components of the target color are (Rd, Gd, Bd, Ad )
  • the source factor is (Sr, Sg, Sb, Sa)
  • the target factor is (Dr, Dg, Db, Da).
  • the new color produced by the blend can be expressed as: (Rs * Sr + Rd * Dr, Gs * Sg + Gd * Dg, Bs * Sb + Bd * Db, As * Sa + Ad * Da), where the alpha value represents transparency, 0 ⁇ alpha ⁇ 1.
  • the above mixing method is only an example. In practical applications, the mixing method can be defined or selected by itself. The calculation can be the larger of the addition, the subtraction, the multiplication, the division, the larger one, the smaller of the two, and a logical operation. (And, or, XOR, etc.). The above mixing method is only an example. In practical applications, the mixing method can be defined or selected by itself. The calculation can be the larger of the addition, the subtraction, the multiplication, the division, the larger one, the smaller of the two, and a logical operation. (And, or, XOR, etc.).
  • the animation behavior configuration file may further include a rendering order.
  • the rendering order includes two layers. One is a rendering order between a sequence of frames of a virtual object.
  • the order may be defined using a parameter "zorder". The smaller the value, the higher the rendering order; the second level is the rendering order between the virtual object and the human hand.
  • This order can be determined in various ways. Typically, you can also use a similar method as "zorder" You can directly set manual rendering first or virtual objects rendering first.
  • a depth test may also be used to determine the order of rendering.
  • the specific depth test refers to setting a depth buffer, which corresponds to the color buffer, and the depth buffer stores pixels. Depth information, the color information of the pixels stored in the color buffer.
  • the depth value of the corresponding pixel of the surface is first compared with the value stored in the depth buffer. If it is greater than or equal to the depth buffer, Median, discard this part; otherwise use the depth and color values corresponding to this pixel to update the depth buffer and color buffer respectively.
  • This process is called DepthTesting.
  • setting the value of the depth buffer to 1, which represents the maximum depth value, and the range of depth values is between [0,1], A smaller value indicates closer observation, and a larger value indicates farther away from the observer.
  • the deep write is associated with the depth test. Generally, if the depth test is enabled and the result of the depth test may update the value of the depth buffer, the deep write needs to be turned on to update the value of the depth buffer. .
  • the following example illustrates the image drawing process when the depth test is turned on and the depth is written. Assume that two color blocks, red and yellow, are to be drawn. In the rendering queue, the red block is in front, the yellow block is behind, and the red block has a depth of 0.5. , The depth value of the yellow block is 0.2, and the depth test comparison function used is DF_LEQUAL. At this time, 0.5 is written in the depth buffer, red is written in the color buffer, and then 0.2 is obtained through the comparison function when rendering yellow.
  • step S201 it may further include step S2001: obtaining an animation behavior configuration file corresponding to the type according to the type of the virtual object.
  • step S2001 obtaining an animation behavior configuration file corresponding to the type according to the type of the virtual object.
  • the types of virtual objects can be classified, and different animation behavior configuration files can be obtained for different types of virtual objects, so that it is more efficient to read the animation configuration parameters in the next step.
  • step S2002 may be further included: setting an animation behavior configuration file, and setting animation configuration parameters in the configuration file.
  • the animation configuration parameters of the animation behavior configuration file may be configured, where the animation configuration parameters may further include rendering parameters.
  • FIGS. 2b-2g for specific examples of a method for generating animation disclosed in this disclosure.
  • FIG. 2b for the video frames in the video collected by the image sensor, in the initial state, no human hand motion is detected, so no virtual object appears.
  • Figures 2c and 2d in the two frames of the image, the circular motion of the human hand is detected.
  • the virtual object-lighting trajectory is triggered, as shown in Figures 2e-2g. Animation of trajectory rotation.
  • FIG. 3 is a schematic structural diagram of a first embodiment of an animation generating device 30 according to an embodiment of the present disclosure.
  • the device includes: a virtual object acquisition module 31, a video acquisition module 32, a human hand recognition module 33, and an animation configuration parameter acquisition. Module 34 and animation generation module 35. among them,
  • a virtual object acquisition module 31 configured to acquire a virtual object
  • a video acquisition module 32 configured to acquire a video collected by an image sensor
  • a human hand recognition module 33 configured to identify a human hand in the video and obtain human hand information
  • An animation configuration parameter acquisition module 34 configured to acquire animation configuration parameters according to the human hand information
  • the animation generating module 35 is configured to generate an animation related to the virtual object according to the animation configuration parameter.
  • the human hand recognition module 33 includes:
  • a first identification module configured to identify a human hand in the video
  • a recording module for recording the movement track of a human hand
  • An analysis and recognition module configured to analyze the motion trajectory and identify the motion trajectory as a predetermined action
  • a human hand information output module is configured to use the action as human hand information.
  • the type of the virtual object is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an attribute of the animation of the virtual object itself.
  • the type of the virtual object is a model type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an animation node of the virtual object.
  • the human hand recognition module 33 includes:
  • a recognition result data acquisition module configured to recognize a human hand in the video, and obtain recognition result data
  • the recognition result data processing module is used for smoothing and coordinate normalizing the recognition result data to obtain the processed manpower
  • the first human hand information acquisition module is configured to obtain the human hand information according to the processed human hand.
  • the apparatus shown in FIG. 3 can execute the method in the embodiment shown in FIG. 1.
  • the animation configuration parameter acquisition module 34 further includes a reading module 41 for reading an animation behavior configuration file, where the animation behavior A configuration file stores animation configuration parameters associated with the human hand information; a first acquisition module 42 is configured to acquire the animation configuration parameters from the animation behavior configuration file according to the human hand information.
  • the rendering information obtaining module 34 may further include a second obtaining module 43 for obtaining an animation behavior configuration file corresponding to the type of the virtual object according to the type of the virtual object.
  • the rendering information acquisition module 34 may further include: 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 device in the foregoing second embodiment may execute the method in the embodiment shown in FIG. 2.
  • the parts that are not described in detail in this embodiment reference may be made to the related description of the embodiment shown in FIG. 2.
  • the implementation process and technical effect of the technical solution refer to the description in the embodiment shown in FIG. 2, and details 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, the electronic device 50 according to an embodiment of the present disclosure includes a memory 51 and a processor 52.
  • the memory 51 is configured to store non-transitory computer-readable instructions.
  • the memory 51 may include one or more computer program products, which 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, a random access memory (RAM) and / or a cache memory.
  • the non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
  • 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.
  • the processor 52 is configured to run the computer-readable instructions stored in the memory 51, so that the electronic device 50 executes all or part of the steps of the animation generating method of the foregoing embodiments of the present disclosure. .
  • this embodiment may also include well-known structures such as a communication bus and an interface. These well-known structures should also be included in the protection scope of the present invention within.
  • FIG. 6 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure.
  • a computer-readable storage medium 60 stores non-transitory computer-readable instructions 61 thereon.
  • the non-transitory computer-readable instruction 61 is executed by a processor, all or part of the steps of the foregoing animation generating method of the embodiments of the present disclosure are performed.
  • the computer-readable storage medium 60 includes, but is not limited to, optical storage media (for example, CD-ROM and DVD), magneto-optical storage media (for example, MO), magnetic storage media (for example, magnetic tape or mobile hard disk), Non-volatile memory rewritable media (for example: memory card) and media with built-in ROM (for example: ROM box).
  • optical storage media for example, CD-ROM and DVD
  • magneto-optical storage media for example, MO
  • magnetic storage media for example, magnetic tape or mobile hard disk
  • Non-volatile memory rewritable media for example: memory card
  • media with built-in ROM for example: ROM box
  • FIG. 7 is a schematic diagram illustrating a hardware structure of a terminal device according to an embodiment of the present disclosure. As shown in FIG. 7, the animation generating terminal 70 includes the foregoing embodiment of the animation generating device.
  • the terminal device may be implemented in various forms, and the terminal device in the present disclosure may include, but is not limited to, such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), Mobile terminal equipment such as PMP (Portable Multimedia Player), navigation device, vehicle-mounted terminal equipment, vehicle-mounted display terminal, vehicle-mounted electronic rear-view mirror, etc., and fixed terminal equipment such as digital TV, desktop computer, and the like.
  • a mobile phone such as a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), Mobile terminal equipment such as PMP (Portable Multimedia Player), navigation device, vehicle-mounted terminal equipment, vehicle-mounted display terminal, vehicle-mounted electronic rear-view mirror, etc., and fixed terminal equipment such as digital TV, desktop computer, and the like.
  • PMP Portable Multimedia Player
  • the terminal may further include other components.
  • the animation generating terminal 70 may include a power source 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, and a controller. 77, an output unit 78, a storage unit 79, and so on.
  • FIG. 7 illustrates a terminal having various components, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the wireless communication unit 72 allows radio communication between the terminal 70 and a wireless communication system or network.
  • the A / V input unit 73 is used to receive audio or video signals.
  • the user input unit 74 may generate key input data according to a command input by the user to control various operations of the terminal device.
  • the sensing unit 75 detects the current state of the terminal 70, the position of the terminal 70, the presence or absence of a user's touch input to the terminal 70, the orientation of the terminal 70, the acceleration or deceleration movement and direction of the terminal 70, and the like, and generates a signal for controlling the terminal 70's operation command or signal.
  • the interface unit 76 functions as an interface through which at least one external device can be connected to the terminal 70.
  • the output unit 78 is configured to provide an output signal in a visual, audio, and / or tactile manner.
  • the storage unit 79 may store software programs and the like for processing and control 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.
  • the terminal 70 can 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.
  • 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 characters or images.
  • the power supply unit 71 receives external power or internal power under the control of the controller 77 and provides appropriate power required to operate each element and component.
  • Various embodiments of the animation generation method proposed by the present disclosure may be implemented using a computer-readable medium such as computer software, hardware, or any combination thereof.
  • various embodiments of the animation generation method proposed by the present disclosure can be implemented by using an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), and a programmable logic device (PLD).
  • ASIC application specific integrated circuit
  • DSP digital signal processor
  • DSPD digital signal processing device
  • PLD programmable logic device
  • FPGA Field Programmable Gate Array
  • processor controller, microcontroller, microprocessor, electronic unit designed to perform the functions described herein, and in some cases, the present disclosure
  • Various embodiments of the proposed animation generation method may be implemented in the controller 77.
  • various embodiments of the animation generation method proposed by the present disclosure may be implemented with a separate software module allowing at least one function or operation to be performed.
  • the software code may be implemented by a software application program (or program) written in any suitable programming language, and the software code may be stored in the storage unit 79 and executed by the controller 77.
  • an "or” used in an enumeration of items beginning with “at least one” indicates a separate enumeration such that, for example, an "at least one of A, B or C” enumeration means A or B or C, or AB or AC or BC, or ABC (ie A and B and C).
  • the word "exemplary” does not mean that the described example is preferred or better than other examples.
  • each component or each step can be disassembled and / or recombined.

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

An animation generation method and apparatus, an electronic device, and a computer-readable storage medium. The animation generation method comprises: acquiring a virtual object (S101); acquiring a video collected by an image sensor (S102); identifying a human hand in the video and obtaining human hand information (S103); acquiring, on the basis of the human hand information, an animation configuration parameter (S104); and generating, on the basis of the animation configuration parameter, an animation related to the virtual object (S105). The method resolves the technical issue of inflexible control over animation generation in the prior art.

Description

动画生成方法和装置Method and device for generating animation
交叉引用cross reference
本公开引用于2018年08月24日递交的名称为“动画生成方法和装置”的、申请号为201810975738.8的中国专利申请,其通过引用被全部并入本申请。The present disclosure refers to a Chinese patent application with the application number 201810975738.8, entitled "Animation Generation Method and Device", filed on August 24, 2018, which is incorporated by reference in its entirety.
技术领域Technical field
本公开涉及图像处理领域,尤其涉及一种动画生成方法、装置、电子设备及计算机可读存储介质。The present disclosure relates to the field of image processing, and in particular, to a method, a device, an electronic device, and a computer-readable storage medium for generating an animation.
背景技术Background technique
随着计算机技术的发展,智能终端的应用范围得到了广泛的提高,例如可以通过智能终端听音乐、玩游戏、上网聊天和拍照等。对于智能终端的拍照技术来说,其拍照像素已经达到千万像素以上,具有较高的清晰度和媲美专业相机的拍照效果。With the development of computer technology, the application range of smart terminals has been widely improved. For example, smart terminals can listen to music, play games, chat on the Internet, and take pictures. For the smart terminal's camera technology, the camera pixels have reached more than 10 million pixels, which has higher resolution and is comparable to that of professional cameras.
目前在采用智能终端进行拍照时,不仅可以使用出厂时内置的拍照软件实现传统功能的拍照效果,还可以通过从网络端下载应用程序(Application,简称为:APP)来实现具有附加功能的拍照效果,例如可以实现暗光检测、美颜相机和超级像素等功能的APP。智能终端的美颜功能通常包括肤色调整、磨皮、大眼和瘦脸等美颜处理效果,能对图像中已识别出的所有人脸进行相同程度的美颜处理。目前也有APP可以实现简单的动画功能,比如在屏幕的固定位置显示一段动画。At present, when using a smart terminal to take a picture, not only can the traditional built-in camera effect be achieved using the built-in camera software at the factory, but also an additional function can be achieved by downloading an application (Application, abbreviated as APP) from the network side. , For example, an app that can implement functions such as dark light detection, beauty camera and super pixel. The beauty functions of smart terminals usually include beauty treatment effects such as skin tone adjustment, microdermabrasion, big eyes, and thin face, which can perform the same degree of beauty treatment on all faces that have been identified in the image. There are also APPs that can implement simple animation functions, such as displaying a section of animation at a fixed position on the screen.
然而目前的动画功能,只能在固定的位置固定的时间显示,如果需要改变动画的显示或者播放属性,需要直接对动画本身进行修改,因此对动画的控制很不 灵活。However, the current animation function can only be displayed at a fixed position and time. If you need to change the display or playback properties of the animation, you need to directly modify the animation itself, so the control of the animation is very inflexible.
发明内容Summary of the Invention
第一方面,本公开实施例提供一种动画生成方法,包括:获取虚拟对象;获取图像传感器采集到的视频;识别所述视频中的人手,得到人手信息;根据所述人手信息获取动画配置参数;根据所述动画配置参数,生成与所述虚拟对象相关的动画。In a first aspect, an embodiment of the present disclosure provides a method for generating an animation, including: obtaining a virtual object; obtaining a video collected by an image sensor; identifying a human hand in the video to obtain human hand information; and acquiring animation configuration parameters according to the human hand information Generating an animation related to the virtual object according to the animation configuration parameters.
进一步的,所述识别所述视频中的人手,得到人手信息,包括:识别所述视频中的人手;记录人手的运动轨迹;分析所述运动轨迹,并将所述运动轨迹识别为预定的动作;将所述动作作为人手信息。Further, the step of identifying the human hand in the video and obtaining the human hand information includes: identifying the human hand in the video; recording the motion trajectory of the human hand; analyzing the motion trajectory, and identifying the motion trajectory as a predetermined action Taking the action as human information.
进一步的,所述根据所述人手信息获取动画配置参数,包括:根据虚拟对象的类型以及所述动作,获取所述动画配置参数,所述动画配置参数用于所述动画的渲染。Further, obtaining the animation configuration parameters according to the human hand information includes: 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 of the animation.
进一步的,所述虚拟对象类型为动画类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象自身动画的属性。Further, the type of the virtual object is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an attribute of the animation of the virtual object itself.
进一步的,所述虚拟对象类型为模型类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象的动画节点。Further, the type of the virtual object is a model type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an animation node of the virtual object.
进一步的,所述根据所述人手信息获取动画配置参数,包括:读取动画行为配置文件,所述动画行为配置文件中保存与所述人手信息关联的动画配置参数;根据所述人手信息从所述动画行为配置文件中获取所述动画配置参数。Further, obtaining the animation configuration parameters according to the human hand information includes reading an animation behavior configuration file, and the animation behavior configuration file stores an animation configuration parameter associated with the human hand information; Obtain the animation configuration parameters in the animation behavior configuration file.
进一步的,在所述读取动画行为配置文件之前,还包括:根据虚拟对象的类型获取与所述类型对应的动画行为配置文件。Further, before the reading the animation behavior configuration file, the method further includes: obtaining 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: setting an animation behavior configuration file, and setting animation configuration parameters in the configuration file.
进一步的,所述识别所述视频中的人手,得到人手信息,包括:识别所述视频中的人手,获取识别结果数据;对识别结果数据进行平滑和坐标归一化处理,得到处理后的人手;根据处理后的人手,得到所述人手信息。Further, the step of identifying the human hand in the video to obtain the human hand information includes: identifying the human hand in the video to obtain the recognition result data; performing smoothing and coordinate normalization processing on the recognition result data to obtain the processed human hand Obtaining the manpower information according to the processed manpower.
进一步的,所述根据所述动画配置参数,生成与所述虚拟对象相关的动画,包括:根据所述动画配置参数,计算所述虚拟对象的渲染位置以及动画属性,生成所述虚拟对象的动画。Further, generating the animation related to the virtual object according to the animation configuration parameter includes: calculating a rendering position and an animation attribute of the virtual object according to the animation configuration parameter, and generating an animation of the virtual object. .
第二方面,本公开实施例提供一种动画生成装置,包括:虚拟对象获取模块,用于获取虚拟对象;视频获取模块,用于获取图像传感器采集到的视频;人手识别模块,用于识别所述视频中的人手,得到人手信息;动画配置参数获取模块,用于根据所述人手信息获取动画配置参数;动画生成模块,用于根据所述动画配置参数,生成与所述虚拟对象相关的动画。In a second aspect, an embodiment of the present disclosure provides an animation generating device, including: a virtual object acquisition module for acquiring a virtual object; a video acquisition module for acquiring a video captured by an image sensor; a human hand recognition module for identifying all The human hand in the video obtains the human hand information; the animation configuration parameter acquisition module is used to obtain the animation configuration parameters according to the human hand information; the animation generation module is used to generate the animation related to the virtual object according to the animation configuration parameters. .
进一步的,所述人手识别模块,包括:第一识别模块,用于识别所述视频中的人手;记录模块,用于记录人手的运动轨迹;分析识别模块,用于分析所述运动轨迹,并将所述运动轨迹识别为预定的动作;人手信息输出模块,用于将所述动作作为人手信息。Further, the human hand recognition module includes: a first recognition module for identifying a human hand in the video; a recording module for recording a movement trajectory of the human hand; an analysis recognition module for analyzing the movement trajectory, and Identifying the motion trajectory as a predetermined action; a human hand information output module, configured to use the action as human hand information.
进一步的,所述动画配置参数获取模块:用于根据虚拟对象的类型以及所述动作,获取所述动画配置参数,所述动画配置参数用于所述动画的渲染。Further, the animation configuration parameter obtaining module is configured to obtain the animation configuration parameters according to the type of the virtual object and the action, and the animation configuration parameters are used for rendering of the animation.
进一步的,所述虚拟对象类型为动画类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象自身动画的属性。Further, the type of the virtual object is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an attribute of the animation of the virtual object itself.
进一步的,所述虚拟对象类型为模型类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象的动画节点。Further, the type of the virtual object is a model type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an animation node of the virtual object.
进一步的,所述动画配置参数获取模块,还包括:读取模块,用于读取动画行为配置文件,所述动画行为配置文件中保存与所述人手信息关联的动画配置 参数;第一获取模块,用于根据所述人手信息从所述动画行为配置文件中获取所述动画配置参数。Further, the animation configuration parameter acquisition module further includes a reading module for reading an animation behavior configuration file, and the animation behavior configuration file stores an animation configuration parameter associated with the human hand information; a first acquisition module For acquiring the animation configuration parameters from the animation behavior configuration file according to the human hand information.
进一步的,所述动画配置参数获取模块,还包括:第二获取模块,用于根据虚拟对象的类型获取与所述类型对应的动画行为配置文件。Further, the animation configuration parameter acquisition module further includes: a second acquisition module, configured to acquire an animation behavior configuration file corresponding to the type according to the type of the virtual object.
进一步的,所述动画配置参数获取模块,还包括:动画行为配置文件设置模块,用于设置动画行为配置文件,对配置文件中的动画配置参数进行设置。Further, the animation configuration parameter acquisition module further includes: an animation behavior configuration file setting module, configured to set an animation behavior configuration file, and set an animation configuration parameter in the configuration file.
进一步的,所述人手识别模块,包括:识别结果数据获取模块,用于识别所述视频中的人手,获取识别结果数据;识别结果数据处理模块,用于对识别结果数据进行平滑和坐标归一化处理,得到处理后的人手;第一人手信息获取模块,用于根据处理后的人手,得到所述人手信息。Further, the human hand recognition module includes: a recognition result data acquisition module for recognizing a human hand in the video to obtain recognition result data; a recognition result data processing module for smoothing and coordinate normalizing the recognition result data The first human hand information acquisition module is configured to obtain the human hand information according to the processed human hand.
进一步的,所述动画生成模块:用于根据所述动画配置参数,计算所述虚拟对象的渲染位置以及动画属性,生成所述虚拟对象的动画。Further, the animation generating module is configured to calculate a rendering position and animation attributes of the virtual object according to the animation configuration parameters, and generate an animation of the virtual object.
第三方面,本公开实施例提供一种电子设备,包括:至少一个处理器;以及,According to a third aspect, an embodiment of the present disclosure provides an electronic device including: at least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有能被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行前述第一方面中的任一所述动画生成方法。A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processing The processor is capable of performing any one of the foregoing animation generating methods.
第四方面,本公开实施例提供一种非暂态计算机可读存储介质,其特征在于,该非暂态计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行前述第一方面中的任一所述动画生成方法。According to a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the foregoing first aspect. Any one of the animation generation methods.
本公开实施例提供一种动画生成方法、装置、电子设备和计算机可读存储介质。其中该动画生成方法包括:获取虚拟对象;获取图像传感器采集到的视频;识别所述视频中的人手,得到人手信息;根据所述人手信息获取动画配置参数;根据所述动画配置参数,生成与所述虚拟对象相关的动画。本公开实施例通过采取该技术方案,解决了现有技术中对动画控制不灵活的技术问题。Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer-readable storage medium for generating an animation. The animation generating method includes: obtaining a virtual object; obtaining a video collected by an image sensor; identifying a human hand in the video to obtain human hand information; obtaining an animation configuration parameter according to the human hand information; and generating and Animation related to the virtual object. The embodiment of the present disclosure solves the technical problem of inflexible animation control in the prior art by adopting this technical solution.
上述说明仅是本公开技术方案的概述,为了能更清楚了解本公开的技术手 段,而可依照说明书的内容予以实施,并且为让本公开的上述和其他目的、特征和优点能够更明显易懂,以下特举较佳实施例,并配合附图,详细说明如下。The above description is only an overview of the technical solutions of the present disclosure. In order to better understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the description, and to make the above and other objects, features, and advantages of the present disclosure more obvious and understandable The following describes the preferred embodiments and the accompanying drawings in detail as follows.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present disclosure or the prior art more clearly, the drawings used in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description These are some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without paying creative labor.
图1为本公开实施例提供的动画生成方法实施例一的流程图;FIG. 1 is a flowchart of Embodiment 1 of a method for generating an animation according to an embodiment of the present disclosure;
图2a为本公开实施例提供的动画生成方法实施例二中步骤S104的流程图;FIG. 2a is a flowchart of step S104 in the second embodiment of the animation generating method according to the embodiment of the present disclosure;
图2b-2g为本公开实施例提供的动画生成方法的具体实例示意图;2b-2g are schematic diagrams of specific examples of an animation generating method according to an embodiment of the present disclosure;
图3为本公开实施例提供的动画生成装置实施例一的结构示意图;3 is a schematic structural diagram of a first embodiment of an animation generating apparatus according to an embodiment of the present disclosure;
图4为本公开实施例提供的动画生成装置实施例二中动画配置参数获取模块的结构示意图FIG. 4 is a schematic structural diagram of an animation configuration parameter obtaining module in the second embodiment of an animation generating device provided by an embodiment of the present disclosure.
图5为根据本公开实施例提供的电子设备的结构示意图;5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
图6为根据本公开实施例提供的计算机可读存储介质的结构示意图;6 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure;
图7为根据本公开实施例提供的动画生成终端的结构示意图。FIG. 7 is a schematic structural diagram of an animation generating terminal according to an embodiment of the present disclosure.
具体实施方式detailed description
以下通过特定的具体实例说明本公开的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本公开的其他优点与功效。显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。本公开还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本公开的精神下进行各种修饰或改变。需说明的是,在不冲突的情况下,以下实施例及实施例中的特征可以相互组合。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实 施例,都属于本公开保护的范围。The embodiments of the present disclosure are described below through specific specific examples. Those skilled in the art can easily understand other advantages and effects of the present disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, but not all the embodiments. The present disclosure can also be implemented or applied through different specific implementations, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, in the case of no conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative labor shall fall within the protection scope of the present disclosure.
需要说明的是,下文描述在所附权利要求书的范围内的实施例的各种方面。应显而易见,本文中所描述的方面可体现于广泛多种形式中,且本文中所描述的任何特定结构及/或功能仅为说明性的。基于本公开,所属领域的技术人员应了解,本文中所描述的一个方面可与任何其它方面独立地实施,且可以各种方式组合这些方面中的两者或两者以上。举例来说,可使用本文中所阐述的任何数目个方面来实施设备及/或实践方法。另外,可使用除了本文中所阐述的方面中的一或多者之外的其它结构及/或功能性实施此设备及/或实践此方法。It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that 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 present disclosure, those skilled in the art should understand that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, any number of the aspects set forth herein may be used to implement a device and / or a practice method. In addition, the apparatus and / or the method may be implemented using other structures and / or functionality than one or more of the aspects set forth herein.
还需要说明的是,以下实施例中所提供的图示仅以示意方式说明本公开的基本构想,图式中仅显示与本公开中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。It should also be noted that the illustrations provided in the following embodiments only illustrate the basic idea of the present disclosure in a schematic manner, and only the components related to the present disclosure are shown in the drawings instead of the number, shape and For size drawing, the type, quantity, and proportion of each component can be changed at will in actual implementation, and the component layout type may be more complicated.
另外,在以下描述中,提供具体细节是为了便于透彻理解实例。然而,所属领域的技术人员将理解,可在没有这些特定细节的情况下实践所述方面。In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects may be practiced without these specific details.
图1为本公开实施例提供的动画生成方法实施例一的流程图,本实施例提供的该动画生成方法可以由一动画生成装置来执行,该动画生成装置可以实现为软件,或者实现为软件和硬件的组合,该动画生成装置可以集成设置在图像处理系统中的某设备中,比如图像处理服务器或者图像处理终端设备中。如图1所示,该方法包括如下步骤:FIG. 1 is a flowchart of Embodiment 1 of an animation generation method provided by an embodiment of the present disclosure. The animation generation method provided by this embodiment may be executed by an animation generation device, and the animation generation device may be implemented as software or as software In combination with hardware, the animation generating device may be integrated in a certain device in the image processing system, such as an image processing server or an image processing terminal device. As shown in Figure 1, the method includes the following steps:
步骤S101,获取虚拟对象;Step S101: Obtain a virtual object.
此处的虚拟对象可以是任何2D或者3D的虚拟对象,典型的如虚拟的宝剑、虚拟的手枪等虚拟武器,虚拟的笔、虚拟的书等虚拟文具,虚拟的手套、虚拟的戒指等虚拟可穿戴物品等等,或者是虚拟的彩虹、云朵等等,在此不做具体的限制,任何虚拟对象都可以引入到本公开中,虚拟对象可以有类型,比如本身带有动画效果的动画类型虚拟对象,典型的比如动画类型的虚拟云朵,其本身具有多 个序列帧,呈现一种从白云到乌云到雨云的动画效果;或者所述虚拟对象可以是模型类型的,比如上述虚拟的宝剑,其本身不带有动画效果,但是可以通过移动等方式形成一段动画效果。在该步骤中,获取虚拟对象的同时,可以获取虚拟对象的类型,获取虚拟对象的类型可以直接从虚拟对象的属性数据中获取,或者获取虚拟对象的ID,通过ID查询该ID的类型,类型的获取方式可以任选,无论何种方式都可以应用到本公开中。The virtual objects here can be any 2D or 3D virtual objects, typically virtual weapons such as virtual swords and virtual pistols, virtual stationery such as virtual pens and books, virtual gloves such as virtual gloves and virtual rings. Wearable items, etc., or virtual rainbows, clouds, etc., are not specifically limited here. Any virtual object can be introduced into this disclosure. The virtual object can have types, such as an animation type virtual with an animation effect itself. The object is typically an animation type virtual cloud, which itself has multiple sequence frames, presenting an animation effect from white cloud to dark cloud to rain cloud; or the virtual object may be a model type, such as the above-mentioned virtual sword, It does not have an animation effect, but it can form a section of animation effect by moving and other methods. In this step, while obtaining the virtual object, the type of the virtual object can be obtained. The type of the virtual object can be obtained directly from the attribute data of the virtual object, or the ID of the virtual object is obtained, and the type and type of the ID are queried by the ID. The obtaining method of the method is optional, and any method can be applied to the present disclosure.
步骤S102,获取图像传感器采集到的视频;Step S102: Obtain a video collected by the image sensor;
图像传感器指可以采集图像的各种设备,典型的图像传感器为摄像机、摄像头、相机等。在该实施例中,所述图像传感器可以是移动终端上的摄像头,比如智能手机上的前置或者后置摄像头,摄像头采集的视频图像可以直接显示在手机的显示屏上,在该步骤中,获取图像传感器所拍摄的图像视频,用于在下一步进一步识别图像。Image sensors refer to various devices that can capture images. Typical image sensors are cameras, cameras, cameras, and so on. In this embodiment, the image sensor may be a camera on a mobile terminal, such as a front or rear camera on a smart phone, and the video image collected by the camera may be directly displayed on the display screen of the mobile phone. In this step, The image video captured by the image sensor is used to further identify the image in the next step.
步骤S103,识别所述视频中的人手,得到人手信息;Step S103: identify the human hand in the video, and obtain the human hand information;
在识别人手时,可以使用颜色特征定位人手的位置,将人手从背景中分割出来,对找到和分割出的人手图像进行特征提取与识别。具体的,使用图像传感器获取图像的颜色信息以及颜色信息的位置信息;将所述颜色信息与预设的人手颜色信息对比;识别第一颜色信息,所述第一颜色信息与所述预设的人手颜色信息的误差小于第一阈值;利用所述第一颜色信息的位置信息形成人手的轮廓。优选的,为了避免环境亮度对颜色信息的干扰,可以将图像传感器采集到的RGB颜色空间的图像数据映射到HSV颜色空间,使用HSV颜色空间中的信息作为对比信息,优选的,将HSV颜色空间中的色调值作为颜色信息,色调信息受亮度的影响最小,可以很好的过滤亮度的干扰。使用人手轮廓粗略确定人手的位置,之后对人手进行关键点提取。在图像上进行人手关键点提取,相当于寻找每个人手轮廓关键点在人手图像中的对应位置坐标,即关键点定位,这一过程需要基于关键点对应的特征进行,在获得了能够清晰标识关键点的图像特征之后,依据此特征在图像中进行搜索比对,在图像上精确定位关键点的位置。由于关键点在图像中 仅占据非常小的面积(通常只有几个至几十个像素的大小),关键点对应的特征在图像上所占据的区域通常也是非常有限和局部的,目前用的特征提取方式有两种:(1)沿轮廓垂向的一维范围图像特征提取;(2)关键点方形邻域的二维范围图像特征提取。上述两种方式有很多种实现方法,如ASM和AAM类方法、统计能量函数类方法、回归分析方法、深度学习方法、分类器方法、批量提取方法等等。上述各种实现方法所使用的关键点个数,准确度以及速度各不相同,适用于不同的应用场景。同样的,对于其他的目标物体,也可以使用同样的原理来识别目标物体。When identifying a human hand, color features can be used to locate the position of the human hand, segment the human hand from the background, and perform feature extraction and recognition on the found and segmented human hand image. Specifically, an image sensor is used to obtain the color information of the image and the position information of the color information; compare the color information with preset color information of the human hand; identify the first color information, and the first color information and the preset color information The error of the color information of the human hand is less than the first threshold; the position information of the first color information is used to form the outline of the human hand. Preferably, in order to avoid the interference of the ambient brightness with the color information, the image data of the RGB color space collected by the image sensor can be mapped to the HSV color space, and the information in the HSV color space is used as comparison information. Preferably, the HSV color space is used. The hue value in the color is used as the color information, and the hue information is least affected by the brightness, which can well filter the interference of the brightness. Use the outline of the human hand to roughly determine the position of the human hand, and then extract the key points of the human hand. Extracting human hand keypoints on the image is equivalent to finding the corresponding position coordinates of each hand contour keypoint in the hand image, that is, keypoint positioning. This process needs to be performed based on the characteristics of the keypoints. After the key point's image features are searched and compared in the image based on this feature, the position of the key points is accurately located on the image. Because the key points occupy only a very small area in the image (usually only a few to tens of pixels in size), the area occupied by the features corresponding to the key points on the image is also usually very limited and local. The features currently used There are two extraction methods: (1) one-dimensional range image feature extraction along the vertical contour; (2) two-dimensional range image feature extraction 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 of key points, accuracy, and speed used by the above various implementation methods are different, which are suitable for different application scenarios. Similarly, for other target objects, the same principle can be used to identify target objects.
在识别出人手之后,在人手的外轮廓之外圈定一个多边形,作为人手的外接检测框,该外接检测框用于替代所述人手,描述所述人手的位置,在此以矩形为例,在识别出人手的关键点之后,可以计算人手最宽处的宽度以及最长处的长度,以该宽度和长度识别出人手的外接检测框。计算人手的最长处和最宽处的一个实现方式为,提取人手的边界关键点,计算X坐标距离最远的两个边界关键点的X坐标之差,作为矩形宽的长度,计算Y坐标距离最远的两个边界关键点的Y坐标之差,作为矩形长的长度。如果人手缩成拳头状,可以设定外接检测框为覆盖拳头的最小圆形。具体的,可以用外检检测框的中心点作为手的位置,所述外接检测框的中心点为外接检测框对角线的交点;也可以用所述圆形的圆心代替拳头的位置。After the human hand is identified, a polygon is circled outside the outer contour of the human hand as an external detection frame of the human hand. The external detection frame is used to replace the human hand and describe the position of the human hand. Here, a rectangle is used as an example. After the key points of the human hand are identified, the width at the widest part of the human hand and the length at the longest part can be calculated, and the external detection frame of the human hand can be identified with the width and length. One way to calculate the longest and widest points of the human hand is to extract the key points of the border of the human hand, calculate the difference between the X coordinates of the two key points with the furthest X coordinate distances, and calculate the Y coordinate distance as the length of the rectangle. The difference between the Y coordinates of the two farthest boundary key points is taken as the length of the rectangle. If the human hand shrinks into a fist shape, the external detection frame can be set to the smallest circle covering the fist. Specifically, the center point of the external detection frame may be used as the position of the hand, and the center point of the external detection frame is the intersection of the diagonals of the external detection frame; the position of the fist may also be replaced by the circular center of the circle.
人手信息还包括检测出来的人手关键点,所述关键点的数量可以设置,一般来说可以包括人手轮廓的关键点和关节关键点,每个关键点有固定编号,比如可以按照轮廓关键点、大拇指关节关键点、食指关节关键点、中指关节关键点、无名指关节关键点、小拇指关节关键点的顺序,从上到下编号,在一个典型的应用中,所述关键点为22个,每个关键点有固定编号。The hand information also includes the detected key points of the hand. The number of the key points can be set. Generally, the key points of the hand contour and joint key points can be set. Each key point has a fixed number. The order of the key points of the thumb joint, the index finger, the middle knuckle, the ring finger, and the little finger is numbered from top to bottom. In a typical application, the key points are 22, each Each key point has a fixed number.
人手信息还可以包括人手的动作,所述人手的动作记录人手的运动轨迹,并分析所述运动轨迹来识别。具体的,记录人手的运动轨迹首先需要跟踪人手的运动,在基于视觉的人手动作识别系统中,人手运动轨迹跟踪是跟踪手势在图片序 列中的位置变化,获取人手在连续时间上的位置信息,人手运动轨迹跟踪效果的优劣直接影响人手动作识别的效果。常用的动作跟踪方法有粒子滤波算法、均值漂移(Mean-shift)算法、卡尔曼滤波法和骨骼跟踪法等。The human hand information may also include human hand movements, which record the movement trajectory of the human hand, and analyze the movement trajectory to identify. Specifically, recording the motion trajectory of a human hand first needs to track the movement of the human hand. In the vision-based human hand motion recognition system, the tracking of the human hand trajectory is to track the position change of a gesture in a sequence of pictures and obtain the position information of the human hand in continuous time. The pros and cons of the tracking effect of human motion directly affect the effect of human motion recognition. Commonly used motion tracking methods include particle filtering algorithms, Mean-shift algorithms, Kalman filtering methods, and bone tracking methods.
其中,基于粒子滤波的目标跟踪是在随机运动模型中获取目标分布的后验概率估计的随机搜索过程,粒子滤波主要分为两步:初步采样和重复采样。初步采样是在一副图像中随机放置粒子,然后计算每个粒子和跟踪目标特征的相似度,进而获得每个粒子的权重。重采样阶段主要是根据初步采样中粒子的权重,改变粒子的分布情况。重复初步采样和重采样的过程,直到跟踪到目标。Among them, particle filtering-based target tracking is a random search process that obtains the posterior probability estimates of the target distribution in a random motion model. Particle filtering is mainly divided into two steps: preliminary sampling and repeated sampling. The initial sampling is to randomly place particles in an image, then calculate the similarity between each particle and the tracking target feature, and then obtain the weight of each particle. The resampling phase mainly changes the distribution of particles based on the weight of the particles in the preliminary sampling. The process of preliminary sampling and resampling is repeated until the target is tracked.
均值漂移法(Mean-shift)是非参数概率密度梯度估计算法。在人手动作识别中,利用Mean-shift算法来跟踪人手的基本思路是:首先建立人手的模型,即计算初始图像帧中属于手部的像素在特征空间的特征值的概率;然后建立当前帧的模型,计算人手可能存在区域的所有像素的特征值概率;最后通过求取初始人手模型和当前帧的人手模型的相似性来得到人手均值漂移量。根据均值漂移算法的收敛性,迭代计算手部的均值漂移量,达到收敛到当前图像帧中人手位置的目的。Mean-shift is a non-parametric probability density gradient estimation algorithm. In human hand recognition, the basic idea of using Mean-shift algorithm to track human hands is: first to build a model of the human hand, that is, to calculate the probability of the feature value of the pixels belonging to the hand in the initial image frame in the feature space; then establish the current frame's The model calculates the eigenvalue probability of all pixels in the area where the human hand may exist. Finally, the mean hand drift is obtained by finding the similarity between the initial human hand model and the current hand human model. According to the convergence of the mean shift algorithm, the mean shift of the hand is calculated iteratively to achieve the goal of converging to the position of the hand in the current image frame.
卡尔曼滤波是利用一系列数学方程预测线性系统在现在或将来的状态。在人手运动轨迹跟踪中,卡尔曼滤波主要是观测一系列图像帧中人手的位置信息,然后预测下一帧中人手的位置。因为卡尔曼滤波是在每个时间间隔的后验概率估计的假设上成立的,所以卡尔曼滤波方法在高斯分布环境下能取得较好的跟踪效果。这种方法能去除噪声,并在手势变形下仍能取得较好的人手跟踪效果。Kalman filtering uses a series of mathematical equations to predict the state of a linear system, now or in the future. In human hand motion trajectory tracking, Kalman filtering mainly observes the position information of the hand in a series of image frames, and then predicts the position of the hand in the next frame. Because the Kalman filter is based on the assumption of the posterior probability estimation of each time interval, the Kalman filter method can achieve better tracking results in the Gaussian distribution environment. This method can remove noise, and still achieve better hand tracking effect under gesture deformation.
随着微软Kinect的广泛应用,许多研究者利用微软的Microsoft Kinect传感器特有的骨骼点跟踪来做人手跟踪的研究。在传感器的视野范围内,Kinect可以提供一名或者两名用户完整的骨骼跟踪,即全身20个关节点的跟踪。骨骼点跟踪分为主动跟踪和被动跟踪,在主动跟踪的模式下,在视野内选择两个可能的用户进行跟踪,在被动跟踪模式下,最多可以跟踪6个用户的骨骼点,多余的四个只作位置跟踪。Kinect的骨骼跟踪的原理是在获取的深度图像的基础上,通 过对人体的32个部分进行分类和机器学习的方法,找到各个部分的骨骼关节点信息。With the wide application of Microsoft Kinect, many researchers have used the unique bone point tracking of Microsoft's Microsoft Kinect sensor to do hand tracking research. Within the sensor's field of view, Kinect can provide complete bone tracking for one or two users, that is, tracking of 20 joint points throughout the body. Skeletal point tracking is divided into active tracking and passive tracking. In the active tracking mode, two possible users are selected for tracking in the field of view. In the passive tracking mode, a maximum of 6 user bone points can be tracked, and the remaining four For position tracking only. The principle of Kinect's bone tracking is to find the bone joint point information of each part by classifying and machine learning the 32 parts of the human body based on the acquired depth image.
由于在该步骤中可以采集人手骨骼的关键点,因此在本公开中可以优先使用基于骨骼跟踪的人手运动轨迹跟踪方法。在分析运动轨迹识别人手动作时,需要识别人手动作的起点和终点,在本公开中,可以计算人手关键点在连续两帧图像中的移动距离,当距离小于一个预设阈值时,认为关键点的位置保持不变,当关键点的预设的连续几帧都保持位置不变时,将手部的位置识别为人手动作的起点或终点,典型的比如所述阈值可以设为1cm,当连续6帧内关键点位置没有发生变化时,将人手的位置作为人手动作的起点或终点。之后可以计算起点和终点之间的图像帧中关键点的位置,所有图像帧中的关键点所形成的轨迹即为人手的运动轨迹,将起点和终点之间的运动轨迹与预设的运动轨迹进行对比识别,当相似度大于一个预设的相似阈值时,将所述运动轨迹识别为一个人手动作。最终将该人手动作作为人手信息输出到下一步骤中。Since the key points of the human hand bones can be collected in this step, a human hand motion trajectory tracking method based on bone tracking can be preferentially used in the present disclosure. When analyzing the motion trajectory to identify human hand movements, it is necessary to identify the starting point and end point of the human hand movements. In this disclosure, the movement distance of the key points of the human hand in two consecutive frames of images can be calculated. When the distance is less than a preset threshold, the key points are considered The position of the key remains the same. When the preset positions of the key points are kept the same for several consecutive frames, the position of the hand is recognized as the starting point or end point of the human hand movement. Typically, for example, the threshold can be set to 1 cm. When the position of the key point does not change within 6 frames, the position of the human hand is used as the starting point or end point of the human hand action. After that, the positions of the key points in the image frames between the starting point and the end point can be calculated. The trajectories formed by the key points in all the image frames are the movement trajectories of the human hand. Perform comparison and recognition, and when the similarity is greater than a preset similarity threshold, identify the motion trajectory as a human hand action. Finally, the human hand motion is output as human hand information to the next step.
在一个实施例中,所述人手信息还可以包括人手的角度,所述角度可以包括人手在拍摄平面上的角度,也可以包括在空间中的角度,或者两者的结合。在一种实现方式中,该角度可以使用外接检测框来描述,在拍摄平面上,可以计算外检检测框相对于X轴的偏移角度,在空间中,可以检测外接检测框的缩放程度,根据该缩放程度与角度的对应关系来确定在空间中的旋转角度,比如手掌正对摄像机时,所检测出来的外接检测框具有最大面积,当旋转手掌时,外接检测框的面积逐渐减小,可以预先设置面积减小的比例与角度的关系,这样通过外接检测框的面积可以计算出手掌的旋转角度。当然,角度的获取方式不止实施例中的这一种,任何可以确定人手的角度的方法均可以应用于本公开中,在此的目的仅仅是得到人手角度。In one embodiment, the human hand information may further include an angle of the human hand, and the angle may include an angle of the human hand on the shooting plane, or an angle in space, or a combination of the two. In one implementation, the angle can be described using an external detection frame. On the shooting plane, the offset angle of the external detection frame with respect to the X axis can be calculated. In space, the degree of zoom of the external detection frame can be detected. The rotation angle in space is determined according to the corresponding relationship between the zoom level and the angle. For example, when the palm is facing the camera, the detected external detection frame has the largest area. When the palm is rotated, the area of the external detection frame gradually decreases. The relationship between the area reduction ratio and the angle can be set in advance, so that the rotation angle of the palm can be calculated by the area of the external detection frame. Of course, the angle is not limited to this one in the embodiment. Any method that can determine 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 includes the steps of smoothing and coordinate normalizing the recognition data of the human hand. Specifically, the smoothing process may be averaging the images in multiple frames of video, and using the averaged image as the recognized image, corresponding to the human hand in the present disclosure, and identifying the human hand in the multi-frame image, After that, the hand image is weighted averaged, and the hand image obtained after the averaging is used as the identified hand, and the hand information is calculated. In this way, the human hand can be determined even when some frames are lost or the images identified by some frames are not very clear. Image and calculate the information of the human hand. The coordinate normalization process is to unify the coordinate range. For example, the coordinates of the human hand image collected by the camera and the human hand image displayed on the display screen are not uniform. A mapping relationship is required to map the large coordinate system to a small coordinate. tie up. After smoothing and normalization, the information of human hands is obtained.
步骤S104,根据所述人手信息获取动画配置参数。Step S104: Obtain animation configuration parameters according to the human hand information.
在该步骤中,所述动画配置参数可以包括虚拟对象的渲染位置以及动画的属性。其中虚拟对象的渲染位置可以与人手的位置相关联,比如人手的位置在步骤S103中由人手外接检测框的中心点确定,则虚拟对象的渲染位置可以直接跟中心点重合,此时可以将虚拟对象的中心位置与外接检测框的中心点重合;或者所述虚拟对象的渲染位置可以与所述中心点保持一定的位置关系,比如虚拟对象的渲染位置可以位于所述中心点Y轴正向上1个长度单位的位置,所述长度单位可以是自定义的长度单位,比如1个长度单位等于1cm等等,在此不做限制。总之,可以通过一定的关系来确定虚拟对象的渲染位置,虚拟对象的显示在什么位置的问题。为了渲染位置更加精确,可以加入人手的关键点,此时可以设置虚拟对象挂载于人手的某几个关键点上,在一个实现方式中,可以在虚拟对象上设置3个点,这3个点与人手上的3个关键点对应,通过这种对应关系,可以确定虚拟对象的渲染位置。In this step, the animation configuration parameters may include the rendering position of the virtual object and the attributes of the animation. The rendering position of the virtual object may be related to the position of the human hand. For example, the position of the human hand is determined by the center 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 center point. The center position of the object coincides with the center point of the external detection frame; or the rendering position of the virtual object may maintain a certain positional relationship with the center point, for example, the rendering position of the virtual object may be located in the positive direction of the center point on the Y axis 1 The position of each length unit, the length unit may be a custom length unit, for example, one length unit is equal to 1 cm, etc., and is not limited herein. In short, a certain relationship can be used to determine the rendering position of the virtual object, and the question of where the virtual object is displayed. In order to render the position more accurately, you can add the key points of the human hand. At this time, you can set the virtual object to be mounted on some key points of the human hand. In one implementation, you can set 3 points on the virtual object. These 3 points The points correspond to the three key points on the human hand. Through this correspondence, the rendering position of the virtual object can be determined.
所述动画的属性,定义了动画的显示属性,典型的比如动画的大小、旋转方向、播放行为、动画的节点等等,当然实际中不止上述举例中所列的动画属性,任何可以控制动画的形态、播放、轨迹等的属性都可以应用到本公开中,上述举例只是为了方便理解而列出的典型的动画属性。为了方便理解,以下具体说明上述典型动画属性与人手信息的关联例子。The properties of the animation define the display properties of the animation, such as the size of the animation, the rotation direction, the playing behavior, the nodes of the animation, and so on. Of course, there are more than just the animation properties listed in the examples above. The attributes of morphology, playback, trajectory, etc. can be applied to the present disclosure. The above examples are just typical animation attributes listed for easy understanding. In order to facilitate understanding, the following specifically describes an example of the association between the typical animation attributes and human hand information.
在步骤S103可以获取左右手的位置,并记录左右手的动作,当识别出左右手做出向中间合并的动作,则将左右手之间的距离计算出来查找与该距离对应 的动画大小参数In step S103, the positions of the left and right hands can be obtained, and the actions of the left and right hands can be recorded. When it is recognized that the left and right hands are merged to the middle, the distance between the left and right hands is calculated to find the animation size parameter corresponding to the distance.
在所述步骤S103中得到的人手信息包括了人手的角度信息,当识别出人手的角度发生变化,可以根据该人手角度查找与该角度对应的动画的旋转方向和旋转角度。The human hand information obtained in the step S103 includes angle information of the human hand. When it is recognized that the angle of the human hand changes, the rotation direction and rotation angle of the animation corresponding to the angle can be found according to the angle of the human hand.
在步骤S103中可以识别人手动作,当识别出人手正时针旋转时,控制动画正向播放;当识别出人手逆时针旋转时,控制动画反向播放。或者当识别出人手做横向滑动时,可以根据人手的滑动速度控制动画的播放速度。In step S103, human hand movements can be identified. When the clockwise rotation of the human hand is recognized, the animation is controlled to play forward; when the clockwise rotation of the human hand is recognized, the animation is controlled to play backward. Or when it is recognized that a human hand is sliding horizontally, the playback speed of the animation can be controlled according to the sliding speed of the human hand.
在一个实施例中,需要先确定虚拟对象的类型,该虚拟对象的类型可以在步骤S101中获取虚拟对象时一并获取。此时可以根据虚拟对象的类型以及所述动作,获取所述动画配置参数,所述动画配置参数用于所述动画的渲染。如果所述虚拟对象类型为模型类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象的动画节点;如果所述虚拟对象类型为动画类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象自身动画的属性。当然,在实际应用中也可以不判断虚拟对象的类型,可以将每个人手信息都对应唯一的动画参数,这样对于不同类型的虚拟对象,只有能控制其动画的人手信息才会起作用,这样可以在一定程度上简化识别过程。举例来说,对于动画类型的虚拟对象,可以使用人手动作控制动画的播放,比如当识别出人手做横向滑动时,可以根据人手的滑动速度控制动画的播放速度;对于模型类型的虚拟对象,可以根据人手动作的运动轨迹确定虚拟对象的动画节点,通过动画节点生成虚拟对象的运动轨迹,根据该运动轨迹生成虚拟对象的运动动画。比如虚拟对象为一只小鸟,当识别出人手在空中的轨迹为“8”字,可以生成小鸟在空中以“8”轨迹飞行的动画。In one embodiment, the type of the virtual object needs to be determined first, and the type of the virtual object may be obtained together 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 action, and the animation configuration parameters are used for rendering of the animation. If the virtual object type is a model type, obtain animation configuration parameters corresponding to the action, and the animation configuration parameters are used to control a rendering position of the virtual object and / or an animation node of the virtual object; if the virtual object is The type is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or a property of the animation of the virtual object itself. Of course, in actual applications, it is not necessary to judge the type of the virtual object, and each person's hand information can correspond to a unique animation parameter. In this way, for different types of virtual objects, only the hand information that can control its animation will work. The recognition process can be simplified to some extent. For example, for an animation type virtual object, you can use human hand motion to control the animation playback. For example, when a person's hand is recognized to make a horizontal slide, you can control the animation playback speed according to the human hand's sliding speed. For a model type virtual object, you can The animation node of the virtual object is determined according to the movement trajectory of the human hand movement, the movement trajectory of the virtual object is generated through the animation node, and the movement animation of the virtual object is generated according to the movement trajectory. For example, the virtual object is a bird. When it is recognized that the trajectory of the human hand in the air is "8", an animation of the bird flying in the air with the "8" trajectory can be generated.
在另外一个实施例中,可以结合上述两种不同类型的虚拟对象的动画生成方式,比如一个本身就带有动画效果的云朵效果,其可以从白云到乌云再到雨云变化,形成一段动画,则结合上述两种方式,一方面可以通过横向滑动的动作设置动画的播放速度,另一方面可以通过人手的弧线动作,使该云朵沿着弧线移动, 形成移动的动画,这样就形成了一个不断变换云朵形态的漂浮移动的动画效果。In another embodiment, the animation generation methods of the two different types of virtual objects can be combined, such as a cloud effect with an animation effect, which can change from white clouds to dark clouds to rain clouds to form a section of animation. In combination with the above two methods, on the one hand, the speed of the animation can be set by the lateral sliding motion, and on the other hand, the cloud can be moved along the arc by the arc motion of the human hand to form a moving animation. A floating animation that constantly changes the shape of the clouds.
需要说明的是,在该步骤中所获取的动画配置参数中还可以包括渲染参数,其定义了动画和/或人手如何渲染,渲染参数将在下文具体说明,在此不再赘述。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 human hands are rendered. The rendering parameters will be specifically described below, and will not be repeated here.
该步骤中的描述仅仅为了说明获取动画配置参数的过程以及方式,并不构成对本公开的限制。实际上本步骤的核心在于根据步骤S103中所识别出的人手信息获取到与该信息所对应的动画配置参数,至于什么样的人手信息对应什么样的动画参数,本公开不做限制。The description in this step is only for explaining the process and manner of obtaining animation configuration parameters, and does not constitute a limitation on the present disclosure. In fact, the core of this step is to obtain the animation configuration parameters corresponding to the information based on the human hand information identified in step S103. As for what kind of human hand information corresponds to what kind of animation parameters, this disclosure does not limit it.
步骤S105,根据所述动画配置参数,生成与所述虚拟对象相关的动画。Step S105: Generate an animation related to the virtual object according to the animation configuration parameters.
在该实施例中,根据步骤S104中获取的动画配置参数,对步骤S101中获取的虚拟对象进行处理,以与所述虚拟对象相关的动画。In this embodiment, the virtual object obtained in step S101 is processed according to the animation configuration parameters obtained in step S104 to perform animation related to the virtual object.
举例来说,当获取的动画配置参数为播放速度,则使用该播放速度参数控制动画的播放速度,比如得到的动画配置参数为播放速度为正常速度的2倍,则从动画的起始帧开始,每隔一帧采样一次,以获得播放速度加倍的效果;比如得到的动画配置参数为播放速度为正常速度的0.5倍,则从动画的起始帧开始,每一帧重复播放两次再播放下一帧,以得到播放速度减慢的效果。For example, when the obtained animation configuration parameter is the playback speed, use the playback speed parameter to control the playback speed of the animation. For example, if the obtained animation configuration parameter is 2 times the normal speed, then start from the start frame of the animation. , Sample every other frame to get the effect of doubling the playback speed; for example, the obtained animation configuration parameter is 0.5 times the normal speed, then starting from the start frame of the animation, each frame is played twice and then played again Next frame to get the effect of slowing down the playback speed.
对于生成虚拟对象的移动动画的参数,一般为人手关键点的位置,比如可以选择人手中3个关键的加权平均位置作为动画的节点,在人手动作的每一帧中,均在该动画节点的位置渲染出该虚拟对象,以形成该虚拟对象的移动动画。为了增加多样性,也可以使用贝塞尔曲线生成虚拟对象的动画效果,将上述动画的节点作为贝塞尔曲线的关键点,带入贝塞尔曲线公式中计算出虚拟对象的动画曲线,具体的计算过程不再赘述。For the parameters of generating a moving animation of a virtual object, the positions of key points of the human hand are generally used. For example, three key weighted average positions of the human hand can be selected as the nodes of the animation. In each frame of the human hand's motion, the positions are at the nodes of the animation. Position the virtual object to form a moving animation of the virtual object. In order to increase the diversity, you can also use Bezier curves to generate the animation effect of the virtual object. Use the nodes of the animation as the key points of the Bezier curve and bring them into the Bezier curve formula to calculate the animation curve of the virtual object. The calculation process is not repeated here.
该步骤中的描述仅仅为了生成动画过程以及方式,并不构成对本公开的限制。实际上本步骤的核心在于根据步骤S104中所获取的动画配置参数,对动画进行控制或者生成动画,至于具体的生成过程,可以使用本领域中的任何具体生成方式,本公开不做具体限定。The description in this step is only for generating an animation process and manner, and does not constitute a limitation on the present disclosure. In fact, the core of this step is to control or generate the animation according to the animation configuration parameters obtained in step S104. As for the specific generation process, any specific generation method in the art may be used, and the disclosure does not specifically limit it.
本公开实施例提供一种动画生成方法、装置、电子设备和计算机可读存储介质。其中该动画生成方法包括:获取虚拟对象;获取图像传感器采集到的视频;识别所述视频中的人手,得到人手信息;根据所述人手信息获取动画配置参数;根据所述动画配置参数,生成与所述虚拟对象相关的动画。本公开实施例通过获取人手的信息,来确定动画的配置参数,以使动画的效果与人手相关,解决了现有技术中对动画的配置或生成方式不灵活的技术问题。Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer-readable storage medium for generating an animation. The animation generating method includes: obtaining a virtual object; obtaining a video collected by an image sensor; identifying a human hand in the video to obtain human hand information; obtaining an animation configuration parameter according to the human hand information; and generating and Animation related to the virtual object. The embodiment of the present disclosure determines the configuration parameters of the animation by acquiring information of the human hand, so that the effect of the animation is related to the human hand, and solves the technical problem of inflexible configuration or generation of the animation in the prior art.
如图2所示,在本公开的动画生成方法的另一个实施例中,所述步骤S104:根据所述人手信息获取动画配置参数,包括:As shown in FIG. 2, in another embodiment of the animation generating method of the present disclosure, the step S104: obtaining animation configuration parameters according to the human hand information, including:
步骤S201,读取动画行为配置文件;Step S201: Read an animation behavior configuration file;
步骤S202,根据所述人手信息从所述动画行为配置文件中获取所述动画配置参数。Step S202: Acquire the animation configuration parameters from the animation behavior configuration file according to the human hand information.
所述动画行为配置文件中,除了动画配置参数之外还可以包括渲染参数,以使所述动画与人手的混合图像更加多样。The animation behavior configuration file may include rendering parameters in addition to the animation configuration parameters to make the mixed image of the animation and the human hand more diverse.
所述动画行为配置文件中,保存有所述人手信息与动画配置参数的对应关系,该对应关系可以是直接对应关系,比如人手动作与播放速度的对应关系,通过查表的方式直接人手动作所对应的播放速度;所述对应关系也可以是间接的,比如所述动画行为配置文件中保存的是人手动作所对应的播放速度函数,可以通过人手动作的方向或者速度计算出播放速度。关于人手信息和动画配置参数的对应关系,在此不做具体限制,总之只要是通过人手信息,从所述动画行为配置文件中所存储的信息可以获取到所述动画配置参数的方式均可以应用到本公开中。The animation behavior configuration file stores a correspondence between the human hand information and animation configuration parameters, and the correspondence may be a direct correspondence relationship, such as a correspondence between a human hand movement and a playback speed. Corresponding playback speed; the corresponding relationship may also be indirect, for example, the animation speed configuration file stores a playback speed function corresponding to a human hand motion, and the playback speed may be calculated from the direction or speed of the human hand motion. There is no specific limitation on the correspondence between human hand information and animation configuration parameters. In short, as long as it is through human hand information, the manner in which the animation configuration parameters can be obtained from the information stored in the animation behavior configuration file can be applied. Into this disclosure.
在该实施例中,对于动画类型的虚拟对象,所述动画行为配置文件中保存了虚拟对象的序列帧的保存路径,步骤S101中获取到虚拟对象的名称或ID,根据该名称或者ID可以在配置文件中获取虚拟对象的序列帧,所有序列帧可以组成一个完整的虚拟对象。具体的,可以在动画行为配置文件中设置参数 “range”:[idx_start,idx_end],表示在文件的列表中从第idx_start开始到第idx_end结束的连续文件,组成该序列帧;或者设置参数"idx":[idx0,idx1,……],表示在文件的列表中的第idx0、第idx1、……等文件,按次序组成该序列帧。In this embodiment, for a virtual object of an animation type, a save path of a sequence frame of the virtual object is saved in the animation behavior configuration file, and the name or ID of the virtual object is obtained in step S101. According to the name or ID, Sequence frames of virtual objects are obtained in the configuration file. All sequence frames can form a complete virtual object. Specifically, the parameter "range" can be set in the animation behavior configuration file: [idx_start, idx_end], which means that the continuous files from the idx_start to the idx_end in the list of files constitute the sequence frame; or the parameter "idx ": [idx0, idx1, ...], which means that the idx0, idx1, ... and other files in the file list form the sequence frame in order.
所述动画行为配置文件中还包括虚拟对象位置的关联参数,所述关联参数描述序列帧关联哪几个人手关键点,默认可以关联所有关键点,也可以设置跟随其中的几个关键点。除了关联参数外,动画行为配置文件中还包括虚拟对象与关键点的位置关系参数"point","point"中可以包括两组关联点,"point0"表示第一组关联点,"point1"表示第二组。对于每一组关联点,"point"描述了camera中的锚点位置,通过对若干组关键点及其权重,求加权平均得到;使用"idx"字段描述了关键点的序号,对于包括了检测框的人手,还可以使用"topleft"、"topright"、"bottomleft"、"bottomright",分别对应人手外接检测框的四个角(或前景的屏幕四个角)。举例来说,设置虚拟对象跟随人手的4个关键点,分别为9号、10号、11号和12号关键点,切每个关键点的权重为0.25,其中每个关键点的坐标分别为(X 9,Y 9),(X 10,Y 10),(X 11,Y 11),(X 12,Y 12),则可以得到虚拟对象所跟随的锚点的X轴坐标为X a=X 9*0.25+X 10*0.25+X 11*0.25+X 12*0.25,锚点的Y轴坐标为Y a=Y 9*0.25+Y 10*0.25+Y 11*0.25+Y 12*0.25。可以理解的是,"point"中可以包括任一组关联点,并不局限于两组。在上述具体实例中,可以得到两个锚点,虚拟对象跟随这两个锚点的位置发生移动。而实际上,锚点可以不止两个,这与所使用的关联点的组数有关。其中每个关键点的坐标可以有步骤S103中所获取的人手信息中获得。 The animation behavior configuration file further includes association parameters of the position of the virtual object, and the association parameters describe which key points of the human hand are associated with the sequence frame. By default, all key points can be associated, and several key points can be set to follow. In addition to the association parameters, the animation behavior configuration file also includes the position relationship parameter "point" of the virtual object and the key point. "Point" may include two groups of association points, "point0" represents the first group of association points, and "point1" represents Second Group. For each group of related points, "point" describes the position of the anchor point in the camera. It is obtained by weighting the average of several groups of key points and their weights. The "idx" field is used to describe the number of the key points. The human hand of the frame can also use "topleft", "topright", "bottomleft", and "bottomright", which correspond to the four corners of the detection frame (or the four corners of the foreground screen). For example, set the 4 key points of the virtual object to follow the human hand, which are the 9th, 10th, 11th, and 12th keypoints, and cut the weight of each keypoint to 0.25, where the coordinates of each keypoint are (X 9 , Y 9 ), (X 10 , Y 10 ), (X 11 , Y 11 ), (X 12 , Y 12 ), then the X-axis coordinate of the anchor point followed by the virtual object is X a = X 9 * 0.25 + X 10 * 0.25 + X 11 * 0.25 + X 12 * 0.25. The Y-axis coordinate of the anchor point is Y a = Y 9 * 0.25 + Y 10 * 0.25 + Y 11 * 0.25 + Y 12 * 0.25. It can be understood that "point" may include any group of related points, and is not limited to two groups. In the above specific example, two anchor points can be obtained, and the virtual object moves following the positions of the two anchor points. In fact, there can be more than two anchor points, which is related to the number of association points used. The coordinates of each key point can be obtained from the human hand information obtained in step S103.
所述动画行为配置文件中还可以包括虚拟对象的缩放程度与关键点的关系,使用参数"scaleX"和"scaleY"分别描述了x和y方向的缩放需求。对于每个方向,都包括两个参数"start_idx"和"end_idx",其对应了两个关键点,这两个关键点之间的距离乘以"factor"的值后得到缩放的强度。其中factor为预先设置的值,可以为任意值。对于缩放来说,如果"position"中只有一组关联点 "point0",那么x方向就是实际的水平向右方向;y方向为实际垂直向下方向;"scaleX"和"scaleY"都会生效,如果任一有缺失,则按照存在的那个参数保持虚拟对象原始长宽比进行缩放。如果"position"中"point0"和"point1"都有,那么x方向为point1.anchor-point0.anchor得到的向量方向;y方向由x方向顺时针旋转90度确定;"scaleX"无效,x方向的缩放由锚点跟随决定。"scaleY"会生效,若"scaleY"缺失,则保持虚拟对象原始长宽比进行缩放。The animation behavior configuration file may further include the relationship between the zoom level of the virtual object and the key point, and the parameters "scaleX" and "scaleY" are used to describe the scaling requirements in the x and y directions, respectively. For each direction, two parameters "start_idx" and "end_idx" are included, which correspond to two key points. The distance between these two key points is multiplied by the value of "factor" to obtain the intensity of the scaling. The factor is a preset value and can be any value. For scaling, if there is only a set of associated points "point0" in "position", then the x direction is the actual horizontal right direction; the y direction is the actual vertical downward direction; both "scaleX" and "scaleY" take effect. If any is missing, the original object's original aspect ratio is scaled according to the existing parameter. If "point0" and "point1" are both in "position", the x direction is the vector direction obtained by point1.anchor-point0.anchor; the y direction is determined by rotating the x direction 90 degrees clockwise; "scaleX" is invalid and the x direction The scaling is determined by the anchor point following. "scaleY" will take effect. If "scaleY" is missing, the original aspect ratio of the virtual object will be scaled.
所述动画行为配置文件中还可以包括虚拟对象的旋转参数"rotationtype",其只有在"position"中只有"point0"时,才会生效,其可以包括0和1两个值,其中:0:不需要旋转;1:需要根据关键点的相关角度值进行旋转。The animation behavior configuration file may further include a rotation parameter "rotationtype" of the virtual object, which takes effect only when there is only "point0" in "position", which may include two values of 0 and 1, where: 0: No rotation is required; 1: Rotation is required based on the relevant angle value of the keypoint.
所述动画行为配置文件中还可以包括渲染混合模式,所述渲染混合是指将两种颜色混合在一起,具体到本公开中是指将某一像素位置的颜色与将要画上去的颜色混合在一起,从而实现特殊效果,而渲染混合模式是指混合所使用的方式,一般来说混合方式是指将源颜色和目标颜色做计算,得出混合后的颜色,在实际应用中常常将源颜色乘以源因子得到的结果与目标颜色乘以目标因子得到的结果做计算,得到混合后的颜色,举例来说,所述计算为加,则BLENDcolor=SRC_color*SCR_factor+DST_color*DST_factor,其中0≤SCR_factor≤1,0≤DST_factor≤1。根据上述运算公式,假设源颜色的四个分量(指红色,绿色,蓝色,alpha值)是(Rs,Gs,Bs,As),目标颜色的四个分量是(Rd,Gd,Bd,Ad),又设源因子为(Sr,Sg,Sb,Sa),目标因子为(Dr,Dg,Db,Da)。则混合产生的新颜色可以表示为:(Rs*Sr+Rd*Dr,Gs*Sg+Gd*Dg,Bs*Sb+Bd*Db,As*Sa+Ad*Da),其中alpha值表示透明度,0≤alpha≤1。上述混合方式仅仅是举例,实际应用中,可以自行定义或者选择混合方式,所述计算可以是加、减、乘、除、取两者中较大的、取两者中较小的、逻辑运算(和、或、异或等等)。上述混合方式仅仅是举例,实际应用中,可以自行定义或者选择混合方式,所述计算可以是加、减、乘、除、取两者中较大的、取两者中较小的、逻辑运算(和、或、异或等等)。The animation behavior configuration file may further include a rendering blending mode. The rendering blending refers to mixing two colors together. Specifically, in the present disclosure, it refers to mixing a color at a pixel position with a color to be painted on. Together to achieve special effects, and the rendering blending mode refers to the method used for blending. Generally speaking, the blending method refers to calculating the source color and the target color to obtain the mixed color. In actual applications, the source color is often used. The result obtained by multiplying the source factor and the result obtained by multiplying the target color by the target factor is calculated to obtain the mixed color. For example, if the calculation is added, BLENDcolor = SRC_color * SCR_factor + DST_color * DST_factor, where 0≤ SCR_factor≤1, 0≤DST_factor≤1. According to the above calculation formula, it is assumed that the four components of the source color (referring to red, green, blue, and alpha values) are (Rs, Gs, Bs, As), and the four components of the target color are (Rd, Gd, Bd, Ad ), And the source factor is (Sr, Sg, Sb, Sa), and the target factor is (Dr, Dg, Db, Da). The new color produced by the blend can be expressed as: (Rs * Sr + Rd * Dr, Gs * Sg + Gd * Dg, Bs * Sb + Bd * Db, As * Sa + Ad * Da), where the alpha value represents transparency, 0≤alpha≤1. The above mixing method is only an example. In practical applications, the mixing method can be defined or selected by itself. The calculation can be the larger of the addition, the subtraction, the multiplication, the division, the larger one, the smaller of the two, and a logical operation. (And, or, XOR, etc.). The above mixing method is only an example. In practical applications, the mixing method can be defined or selected by itself. The calculation can be the larger of the addition, the subtraction, the multiplication, the division, the larger one, the smaller of the two, and a logical operation. (And, or, XOR, etc.).
所述动画行为配置文件中还可以包括渲染顺序,所述渲染顺序包括两个层次,一个是虚拟对象的序列帧之间的渲染顺序,该顺序可以使用参数"zorder"来定义,"zorder"的值越小,表示渲染的顺序越靠前;第二个层次是虚拟对象和人手之间的渲染顺序,该顺序可以通过多种方式来确定,典型的,也可以使用与"zorder"类似的方式,可以直接设置人手先渲染或者虚拟对象先渲染。在一个实施例中,还可以使用深度测试的方式来确定渲染的顺序,具体的所述深度测试,是指设置一个深度缓冲区,该深度缓冲区与颜色缓冲区相对应,深度缓冲区存储像素的深度信息,颜色缓冲区存储的像素的颜色信息,在决定是否绘制一个物体的表面时,首先将表面对应像素的深度值与存储在深度缓冲区中的值进行比较,如果大于等于深度缓冲区中值,则丢弃这部分;否则利用这个像素对应的深度值和颜色值,分别更新深度缓冲区和颜色缓冲区。这一过程称之为深度测试(DepthTesting)。在绘制场景前,清除颜色缓冲区时,清除深度缓冲区,清除深度缓冲区时将深度缓冲区的值设置为1,表示最大的深度值,深度值的范围在[0,1]之间,值越小表示越靠近观察着,值越大表示远离观察者。在开启深度测试时,还需要设置深度测试的比较函数,典型的函数如下:DF_ALWAYS,总是通过测试,此时与不开启深度测试是一样的,总是使用当前像素的深度值和颜色值更新深度缓冲区和颜色缓冲区;DF_NEVER,总是不通过测试,此时会一直保持深度缓冲和颜色缓冲区中的值,就是任何像素点都不会被绘制到屏幕上;DF_LESS,在当前深度值<存储的深度值时通过;DF_EQUAL,在当前深度值=存储的深度值时通过;DF_LEQUAL,在当前深度值≤存储的深度值时通过;DF_GREATER,在当前深度值>存储的深度值时通过;DF_NOTEQUAL,在当前深度值≠存储的深度值时通过;DF_GEQUAL,在当前深度值>=存储的深度值时通过。所述深度写是与深度测试关联的,一般来说如果开启了深度测试,并且深度测试的结果有可能会更新深度缓冲区的值时,需要开启深度写,以便对深度缓冲区的值进行更新。以下举例说明开启深度测试以及深度写时的图像绘制过程,假设要绘制两个色块,分别为红色和黄色,在渲染队列中,红色块在前,黄色块在后,红色块深度值为0.5,黄色块深度值为0.2,使用的深度测试比较函数为DF_LEQUAL,此时 深度缓冲区中会先被写入0.5,颜色缓冲区中写入红色,之后在渲染黄色时,通过比较函数得出0.2<0.5,通过测试,则将深度缓冲区的值更新为0.2,颜色缓冲区更新为黄色,也就是说因为黄色的深度比较浅,因此需要覆盖到深度较深的红色。使用上述方法可以确定人手和虚拟对象的渲染顺序,以形成合成图像的效果。The animation behavior configuration file may further include a rendering order. The rendering order includes two layers. One is a rendering order between a sequence of frames of a virtual object. The order may be defined using a parameter "zorder". The smaller the value, the higher the rendering order; the second level is the rendering order between the virtual object and the human hand. This order can be determined in various ways. Typically, you can also use a similar method as "zorder" You can directly set manual rendering first or virtual objects rendering first. In one embodiment, a depth test may also be used to determine the order of rendering. The specific depth test refers to setting a depth buffer, which corresponds to the color buffer, and the depth buffer stores pixels. Depth information, the color information of the pixels stored in the color buffer. When deciding whether to draw the surface of an object, the depth value of the corresponding pixel of the surface is first compared with the value stored in the depth buffer. If it is greater than or equal to the depth buffer, Median, discard this part; otherwise use the depth and color values corresponding to this pixel to update the depth buffer and color buffer respectively. This process is called DepthTesting. Before drawing the scene, when clearing the color buffer, clearing the depth buffer, and clearing the depth buffer, set the value of the depth buffer to 1, which represents the maximum depth value, and the range of depth values is between [0,1], A smaller value indicates closer observation, and a larger value indicates farther away from the observer. When opening the depth test, you also need to set a comparison function for the depth test. The typical function is as follows: DF_ALWAYS, which always passes the test. At this time, it is the same as not turning on the depth test. It always uses the current pixel depth and color values to update. Depth buffer and color buffer; DF_NEVER, always fails the test, at this time the values in the depth buffer and color buffer will always be maintained, that is, no pixel will be drawn to the screen; DF_LESS, at the current depth value <Passed when stored depth value; DF_EQUAL, passed when current depth value = stored depth value; DF_LEQUAL, passed when current depth value ≤ stored depth value; DF_GREATER, passed when current depth value> stored depth value; DF_NOTEQUAL passes when the current depth value ≠ the stored depth value; DF_GEQUAL passes when the current depth value> = stored depth value. The deep write is associated with the depth test. Generally, if the depth test is enabled and the result of the depth test may update the value of the depth buffer, the deep write needs to be turned on to update the value of the depth buffer. . The following example illustrates the image drawing process when the depth test is turned on and the depth is written. Assume that two color blocks, red and yellow, are to be drawn. In the rendering queue, the red block is in front, the yellow block is behind, and the red block has a depth of 0.5. , The depth value of the yellow block is 0.2, and the depth test comparison function used is DF_LEQUAL. At this time, 0.5 is written in the depth buffer, red is written in the color buffer, and then 0.2 is obtained through the comparison function when rendering yellow. <0.5, pass the test, then update the value of the depth buffer to 0.2 and the color buffer to yellow, which means that because the depth of yellow is relatively shallow, it is necessary to cover the deep red. The above method can be used to determine the rendering order of human hands and virtual objects to form the effect of a composite image.
进一步的,在步骤S201之前,还可以包括步骤S2001:根据虚拟对象的类型获取与所述类型对应的动画行为配置文件。在该步骤中,可以对虚拟对象的类型进行分类,对不同类型的虚拟对象,获取不同的动画行为配置文件,以使下一步骤中读取动画配置参数的效率更高。Further, before step S201, it may further include step S2001: obtaining an animation behavior configuration file corresponding to the type according to the type of the virtual object. In this step, the types of virtual objects can be classified, and different animation behavior configuration files can be obtained for different types of virtual objects, so that it is more efficient to read the animation configuration parameters in the next step.
进一步的,在步骤S201之前,还可以包括步骤S2002:设置动画行为配置文件,对配置文件中的动画配置参数进行设置。在该步骤中,可以对动画行为配置文件的动画配置参数进行配置,其中所述动画配置参数中还可以包括有渲染参数。Further, before step S201, step S2002 may be further included: setting an animation behavior configuration file, and setting animation configuration parameters in the configuration file. In this step, the animation configuration parameters of the animation behavior configuration file may be configured, where the animation configuration parameters may further include rendering parameters.
为了方便理解,参见附图2b-2g为本公开所公开的一种动画生成方法的具体实例。参见附图2b,为图像传感器所采集到的视频中的视频帧,在初始状态,没有检测到任何人手的动作,因此没有虚拟对象出现。参见附图2c和2d,在这两帧图像中,检测到人手的画圈动作,此时触发虚拟对象—发光轨迹,如图2e-2g所示,发光轨迹根据人手的动作轨迹,做出相同轨迹的转圈动画。In order to facilitate understanding, reference is made to FIGS. 2b-2g for specific examples of a method for generating animation disclosed in this disclosure. Referring to FIG. 2b, for the video frames in the video collected by the image sensor, in the initial state, no human hand motion is detected, so no virtual object appears. Referring to Figures 2c and 2d, in the two frames of the image, the circular motion of the human hand is detected. At this time, the virtual object-lighting trajectory is triggered, as shown in Figures 2e-2g. Animation of trajectory rotation.
图3为本公开实施例提供的动画生成装置30实施例一的结构示意图,如图3所示,该装置包括:虚拟对象获取模块31、视频获取模块32、人手识别模块33、动画配置参数获取模块34和动画生成模块35。其中,FIG. 3 is a schematic structural diagram of a first embodiment of an animation generating device 30 according to an embodiment of the present disclosure. As shown in FIG. 3, the device includes: a virtual object acquisition module 31, a video acquisition module 32, a human hand recognition module 33, and an animation configuration parameter acquisition. Module 34 and animation generation module 35. among them,
虚拟对象获取模块31,用于获取虚拟对象;A virtual object acquisition module 31, configured to acquire a virtual object;
视频获取模块32,用于获取图像传感器采集到的视频;A video acquisition module 32, configured to acquire a video collected by an image sensor;
人手识别模块33,用于识别所述视频中的人手,得到人手信息;A human hand recognition module 33, configured to identify a human hand in the video and obtain human hand information;
动画配置参数获取模块34,用于根据所述人手信息获取动画配置参数;An animation configuration parameter acquisition module 34, configured to acquire animation configuration parameters according to the human hand information;
动画生成模块35,用于根据所述动画配置参数,生成与所述虚拟对象相关的动画。The animation generating module 35 is configured to generate an animation related to the virtual object according to the animation configuration parameter.
进一步的,所述人手识别模块33,包括:Further, the human hand recognition module 33 includes:
第一识别模块,用于识别所述视频中的人手;A first identification module, configured to identify a human hand in the video;
记录模块,用于记录人手的运动轨迹;A recording module, for recording the movement track of a human hand;
分析识别模块,用于分析所述运动轨迹,并将所述运动轨迹识别为预定的动作;An analysis and recognition module, configured to analyze the motion trajectory and identify the motion trajectory as a predetermined action;
人手信息输出模块,用于将所述动作作为人手信息。A human hand information output module is configured to use the action as human hand information.
进一步的,所述动画配置参数获取模块34:Further, the animation configuration parameter acquisition module 34:
用于根据虚拟对象的类型以及所述动作,获取所述动画配置参数,所述动画配置参数用于所述动画的渲染。Configured to obtain the animation configuration parameters according to the type of the virtual object and the action, and the animation configuration parameters are used for rendering of the animation.
进一步的,所述虚拟对象类型为动画类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象自身动画的属性。Further, the type of the virtual object is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an attribute of the animation of the virtual object itself.
进一步的,所述虚拟对象类型为模型类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象的动画节点。Further, the type of the virtual object is a model type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an animation node of the virtual object.
进一步的,所述人手识别模块33,包括:Further, the human hand recognition module 33 includes:
识别结果数据获取模块,用于识别所述视频中的人手,获取识别结果数据;A recognition result data acquisition module, configured to recognize a human hand in the video, and obtain recognition result data;
识别结果数据处理模块,用于对识别结果数据进行平滑和坐标归一化处理,得到处理后的人手;The recognition result data processing module is used for smoothing and coordinate normalizing the recognition result data to obtain the processed manpower;
第一人手信息获取模块,用于根据处理后的人手,得到所述人手信息。The first human hand information acquisition module is configured to obtain the human hand information according to the processed human hand.
进一步的,所述动画生成模块35:Further, the animation generating module 35:
用于根据所述动画配置参数,计算所述虚拟对象的渲染位置以及动画属性,生成所述虚拟对象的动画。And configured to calculate a rendering position and animation attributes of the virtual object according to the animation configuration parameters, and generate an animation of the virtual object.
图3所示装置可以执行图1所示实施例的方法,本实施例未详细描述的部分,可参考对图1所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1所示实施例中的描述,在此不再赘述。The apparatus shown in FIG. 3 can execute the method in the embodiment shown in FIG. 1. For the parts that are not described in detail in this embodiment, refer to the related description of the embodiment shown in FIG. 1. For the implementation process and technical effect of the technical solution, refer to the description in the embodiment shown in FIG. 1, and details are not described herein again.
在本公开实施例提供的动画生成装置实施例二中,如图4所示,所述动画配置参数获取模块34还包括:读取模块41,用于读取动画行为配置文件,所述动画行为配置文件中保存与所述人手信息关联的动画配置参数;第一获取模块42,用于根据所述人手信息从所述动画行为配置文件中获取所述动画配置参数。In the second embodiment of the animation generating apparatus provided by the embodiment of the present disclosure, as shown in FIG. 4, the animation configuration parameter acquisition module 34 further includes a reading module 41 for reading an animation behavior configuration file, where the animation behavior A configuration file stores animation configuration parameters associated with the human hand information; a first acquisition module 42 is configured to acquire the animation configuration parameters from the animation behavior configuration file according to the human hand information.
在该实施例中,所述渲染信息获取模块34还可以包括:第二获取模块43,用于根据虚拟对象的类型获取与所述类型对应的动画行为配置文件。In this embodiment, the rendering information obtaining module 34 may further include a second obtaining module 43 for obtaining an animation behavior configuration file corresponding to the type of the virtual object according to the type of the virtual object.
在该实施例中,所述渲染信息获取模块34还可以包括:动画行为配置文件设置模块44,用于设置动画行为配置文件,对配置文件中的动画配置参数进行设置。In this embodiment, the rendering information acquisition module 34 may further include: 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.
上述实施例二中的装置可以执行图2所示实施例的方法,本实施例未详细描述的部分,可参考对图2所示实施例的相关说明。该技术方案的执行过程和技术效果参见图2所示实施例中的描述,在此不再赘述。The device in the foregoing second embodiment may execute the method in the embodiment shown in FIG. 2. For the parts that are not described in detail in this embodiment, reference may be made to the related description of the embodiment shown in FIG. 2. For the implementation process and technical effect of the technical solution, refer to the description in the embodiment shown in FIG. 2, and details are not described herein again.
图5是图示根据本公开的实施例的电子设备的硬件框图。如图5所示,根据本公开实施例的电子设备50包括存储器51和处理器52。FIG. 5 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure. As shown in FIG. 5, the electronic device 50 according to an embodiment of the present disclosure includes a memory 51 and a processor 52.
该存储器51用于存储非暂时性计算机可读指令。具体地,存储器51可以包括一个或多个计算机程序产品,该计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。该易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。该非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。The memory 51 is configured to store non-transitory computer-readable instructions. Specifically, the memory 51 may include one or more computer program products, which 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, a random access memory (RAM) and / or a cache memory. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
该处理器52可以是中央处理单元(CPU)或者具有数据处理能力和/或指令 执行能力的其它形式的处理单元,并且可以控制电子设备50中的其它组件以执行期望的功能。在本公开的一个实施例中,该处理器52用于运行该存储器51中存储的该计算机可读指令,使得该电子设备50执行前述的本公开各实施例的动画生成方法的全部或部分步骤。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 an embodiment of the present disclosure, the processor 52 is configured to run the computer-readable instructions stored in the memory 51, so that the electronic device 50 executes all or part of the steps of the animation generating method of the foregoing 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 effect, this embodiment may also include well-known structures such as a communication bus and an interface. These well-known structures should also be included in the protection scope of the present invention within.
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
图6是图示根据本公开的实施例的计算机可读存储介质的示意图。如图6所示,根据本公开实施例的计算机可读存储介质60,其上存储有非暂时性计算机可读指令61。当该非暂时性计算机可读指令61由处理器运行时,执行前述的本公开各实施例的动画生成方法的全部或部分步骤。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 according to an embodiment of the present disclosure stores non-transitory computer-readable instructions 61 thereon. When the non-transitory computer-readable instruction 61 is executed by a processor, all or part of the steps of the foregoing animation generating method of the embodiments of the present disclosure are performed.
上述计算机可读存储介质60包括但不限于:光存储介质(例如:CD-ROM和DVD)、磁光存储介质(例如:MO)、磁存储介质(例如:磁带或移动硬盘)、具有内置的可重写非易失性存储器的媒体(例如:存储卡)和具有内置ROM的媒体(例如:ROM盒)。The computer-readable storage medium 60 includes, but is not limited to, optical storage media (for example, CD-ROM and DVD), magneto-optical storage media (for example, MO), magnetic storage media (for example, magnetic tape or mobile hard disk), Non-volatile memory rewritable media (for example: memory card) and media with built-in ROM (for example: ROM box).
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
图7是图示根据本公开实施例的终端设备的硬件结构示意图。如图7所示,该动画生成终端70包括上述动画生成装置实施例。FIG. 7 is a schematic diagram illustrating a hardware structure of a terminal device according to an embodiment of the present disclosure. As shown in FIG. 7, the animation generating terminal 70 includes the foregoing embodiment of the animation generating device.
该终端设备可以以各种形式来实施,本公开中的终端设备可以包括但不限于诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置、车载终端设备、车载显示终端、车载电子后视镜等等的移动终端设备以及诸如数字TV、 台式计算机等等的固定终端设备。The terminal device may be implemented in various forms, and the terminal device in the present disclosure may include, but is not limited to, such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), Mobile terminal equipment such as PMP (Portable Multimedia Player), navigation device, vehicle-mounted terminal equipment, vehicle-mounted display terminal, vehicle-mounted electronic rear-view mirror, etc., and fixed terminal equipment such as digital TV, desktop computer, and the like.
作为等同替换的实施方式,该终端还可以包括其他组件。如图7所示,该动画生成终端70可以包括电源单元71、无线通信单元72、A/V(音频/视频)输入单元73、用户输入单元74、感测单元75、接口单元76、控制器77、输出单元78和存储单元79等等。图7示出了具有各种组件的终端,但是应理解的是,并不要求实施所有示出的组件,也可以替代地实施更多或更少的组件。As an equivalent alternative, the terminal may further include other components. As shown in FIG. 7, the animation generating terminal 70 may include a power source 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, and a controller. 77, an output unit 78, a storage unit 79, and so on. FIG. 7 illustrates a terminal having various components, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
其中,无线通信单元72允许终端70与无线通信系统或网络之间的无线电通信。A/V输入单元73用于接收音频或视频信号。用户输入单元74可以根据用户输入的命令生成键输入数据以控制终端设备的各种操作。感测单元75检测终端70的当前状态、终端70的位置、用户对于终端70的触摸输入的有无、终端70的取向、终端70的加速或减速移动和方向等等,并且生成用于控制终端70的操作的命令或信号。接口单元76用作至少一个外部装置与终端70连接可以通过的接口。输出单元78被构造为以视觉、音频和/或触觉方式提供输出信号。存储单元79可以存储由控制器77执行的处理和控制操作的软件程序等等,或者可以暂时地存储己经输出或将要输出的数据。存储单元79可以包括至少一种类型的存储介质。而且,终端70可以与通过网络连接执行存储单元79的存储功能的网络存储装置协作。控制器77通常控制终端设备的总体操作。另外,控制器77可以包括用于再现或回放多媒体数据的多媒体模块。控制器77可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。电源单元71在控制器77的控制下接收外部电力或内部电力并且提供操作各元件和组件所需的适当的电力。Among them, the wireless communication unit 72 allows radio communication between the terminal 70 and a wireless communication system or network. The A / V input unit 73 is used to receive audio or video signals. The user input unit 74 may generate key input data according to a command input by the user to control various operations of the terminal device. The sensing unit 75 detects the current state of the terminal 70, the position of the terminal 70, the presence or absence of a user's touch input to the terminal 70, the orientation of the terminal 70, the acceleration or deceleration movement and direction of the terminal 70, and the like, and generates a signal for controlling the terminal 70's operation command or signal. The interface unit 76 functions as an interface through which at least one external device can be connected to the terminal 70. The output unit 78 is configured to provide an output signal in a visual, audio, and / or tactile manner. The storage unit 79 may store software programs and the like for processing and control 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. Moreover, the terminal 70 can 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 characters or images. The power supply unit 71 receives external power or internal power under the control of the controller 77 and provides appropriate power required to operate each element and component.
本公开提出的动画生成方法的各种实施方式可以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,本公开提出的动画生成方法的各种实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行 这里描述的功能的电子单元中的至少一种来实施,在一些情况下,本公开提出的动画生成方法的各种实施方式可以在控制器77中实施。对于软件实施,本公开提出的动画生成方法的各种实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储单元79中并且由控制器77执行。Various embodiments of the animation generation method proposed by the present disclosure may be implemented using a computer-readable medium such as computer software, hardware, or any combination thereof. For hardware implementation, various embodiments of the animation generation method proposed by the present disclosure can be implemented by using an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), and a programmable logic device (PLD). , Field Programmable Gate Array (FPGA), processor, controller, microcontroller, microprocessor, electronic unit designed to perform the functions described herein, and in some cases, the present disclosure Various embodiments of the proposed animation generation method may be implemented in the controller 77. For software implementation, various embodiments of the animation generation method proposed by the present disclosure may be implemented with a separate software module allowing at least one function or operation to be performed. The software code may be implemented by a software application program (or program) written in any suitable programming language, and the software code may be stored in the storage unit 79 and executed by the controller 77.
有关本实施例的详细说明可以参考前述各实施例中的相应说明,在此不再赘述。For detailed descriptions of this embodiment, reference may be made to corresponding descriptions in the foregoing embodiments, and details are not described herein again.
以上结合具体实施例描述了本公开的基本原理,但是,需要指出的是,在本公开中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优点、优势、效果等是本公开的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本公开为必须采用上述具体的细节来实现。The basic principles of the present disclosure have been described above in conjunction with specific embodiments, but it should be noted that the advantages, advantages, effects, etc. mentioned in this disclosure are merely examples and not limitations, and these advantages, advantages, effects, etc. cannot be considered as Required for various embodiments of the present disclosure. In addition, the specific details of the above disclosure are only for the purpose of example and easy to understand, and are not limiting, and the above details do not limit the present disclosure to the implementation of the above specific details.
本公开中涉及的器件、装置、设备、系统的方框图仅作为例示性的例子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备、系统。诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“诸如但不限于”,且可与其互换使用。The block diagrams of the devices, devices, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be recognized by those skilled in the art, these devices, devices, equipment, systems can be connected, arranged, and configured in any manner. Words such as "including," "including," "having," and the like are open words that refer to "including, but not limited to," and can be used interchangeably with them. As used herein, the terms "or" and "and" refer to the terms "and / or" and are used interchangeably therewith unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as, but not limited to," and is used interchangeably with it.
另外,如在此使用的,在以“至少一个”开始的项的列举中使用的“或”指示分离的列举,以便例如“A、B或C的至少一个”的列举意味着A或B或C,或AB或AC或BC,或ABC(即A和B和C)。此外,措辞“示例的”不意味着描述的例子是优选的或者比其他例子更好。In addition, as used herein, an "or" used in an enumeration of items beginning with "at least one" indicates a separate enumeration such that, for example, an "at least one of A, B or C" enumeration means A or B or C, or AB or AC or BC, or ABC (ie A and B and C). Furthermore, the word "exemplary" does not mean that the described example is preferred or better than other examples.
还需要指出的是,在本公开的系统和方法中,各部件或各步骤是可以分解和 /或重新组合的。这些分解和/或重新组合应视为本公开的等效方案。It should also be noted that, in the system and method of the present disclosure, each component or each step can be disassembled and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present disclosure.
可以不脱离由所附权利要求定义的教导的技术而进行对在此所述的技术的各种改变、替换和更改。此外,本公开的权利要求的范围不限于以上所述的处理、机器、制造、事件的组成、手段、方法和动作的具体方面。可以利用与在此所述的相应方面进行基本相同的功能或者实现基本相同的结果的当前存在的或者稍后要开发的处理、机器、制造、事件的组成、手段、方法或动作。因而,所附权利要求包括在其范围内的这样的处理、机器、制造、事件的组成、手段、方法或动作。Various changes, substitutions, and alterations to the techniques described herein can be made without departing from the techniques taught by the appended claims. Further, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufacturing, composition of events, means, methods, and actions described above. The composition, means, methods, or actions of processes, machines, manufacturing, and events that currently exist or are to be developed later may be utilized that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein. Accordingly, the appended claims include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or actions.
提供所公开的方面的以上描述以使本领域的任何技术人员能够做出或者使用本公开。对这些方面的各种修改对于本领域技术人员而言是非常显而易见的,并且在此定义的一般原理可以应用于其他方面而不脱离本公开的范围。因此,本公开不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above 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 general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Accordingly, the disclosure is not intended to be limited to the aspects shown herein, but to the broadest scope consistent with the principles and novel features disclosed herein.
为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本公开的实施例限制到在此公开的形式。尽管以上已经讨论了多个示例方面和实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The foregoing description has been given for the purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims (13)

  1. 一种动画生成方法,其特征在于,包括:A method for generating animation, comprising:
    获取虚拟对象;Get virtual objects;
    获取图像传感器采集到的视频;Obtain the video collected by the image sensor;
    识别所述视频中的人手,得到人手信息;Identifying the human hand in the video to obtain the human hand information;
    根据所述人手信息获取动画配置参数;Acquiring animation configuration parameters according to the human hand information;
    根据所述动画配置参数,生成与所述虚拟对象相关的动画。Generate an animation related to the virtual object according to the animation configuration parameter.
  2. 如权利要求1中所述的动画生成方法,其特征在于,所述识别所述视频中的人手,得到人手信息,包括:The method for generating an animation according to claim 1, wherein the step of identifying human hands in the video to obtain human hand information comprises:
    识别所述视频中的人手;Identifying human hands in the video;
    记录人手的运动轨迹;Record the movement track of human hand;
    分析所述运动轨迹,并将所述运动轨迹识别为预定的动作;Analyze the motion trajectory, and identify the motion trajectory as a predetermined action;
    将所述动作作为人手信息。The action is used as human hand information.
  3. 如权利要求2中所述的动画生成方法,其特征在于,所述根据所述人手信息获取动画配置参数,包括:The method for generating an animation according to claim 2, wherein the acquiring animation configuration parameters according to the human hand information comprises:
    根据虚拟对象的类型以及所述动作,获取所述动画配置参数,所述动画配置参数用于所述动画的渲染。The animation configuration parameters are obtained according to the type of the virtual object and the action, and the animation configuration parameters are used for rendering of the animation.
  4. 如权利要求3中所述的动画生成方法,其特征在于:The method for generating an animation according to claim 3, wherein:
    所述虚拟对象类型为动画类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象自身动画的属性。The virtual object type is an animation type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an attribute of the animation of the virtual object itself.
  5. 如权利要求3中所述的动画生成方法,其特征在于:The method for generating an animation according to claim 3, wherein:
    所述虚拟对象类型为模型类型,获取与所述动作对应的动画配置参数,所述动画配置参数用于控制所述虚拟对象的渲染位置和/或虚拟对象的动画节点。The virtual object type is a model type, and an animation configuration parameter corresponding to the action is obtained, and the animation configuration parameter is used to control a rendering position of the virtual object and / or an animation node of the virtual object.
  6. 如权利要求1中所述的动画生成方法,其特征在于,所述根据所述人手信息获取动画配置参数,包括:The method for generating an animation according to claim 1, wherein the acquiring animation configuration parameters according to the human hand information comprises:
    读取动画行为配置文件,所述动画行为配置文件中保存与所述人手信息关 联的动画配置参数;Reading an animation behavior configuration file, and the animation behavior configuration file saves animation configuration parameters associated with the human hand information;
    根据所述人手信息从所述动画行为配置文件中获取所述动画配置参数。Acquiring the animation configuration parameter from the animation behavior configuration file according to the human hand information.
  7. 如权利要求6中所述的动画生成方法,其特征在于,在所述读取动画行为配置文件之前,还包括:The animation generating method according to claim 6, further comprising: before the reading the animation behavior configuration file, further comprising:
    根据虚拟对象的类型获取与所述类型对应的动画行为配置文件。An animation behavior configuration file corresponding to the type is obtained according to the type of the virtual object.
  8. 如权利要求6中所述的动画生成方法,其特征在于,在所述读取动画行为配置文件之前,还包括:The animation generating method according to claim 6, further comprising: before the reading the animation behavior configuration file, further comprising:
    设置动画行为配置文件,对配置文件中的动画配置参数进行设置。Set the animation behavior configuration file and set the animation configuration parameters in the configuration file.
  9. 如权利要求1中所述的动画生成方法,其特征在于,所述识别所述视频中的人手,得到人手信息,包括:The method for generating an animation according to claim 1, wherein the step of identifying human hands in the video to obtain human hand information comprises:
    识别所述视频中的人手,获取识别结果数据;Identify the human hand in the video, and obtain the recognition result data;
    对识别结果数据进行平滑和坐标归一化处理,得到处理后的人手;Perform the smoothing and coordinate normalization processing on the recognition result data to obtain the processed manpower;
    根据处理后的人手,得到所述人手信息。According to the processed manpower, the manpower information is obtained.
  10. 如权利要求1中所述的动画生成方法,其特征在于,所述根据所述动画配置参数,生成与所述虚拟对象相关的动画,包括:The method for generating an animation according to claim 1, wherein the generating an animation related to the virtual object according to the animation configuration parameter comprises:
    根据所述动画配置参数,计算所述虚拟对象的渲染位置以及动画属性,生成所述虚拟对象的动画。Calculate the rendering position and animation attributes of the virtual object according to the animation configuration parameters, and generate an animation of the virtual object.
  11. 一种动画生成装置,其特征在于,包括:An animation generating device, comprising:
    虚拟对象获取模块,用于获取虚拟对象;A virtual object acquisition module for acquiring a virtual object;
    视频获取模块,用于获取图像传感器采集到的视频;A video acquisition module, for acquiring video collected by an image sensor;
    人手识别模块,用于识别所述视频中的人手,得到人手信息;A human hand recognition module, configured to identify the human hand in the video and obtain human hand information;
    动画配置参数获取模块,用于根据所述人手信息获取动画配置参数;An animation configuration parameter acquisition module, configured to acquire animation configuration parameters according to the human hand information;
    动画生成模块,用于根据所述动画配置参数,生成与所述虚拟对象相关的动画。An animation generating module is configured to generate an animation related to the virtual object according to the animation configuration parameter.
  12. 一种电子设备,包括:An electronic device includes:
    存储器,用于存储非暂时性计算机可读指令;以及Memory for storing non-transitory computer-readable instructions; and
    处理器,用于运行所述计算机可读指令,使得所述处理器执行时实现根据权 利要求1-10中任意一项所述的动画生成方法。A processor, configured to run the computer-readable instructions, so that the processor, when executed, implements the animation generating method according to any one of claims 1-10.
  13. 一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时,使得所述计算机执行权利要求1-10中任意一项所述的动画生成方法。A computer-readable storage medium is configured to store non-transitory computer-readable instructions, and when the non-transitory computer-readable instructions are executed by a computer, cause the computer to execute any one of claims 1-10 Animation generation method.
PCT/CN2018/123648 2018-08-24 2018-12-25 Animation generation method and apparatus WO2020037924A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810975738.8 2018-08-24
CN201810975738.8A CN110858409A (en) 2018-08-24 2018-08-24 Animation generation method and device

Publications (1)

Publication Number Publication Date
WO2020037924A1 true WO2020037924A1 (en) 2020-02-27

Family

ID=69592192

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/123648 WO2020037924A1 (en) 2018-08-24 2018-12-25 Animation generation method and apparatus

Country Status (2)

Country Link
CN (1) CN110858409A (en)
WO (1) WO2020037924A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369687B (en) * 2020-03-04 2021-03-30 腾讯科技(深圳)有限公司 Method and device for synthesizing action sequence of virtual object
CN113163135B (en) * 2021-04-25 2022-12-16 北京字跳网络技术有限公司 Animation adding method, device, equipment and medium for video
CN114187656A (en) * 2021-11-30 2022-03-15 上海商汤智能科技有限公司 Action detection method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045373A (en) * 2015-03-26 2015-11-11 济南大学 Three-dimensional gesture interacting method used for expressing user mental model
CN105389005A (en) * 2015-10-27 2016-03-09 武汉体育学院 Three-dimensional interactive display method for twenty-four-form Tai Chi Chuan
CN106709464A (en) * 2016-12-29 2017-05-24 华中师范大学 Method for collecting and integrating body and hand movements of Tujia brocade technique
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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104123007B (en) * 2014-07-29 2017-01-11 电子科技大学 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
CN107911614B (en) * 2017-12-25 2019-09-27 腾讯数码(天津)有限公司 A kind of image capturing method based on gesture, device and storage medium
CN112860168B (en) * 2018-02-08 2022-08-02 北京市商汤科技开发有限公司 Method and device for generating special-effect program file package and special effect, and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045373A (en) * 2015-03-26 2015-11-11 济南大学 Three-dimensional gesture interacting method used for expressing user mental model
CN105389005A (en) * 2015-10-27 2016-03-09 武汉体育学院 Three-dimensional interactive display method for twenty-four-form Tai Chi Chuan
CN106709464A (en) * 2016-12-29 2017-05-24 华中师范大学 Method for collecting and integrating body and hand movements of Tujia brocade technique
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

Also Published As

Publication number Publication date
CN110858409A (en) 2020-03-03

Similar Documents

Publication Publication Date Title
WO2020037923A1 (en) Image synthesis method and apparatus
US10606364B2 (en) Two-handed gesture sequences in virtual, augmented, and mixed reality (xR) applications
US9514570B2 (en) Augmentation of tangible objects as user interface controller
CN108986016B (en) Image beautifying method and device and electronic equipment
WO2020001013A1 (en) Image processing method and device, computer readable storage medium, and terminal
US10642369B2 (en) Distinguishing between one-handed and two-handed gesture sequences in virtual, augmented, and mixed reality (xR) applications
US11176355B2 (en) Facial image processing method and apparatus, electronic device and computer readable storage medium
KR20150108888A (en) Part and state detection for gesture recognition
WO2020019665A1 (en) Three-dimensional special effect generation method and apparatus based on human face, and electronic device
WO2020037924A1 (en) Animation generation method and apparatus
WO2020019664A1 (en) Deformed image generation method and apparatus based on human face
WO2019242271A1 (en) Image warping method and apparatus, and electronic device
CN110069125B (en) Virtual object control method and device
US20210158593A1 (en) Pose selection and animation of characters using video data and training techniques
CN111199169A (en) Image processing method and device
US10440313B2 (en) Method, system and apparatus for spatially arranging a plurality of video frames for display
CN108961314B (en) Moving image generation method, moving image generation device, electronic device, and computer-readable storage medium
CN110069126B (en) Virtual object control method and device
US11361467B2 (en) Pose selection and animation of characters using video data and training techniques
Akman et al. Multi-cue hand detection and tracking for a head-mounted augmented reality system
US11755119B2 (en) Scene controlling method, device and electronic equipment
CN110941327A (en) Virtual object display method and device
CN111258413A (en) Control method and device of virtual object
CN110941974B (en) Control method and device of virtual object
CN111103967A (en) Control method and device of virtual object

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18930593

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.05.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18930593

Country of ref document: EP

Kind code of ref document: A1