Human body beautification method, device, electronic equipment and storage medium

By identifying and adjusting local areas in the image in electronic devices and beautifying different trunk parts, the problem of inadequate beautification in the prior art is solved, and a more ideal beautification effect is achieved.

CN112102159BActive Publication Date: 2025-03-11GUANGZHOU HUYA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010989845.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-18
Publication Date
2025-03-11
Estimated Expiration
2040-09-18

AI Technical Summary

Technical Problem

When the prior art beautifies images or videos, it fails to effectively carry out targeted beautification treatment for different trunk parts, resulting in unsatisfactory beautification effects.

Method used

By identifying the body parts of the target person in the image to be processed in the electronic device, extracting key points, determining local areas, and adjusting the range of local areas in the image according to the preset beautification method and parameters.

Benefits of technology

The targeted beautification of images of specific body parts of the target character is achieved, improving the personalization and accuracy of the beautification effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112102159B_ABST
    Figure CN112102159B_ABST
Patent Text Reader

Abstract

The present application provides a human body beautification method, device, electronic device and storage medium. The electronic device determines the local area corresponding to the body part in the human image through the key points determined in the human image area; and adjusts the range occupied in the image to be processed based on the preset beautification method and beautification parameters, thereby achieving the purpose of beautifying the image of the specific body part of the target person.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and more specifically, to a human body beautification method, device, electronic device and storage medium. Background Art

[0002] In order to present a satisfactory photogenic effect, users sometimes need to make certain beautification adjustments to the images or videos they have taken. Currently, the beautification processing method for images or videos mainly involves stretching or scaling the entire image, and does not consider targeted beautification processing for different body parts. Summary of the invention

[0003] In order to overcome at least one of the deficiencies in the prior art, one of the purposes of the present application is to provide a human body beautification method, which is applied to electronic devices, and the method comprises:

[0004] Get the image to be processed;

[0005] Determining a person image region of a target person in the image to be processed;

[0006] Extracting key points in the character image region, wherein the key points represent joint points of the target character;

[0007] According to the key points, a local area at a preset position is determined from the character image area, wherein the local area represents a body part of the target character;

[0008] According to a preset beautification method and preset beautification parameters of the local area, a range occupied by the local area in the image to be processed is adjusted.

[0009] Optionally, the beautification mode is a scaling mode, and the method further includes:

[0010] Determine the area to be filled generated by the scaling method in the image to be processed;

[0011] The area to be filled is filled according to image information outside the area to be filled in the image to be processed.

[0012] Optionally, the step of filling the area to be filled according to image information outside the area to be filled in the image to be processed includes:

[0013] Determine a reference area within a preset range from the edge position of the area to be filled in a direction opposite to the scaling method;

[0014] Calculating filling image information for filling the area to be filled according to the image information of the reference area;

[0015] The area to be filled is filled according to the filling image information.

[0016] Optionally, the electronic device is preset with a machine learning model, and the step of filling the area to be filled according to image information outside the area to be filled in the image to be processed includes:

[0017] The area to be filled is filled according to the image information outside the area to be filled through the machine learning model.

[0018] Optionally, before extracting key points in the character image region, wherein the key points represent joint points of the target character, the method further includes:

[0019] The character image region is cut out from the image to be processed.

[0020] Optionally, before adjusting the range occupied by the local area in the image to be processed according to the preset beautification method and preset beautification parameters of the local area, the method further includes:

[0021] Providing a display interface, wherein the display interface provides options of candidate beautification methods and parameter input controls for each of the candidate beautification methods for the local area;

[0022] In response to the configuration operation in the display interface, a preset beautification method and preset beautification parameters of the local area are determined.

[0023] A second object of the embodiment of the present application is to provide a human body beautification device, which is applied to electronic equipment, and the human body beautification device comprises:

[0024] An input module, used for acquiring an image to be processed;

[0025] A processing module, used to determine a character image region of a target character in the image to be processed; extract key points in the character image region, wherein the key points represent joint points of the target character; and determine a local region of a preset position from the character image region according to the key points, wherein the local region represents a body part of the target character;

