Image processing method, terminal device and storage medium
By transforming the posture image of the target object to generate a video or image of the target posture, the problem of poor image and video quality caused by insufficient dance skills is solved, and a convenient and high-quality user experience is achieved.
Patent Information
- Application Number
- CN202110948278.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-18
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-08-18
AI Technical Summary
It is difficult for users without dance skills to shoot high-quality images or videos of specified postures, which affects the user experience.
By obtaining the posture image of the target object, transform the posture image according to the preset or selected target posture, generate the target video or image, and use the posture transformation network model to achieve accurate transformation and synthesis of the posture.
It improves the user experience and ensures that users without dance skills can shoot high-quality videos or images of specified postures, with easy operation and high flexibility.
Smart Images

Figure CN113705401B
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to an image processing method, a terminal device and a storage medium. Background Art
[0002] The rapid popularization of terminal devices has brought more fun and convenience to users' work and life. For example, the image capture device of the terminal device can be used to shoot videos of users imitating currently popular dances for mutual sharing or preservation as a souvenir.
[0003] In the process of conceiving and implementing the present application, the inventors discovered that there are at least the following problems: users without dance skills may not be able to capture specified images and / or videos, or the captured images and / or videos may be of poor quality, affecting the user experience.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the invention
[0005] The purpose of this application is to provide an image processing method, terminal device and storage medium, which are easy to operate and effectively improve the user experience.
[0006] To achieve the above purpose, the technical solution of this application is implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides an image processing method, comprising:
[0008] Acquire at least one frame of posture image of the target object;
[0009] The posture of the target object in the posture image is transformed according to the target posture, and a target video is acquired based on the transformed posture image.
[0010] Optionally, acquiring at least one frame of posture image of the target object includes:
[0011] Outputting at least one preset posture to instruct the target object to pose according to the preset posture;
[0012] Acquire at least one frame of posture image of the target object captured by an image capture device.
[0013] Optionally, the outputting at least one preset posture includes:
[0014] At least one posture is selected from the target postures as a preset posture according to a preset rule, and the preset posture is output. Optionally, the posture includes a posture key point and / or a posture orientation.
[0015] Optionally, the acquiring of at least one frame of posture image of the target object taken by an image capture device comprises:
[0016] When it is determined that the matching degree between the posture of the target object and the preset posture meets a preset condition, an image capture device is controlled to shoot the target object to obtain at least one frame of posture image.
[0017] Optionally, before transforming the posture of the target object in the posture image according to the target posture, the method further includes:
[0018] Outputting at least one posture identifier;
[0019] An operation is selected according to the received posture identifier to determine the target posture.
[0020] Optionally, transforming the posture of the target object in the posture image according to the target posture includes:
[0021] Extracting the posture of the target object in the posture image to obtain the posture of the target object;
[0022] The posture of the target object in the posture image is transformed into a target posture to obtain the transformed posture image.
[0023] Optionally, transforming the posture of the target object in the posture image into the target posture to obtain the transformed posture image includes:
[0024] The target posture, the posture image and the posture of the target object are input into a set posture transformation network model to obtain the transformed posture image output by the posture transformation network model, and the posture of the target object in the transformed posture image is the target posture.
[0025] Optionally, before transforming the posture of the target object in the posture image according to the target posture, the method further includes:
[0026] In response to the image selection operation, determining a first posture image to be transformed and a second posture image not to be transformed;
[0027] The step of acquiring a target video based on the transformed posture image comprises:
[0028] The two posture images and the transformed first posture image are synthesized into a target video.
[0029] In a second aspect, an embodiment of the present application provides an image processing method, including:
[0030] Obtaining a posture image of the target object;
[0031] In response to a preset operation, determining a target posture of the target object;
[0032] The posture of the target object in the posture image is transformed into the target posture to obtain a target image.
[0033] Optionally, before responding to the preset operation, the method further includes:
[0034] The posture of the target object is displayed in the posture image.
[0035] Optionally, the response to a preset operation includes at least one of the following:
[0036] A gesture selection operation is detected;
[0037] An editing operation of a gesture on the target object is detected.
[0038] Optionally, transforming the posture of the target object in the posture image into the target posture to obtain the target image includes:
[0039] The target posture, the posture image and the posture of the target object are input into a set posture transformation network model to obtain a target image output by the posture transformation network model, and the posture of the target object in the target image is the target posture.
[0040] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of any of the above-described image processing methods are implemented.
[0041] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned image processing methods are implemented.
[0042] The image processing method, terminal device and storage medium provided by the embodiment of the present application include: obtaining at least one frame of posture image of the target object; transforming the posture of the target object in the posture image according to the target posture, and obtaining the target video based on the transformed posture image. In this way, the posture of the target object in the posture image of the target object is transformed according to the target posture, so as to generate a video based on the transformed posture image, so as to obtain a video in which the posture of the target object is the target posture, which is convenient to operate and effectively improves the user experience.
[0043] Optionally, the image processing method, terminal device and storage medium provided in the embodiments of the present application include: obtaining a posture image of a target object; determining a target posture of the target object in response to a preset operation; transforming the posture of the target object in the posture image into the target posture to obtain a target image. In this way, the posture of the target object in the posture image is transformed according to the target posture, so that an image in which the posture of the target object is the target posture can be obtained, which is convenient to operate and effectively improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor.
[0045] Figure 1 A schematic diagram of the hardware structure of a mobile terminal provided in an embodiment of the present application;
[0046] Figure 2 A communication network system architecture diagram provided for an embodiment of the present application;
[0047] Figure 3 A flowchart of an image processing method provided in the first embodiment of the present application;
[0048] Figure 4 A flowchart of an image processing method provided in the second embodiment of the present application;
[0049] Figure 5 A schematic diagram of a specific flow chart of an image processing method provided in the third embodiment of the present application;
[0050] Figure 6 A schematic diagram of a specific flow chart of an image processing method provided in the fourth embodiment of the present application;
[0051] Figure 7 This is a schematic diagram of a person's posture before the posture of the photo is transformed in the fourth embodiment of the present application;
[0052] Figure 8 This is a schematic diagram of a person's posture after photo editing in the fourth embodiment of the present application;
[0053] Fig. 9 This is a schematic diagram of the posture of a person after the posture of the photo is transformed in the fourth embodiment of the present application.
[0054] The realization of the purpose, functional features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings have shown clear embodiments of this application, which will be described in more detail later. These drawings and textual descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0056] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. Optionally, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context in the specific embodiment.
[0057] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of..." or "when..." or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising", "including" indicate that there are described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Thus, “A, B, or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A, B, and C.” An exception to this definition will occur only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.
[0058] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0059] It should be noted that in this article, step codes such as S30 and S31 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S31 first and then S30, etc., but these should all be within the scope of protection of this application.
[0060] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0062] The terminal device may be implemented in various forms. For example, the terminal device described in this application may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0063] The following description will be made by taking a mobile terminal as an example, and those skilled in the art will understand that, in addition to components specifically used for mobile purposes, the construction according to the embodiments of the present application can also be applied to fixed-type terminals.
[0064] See also Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application, the mobile terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, wireless network module 102, audio output unit 103, A / V (audio / video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111 and other components. Those skilled in the art can understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0065] Combine the following Figure 1 The following is a detailed introduction to the various components of the mobile terminal:
[0066] The radio frequency unit 101 can be used for receiving and sending signals during information transmission or calls. Specifically, after receiving the downlink information of the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. Optionally, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.
[0067] Wireless network is a short-range wireless transmission technology. The mobile terminal can help users send and receive emails, browse web pages and access streaming media through the wireless network module 102, which provides users with wireless broadband Internet access. Figure 1 The wireless network module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as required without changing the essence of the invention.
[0068] The audio output unit 103 can convert the audio data received by the RF unit 101 or the wireless network module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0069] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the wireless network module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, and other operating modes, and can process such sound into audio data. The processed audio (voice) data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 can implement various types of noise elimination (or suppression) algorithms to eliminate (or suppress) noise or interference generated in the process of receiving and sending audio signals.
[0070] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured on the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0071] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0072] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile terminal. Optionally, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 110, and can receive and execute the command sent by the processor 110. Optionally, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Optionally, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc., which are not specifically limited here.
[0073] Optionally, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Then, the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Figure 1 In the figure, the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement the input and output functions of the mobile terminal, which is not limited here.
[0074] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
[0075] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area. Optionally, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. Optionally, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0076] The processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, so as to monitor the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. Optionally, the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.
[0077] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0078] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0079] In order to facilitate understanding of the embodiments of the present application, the communication network system on which the mobile terminal of the present application is based is described below.
[0080] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present application, wherein the communication network system is an LTE system of universal mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are connected in sequence for communication.
[0081] Optionally, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0082] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Optionally, eNodeB 2021 may be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 may provide UE 201 with access to EPC 203 .
[0083] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MME 2033, SGW (Serving Gate Way) 2034, PGW (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function) 2036. Optionally, MME 2031 is a control node that processes signaling between UE 201 and EPC 203, providing bearer and connection management. HSS 2032 is used to provide some registers to manage such as home location register ( Figure 2 All user data can be sent through SGW2034. PGW2035 can provide IP address allocation and other functions for UE 201. PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources. It is the policy and charging execution function unit ( Figure 2 (not shown) selects and provides available policy and charging control decisions.
[0084] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem) or other IP services.
[0085] Although the above introduction takes the LTE system as an example, those skilled in the art should know that the present application is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA and future new network systems, etc., which are not limited here.
[0086] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0087] First embodiment
[0088] See also Figure 3 , is a flowchart of an image processing method provided in the first embodiment of the present application. The image processing method can be applied to the case of generating a video in which the posture of the target object is a specified posture. The method can be executed by a terminal device or an image processing device provided in an embodiment of the present application. The image processing device can be implemented in software and / or hardware. Optionally, the image processing device can be set in a terminal device or a server. The image processing method includes the following steps:
[0089] Step S30: Acquire at least one frame of posture image of the target object;
[0090] It is understandable that the posture image can be a real-time shot of the target object by the terminal device, or a historical shot of the target object by the terminal device, or a shot of the target object by a third-party device and transmitted to the terminal device. The source of the posture image is not specifically limited here. The target object can be a person, an object, or a person and an object. The posture image contains the posture of the target object, such as a standing posture or a sitting posture of a person, etc. At the same time, the posture image can be one frame or multiple frames.
[0091] Step S31: transforming the posture of the target object in the posture image according to the target posture, and acquiring a target video based on the transformed posture image.
[0092] Optionally, the target posture is a posture that the target object needs to present in the posture image, and the target posture may be one posture or multiple postures. If there is only one target posture, transforming the posture of the target object in the posture image according to the target posture may be transforming the posture of the target object in each frame of the posture image into the target posture to obtain the transformed posture image.
[0093] For example, assuming that the posture image has 5 frames, namely image a, image b, image c, image d and image e, if there is only one target posture, the postures of the target objects in image a, image b, image c, image d and image e can be transformed into the target posture respectively to obtain the 5 frames of the transformed posture images. If there are multiple target postures and there is only one frame of the posture image, transforming the posture of the target object in the posture image according to the target posture can be transforming the posture of the target object in the posture image into the corresponding target posture respectively to obtain multiple frames of the transformed posture images.
[0094] For example, assuming that the posture image has only one frame, if there are five target postures, namely posture A, posture B, posture C, posture D and posture E, the posture of the target object in the posture image can be transformed into posture A, posture B, posture C, posture D and posture E in sequence, so as to obtain five frames of the transformed posture images. If there are multiple target postures and the number of the posture images is the same as the number of the target postures, transforming the posture of the target object in the posture image according to the target posture can be transforming the posture of the target object in each frame of the posture image into the corresponding target posture, so as to obtain multiple frames of the transformed posture images.
[0095] For example, assuming that the posture image has 5 frames, namely image a, image b, image c, image d and image e, if the target postures have 5 frames, namely posture A, posture B, posture C, posture D and posture E, then the posture of the target object in image a can be transformed into posture A to obtain the transformed image a, the posture of the target object in image b can be transformed into posture B to obtain the transformed image b, the posture of the target object in image c can be transformed into posture C to obtain the transformed image c, the posture of the target object in image d can be transformed into posture D to obtain the transformed image d, and the posture of the target object in image e can be transformed into posture E to obtain the transformed image e, that is, 5 frames of the transformed posture images can be obtained. If there are multiple target postures and the number of the posture images is different from the number of the target postures, then transforming the posture of the target object in the posture image according to the target posture can be first determining the posture image to be transformed selected by the user, and then transforming the posture of the target object in the posture image to be transformed into the corresponding target posture.
[0096] For example, assuming that the posture image has 5 frames, namely image a, image b, image c, image d and image e, if there are 2 target postures, namely posture A and posture B, and the posture images to be transformed selected by the user are image a and image b, then the posture of the target object in image a can be transformed into posture A to obtain the transformed image a, and the posture of the target object in image b can be transformed into posture B to obtain the transformed image b, that is, 2 frames of the transformed posture images are obtained. Correspondingly, the target video is obtained based on the transformed posture images, which can be synthesized by synthesizing the transformed posture images to obtain the target video, or by synthesizing the transformed posture images with the untransformed posture images to obtain the target video. It should be noted that when synthesizing the posture images, the synthesis can be based on the shooting time sequence or position sequence of the posture images.
[0097] The method of this embodiment transforms the posture of the target object in the posture image of the target object according to the target posture to generate a video based on the transformed posture image, thereby obtaining a video in which the posture of the target object is the target posture. The operation is convenient and the user experience is effectively improved.
[0098] Optionally, acquiring at least one frame of posture image of the target object includes:
[0099] Outputting at least one preset posture to instruct the target object to pose according to the preset posture;
[0100] Acquire at least one frame of posture image of the target object captured by an image capture device.
[0101] Optionally, in order to accurately and comprehensively acquire the posture of the target object so as to be able to accurately transform the posture of the target object, that is, to accurately transform the posture of the target object into the target posture, the terminal device may first output at least one preset posture to instruct the target object to pose according to the preset posture.
[0102] Optionally, the preset posture includes posture key points and / or posture orientation. Taking the target object as a person as an example, the preset posture may include posture key points such as all facial features and / or joints of the human body. The posture orientation may refer to the orientation of the side where the human face is located, such as the side where the human face is located facing the terminal device, or the side where the human face is located facing away from the terminal device. Of course, the preset posture can be set according to actual needs. For example, in order to fully obtain all posture key points of the human body, the preset posture may be a posture of a human body standing with limbs spread out.
[0103] The number of the preset postures can also be set according to actual needs, and can be one preset posture or multiple preset postures. It can be understood that the terminal device can also output a text or voice prompt message to instruct the target object to pose according to the posture information contained in the prompt message.
[0104] Optionally, the outputting of at least one preset posture comprises: selecting at least one posture from the target posture as a preset posture according to a preset rule, and outputting the preset posture. The preset rule can be set according to actual needs, for example, a clear and concise target posture can be selected as the preset posture, or a target posture containing the most posture key points can be selected as the preset posture. In this way, the preset posture is directly selected from the target posture, which is convenient to operate, and because the target posture is usually a relatively coherent posture, the speed of changing the posture of the target object in the posture image can be accelerated.
[0105] Optionally, the acquiring of at least one frame of posture image taken by the image capture device of the target object includes: when it is determined that the matching degree between the posture of the target object and the preset posture meets a preset condition, controlling the image capture device to shoot the target object to obtain at least one frame of posture image. It can be understood that after the terminal device outputs at least one preset posture for indicating the target object to pose, the posture of the target object can be acquired through the preview interface of the image capture device, and the matching degree between the posture of the target object and the preset posture meets the preset condition. If it is determined that the matching degree between the posture of the target object and the preset posture meets the preset condition, the image capture device is controlled to shoot the target object to obtain at least one frame of posture image; and / or, if it is determined that the matching degree between the posture of the target object and the preset posture does not meet the preset condition, a prompt message for prompting the target object to adjust the posture can be output and / or continue to wait until it is determined that the matching degree between the posture of the target object and the preset posture meets the preset condition.
[0106] Optionally, the preset condition can be set according to actual needs, for example, the similarity between the posture of the target object and the preset posture is greater than a preset similarity threshold, etc. In this way, when it is determined that the matching degree between the posture of the target object and the preset posture meets the preset condition, the image capture device is controlled to shoot the target object, which can ensure that a posture image with better quality is obtained, further speed up the speed of changing the posture of the target object in the posture image, and improve the user experience.
[0107] The method of this embodiment first outputs a preset posture for instructing the target object to pose, and then obtains a posture image of the target object to accurately and comprehensively obtain the posture of the target object, thereby improving the accuracy of transforming the posture of the target object.
[0108] Optionally, before transforming the posture of the target object in the posture image according to the target posture, the method further includes:
[0109] Outputting at least one posture identifier;
[0110] An operation is selected according to the received posture identifier to determine the target posture.
[0111] Optionally, some videos may be pre-selected as video templates, and then the posture of the object in each frame of each video is parsed to obtain the posture of the object in each frame, thereby obtaining the posture set corresponding to the video. Since the posture sets corresponding to different videos may be different, the videos that the user needs to generate are also different, that is, the target postures required by the user are also different. Therefore, the terminal device may first output at least one posture identifier, and each posture identifier corresponds to a posture set of a video. The user may input a posture identifier selection operation through touch operation, air operation or voice, and accordingly, the terminal device determines the posture set corresponding to the selected posture identifier as the target posture according to the received posture identifier selection operation. For example, the terminal device may display the identifier p of the posture set corresponding to the dance video A and the identifier q of the posture set corresponding to the dance video B, so that the user can select which dance video corresponding to the posture set to use as the target posture from the two.
[0112] The method of this embodiment outputs a posture identifier for the user to select a target posture, which is flexible and convenient to operate and further improves the user experience.
[0113] Optionally, transforming the posture of the target object in the posture image according to the target posture includes:
[0114] Extracting the posture of the target object in the posture image to obtain the posture of the target object;
[0115] The posture of the target object in the posture image is transformed into a target posture to obtain the transformed posture image.
[0116] Optionally, the posture estimation network model set in the posture image input can be used to extract the posture of the target object in the posture image to obtain the posture of the target object in the posture image output by the posture estimation network model. Optionally, the target object in the posture image can also be identified to obtain the posture of the target object. For each frame of posture image, the posture of the target object in the posture image is transformed into the corresponding target posture to obtain the transformed posture image.
[0117] Optionally, the step of transforming the posture of the target object in the posture image into the target posture to obtain the transformed posture image comprises: inputting the target posture, the posture image and the posture of the target object into a posture transformation network model, obtaining the transformed posture image output by the posture transformation network model, wherein the posture of the target object in the transformed posture image is the target posture. Here, the posture transformation network model can be obtained by training a plurality of training samples based on a generative adversarial network algorithm. For each frame of posture image, the posture image, the posture of the target object in the posture image and the corresponding target posture are used as inputs of the posture transformation network model, and the corresponding output of the posture transformation network model is a posture image in which the posture of the target object is the target posture, i.e., a posture image after the posture of the target object is transformed. The method of this embodiment transforms the posture of the target object in the posture image through the posture transformation network model, which is flexible in operation and highly accurate, and further improves the user experience.
[0118] Optionally, before transforming the posture of the target object in the posture image according to the target posture, the method further includes:
[0119] In response to the image selection operation, determining a first posture image to be transformed and a second posture image not to be transformed;
[0120] The step of acquiring a target video based on the transformed posture image comprises:
[0121] The two posture images and the transformed first posture image are synthesized into a target video.
[0122] Optionally, when there are multiple frames of the posture image, the user may only need to transform the posture of the target object in some of the posture images, but may not need to transform the posture of the target object in the remaining posture images. At this time, the terminal device can display an image selection interface, receive an input image selection operation, and determine the first posture image to be transformed and the second posture image not to be transformed in response to the image selection operation, so as to transform the posture of the target object in the first posture image, and then synthesize the second posture image and the transformed first posture image into a target video. It should be noted that the number of the first posture images can be one frame or more frames, and the number of the second posture images can also be one frame or more frames, which can be set by the user. For example, assuming that the posture image has 5 frames, namely image a, image b, image c, image d and image e, and there are 2 target postures, namely posture A and posture B. If the first posture images to be transformed selected by the user are image a and image b, then the posture of the target object in image a can be transformed into posture A to obtain the transformed image a, and the posture of the target object in image b can be transformed into posture B to obtain the transformed image b, and then the transformed image a, the transformed image b, and image c, image d and image e are synthesized into the target video.
[0123] The method of this embodiment can flexibly set the posture images to be changed and the posture images not to be changed in combination with actual needs, thereby increasing the flexibility of generating videos and further improving the user experience.
[0124] Second embodiment
[0125] Based on the same application concept as the above embodiments, refer to Figure 4 , is a flow chart of an image processing method provided in the second embodiment of the present application. The image processing method can be applied to the case where an image with a posture of a target object being a specified posture is generated. The method can be executed by a terminal device or an image processing apparatus provided in an embodiment of the present application. The image processing apparatus can be implemented in software and / or hardware. Optionally, the image processing apparatus can be set in a terminal device or a server. The image processing method comprises the following steps:
[0126] Step S40: Acquire a posture image of the target object;
[0127] It is understandable that the posture image can be a real-time shot of the target object by the terminal device, or a historical shot of the target object by the terminal device, or a shot of the target object by a third-party device and transmitted to the terminal device. The source of the posture image is not specifically limited here. Optionally, the posture image can be a frame, and the target object can be a person, an object, or a person and an object. The posture image contains the posture of the target object, such as a standing posture or a sitting posture of a person, etc. Optionally, the posture image can be input into a posture prediction network model to extract the posture of the target object in the posture image to obtain the posture of the target object in the posture image output by the posture prediction network model. Optionally, the target object in the posture image can also be identified to obtain the posture of the target object.
[0128] Step S41: In response to a preset operation, determining a target posture of the target object;
[0129] Optionally, the target posture is the posture that the target object needs to present in the posture image, and the target posture can be a posture. The preset operation can be a touch operation, an air operation and / or a voice operation, etc. For example, in the posture editing interface, the user directly performs an editing operation such as dragging on the posture of the target object in the posture image.
[0130] Optionally, before responding to a preset operation, it also includes: displaying the posture of the target object in the posture image. Optionally, before the user determines whether the posture of the target object in the posture image needs to be changed, the user may need to first know the posture of the target object in the posture image. At this time, the terminal device can display the posture of the target object in the posture image so that the user can determine whether the posture of the target object in the posture image needs to be changed according to the posture of the target object. In this way, by timely displaying the posture of the target object in the posture image, it is easy to judge whether the posture of the target object in the posture image needs to be changed, thereby further improving the user experience.
[0131] Optionally, the response to a preset operation includes at least one of the following:
[0132] A gesture or image selection operation is detected;
[0133] An editing operation of a gesture on the target object is detected.
[0134] Optionally, the terminal device may display at least one posture identifier based on user operation, and each posture identifier corresponds to a posture. The user may input a posture selection operation through touch operation, air operation or voice, and accordingly, the terminal device determines the posture corresponding to the selected posture identifier as the target posture according to the received posture selection operation. Alternatively, the terminal device may display at least one frame of image based on user operation, and the posture of the object in each frame of image is different. The user may input an image selection operation through touch operation, air operation or voice, and accordingly, the terminal device determines the posture corresponding to the selected image as the target posture according to the received image selection operation. Alternatively, in the posture editing interface, the user directly performs editing operations such as dragging on the posture of the target object in the posture image to input the editing operation of the posture of the target object to the terminal device. In this way, the target posture of the target object is flexibly determined in a variety of ways, further improving the user experience.
[0135] Step S42: transforming the posture of the target object in the posture image into the target posture to obtain a target image.
[0136] Optionally, the step of transforming the posture of the target object in the posture image into the target posture to obtain the target image includes: inputting the target posture, the posture image and the posture of the target object into a posture transformation network model, obtaining the target image output by the posture transformation network model, and the posture of the target object in the target image is the target posture. Here, the posture transformation network model can be obtained by training multiple training samples based on a generative adversarial network algorithm. For each frame of posture image, the posture image, the posture of the target object in the posture image and the corresponding target posture are used as inputs of the posture transformation network model, and the corresponding output of the posture transformation network model is a posture image in which the posture of the target object is the target posture, that is, a posture image after the posture of the target object is transformed. The method of this embodiment transforms the posture of the target object in the posture image through the posture transformation network model, which is flexible in operation and highly accurate, and further improves the user experience.
[0137] In summary, in the image processing method provided in this embodiment, the posture of the target object in the posture image is transformed according to the target posture, so that an image in which the posture of the target object is the target posture can be obtained, which is easy to operate and effectively improves the user experience.
[0138] Third embodiment
[0139] Based on the same application concept as the above embodiments, this embodiment describes the technical solution of the above embodiments in detail through a specific example. In this example, the terminal device is a mobile phone and the target object is a person.
[0140] like Figure 5 As shown, the application scenario of the image processing method provided in the third embodiment of the present application is how a user who does not dance can obtain a video of himself dancing a specified dance. The method includes:
[0141] Step S50, selecting a dance video template;
[0142] Optionally, when the user needs to obtain a video of himself / herself dancing a specified dance, he / she can first open a preset image processing application and select a dance video template from a dance video template library according to his / her needs. The dance video template includes two parts, namely, a person dance video and a person posture in each frame of the person dance video. Here, the person posture in each frame of the dance video is obtained by performing posture extraction on each frame of the image through a posture estimation network model.
[0143] Step S51, selecting or taking a full-body photo of a single person;
[0144] Optionally, the user can select a full-body photo of a single person from a local album of the mobile phone, or use the mobile phone to take a full-body photo of a single person. Here, the mobile phone can output a preset posture to instruct the user to pose according to the preset posture.
[0145] Step S52, obtaining the posture of the person in the photo through a posture estimation network model;
[0146] Optionally, the photo is input into a posture estimation network model to obtain the posture of the person in the photo.
[0147] Step S53: transform the posture of the person in the photo into the posture of the person in each frame image of the dance video template in sequence through the posture transformation network model.
[0148] Optionally, the mobile phone inputs the photos, the postures of the characters in the photos and the dance video template into a posture transformation network model to obtain a plurality of photos in which the postures of the characters output by the posture transformation network model are transformed into the postures of the characters in each frame image of the dance video template.
[0149] Step S54: synthesize the user's dance video based on the transformed photo.
[0150] Optionally, for the photos after the posture of the character is transformed into the posture of the character in each frame image of the dance video template, the transformed photos can be synthesized according to the order of the dance video template to obtain the dance video of the user.
[0151] In summary, a dance video template can be used to generate a dance video in which the user dances to the corresponding dance video template, so that users without dance skills can also obtain a video of themselves dancing a specified dance, which enhances the fun and is simple to operate.
[0152] Fourth embodiment
[0153] Based on the same application concept as the above embodiments, this embodiment describes the technical solution of the above embodiments in detail through a specific example. In this example, the terminal device is a mobile phone and the target object is a person.
[0154] like Figure 6 As shown, the application scenario of the image processing method provided in the fourth embodiment of the present application is how a user modifies the posture of a person in a photo, and the method includes:
[0155] Step S60, selecting a photo to be modified;
[0156] Optionally, when the user needs to modify the posture of a person in a photo, the user can first open a preset image processing application and select the photo to be modified from the album library according to their own needs.
[0157] Step S61, obtaining and displaying the posture of the person in the photo through a posture estimation network model;
[0158] Optionally, the photo to be modified is input into a posture estimation network model to obtain the posture of the person in the photo to be modified, and then the posture of the person in the photo to be modified is displayed, such as Figure 7 As shown, Figure 7 The lines between the black dots represent the character's posture.
[0159] Step S62, obtaining the editing operation of the person's posture in the photo, and displaying the edited person's posture;
[0160] Optionally, the user can first click the edit button displayed on the operation interface of the preset image processing application, and then edit the posture of the person in the photo, such as changing the right hand from a parallel state to a raised state, etc. Correspondingly, the mobile phone obtains the user's editing operation on the posture of the person in the photo, and then displays the edited posture of the person, such as Figure 8 shown.
[0161] Step S63: transform the posture of the person in the photo into the edited posture of the person through the posture transformation network model to generate a posture-transformed photo.
[0162] Optionally, the mobile phone inputs the photo, the person's posture in the photo, and the edited person's posture into a posture transformation network model to obtain the photo in which the person's posture output by the posture transformation network model is transformed into the edited person's posture, such as Fig. 9 shown.
[0163] In summary, by adjusting the posture of the person in the photo, the user can obtain the photo he wants, the operation is simple, and the user experience is improved.
[0164] The present application also provides a terminal device, which includes: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the image processing method described above are implemented.
[0165] The present application also provides a readable storage medium, characterized in that a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the steps of the image processing method described above are implemented.
[0166] In the embodiments of the terminal device and the readable storage medium provided in the present application, all the technical features of any of the above-mentioned image processing method embodiments may be included, and the expanded and explained contents of the specification are basically the same as those of the embodiments of the above-mentioned methods, and will not be repeated here.
[0167] An embodiment of the present application further provides a computer program product, which includes a computer program code. When the computer program code is executed on a computer, the computer executes the image processing method described in the above various possible implementation modes.
[0168] An embodiment of the present application also provides a chip, including a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device equipped with the chip executes the image processing method described in the various possible implementation modes above.
[0169] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0170] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0171] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0172] In the present application, the same or similar terminology concepts, technical solutions and / or application scenario descriptions are generally described in detail only the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of the present application, for the same or similar terminology concepts, technical solutions and / or application scenario descriptions that are not described in detail later, reference can be made to the previous related detailed descriptions.
[0173] In the present application, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0174] The various technical features of the technical solution of the present application can be arbitrarily combined. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0175] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to execute the method of each embodiment of the present application.
[0176] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrated. The available medium can be a magnetic medium, (e.g., a floppy disk, a storage disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state storage disk Solid State Disk (SSD)), etc.
[0177] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An image processing method, characterized in that: The method comprises: Acquire at least one frame of posture image of the target object; transforming the posture of the target object in the posture image according to the target posture, and acquiring a target video based on the transformed posture image; The step of acquiring at least one frame of posture image of the target object comprises: Selecting at least one posture from the target postures as a preset posture according to a preset rule, and outputting the preset posture to instruct the target object to pose according to the preset posture; Acquire at least one frame of posture image of the target object taken by an image capture device; The preset rule includes at least one of the following: selecting a clear and concise target posture as the preset posture, or selecting a target posture containing the most posture key points as the preset posture.
2. The method according to claim 1, characterized in that The step of acquiring at least one frame of posture image of the target object captured by an image capture device comprises: When it is determined that the matching degree between the posture of the target object and the preset posture meets a preset condition, an image capture device is controlled to shoot the target object to obtain at least one frame of posture image.
3. The method according to claim 1, characterized in that Before the posture of the target object in the posture image is changed according to the target posture, the method further includes: Outputting at least one posture identifier; An operation is selected according to the received posture identifier to determine the target posture.
4. The method according to any one of claims 1 to 3, characterized in that: The step of transforming the posture of the target object in the posture image according to the target posture comprises: Extracting the posture of the target object in the posture image to obtain the posture of the target object; The posture of the target object in the posture image is transformed into a target posture to obtain the transformed posture image.
5. The method according to claim 4, characterized in that The step of transforming the posture of the target object in the posture image into the target posture to obtain the transformed posture image comprises: The target posture, the posture image and the posture of the target object are input into a set posture transformation network model to obtain the transformed posture image output by the posture transformation network model, and the posture of the target object in the transformed posture image is the target posture.
6. The method according to claim 4, characterized in that Before the posture of the target object in the posture image is changed according to the target posture, the method further includes: In response to the image selection operation, determining a first posture image to be transformed and a second posture image not to be transformed; The step of acquiring a target video based on the transformed posture image comprises: The two posture images and the transformed first posture image are synthesized into a target video.
7. A terminal device, characterized in that: The terminal device comprises: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the image processing method according to any one of claims 1 to 6 are implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 6 are implemented.
