Method, device and storage medium for generating animation image
By acquiring the key point positions and line angles in the target object image and adjusting the preset animation image, the complex cartoon image replacement problem in the existing technology is solved, and the generation of an animation image with consistent body posture of the target object is realized.
Patent Information
- Application Number
- CN202010100100.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-18
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-05-12
AI Technical Summary
In existing screen-based interactive game scenarios, the process of replacing target objects with cartoon characters is complex and requires prior measurement and labeling.
By acquiring the location information of key points in the target object image, determining the angle information of the lines connecting the key points, and adjusting the preset animation image to make it consistent with the body shape of the target object, the animation image is generated.
The process of generating animated characters has been simplified, making the animated characters consistent with the body shape of the target object, and providing a more vivid character replacement effect.
Smart Images

Figure CN113345057B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus and storage medium for generating animated characters. Background Technology
[0002] Currently, in some screen-based interactive game scenarios, a cartoon image can be displayed on the screen to replace a target object. This typically involves first labeling the image of the target object, then sampling the target image and stored cartoon images to obtain replacement information, and finally replacing the target object's image with the cartoon image based on this information to obtain the target cartoon image, which can then be displayed on the screen. However, this method requires prior measurement and labeling, making the entire process quite complex. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a method, apparatus and storage medium for generating animated characters.
[0004] According to one aspect of the present invention, a method for generating an animated character is provided, comprising: acquiring an image containing at least one target object; acquiring position information of key points of the target object in the image; determining target angle information of the lines connecting the key points based on the position information of the key points; and adjusting a preset animated character based on the target angle information so that the adjusted animated character is consistent with the posture of the target object in the image, thereby obtaining an animated character corresponding to the target object.
[0005] Optionally, obtaining the location information of key points of the target object in the image includes: predicting candidate bounding box information of the target object in the image based on the image; inputting the candidate bounding box information into a single-person key point recognizer to obtain the location information of the key points.
[0006] Optionally, predicting candidate bounding boxes of the target object in the image based on the image includes: inputting the image into a convolutional neural network; obtaining a first feature map of the image generated by the last convolutional layer of the convolutional neural network; obtaining a second feature map of the image generated by the convolutional layers before the last convolutional layer of the convolutional neural network; and inputting the first feature map and the second feature map into a region generation network to obtain the candidate bounding box information output by the region generation network.
[0007] Optionally, the method further includes: after adjusting the preset animated image according to the target angle information, determining the size information of the target object in the image according to the position information of the key points; adjusting the size of the preset animated image according to the size information so that the size of the adjusted preset animated image is consistent with the size of the target object in the image.
[0008] Optionally, the method further includes: after adjusting the size of the preset animated image according to the size information, using the adjusted animated image to cover the target object in the image to obtain an animated image corresponding to the target object.
[0009] Optionally, the key points include the neck and two ankles of the human body. Determining the size information of the target object in the image based on the position information of the key points includes: determining the size information of the target object in the image based on the position information of the neck and the position information of the two ankles of the target object.
[0010] Optionally, determining the size information of the target object in the image based on the neck position information and the two ankle position information of the target object includes: determining the position of the midpoint between the two ankles of the target object in the image; calculating the distance between the position of the midpoint and the neck position, and using the distance as the size information of the target object.
[0011] Optionally, the method further includes: after determining the target angle information of the line connecting the key points based on the position information of the key points, storing the angle information between the line connecting each key point and other key points and any coordinate axis in a pre-established coordinate system.
[0012] Optionally, the method further includes: acquiring the position information of key points of the preset animated image before acquiring an image containing at least one target object; and determining the angle information of the line connecting the key points of the preset animated image based on the position information of the key points of the preset animated image.
[0013] According to another aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the above-described methods for generating animated characters.
[0014] According to another aspect of the present invention, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute any of the above-described methods for generating animated characters.
[0015] As can be seen from the above, the method for generating animated characters in one or more embodiments of this specification can obtain the position information of key points of the target object in the image, and thus obtain the target angle information of the lines connecting the key points of the target object. By adjusting the angle of the lines connecting the key points in the preset animated character according to the target angle information, the preset animated character can be made to match the body shape of the target object. Therefore, the adjusted preset animated character can be used to replace the image of the target object in the image, thereby achieving the purpose of replacing the image of the target object with the animated character. This allows for a more vivid and lifelike presentation of the animated character corresponding to the target object based on its body shape. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram illustrating a method for generating an animated character according to an exemplary embodiment of the present disclosure;
[0018] Figure 2 This is a flowchart illustrating a method for generating an animated character according to an exemplary embodiment of the present disclosure;
[0019] Figure 3 This is a schematic diagram of key points of the human body according to an exemplary embodiment of the present disclosure;
[0020] Figure 4 This is a schematic diagram illustrating the presentation of candidate boxes in an image according to an exemplary embodiment of the present disclosure;
[0021] Figure 5 This is a schematic diagram illustrating the detection of candidate bounding boxes of a target object in an image using R-CNN according to an exemplary embodiment of the present disclosure;
[0022] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0024] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0025] One or more embodiments of this specification provide a method for generating animated characters, used to replace the image of at least one target object in an image with a preset animated character, so as to... Figure 1 Taking the human body as an example, the implementation process of this method will be illustrated. Figure 1 As shown, a user acquires an image containing at least one target object using an image acquisition device. This target object may include the user, or other target objects besides the user. Human keypoint recognition is performed on the acquired image to obtain the position information of the keypoints. Human dimensions are calculated based on the position information of the keypoints to obtain human size information. Angle information of the lines connecting the keypoints is also calculated based on the position information of the keypoints. The size of a preset animated character and the angles between the lines connecting the keypoints are adjusted based on the calculated size and angle information. The adjusted preset animated character (which may include animation character data and the position information of the keypoints of the animation character) replaces the human figure in the image.
[0026] Figure 2 This is a flowchart illustrating a method for generating an animated character according to an exemplary embodiment of the present disclosure, such as... Figure 2 As shown, the method includes:
[0027] Step 201: Obtain an image containing at least one target object;
[0028] For example, the above image can be obtained by capturing a scene containing at least one target object using an image acquisition device, such as a camera.
[0029] Step 202: Obtain the location information of the key points of the target object in the image;
[0030] The location information can be the coordinates of the key point in the coordinate system.
[0031] For example, SPPE (Single-Person Pose Estimator) can be used to identify key points of all target objects in the image, obtaining the location information of key points of all target objects. This location information can be, for example, the coordinates of the key points. The coordinates of the key points include the coordinates of points on the top of the head, facial features, neck, and major joints of the limbs.
[0032] Step 203: Determine the target angle information of the line connecting the key points based on the position information of the key points;
[0033] In the example above, based on the key coordinates as the location information of the key points, the target angle information of the line connecting the two key points can be the angle between the line connecting the two key points and any coordinate axis in the coordinate system corresponding to the image.
[0034] Step 204: Adjust the preset animated image according to the target angle information so that the adjusted animated image is consistent with the body posture of the target object in the image, thereby obtaining an animated image corresponding to the target object.
[0035] Optionally, the aforementioned preset animated image may have already undergone key point recognition. The angle of the line connecting the key points of the preset animated image can be adjusted according to the target angle information, so that the adjusted animated image is consistent with the body shape of the target object in the image.
[0036] For example, the animated image can be displayed on the screen of an electronic device, and the animated image can be displayed in the image when the animated image is used to replace a target object in the image.
[0037] The method for generating animated characters according to one or more embodiments of this specification obtains the position information of key points of a target object in an image, and then obtains the target angle information of the lines connecting the key points of the target object. Based on the target angle information, the angle of the lines connecting the key points in the preset animated character is adjusted so that the preset animated character is consistent with the body shape of the target object. Thus, the adjusted preset animated character can be used to replace the image of the target object in the image, achieving the purpose of replacing the image of the target object with an animated character. This allows for a more vivid and lifelike presentation of the animated character corresponding to the target object based on its body shape.
[0038] In one possible implementation, the above-mentioned method for generating the animated image may further include: after adjusting the preset animated image according to the target angle information, determining the size information of the target object in the image according to the position information of the key points; wherein, the position information of the key points may be, for example, the coordinates of the key points in the image, and the size information of the target object in the image can be determined according to the coordinates of each key point.
[0039] The size of the preset animated character is adjusted according to the size information so that the adjusted size of the preset animated character matches the size of the target object in the image. After adjusting the size of the preset animated character to match the size of the target object, the adjusted animated character can be used to replace the target object in the image, thereby displaying an animated character in the image that matches the shape and size of the target object.
[0040] In one possible implementation, the method for generating the animated image may further include: after adjusting the size of the preset animated image according to the size information, using the adjusted animated image to cover the target object in the image, thereby obtaining an animated image corresponding to the target object. For example, after obtaining the adjusted animated image, the key points of the adjusted animated image can be mapped to the positions of the key points of the target object in the image, and the image of the target object in the image can be covered. After the coverage is completed, the purpose of replacing the target object in the image with the animated image is achieved.
[0041] In one possible implementation, the target object includes a human body, and the key points include the neck and two ankles. Determining the size information of the target object in the image based on the position information of the key points may include: determining the size information of the target object in the image based on the position information of the neck and the position information of the two ankles. For example, the position information of the key points of the human body is labeled and stored, such as... Figure 3 As shown, numbers 0-17 correspond to key points on the human body. Based on the stored location information of these key points, the body's dimensions can be calculated using the distance between the neck and feet, as shown in the following formula:
[0042]
[0043] Where (x1, y2) is the average of the coordinates of the two ankles (i.e., the midpoint of the coordinates of the two ankles, such as...). Figure 3 The distance between the two key points marked 15 and 16 in the diagram), and (x2, y2) are the coordinates of the human neck, i.e., as shown in the diagram. Figure 3The coordinates corresponding to number 17 in the image are given. Assuming the size of the human figure in the acquired image, calculated using the above formula, is L, then the preset size of the cartoon character is L', and the preset scaling factor for the cartoon character is k, calculated using the following formula:
[0044] k = L' / L;
[0045] The final image size can be obtained by scaling the size of the preset cartoon character by k.
[0046] In one possible implementation, determining the size information of the target object in the image based on the neck position information and the position information of the two ankles includes:
[0047] Determine the position of the midpoint between the two ankles of the target object in the image; for example, first determine the coordinates of the two ankles of the target object in the image, calculate the coordinates of the midpoint between the two coordinates, and the calculated coordinates are used to represent the position of the midpoint between the two ankles of the target object.
[0048] The distance between the midpoint and the neck position is calculated, and this distance is used as the size information of the target object. The neck position can be represented, for example, by the coordinates of the neck of the target object in the image. Therefore, the distance between the midpoint and the neck coordinates can be calculated, thus obtaining the size information of the target object.
[0049] In one possible implementation, obtaining the location information of key points of the target object in the image may include:
[0050] Predict information about the candidate bounding box of the target object in the image based on the image;
[0051] For example, the image can be input into a Faster R-CNN network to predict candidate bounding boxes for target objects in the image.
[0052] Input the candidate box information into SPPE to obtain the location information of the key points. For example... Figure 4As shown, in image 40, rectangle 41 represents the actual location of the target object in the image, and rectangle 42 represents the predicted location of the target object using the Faster R-CNN detection algorithm. Inputting rectangle 42 into the SPPE network yields keypoint location information for the target object. The SPPE network is a top-down recognition structure, first detecting the human body in the image, then identifying the keypoints of each body. Therefore, when returning the identified keypoints, it can return the target object's location information in the image, as well as the angle information between the lines connecting the keypoints. This allows the pre-defined animated image with identified keypoints to be reset using the obtained target angle information, scaled according to the target object's size, and placed in the corresponding position in the image to replace the target object's image. By using SPPE for keypoint recognition, even in scenes containing multiple target objects, fast animated image replacement can still be achieved.
[0053] In one possible implementation, predicting candidate bounding boxes of the target object in the image based on the image may include:
[0054] The image is input into a convolutional neural network; for example, the convolutional neural network can be the R-CNN_base network in an R-CNN network. The R-CNN network can be divided into the R-CNN_base network and the R-CNN_top network. The R-CNN_base network is the part of the R-CNN network used to extract image features, and it contains the base network for feature extraction, which can be VGG16 or ResNet (full name: Residual Network). The R-CNN_top network is the part of the R-CNN network used for feature processing, such as non-pure CNN operations like softmax, and is used to obtain confidence scores and bounding boxes. It has the function of merging feature maps before trimming. The input dimension of this part of the feature map is consistent with the output dimension of the ROI pooling layer, and the output dimension of this part of the feature map is consistent with the input dimension required for the final classification and bounding box localization.
[0055] Obtain the first feature map of the image generated by the last convolutional layer of the convolutional neural network;
[0056] Obtain the second feature map of the image generated by the convolutional layers before the last convolutional layer in the convolutional neural network; for example, the convolutional layers before the last convolutional layer in the R-CNN_base network can be all the convolutional layers before the last convolutional layer in the R-CNN_base network;
[0057] The first feature map and the second feature map are input into the RPN (Region Proposal Network) to obtain the candidate box information output by the region proposal network. For example... Figure 5 As shown, after inputting the image into the R-CNN_base network, the first feature map and the second feature map are obtained. These two feature maps are then input into the RPN network. The RPN network filters out the image regions most likely to contain the target, i.e., the Region of Interest (ROI), which is the information of the candidate boxes. This image region serves as the input to the R-CNN_top network, which determines the precise coordinates and category of the target object within the R-CNN_base network based on the candidate box information. When detecting candidate boxes based on R-CNN_base, not only the first feature map but also the second feature map is input into the RPN network. Therefore, the target object in the image will have more samples of different sizes as target candidate boxes. By comparing the confidence scores of target objects in similar locations, detection results with high confidence and more accurate localization can be obtained.
[0058] In one possible implementation, the method for generating the animated image may further include: after determining the target angle information of the lines connecting the key points based on the position information of the key points, storing the angle information between the connecting lines between each of the key points and other key points and any coordinate axis in a pre-established coordinate system. The pre-established coordinate system may be, for example, a Cartesian coordinate system with the length direction of the image as the X-axis and the width direction as the Y-axis, or with the length direction of the image as the Y-axis and the width direction as the X-axis. The stored angle information may be, for example, the angle between the connecting lines and the X-axis, or the angle between the connecting lines and the Y-axis.
[0059] In one possible implementation, the key point may be the location of a joint in the human body, wherein the joints of the human body include, but are not limited to, those mentioned above. Figure 3 The key points, excluding the facial features (as indicated by numbers 5 to 17), refer to joints or limb joints. It should be noted that, in another possible implementation, the key points may further include the facial features of the human body, for example, such as... Figure 3 The facial features marked with numbers 1 to 5.
[0060] In one possible implementation, the image may include at least one frame from a series of video images; presenting the animated image may include: presenting the animated image within the video images. Based on this, after processing all images in a video as described in steps 201 to 204 above, the images of all target objects in the video can be replaced with corresponding animated images. Furthermore, based on the dynamics of the target objects, animated images consistent with the dynamics of the target objects can be presented in the video, thus achieving the goal of presenting dynamic target images in the video using animated images, providing users with a more vivid visual experience.
[0061] In one possible implementation, the above-mentioned method for generating animated characters may further include: acquiring the position information of key points of the preset animated character before acquiring an image containing at least one target object;
[0062] The angle information of the lines connecting the key points of the preset animated character is determined based on the position information of the key points. The specific method for obtaining the position information of the key points of the preset animated character is the same as the method for obtaining the position information of the key points of the target object, and can be referred to the method for obtaining the position information of the key points of the target object; it will not be repeated here.
[0063] In one possible implementation, adjusting the preset animated character based on the target angle information may include:
[0064] The angles of the lines connecting the key points in the preset animated character are adjusted according to the target angle information. The goal of adjusting the angles of the lines connecting the key points in the preset animated character is to make the angles of the lines connecting the key points in the preset animated character consistent with the corresponding target angles in the target angle information. For example, if the angle between the two key points corresponding to the wrist joint and elbow joint of the target object is 90 degrees, then the angle between the two key points corresponding to the wrist joint and elbow joint of the preset animated character is adjusted to 90 degrees, so that the posture of the preset animated character is consistent with the posture of the target object.
[0065] In one possible implementation, the method for generating the animated character may further include: after obtaining the position information of key points of the preset animated character, determining the size information of the preset animated character based on the position information of the key points of the preset animated character. Based on this, the size information of the preset animated character can be pre-stored before adjusting the preset animated character according to the size of the target object. This allows for rapid adjustment when the size of the preset animated character needs to be adjusted, thus improving adjustment efficiency.
[0066] It should be noted that the method of this embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this embodiment, and the multiple devices will interact with each other to complete the method described.
[0067] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0068] Figure 6 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0069] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0070] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0071] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0072] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0073] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0074] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0075] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0076] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in the details for the sake of brevity.
[0077] Additionally, to simplify the description and discussion, and to avoid obscuring the invention, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the invention, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the invention will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) are set forth to describe exemplary embodiments of the invention, it will be apparent to those skilled in the art that the invention may be practiced without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0078] Although the invention has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0079] The embodiments of this invention are intended to cover all such substitutions, modifications, and variations falling within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating an animated image, characterized in that: include: Acquire an image containing at least one target object; Acquire position information of key points of the target object in the image; Determine target angle information of the line between the key points according to the position information of the key points; Adjusting a preset animated image according to the target angle information so that the adjusted animated image is consistent with the posture of the target object in the image, thereby obtaining an animated image corresponding to the target object; The method further comprises: Before acquiring an image containing at least one target object, acquiring position information of key points of the preset animation image; The angle information of the line between the key points of the preset animation image is determined according to the position information of the key points of the preset animation image.
2. The method according to claim 1, characterized in that Acquiring position information of key points of the target object in the image includes: Predicting information of a candidate box of the target object in the image according to the image; The information of the candidate frame is input into a single-person key point identifier to obtain the position information of the key point.
3. The method according to claim 2, characterized in that Predicting information of a candidate box of the target object in the image according to the image includes: Inputting the image into a convolutional neural network; Obtaining a first feature map of the image generated by the last convolutional layer of the convolutional neural network; Obtaining a second feature map of the image generated by a convolutional layer before the last convolutional layer in the convolutional neural network; The first feature map and the second feature map are input into a region generation network to obtain information of the candidate box output by the region generation network.
4. The method according to claim 1, characterized in that: The method further comprises: After adjusting the preset animation image according to the target angle information, determining the size information of the target object in the image according to the position information of the key point; The size of the preset animation image is adjusted according to the size information, so that the adjusted size of the preset animation image is consistent with the size of the target object in the image.
5. The method according to claim 4, characterized in that The method further comprises: After adjusting the size of the preset animated image according to the size information, the adjusted animated image is used to cover the target object in the image to obtain an animated image corresponding to the target object.
6. The method according to claim 4, characterized in that The key points include the neck and two ankles of the human body, and determining the size information of the target object in the image according to the position information of the key points includes: The size information of the target object in the image is determined according to the position information of the neck and the position information of the two ankles of the target object.
7. The method according to claim 6, characterized in that Determining the size information of the target object in the image according to the neck position information and the two ankle position information of the target object includes: determining a location of a midpoint between two ankles of the target object in the image; The distance between the midpoint and the neck is calculated, and the distance is used as the size information of the target object.
8. The method according to claim 1, characterized in that The method further comprises: After determining the target angle information of the line between the key points according to the position information of the key points, for the line between each key point and other key points, the angle information between the line and any coordinate axis in the pre-established coordinate system is stored.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for generating an animated image according to any one of claims 1 to 8 is implemented.
10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for generating an animated character as described in any one of claims 1 to 8.