[0026] The output module is used to adjust the range occupied by the local area in the image to be processed according to the preset beautification method and preset beautification parameters of the local area.

[0027] Optionally, the processing module is further used for:

[0028] Determine the area to be filled generated by the scaling method in the image to be processed;

[0029] The output module is further used to fill the area to be filled according to image information outside the area to be filled in the image to be processed.

[0030] The third purpose of an embodiment of the present application is to provide an electronic device, which includes a processor and a memory, wherein the memory stores computer-executable instructions, and when the computer-executable instructions are executed by the processor, the human body beautification method is implemented.

[0031] A fourth objective of an embodiment of the present application is to provide a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the human body beautification method is implemented.

[0032] Compared with the prior art, this application has the following beneficial effects:

[0033] The present application provides a human body beautification method, device, electronic device and storage medium. The electronic device determines the local area corresponding to the body part in the human image through the key points determined in the human image area; and adjusts the range occupied in the image to be processed based on the preset beautification method and beautification parameters, thereby achieving the purpose of beautifying the image of the specific body part of the target person. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A schematic diagram of overall beautification of the screen provided in the embodiment of the present application;

[0036] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0037] Figure 3 One of the step flow diagrams of the human body beautification method provided in the embodiment of the present application;

[0038] Figure 4 A schematic diagram of key points provided for an embodiment of the present application;

[0039] Figure 5 A schematic diagram of the area to be filled provided in an embodiment of the present application;

[0040] Figure 6 The second step flow diagram of the human body beautification method provided in the embodiment of the present application;

[0041] Figure 7 A schematic diagram of a filling method provided in an embodiment of the present application;

[0042] Figure 8 The third step flow diagram of the human body beautification method provided in the embodiment of the present application;

[0043] Fig. 9 This is a schematic diagram of the structure of a human body beautification device provided in an embodiment of the present application.

[0044] Icons: 100 - electronic device; 110 - human body beautification device; 120 - memory; 130 - processor; 140 - communication unit; 200 - key point; 300 - area to be filled; 410 - first sub-area; 420 - network point; 400 - second sub-area; 1101 - input module; 1102 - processing module; 1103 - output module. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0046] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0047] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0048] In the description of the present application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0049] In order to present a satisfactory photogenic effect, users sometimes need to make certain beautification adjustments to the images or videos they have taken. Currently, the beautification processing method for images or videos mainly involves stretching the entire image, and does not consider targeted beautification processing for different body parts.

[0050] It should be understood that certain beautification adjustments to images or videos can be applied in many scenarios. For example, live broadcast scenarios, video conferencing scenarios, video editing scenarios, and photo shooting scenarios. Figure 1 , the above-mentioned beautification method is exemplified.

[0051] In a live broadcast scenario, some anchors may not be satisfied with their body shape and need to use the live broadcast equipment to beautify their body shape to make it more slender in order to achieve a better photogenic effect.

[0052] like Figure 1 As shown, in order to make the figure more slender, the live broadcast device needs to scale the host image as a whole from a horizontal perspective and stretch the host image from a vertical perspective, so that the host's figure becomes thinner and the height is increased to a certain extent, achieving the effect of a more slender figure.

[0053] However, when the entire image is stretched or scaled, all parts of the body trunk will undergo certain changes. However, some anchors only need to slim down their waist, thighs, and / or arms.

[0054] In view of this, an embodiment of the present application provides a human body beautification method, which is applied to an electronic device. The electronic device identifies a local area corresponding to a preset body part of a target person in an image to be processed, and performs corresponding beautification adjustments based on a preset beautification method and beautification parameters. Thus, the purpose of targeted beautification of the torso is achieved.

[0055] The electronic device may be, but is not limited to, a server, a smart phone, a personal computer (PC), a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), an image acquisition device, etc.

[0056] Please refer to Figure 2 The electronic device 100 is a schematic structural diagram of the electronic device 100. The electronic device 100 includes a body beautification device 110, a memory 120, a processor 130 and a communication unit 140.

[0057] The memory 120, the processor 130 and the communication unit 140 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The human body beautification device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or solidified in the operating system (OS) of the electronic device 100. The processor 130 is used to execute the executable modules stored in the memory 120, such as the software function modules and computer programs included in the human body beautification device 110. When the computer executable instructions in the human body beautification device 110 are executed by the processor, the human body beautification method is implemented.

[0058] The memory 120 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 120 is used to store a program, and the processor 130 executes the program after receiving an execution instruction. The communication unit 140 is used to send and receive data through a network.

[0059] The processor 130 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0060] Please refer to Figure 3 , which is a schematic diagram of the steps of the human body beautification method provided as an example in this application. Figure 3 , each step of the human body beautification method is described in detail.

[0061] Step S90, obtaining an image to be processed.

[0062] Step S100, determining a person image region of a target person in an image to be processed.

[0063] There are many ways to determine the target person's image area, and traditional image recognition methods can be used, for example, by identifying the color change between the human image and the background image. Alternatively, the person image area can be identified through a machine learning model.

[0064] Step S120, extracting key points in the character image region, where the key points represent the joints of the target character.

[0065] That is, in the embodiment of the present application, the key points corresponding to the joint points in the human skeleton are first determined, and the task image area is divided according to the key points.

[0066] Step S130, determining a local area at a preset position from the character image area according to the key points, wherein the local area represents a body part of the target character.

[0067] Step S140, adjusting the range occupied by the local area in the image to be processed according to the preset beautification method and preset beautification parameters of the local area.

[0068] That is, in the embodiment of the present application, the electronic device 100 performs beautification processing on the determined local area according to the corresponding beautification method and beautification parameters to achieve targeted adjustment of the torso area.

[0069] In view of the above steps, the following Figure 4 It should be understood that the following example is only to provide a possible example and to illustrate the above steps, and does not mean that the present application is limited to this example.

[0070] like Figure 4 The person image shown includes 14 determined key points 200, which correspond to the head, shoulder, elbow, wrist, waist, knee and ankle of the target person. That is, through the above 14 key points 200, the electronic device 100 can divide the person image into at least a plurality of local areas such as a torso area, a thigh area, a calf area, a head area and an arm area.

[0071] Based on the multiple local areas divided by the key points 200, if the thigh needs to be slimmed down, the electronic device 100 determines the thigh area corresponding to the thigh of the target person in the person image, and scales it so that the area occupied by the thigh area in the image becomes smaller, thereby achieving the purpose of slimming down the thigh. Since only the area occupied by the thigh area is adjusted, other areas in the person image will not be affected.

[0072] Therefore, through the above-mentioned human body beautification method, the electronic device 100 determines the local area corresponding to the body part in the character image through the key points 200 determined in the character image area; and adjusts the range occupied in the image to be processed based on the preset beautification method and beautification parameters, thereby achieving the purpose of beautifying the image of the specific body part of the target person.

[0073] In addition, by adjusting the range occupied by the local area in the image to be processed, it is mainly divided into stretching and scaling. Among them, scaling will reduce the occupied area, and stretching will expand the occupied area.

[0074] Please refer to Figure 5 Taking the image area corresponding to the thigh as an example, since scaling will reduce the occupied area, the image area corresponding to the original thigh will leave a blank area to be filled 300, and then the electronic device 100 needs to fill and repair it so that no obvious beautification traces are left in the processed image. Of course, scaling other parts of the body will also produce areas to be filled 300 that need to be repaired, and the present application embodiment does not make specific limitations.

[0075] In view of this, please refer to Figure 6 , the human body beautification method further comprises:

[0076] Step S150, determining whether the preset beautification mode is a zoom mode;

[0077] Step S160: If yes, then determine the area 300 to be filled generated by the scaling method in the image to be processed.

[0078] Step S170 , filling the area to be filled 300 according to the image information outside the area to be filled 300 in the image to be processed.

[0079] That is, when the preset beautification method is the scaling method, the electronic device 100 determines the area to be filled 300 generated by the scaling method in the image to be processed; and then fills it with the image information outside the area to be filled 300 in the image to be processed.

[0080] It should be understood that by filling in the image information outside the to-be-filled area 300 in the image information to be processed, since it is based on the image information outside the to-be-filled area 300 in the image information to be processed, the filled image information can achieve a better fusion effect with the surrounding image information, reducing the remaining beautification traces.

[0081] There are many ways to fill the area to be filled 300 using the image information other than the area to be filled 300 in the image information to be processed. As a possible implementation, step S170 includes:

[0082] Step S170 - 1A: determining a reference area within a preset range from the edge position of the area to be filled 300 in a direction opposite to the scaling method.

[0083] Step S170 - 2A: Calculate filling image information for filling the area to be filled 300 according to the image information of the reference area.

[0084] Step S170 - 3A, filling the area to be filled 300 according to the filling image information.

[0085] That is, through the above steps, the electronic device 100 determines a reference area around the area to be filled 300 based on the area to be filled, and calculates filling image information for filling the area to be filled 300 through image information of the reference area.

[0086] Let's take the target person's thigh as an example. Figure 7 As shown, after the image area corresponding to the thigh area of ​​the target person is scaled, a to-be-filled area 300 is generated. The electronic device 100 determines a reference area within a preset range from the edge position of the to-be-filled area 300 in a direction opposite to the scaling method.

[0087] Furthermore, for the scaled thigh area, the electronic device 100 determines a plurality of network points 420 along the edge of the scaled thigh area, and based on the network points 420, divides the area to be filled into more than 300 first sub-areas 410 and the reference area into a plurality of second sub-areas 400 along a direction opposite to the scaling method.

[0088] As a possible filling method, for each first sub-region 410, the electronic device 100 determines the second sub-region 400 corresponding to the first sub-region 410, calculates the average pixel value of all pixel values ​​in the second sub-region 400, and fills the average pixel value into the first sub-region 410.

[0089] As another possible filling method, for each first sub-region 410 and the corresponding second sub-region 400, the electronic device 100 divides the second sub-region 400 into multiple pixel blocks, and sets multiple weights according to the distance of each pixel block from the first sub-region 410, wherein the greater the distance, the smaller the weight; weighted pixel values ​​of the multiple pixel blocks are obtained based on the set multiple weights; and the weighted pixel values ​​are filled into the first sub-region 410.

[0090] As another possible implementation, the electronic device 100 is preset with a machine learning model. Based on the preset machine learning model, step S170 includes:

[0091] Step S170 - 1B, filling the area to be filled 300 according to the image information outside the area to be filled 300 through the machine learning model.

[0092] That is, in this embodiment, the electronic device 100 can fill the area to be filled 300 according to the graphic information outside the area to be filled 300 through a pre-selected trained machine learning model.

[0093] Since there are multiple ways to fill the area to be filled 300 , the electronic device 100 can provide a corresponding filling method option interface for the user to select.

[0094] Taking the live broadcast scene as an example, when the background in the live broadcast scene is relatively simple, the average pixel value or weighted pixel value can be selected for filling. It should be understood that since the average pixel value or weighted pixel value is simple to calculate, it can save calculation amount to a certain extent.

[0095] When the background in the live broadcast scene is relatively complex, the average pixel value or weighted pixel value method has certain limitations when processing the complex background. Therefore, a machine learning model can be selected to fill the area to be filled 300.

[0096] In addition, when the beautification process is performed on a preset area in the character image area, it may have a certain impact on areas outside the character image area, resulting in residual beautification traces in the beautified image.

[0097] In view of this, please refer to Figure 8 Before step S120, the human body beautification method further includes:

[0098] Step S110, extracting a person image region from the image to be processed.

[0099] Through the above steps, the electronic device 100 processes the intercepted character image area separately after intercepting the character image area. Among them, after the character image area is intercepted in the image to be processed, the remaining is the background image area. The electronic device 100 fills the beautified character image area into the intercepted position in the background image area to obtain a beautified image.

[0100] Since the cut-out character image region is processed separately, the influence of the beautification processing of the character image region on the background image region can be avoided, and thus the beautification traces in the beautified image can be reduced.

[0101] Also, considering that aesthetics is a subjective feeling, please refer to Figure 8 Before step S140, the human body beautification method further includes:

[0102] Step S70, providing a display interface.

[0103] The display interface provides options of candidate beautification methods and parameter input controls for each candidate beautification method for the local area;

[0104] Step S80 determines a preset beautification method and preset beautification parameters for a local area in response to the configuration operation in the display interface.

[0105] That is, the electronic device 100 provides a display interface showing candidate beautification methods and parameter input controls for the user to customize the beautification effect. In order to provide a visual customization effect, the display interface also displays a preview area of ​​the beautification effect. Based on the preview image, the electronic device 100 displays the beautified character image in the preview area according to the beautification method and beautification parameters selected by the user for the user to browse.

[0106] Considering that there may be multiple local areas determined by the key points 200 in the character image area, the electronic device 100 provides corresponding display interfaces for local areas corresponding to different body parts of the target person, so that the user can customize the beautification effect.

[0107] Based on the same inventive concept, the embodiment of the present application further provides a human body beautification device 110, which is applied to the electronic device 100. The human body beautification device 110 includes at least one functional module that can be stored in the memory 120 in the form of software. Fig. 9 Functionally, the human body beautification device 110 includes:

[0108] The input module 1101 is used to obtain an image to be processed.

[0109] In the embodiment of the present application, the input module 1101 is used to execute Figure 3 For the detailed description of the input module 1101, please refer to the detailed description of step S90.

[0110] The processing module 1102 is used to determine the character image area of ​​the target person in the image to be processed; extract key points 200 in the character image area, and the key points 200 represent the joints of the target person; based on the key points 200, determine a local area of ​​a preset position from the character image area, and the local area represents the body part of the target person.

[0111] In the embodiment of the present application, the processing module 1102 is used to execute Figure 3 For the detailed description of the processing module 1102, please refer to the detailed description of steps S100, S120, S130.

[0112] The output module 1103 is used to adjust the range occupied by the local area in the image to be processed according to the preset beautification method and preset beautification parameters of the local area.

[0113] In the embodiment of the present application, the output module 1103 is used to execute Figure 3 For the detailed description of the output module 1103, please refer to the detailed description of step S140.

[0114] Optionally, the processing module 1102 is further configured to:

[0115] Determine the area to be filled 300 generated by the scaling method in the image to be processed;

[0116] The output module 1103 is further used to fill the area to be filled 300 according to the image information outside the area to be filled 300 in the image to be processed.

[0117] Optionally, as a possible implementation manner, the processing module 1102 fills the to-be-filled area 300 in a manner that specifically includes:

[0118] In a direction opposite to the scaling method, a reference area within a preset range from the edge position of the area to be filled 300 is determined;

[0119] Calculating filling image information for filling the area to be filled 300 according to the image information of the reference area;

[0120] The area to be filled 300 is filled according to the filling image information.

[0121] Optionally, as another possible implementation, the processing module 1102 fills the to-be-filled area 300 in a manner that specifically includes:

[0122] The area to be filled 300 is filled according to the image information outside the area to be filled 300 through the machine learning model.

[0123] Optionally, the processing module 1102 is further configured to extract a character image region from the image to be processed.

[0124] Optionally, the input module 1101 is further used to provide a display interface, wherein the display interface provides options of candidate beautification methods and parameter input controls of each candidate beautification method for the local area;

[0125] In response to the configuration operation in the display interface, a preset beautification method and preset beautification parameters of the local area are determined.

[0126] The embodiment of the present application further provides an electronic device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer executable instructions. When the computer executable instructions are executed by the processor 130, the human body beautification method is implemented.

[0127] The embodiment of the present application further provides a storage medium, which stores a computer program. When the computer program is executed by the processor 130, the human body beautification method is implemented.

[0128] In summary, the embodiments of the present application provide a human body beautification method, device, electronic device and storage medium. The electronic device determines the local area corresponding to the body part in the human image through the key points determined in the human image area; and adjusts the range occupied in the image to be processed based on the preset beautification method and beautification parameters, thereby achieving the purpose of beautifying the image of the specific body part of the target person.

[0129] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0130] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0131] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0132] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" 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 other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0133] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for beautifying a human body, characterized in that: Applied to electronic equipment, the method comprises: Get the image to be processed; Determining a person image region of a target person in the image to be processed; Extracting key points in the character image region, wherein the key points represent joint points of the target character; According to the key points, a local area at a preset position is determined from the character image area, wherein the local area represents a body part of the target character; According to a preset beautification method and preset beautification parameters of the local area, adjusting the range occupied by the local area in the image to be processed, wherein the preset beautification method is a scaling method; Determine the area to be filled generated by the scaling method in the image to be processed; Determine a reference area within a preset range from the edge position of the area to be filled in a direction opposite to the scaling method; Determine a plurality of network points along the edge of the scaled local area, and divide the area to be filled into a plurality of first sub-areas and the reference area into a plurality of second sub-areas based on the network points in a direction opposite to the scaling method; For each of the first sub-regions and the corresponding second sub-region, the second sub-region is divided into a plurality of pixel blocks, and a plurality of weights are set according to the distance between each of the pixel blocks and the first sub-region, wherein the farther the distance, the smaller the weight; The weighted pixel values ​​of the plurality of pixel blocks are obtained based on the set plurality of weights, and the weighted pixel values ​​are filled into the first sub-region.

2. The human body beautification method according to claim 1, characterized in that: Before extracting key points in the character image region, wherein the key points represent joint points of the target character, the method further includes: The character image region is cut out from the image to be processed.

3. The human body beautification method according to claim 1, characterized in that: Before adjusting the range occupied by the local area in the image to be processed according to the preset beautification method and preset beautification parameters of the local area, the method further includes: Providing a display interface, wherein the display interface provides options of candidate beautification methods and parameter input controls for each of the candidate beautification methods for the local area; In response to the configuration operation in the display interface, a preset beautification method and preset beautification parameters of the local area are determined.

4. A human body beautification device, characterized in that: Applied to electronic equipment, the human body beautification device comprises: An input module, used for acquiring an image to be processed; A processing module, used to determine a character image region of a target character in the image to be processed; extract key points in the character image region, wherein the key points represent joint points of the target character; and determine a local region of a preset position from the character image region according to the key points, wherein the local region represents a body part of the target character; An output module, used for adjusting the range occupied by the local area in the image to be processed according to a preset beautification method and preset beautification parameters of the local area, wherein the preset beautification method is a scaling method; Determine the area to be filled generated by the scaling method in the image to be processed; Determine a reference area within a preset range from the edge position of the area to be filled in a direction opposite to the scaling method; Determine a plurality of network points along the edge of the scaled local area, and divide the area to be filled into a plurality of first sub-areas and the reference area into a plurality of second sub-areas based on the network points in a direction opposite to the scaling method; For each of the first sub-regions and the corresponding second sub-region, the second sub-region is divided into a plurality of pixel blocks, and a plurality of weights are set according to the distance between each of the pixel blocks and the first sub-region, wherein the farther the distance, the smaller the weight; The weighted pixel values ​​of the plurality of pixel blocks are obtained based on the set plurality of weights, and the weighted pixel values ​​are filled into the first sub-region.

5. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores computer executable instructions, and when the computer executable instructions are executed by the processor, the human body beautification method described in any one of claims 1 to 3 is implemented.

6. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the human body beautification method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Image processing method and device, electronic apparatus and storage medium

    CN109191414A

  • Image beautifying method and device and electronic equipment

    CN110298785A