Image processing method and device, electronic equipment and storage medium
By detecting the character's standing position type and performing scaling and body contour correction in image processing, the problem of balancing the character's aesthetic appeal with the overall visual effect is solved, ensuring the integrity of the character's head proportions.
Patent Information
- Application Number
- CN202511725495.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-03-13
AI Technical Summary
In image processing, it is difficult to balance the aesthetic appeal of a person with the overall visual effect of the image. Existing technologies often result in adverse effects on the proportions of a person's head.
By detecting people in the image and determining the standing type, scaling is performed in a single direction based on the standing type to adjust the body contour and correct the facial proportions, ensuring that the beautification effect only applies to the body and does not affect the head.
It achieves a beautifying effect on the figures in the image while keeping the proportions of the figures' heads unaffected, thus improving the overall visual effect of the image.
Smart Images

Figure CN121660871A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer vision technology, and in particular to an image processing method, apparatus, electronic device and storage medium. Background Technology
[0002] In image processing (such as a single image or a frame from a video), the reshaping of people is often involved. When reshaping people in an image, two major requirements must be met simultaneously: firstly, the reshaping of the person must be of high quality; secondly, the overall visual effect of the image must be maintained. Therefore, how to perform image processing that balances the reshaping of people with the overall visual effect of the image has become a key issue of concern for those skilled in the art. Summary of the Invention
[0003] This disclosure provides an image processing method, apparatus, electronic device, and storage medium. The technical solution of this disclosure is shown below.
[0004] According to a first aspect of the present disclosure, an image processing method is provided, comprising: Perform person detection on the original image, and determine the person's position type in the original image based on the person detection results; The original image is scaled in a single direction to obtain a first image; Based on the character's standing position type, the image processing center point is determined. Using the image processing center point as a reference, the body contour of the character in the first image is corrected to obtain the second image. Based on the image scaling information from scaling the original image, the facial proportions of the person in the second image are adjusted to obtain the target image.
[0005] In some embodiments, determining the person's position type in the original image based on the person detection results includes: When the person detection results determine that the original image contains only two people, and the distance between the two people exceeds a first distance threshold, the person's position type is determined to be a dual-center position type; or, When it is determined based on the person detection results that the original image includes multiple people, and the distance between the first person and the second person among the multiple people is greater than the first distance threshold, the person's position type is determined to be the dual-center position type; wherein, according to visual priority, the first person and the second person are ranked first among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
[0006] In other embodiments, determining the person's position type in the original image based on the person detection results includes: When the person detection results determine that the original image contains only a single person, the person's position type is determined to be a single-center position type; or, When the original image is determined to contain multiple people based on the person detection results, and the distance between the third and fourth people among the multiple people is greater than a second distance threshold, the person's position type is determined to be the single-center position type; wherein, according to visual priority, the third person is ranked first among the multiple people, and the fourth person is ranked second among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
[0007] In other embodiments, the step of determining the image processing center point based on the person's standing position type, and using the image processing center point as a reference to correct the body contour of the person in the first image, includes: When the character's position type is a double-center position type, the body center point of the first character in the first image who is in a double-center position is taken as the first image processing center point, and the body center point of the second character in the first image who is in a double-center position is taken as the second image processing center point. Based on the first image processing center point and the first deformation intensity, the two sides of the first figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. Based on the second image processing center point and the first deformation intensity, the two sides of the second figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the first image processing center point and the second image processing center point, the greater the deformation of the body contour.
[0008] In other embodiments, the step of determining the image processing center point based on the person's standing position type, and using the image processing center point as a reference to correct the body contour of the person in the first image, includes: When the character's position type is a single-center position type, the body center point of the third character in the first image who is in a single-center position is taken as the image processing center point. Based on the image processing center point, and based on the first deformation intensity, the body contours of the second side of the third person are subjected to flexible deformation in the horizontal direction, shrinking inward toward the center. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
[0009] In other embodiments, the step of determining the image processing center point based on the person's standing position type, and using the image processing center point as a reference to correct the body contour of the person in the first image, includes: When the character's position type is other types, the geometric center point of the first image is used as the image processing center point; wherein, the other types refer to position types other than the dual-center position type and the single-center position type; Based on the image processing center point, and based on the first deformation intensity, the body contours of the fifth character on both sides are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
[0010] In other embodiments, the method further includes: The fifth person is determined based on the size of each person in the first image and the distance between each person and the image processing center point.
[0011] In other embodiments, the method further includes: Based on the second deformation intensity, the body contours of other figures in the first image are corrected, where the second deformation intensity is less than the deformation intensity. Wherein, when the character's position type is a double-center position type, the other characters refer to characters other than the first and second characters in the double-center position; when the character's position type is a single-center position type, the other characters refer to characters other than the third character in the single-center position; when the character's position type is other types, the other characters refer to characters other than the fifth character.
[0012] In other embodiments, scaling the original image in a single direction to obtain a first image includes: Based on a preset stretching strength, the original image is stretched in the height direction, and the stretched image is cropped to obtain the first image with the same size as the original image. The step of adjusting the facial proportions of the person in the second image based on the image scaling information when scaling the original image to obtain the target image includes: Based on the preset stretching strength, the facial area of the person in the second image is shortened to obtain the target image.
[0013] According to a second aspect of the present disclosure, an image processing apparatus is provided, comprising: The detection module is configured to detect people in the original image; The determination module is configured to determine the position type of the person in the original image based on the person detection results; The first processing module is configured to scale the original image in a single direction to obtain a first image; The second processing module is configured to determine the image processing center point based on the person's standing position type, and use the image processing center point as a reference to correct the body contour of the person in the first image to obtain the second image. The third processing module is configured to adjust the facial proportions of the person in the second image based on the image scaling information when scaling the original image, so as to obtain the target image.
[0014] In some embodiments, the determining module is configured to: When the person detection results determine that the original image contains only two people, and the distance between the two people exceeds a first distance threshold, the person's position type is determined to be a dual-center position type; or, When it is determined based on the person detection results that the original image includes multiple people, and the distance between the first person and the second person among the multiple people is greater than the first distance threshold, the person's position type is determined to be the dual-center position type; wherein, according to visual priority, the first person and the second person are ranked first among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
[0015] In other embodiments, the determining module is configured to: When the person detection results determine that the original image contains only a single person, the person's position type is determined to be a single-center position type; or, When the original image is determined to contain multiple people based on the person detection results, and the distance between the third and fourth people among the multiple people is greater than a second distance threshold, the person's position type is determined to be the single-center position type; wherein, according to visual priority, the third person is ranked first among the multiple people, and the fourth person is ranked second among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
[0016] In other embodiments, the second processing module is configured to: When the character's position type is a double-center position type, the body center point of the first character in the first image who is in a double-center position is taken as the first image processing center point, and the body center point of the second character in the first image who is in a double-center position is taken as the second image processing center point. Based on the first image processing center point and the first deformation intensity, the two sides of the first figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. Based on the second image processing center point and the first deformation intensity, the two sides of the second figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the first image processing center point and the second image processing center point, the greater the deformation of the body contour.
[0017] In other embodiments, the second processing module is configured to: When the character's position type is a single-center position type, the body center point of the third character in the first image who is in a single-center position is taken as the image processing center point. Based on the image processing center point, and based on the first deformation intensity, the body contours of the second side of the third person are subjected to flexible deformation in the horizontal direction, shrinking inward toward the center. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
[0018] In other embodiments, the second processing module is configured to: When the character's position type is other types, the geometric center point of the first image is used as the image processing center point; wherein, the other types refer to position types other than the dual-center position type and the single-center position type; Based on the image processing center point, and based on the first deformation intensity, the body contours of the fifth character on both sides are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
[0019] In other embodiments, the second processing module is further configured to: The fifth person is determined based on the size of each person in the first image and the distance between each person and the image processing center point.
[0020] In other embodiments, the second processing module is further configured to: Based on the second deformation intensity, the body contours of other figures in the first image are corrected, where the second deformation intensity is less than the deformation intensity. Wherein, when the character's position type is a double-center position type, the other characters refer to characters other than the first and second characters in the double-center position; when the character's position type is a single-center position type, the other characters refer to characters other than the third character in the single-center position; when the character's position type is other types, the other characters refer to characters other than the fifth character.
[0021] In other embodiments, the first processing module is configured to stretch the original image in the height direction based on a preset stretching strength, and to crop the stretched image to obtain the first image with the same size as the original image. The third processing module is configured to shorten the facial area of the person in the second image based on the preset stretching strength, thereby obtaining the target image.
[0022] According to a third aspect of the present disclosure, an electronic device is provided, the electronic device comprising: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the image processing method described above.
[0023] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein program code in the computer-readable storage medium is executed by a processor of an electronic device, enabling the electronic device to perform the image processing method described above.
[0024] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor of an electronic device, implements the image processing method described above.
[0025] The image processing solution provided in this disclosure can balance the beautification effect of the person with the overall visual effect of the image. Specifically, this solution first performs person detection on the image, then determines the person's standing type based on the detection results. After determining the standing type, the beautification of the person is achieved through the following steps: First, the image is scaled in a single direction, achieving initial beautification. Next, an image processing center point is determined based on the person's standing type, and the body contour of the person in the image is corrected using this center point as a reference, achieving further beautification. Finally, this solution also adjusts the facial proportions of the person in the image based on the scaling information during image scaling. This step ensures that the beautification effect only applies to the body and does not adversely affect the head. In summary, this solution, through image scaling, body contour correction, and facial proportion adjustment, not only achieves beautification of the person in the image but also ensures that the facial proportions are not affected, resulting in a good overall visual effect for the processed image.
[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0028] Figure 1 This is a schematic diagram illustrating the implementation environment of an image processing method according to an exemplary embodiment.
[0029] Figure 2 This is a flowchart illustrating a first image processing method according to an exemplary embodiment.
[0030] Figure 3 This is a flowchart illustrating a second image processing method according to an exemplary embodiment.
[0031] Figure 4 This is a schematic diagram illustrating a key point of the human body according to an exemplary embodiment.
[0032] Figure 5 This is a schematic diagram illustrating an overall process of image processing according to an exemplary embodiment.
[0033] Figure 6 This is a schematic diagram illustrating an image scaling method according to an exemplary embodiment.
[0034] Figure 7 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment.
[0035] Figure 8 This is a block diagram illustrating a terminal according to an exemplary embodiment. Detailed Implementation
[0036] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0037] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0038] The information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by the parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0039] Figure 1 This is a schematic diagram illustrating the implementation environment of an image processing method according to an exemplary embodiment.
[0040] See Figure 1 The implementation environment includes a terminal 101 and a server 102. The terminal 101 is an electronic device used by a user. In this embodiment, a target application is installed on the terminal 101, and the terminal 101 implements the image processing method provided in this embodiment based on the target application. Exemplarily, the target application is a dedicated image processing application or other types of applications with image processing capabilities, such as social applications with image processing capabilities; this disclosure does not limit the scope of the application to these types.
[0041] In some embodiments, the terminal 101 is a device such as a smartphone, desktop computer, or laptop. Figure 1 The example of terminal 101 being a smartphone is provided for illustration only. Furthermore, those skilled in the art will understand that the number of terminals described above can be more or less. For example, there may be only a few terminals, or dozens or hundreds of devices, or even more. This disclosure does not limit the number or type of terminals.
[0042] In other embodiments, server 102 provides background services for the target application. Additionally, server 102 is connected to terminal 101 via a wireless or wired network. Furthermore, the server described in this disclosure may also include other functional servers to provide more comprehensive and diverse services.
[0043] Based on the aforementioned implementation environment, this disclosure provides an image processing method. The image processing method described herein can be applied to scenarios such as image or video editing, human body enhancement during live streaming, and post-processing of photographs; this disclosure does not limit its application.
[0044] The image processing scheme provided in this disclosure will be described in detail below through the following embodiments.
[0045] Figure 2 This is a flowchart illustrating a first image processing method according to an exemplary embodiment, such as... Figure 2 As shown, this image processing method is applied in electronic devices, such as... Figure 1 In the terminal 101 shown, the image processing method includes the following steps.
[0046] In 201, the electronic device performs person detection on the original image and determines the person's position type in the original image based on the person detection results.
[0047] In this embodiment of the disclosure, the original image refers to the image of the person to be beautified. This image can be a single image independent of the video, or it can be a frame from the video; this disclosure does not limit this. Taking a frame from the video as an example, all frames in the video containing a person can be processed as described in this embodiment of the disclosure, thereby achieving a beautification effect on the person appearing in the video.
[0048] As an example, the aforementioned person detection includes human body keypoint detection and facial keypoint detection. Accordingly, the aforementioned person detection results include human body keypoint detection results and facial keypoint detection results, which are not limited in this disclosure.
[0049] As another example, the above character positioning types include, but are not limited to: single-center positioning, double-center positioning, and other types. Among them, the single-center positioning type is also called the single C-position positioning type, and the double-center positioning type is also called the double C-position positioning type.
[0050] For single-center positioning, there are two scenarios: the image contains only one person, or the image contains multiple people, but one person is in the visual focus position, such as one person clearly standing in the center of the image.
[0051] For the double-C position type, there are two scenarios: the image contains only two people, or the image contains multiple people, but two of them are in the visual focus position, such as two people clearly standing together in the center of the picture.
[0052] It should be noted that after completing the person detection and determining the person's position type in the image, the person in the image is beautified through the following steps 202 to 204, depending on the situation.
[0053] In step 202, the electronic device scales the original image in a single direction to obtain the first image.
[0054] This step does not distinguish between the positions of the people in the image; it is used to perform a preliminary reshaping of all people in the original image. In other words, the scaling process in this step applies to the entire image. For example, taking human reshaping as slimming down a person, the electronic device will reduce the aspect ratio of the image and scale the original image in one direction to obtain the first image.
[0055] As an example, continuing to use the human body aesthetics as an example of slimming down a person, the above-mentioned scaling processing of the original image in a single direction can be either stretching the original image in the height direction, that is, keeping the image width unchanged and increasing the height of the original image, or shrinking the original image in the width direction, that is, keeping the image height unchanged and decreasing the width of the original image. This disclosure does not limit this.
[0056] It's important to note that to maintain the original image size, the aspect ratio is typically reduced by increasing the original image height, making the entire image appear narrower. In this case, to preserve the original image size, any portion of the stretched image that exceeds the original dimensions must be cropped. See the following description for details.
[0057] In 203, the electronic device determines the image processing center point based on the person's standing position type, and uses the image processing center point as a reference to correct the body contour of the person in the first image to obtain the second image.
[0058] This step distinguishes the types of people's positions in the image and is used to further refine the appearance of all people in the original image based on the initial reshaping. In other words, the body contour correction in this step applies to the entire image.
[0059] As an example, this disclosure uses C-arc liquefaction deformation to correct the body contour of a person in an image, but this disclosure does not limit this.
[0060] In this embodiment, the image processing center point is determined differently depending on the type of person's position. This allows for the correction of the person's body contour around different reference anchor points in different scenarios, resulting in better multi-person aesthetic effects. For example, when the image is a single-center position, the center point of the center person's body is used as the image processing center point. When the image is a double-center position, the center points of the two center people's bodies are used as the image processing center points respectively. When the image is a position other than single-center or double-center, the geometric center point of the image is used as the image processing center point.
[0061] In addition, considering that the number of people included in different images may vary, in order to obtain a better multi-person beauty effect, this embodiment applies one layer of C-arc liquefaction deformation to some images and two layers of C-arc liquefaction deformation to others, depending on the number of people included in the specific image.
[0062] When applying two layers of C-arc liquefaction deformation, the first layer has a small effective range but high intensity, generally only affecting characters in a single-center or dual-center position. The second layer has a large effective range but low intensity, affecting all non-core edge characters, such as those on the sides or corners of the image.
[0063] In step 204, the electronic device adjusts the facial proportions of the person in the second image based on the image scaling information from scaling the original image, thereby obtaining the target image.
[0064] Since the processing in steps 202 and 203 applies to the entire image, not only the body appears thinner, but the face is also affected, potentially altering facial proportions. To ensure that the processing in steps 202 and 203 only affects the body, it is necessary to adjust the facial proportions of the person in the image.
[0065] It should be noted that, considering that step 203 uses C-arc liquefaction deformation to correct the body contour of the person in the image, and the head is far from the center point of the person's body, its deformation is small, so the main purpose is to compensate for the negative impact of step 202.
[0066] In summary, the image processing solution provided in this disclosure can balance the aesthetic effect of the subject with the overall visual effect of the image. Specifically, this solution first performs subject detection on the image. Next, based on the subject detection results, it determines the subject's position type in the image. After determining the position type, it achieves subject aesthetic enhancement through the following steps: First, the image is scaled in a single direction, achieving initial subject aesthetic enhancement. Then, based on the subject's position type, an image processing center point is determined, and using this center point as a reference, the body contour of the subject in the image is corrected, achieving further subject aesthetic enhancement. Finally, this solution also adjusts the facial proportions of the subject in the image based on the scaling information obtained during image scaling. This step ensures that the aesthetic enhancement effect only applies to the body and does not adversely affect the subject's head.
[0067] In summary, this solution, through image scaling, body contour correction, and facial proportion adjustment, not only enhances the appearance of people in images but also ensures that facial proportions are not affected, resulting in a good overall visual effect for the processed image.
[0068] The above Figure 2 The diagram shown is merely the basic process of this disclosure. The following section will further elaborate on the solution provided in this disclosure based on a specific implementation method. Figure 3 This is a flowchart illustrating a second image processing method according to an exemplary embodiment, such as... Figure 3 As shown, this image processing method is applied in electronic devices, such as... Figure 1 In the terminal 101 shown, taking the slimming of a person as an example, the image processing method includes the following steps.
[0069] In section 301, the electronic device performs person detection on the original image and determines the person's position type in the original image based on the person detection results.
[0070] Taking the aforementioned person detection, which includes both human body keypoint detection and facial keypoint detection, as an example, the resulting person detection output includes both human body keypoint detection results and facial keypoint detection results. As an example, the human body keypoint detection results include... Figure 4 The 40 human body key points shown are included in the facial key point detection results, which include 101 facial key points. This disclosure does not limit this.
[0071] Figure 5 This is a schematic diagram illustrating an overall process of image processing according to an exemplary embodiment. The following is in conjunction with... Figure 5 This paper provides a detailed explanation of how to determine the position type of people in the original image based on the person detection results.
[0072] First, based on the person detection results, determine whether the original image belongs to the double C position type.
[0073] 1. When the person detection results determine that the original image contains only two people and the distance between the two people exceeds the first distance threshold, the person's position type is determined to be the double C position type.
[0074] The value of the first distance threshold is based on the electronic device's ability to distinguish the two figures as two independent targets, and this disclosure does not limit this value.
[0075] 2. When the original image is determined to contain multiple people based on the person detection results, and the distance between the first person and the second person among the multiple people is greater than the first distance threshold, the person's position type is determined to be the double C position type.
[0076] In this situation, according to visual priority, the first and second characters are ranked first among these characters, meaning that the first and second characters are the visual focus.
[0077] It should be noted that visual priority is related to the differences in spatial attributes of these figures. Typically, facial and human landmark detection results only include two-dimensional information (top, bottom, left, and right) and do not include depth information. Therefore, the aforementioned spatial attributes generally refer to position, size, etc. Accordingly, according to visual priority, the first and second figures are ranked first among these figures. This could mean that both the first and second figures are located in the center of the image, or that the first and second figures are the largest in size within the image; this disclosure does not limit this.
[0078] It should be noted that, as Figure 5 As shown, if the original image does not belong to the double C position type, then the next step is to determine whether the original image belongs to the single C position type.
[0079] 1. When the person detection results determine that the original image contains only a single person, the person's position type is determined to be a single C-position position type.
[0080] 2. When the original image is determined to contain multiple people based on the person detection results, and the distance between the third and fourth people among the multiple people is greater than the second distance threshold, the person's position type is determined to be a single C-position position type.
[0081] In this situation, based on visual priority, the third person is ranked first among these people, and the fourth person is ranked second. For example, the third person is the person in the foreground of the image, and the fourth person is the second foreground. Or, the third person is the largest person in the image, and the fourth person is the second largest. Or, the third person is the person closest to the center of the image, and the fourth person is the second closest.
[0082] As an example, considering that when people are all standing on the same horizontal plane, the people who are further forward will have their feet appear lower in the picture, so the relationship between people can be determined by comparing the vertical coordinates of the key points of their feet in the picture. This disclosure does not limit this.
[0083] It should be noted that, as Figure 5 As shown, if the original image does not belong to the single C position type, then its character position type is determined to be other types, that is, the original image does not include the C position, such as there is no person in the picture or the people in the picture are evenly distributed and the C position cannot be selected.
[0084] In some embodiments, the implementation of the character beautification effect includes the following three steps: stretching the entire image in the height direction, performing C-arc liquefaction deformation centered on the character in the center, and restoring the proportions of the face. This disclosure does not limit these steps. The following steps 302 to 304 will describe these three steps respectively.
[0085] In step 302, the electronic device stretches the original image in the height direction based on a preset stretching strength, and then crops the stretched image to obtain a first image with the same size as the original image.
[0086] This step is used to stretch the original image in the height direction. That is, fix the width of the original image and increase the height of the original image to reduce the aspect ratio, thereby achieving a more aesthetically pleasing effect on the person.
[0087] The following is combined Figure 6 This explains why the image is stretched along its entire height to reduce the aspect ratio. Figure 6 Figure (a) in the image corresponds to the original image, which has an aspect ratio of 3:4. Figure 6 Image (b) in the image is obtained by stretching the original image (increasing the image height). Figure 6 Image (c) in the diagram is obtained by shrinking the original image (reducing the image width). For... Figure 6 In figures (b) and (c), the aspect ratio is 3:5. Because... Figure 6 Figure (c) in the middle is compared to Figure 6In Figure (a), the size is reduced, so when reshaping a person, the size is usually reduced. Figure 6 The processing method corresponding to Figure (a) is such that, in this case, only the portion exceeding the height of the original image needs to be cropped to obtain a processed image with the same size as the original image. That is, Figure 6 The processing method corresponding to Figure (a) in the figure can ensure that the image size remains unchanged before and after processing.
[0088] It should be noted that since the C-arc liquefaction deformation effect will be superimposed in subsequent steps, this step will not control the image stretching intensity; that is, a smaller image stretching intensity will be selected. This effectively reduces the area of the image that is cropped. This is because the greater the image stretching intensity, the larger the area of the image that will be cropped.
[0089] In 303, the electronic device determines the image processing center point based on the person's standing position type, and uses the image processing center point as a reference to correct the body contour of the person in the first image to obtain the second image.
[0090] As an example, this embodiment of the disclosure uses C-arc liquefaction deformation to correct the body contour of a person in an image. C-arc liquefaction deformation involves first determining a reference anchor point, then performing a symmetrical, inward-shrinking flexible deformation on both sides of the person's body contour in the horizontal direction. Simultaneously, in the vertical direction, the deformation amplitude is greater the closer the body contour is to the reference anchor point. The reason for using C-arc deformation is that this technique can focus on reshaping the person's body while minimizing the impact on non-target areas such as the head and feet.
[0091] In some embodiments, when the character's positioning type is a single center position, it is necessary to implement... Figure 5 The aforementioned single-center aesthetic effect requires the following steps: The center point of the body of the third person in the first image, which is in a single-center position, is taken as the center point of image processing. Based on the center point of image processing, and based on the first deformation intensity, the body contours on both sides of the third person are symmetrically deformed and inwardly contracted in the horizontal direction. In the vertical direction, the closer the part is to the center point of image processing, the greater the deformation of the body contour.
[0092] For example, the body's center point is Figure 4 The human body key points numbered 16 or 17 are not limited in this disclosure.
[0093] In other embodiments, when the character positioning type is a double C-position positioning type, it is necessary to achieve... Figure 5 To achieve the desired double-center aesthetic effect, the following steps must be performed: The center point of the body of the first person in the first image, positioned in a dual-center stance, is taken as the first image processing center point, and the center point of the body of the second person in the first image, also positioned in a dual-center stance, is taken as the second image processing center point. Based on the first image processing center point and a first deformation intensity, the body contours on both sides of the first person are subjected to symmetrical and inward flexible deformation in the horizontal direction. Based on the second image processing center point and a first deformation intensity, the body contours on both sides of the second person are subjected to symmetrical and inward flexible deformation in the horizontal direction. In the vertical direction, the closer the body contour is to the first and second image processing center points, the greater the deformation amplitude.
[0094] In other embodiments, when the character positioning type is other than a single center position or a double center position, this embodiment of the present disclosure adopts a fallback strategy to achieve... Figure 5 The aforementioned "C position" refers to a single-center aesthetic effect at the center of the image. To achieve this aesthetic effect, the following steps are required: The geometric center point of the first image is used as the image processing center point. Based on the image processing center point, and based on the first deformation intensity, the body contours of the fifth person are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the image processing center point, the greater the deformation amplitude of the body contour.
[0095] In other embodiments, the present disclosure determines the fifth person based on the size of each person in the first image and the distance between each person and the image processing center point. That is, the fifth person is determined by taking into account both the person's position in the image and the person's size. For example, the fifth person is the person closest to the image processing center point and the largest in size.
[0096] It should be noted that, regardless of the character positioning type, in addition to correcting the body outline of the core character in the image, it is also necessary to consider simultaneously correcting the body outline of all non-core peripheral characters in the image. This is because, when correcting the body outline of the core character, characters located on the sides or corners of the image may be widened, resulting in a poor aesthetic effect. To solve this problem, this embodiment of the disclosure also superimposes a larger-area but weaker C-arc liquefaction deformation, which slightly shrinks inward from the edge to the center to alleviate the widening of non-core peripheral characters.
[0097] As can be seen from the above description, the method provided in this embodiment further includes: correcting the body contours of other figures in the first image based on a second deformation intensity. Wherein, the second deformation intensity is less than the deformation intensity.
[0098] It should be noted that when the character positioning type is a double-center positioning type, "other characters" refers to all characters except the first and second characters in the double-center positioning. When the character positioning type is a single-center positioning type, "other characters" refers to all characters except the third character in the single-center positioning. When the character positioning type is any other type, "other characters" refers to all characters except the fifth character.
[0099] In step 304, the electronic device shortens the facial area of the person in the second image based on a preset tensile strength to obtain the target image.
[0100] Because this embodiment employs a method of stretching the entire original image in the height direction in step 302, the facial areas of each person in the image will also be elongated. Therefore, the facial proportion adjustment involved in this step includes the following two steps: first, determining the position of the face in the image; second, shortening the face to a corresponding degree to restore the facial proportions.
[0101] Based on the facial landmark detection results described in the first step, a face bounding box that includes all detected facial landmarks can be obtained. The area defined by this face bounding box is the face region.
[0102] Regarding the second step mentioned above, the stretching of the image in step 302 is equivalent to lengthening the height of the face frame. Therefore, this step requires a corresponding degree of reverse compensation to the height of the face frame, that is, shortening the stretched face area to the original face proportion, thereby obtaining the target image.
[0103] In summary, the image processing solution provided in this disclosure can balance the aesthetic effect of the subject with the overall visual effect of the image. Specifically, this solution first performs subject detection on the image. Next, based on the subject detection results, it determines the subject's position type in the image. After determining the position type, it achieves subject aesthetic enhancement through the following steps: First, the image is scaled in a single direction, achieving initial subject aesthetic enhancement. Then, based on the subject's position type, an image processing center point is determined, and using this center point as a reference, the body contour of the subject in the image is corrected, achieving further subject aesthetic enhancement. Finally, this solution also adjusts the facial proportions of the subject in the image based on the scaling information obtained during image scaling. This step ensures that the aesthetic enhancement effect only applies to the body and does not adversely affect the subject's head.
[0104] In addition, based on the differences in spatial attributes of the people appearing in the image, this method can accurately determine the standing type of the people in the image, which provides a basic support for subsequent correction of the body contours of the people.
[0105] In addition, this solution determines the image processing center point based on the character's position, and uses the determined image processing center point as a reference to correct the body contour of the character in the image. This scene-specific correction of the character's body contour achieves a better aesthetic effect for the character in the image.
[0106] In addition, since the C-arc liquefaction deformation is used to correct the body contour of the figure after the whole image is stretched, even if a very small stretching intensity is used in the whole image stretching stage, a good figure-shaping effect can be achieved. This prevents the situation where a large area of the image area is cropped in pursuit of a beautiful figure.
[0107] In addition, this solution uses two layers of C-arc liquefaction deformation to not only beautify the core figures in the image, but also to beautify non-core figures, achieving a better effect of beautifying multiple people simultaneously.
[0108] In summary, this solution, through image scaling, body contour correction, and facial proportion adjustment, not only achieves aesthetic enhancement of the figures in the image but also ensures that the facial proportions remain unaffected. The processed image has a good overall visual effect and avoids the situation of extensive cropping of the image area in pursuit of aesthetic enhancement.
[0109] Figure 7 This is a block diagram illustrating an image processing apparatus according to an exemplary embodiment. (Refer to...) Figure 7 The device includes: The detection module 701 is configured to perform person detection on the original image; The determination module 702 is configured to determine the position type of the person in the original image based on the person detection results; The first processing module 703 is configured to scale the original image in a single direction to obtain a first image. The second processing module 704 is configured to determine the image processing center point based on the person's standing position type, and use the image processing center point as a reference to correct the body contour of the person in the first image to obtain the second image. The third processing module 705 is configured to adjust the facial proportions of the person in the second image based on the image scaling information when scaling the original image, so as to obtain the target image.
[0110] The image processing solution provided in this disclosure can balance the beautification effect of the person with the overall visual effect of the image. Specifically, this solution first performs person detection on the image, then determines the person's standing type based on the detection results. After determining the standing type, the beautification of the person is achieved through the following steps: First, the image is scaled in a single direction, achieving initial beautification. Next, an image processing center point is determined based on the person's standing type, and the body contour of the person in the image is corrected using this center point as a reference, achieving further beautification. Finally, this solution also adjusts the facial proportions of the person in the image based on the scaling information during image scaling. This step ensures that the beautification effect only applies to the body and does not adversely affect the head. In summary, this solution, through image scaling, body contour correction, and facial proportion adjustment, not only achieves beautification of the person in the image but also ensures that the facial proportions are not affected, resulting in a good overall visual effect for the processed image.
[0111] In some embodiments, the determining module is configured to: When the person detection results determine that the original image contains only two people, and the distance between the two people exceeds a first distance threshold, the person's position type is determined to be a dual-center position type; or, When it is determined based on the person detection results that the original image includes multiple people, and the distance between the first person and the second person among the multiple people is greater than the first distance threshold, the person's position type is determined to be the dual-center position type; wherein, according to visual priority, the first person and the second person are ranked first among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
[0112] In other embodiments, the determining module is configured to: When the person detection results determine that the original image contains only a single person, the person's position type is determined to be a single-center position type; or, When the original image is determined to contain multiple people based on the person detection results, and the distance between the third and fourth people among the multiple people is greater than a second distance threshold, the person's position type is determined to be the single-center position type; wherein, according to visual priority, the third person is ranked first among the multiple people, and the fourth person is ranked second among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
[0113] In other embodiments, the second processing module is configured to: When the character's position type is a double-center position type, the body center point of the first character in the first image who is in a double-center position is taken as the first image processing center point, and the body center point of the second character in the first image who is in a double-center position is taken as the second image processing center point. Based on the first image processing center point and the first deformation intensity, the two sides of the first figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. Based on the second image processing center point and the first deformation intensity, the two sides of the second figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the first image processing center point and the second image processing center point, the greater the deformation of the body contour.
[0114] In other embodiments, the second processing module is configured to: When the character's position type is a single-center position type, the body center point of the third character in the first image who is in a single-center position is taken as the image processing center point. Based on the image processing center point, and based on the first deformation intensity, the body contours of the second side of the third person are subjected to flexible deformation in the horizontal direction, shrinking inward toward the center. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
[0115] In other embodiments, the second processing module is configured to: When the character's position type is other types, the geometric center point of the first image is used as the image processing center point; wherein, the other types refer to position types other than the dual-center position type and the single-center position type; Based on the image processing center point, and based on the first deformation intensity, the body contours of the fifth character on both sides are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
[0116] In other embodiments, the second processing module is further configured to: The fifth person is determined based on the size of each person in the first image and the distance between each person and the image processing center point.
[0117] In other embodiments, the second processing module is further configured to: Based on the second deformation intensity, the body contours of other figures in the first image are corrected, where the second deformation intensity is less than the deformation intensity. Wherein, when the character's position type is a double-center position type, the other characters refer to characters other than the first and second characters in the double-center position; when the character's position type is a single-center position type, the other characters refer to characters other than the third character in the single-center position; when the character's position type is other types, the other characters refer to characters other than the fifth character.
[0118] In other embodiments, the first processing module is configured to stretch the original image in the height direction based on a preset stretching strength, and to crop the stretched image to obtain the first image with the same size as the original image. The third processing module is configured to shorten the facial area of the person in the second image based on the preset stretching strength, thereby obtaining the target image.
[0119] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.
[0120] It should be noted that the image processing apparatus provided in the above embodiments is only illustrated by the division of the above functional units when performing image processing. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device can be divided into different functional units to complete all or part of the functions described above. In addition, the image processing apparatus and image processing method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0121] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0122] In some embodiments, an electronic device is also provided, the electronic device comprising: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the image processing method described above.
[0123] In response to the electronic device being provided as a terminal, Figure 8 This is a block diagram illustrating a terminal 800 according to an exemplary embodiment.
[0124] Typically, terminal 800 includes a processor 801 and a memory 802.
[0125] Processor 801 includes one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 801 is implemented using at least one of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Alternatively, processor 801 includes a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0126] In some embodiments, processor 801 integrates a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that the display screen needs to show. In some embodiments, processor 801 also includes an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0127] The memory 802 includes one or more computer-readable storage media, which are non-transitory. The memory 802 also includes high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 are used to store at least one program code, which is executed by the processor 801 to implement the image processing method provided in the method embodiments of this disclosure.
[0128] In some embodiments, the terminal 800 further includes a peripheral device interface 803 and at least one peripheral device. The processor 801, memory 802, and peripheral device interface 803 are connected via a bus or signal line. Each peripheral device is connected to the peripheral device interface 803 via a bus, signal line, or circuit board. The peripheral device includes at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.
[0129] Peripheral device interface 803 is used to connect at least one I / O (Input / Output) related peripheral device to processor 801 and memory 802. In some embodiments, processor 801, memory 802 and peripheral device interface 803 are integrated on the same chip or circuit board; in other embodiments, any one or two of processor 801, memory 802 and peripheral device interface 803 are implemented on separate chips or circuit boards, which is not limited in this disclosure.
[0130] The radio frequency (RF) circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. In some embodiments, the RF circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 804 communicates with other terminals via at least one wireless communication protocol. Wireless communication protocols include, but are not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 also includes circuitry related to NFC (Near Field Communication), which is not limited in this disclosure.
[0131] Display screen 805 is used to display a UI (User Interface). The UI includes graphics, text, icons, videos, and any combination thereof. When display screen 805 is a touch display, it also has the ability to collect touch signals on or above its surface. These touch signals are input as control signals to processor 801 for processing. In this case, display screen 805 also provides virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there is one display screen 805, disposed on the front panel of terminal 800; in other embodiments, there are at least two display screens 805, disposed on different surfaces of terminal 800 or in a folded design; in still other embodiments, display screen 805 is a flexible display screen, disposed on a curved or folded surface of terminal 800. Alternatively, display screen 805 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. Display screen 805 is made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0132] The camera assembly 806 is used to acquire images or videos. In some embodiments, the camera assembly 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In other embodiments, the camera assembly 806 also includes a flash. The flash is a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, used for light compensation at different color temperatures.
[0133] The audio circuit 807 includes a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 801 for processing, or to the radio frequency circuit 804 for voice communication. Multiple microphones are used for stereo sound acquisition or noise reduction, each located at a different part of the terminal 800. Alternatively, the microphones may be array microphones or omnidirectional microphones. The speaker is used to convert electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional thin-film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 807 also includes a headphone jack.
[0134] Power supply 808 is used to power the various components in terminal 800. Power supply 808 can be AC power, DC power, a disposable battery, or a rechargeable battery. If power supply 808 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired connection, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery also supports fast charging technology.
[0135] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on terminal 800 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0136] In some embodiments, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, which are executed by a processor of an electronic device to implement the image processing method described above. In other embodiments, the computer-readable storage medium is a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0137] In some embodiments, a computer program product is also provided, including a computer program that, when executed by a processor of an electronic device, implements the image processing method described above.
[0138] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0139] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: Perform person detection on the original image, and determine the person's position type in the original image based on the person detection results; The original image is scaled in a single direction to obtain a first image; Based on the character's standing position type, the image processing center point is determined. Using the image processing center point as a reference, the body contour of the character in the first image is corrected to obtain the second image. Based on the image scaling information from scaling the original image, the facial proportions of the person in the second image are adjusted to obtain the target image.
2. The image processing method according to claim 1, characterized in that, The process of determining the position type of the person in the original image based on the person detection results includes: When the person detection results determine that the original image contains only two people, and the distance between the two people exceeds a first distance threshold, the person's position type is determined to be a dual-center position type; or, When it is determined based on the person detection results that the original image includes multiple people, and the distance between the first person and the second person among the multiple people is greater than the first distance threshold, the person's position type is determined to be the dual-center position type; wherein, according to visual priority, the first person and the second person are ranked first among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
3. The image processing method according to claim 1, characterized in that, The process of determining the position type of the person in the original image based on the person detection results includes: When the person detection results determine that the original image contains only a single person, the person's position type is determined to be a single-center position type; or, When the original image is determined to contain multiple people based on the person detection results, and the distance between the third and fourth people among the multiple people is greater than a second distance threshold, the person's position type is determined to be the single-center position type; wherein, according to visual priority, the third person is ranked first among the multiple people, and the fourth person is ranked second among the multiple people; the visual priority is related to the differences in attributes of the multiple people in the spatial dimension.
4. The image processing method according to claim 1, characterized in that, The step of determining the image processing center point based on the person's standing position type, and using the image processing center point as a reference, correcting the body contour of the person in the first image, includes: When the character's position type is a double-center position type, the body center point of the first character in the first image who is in a double-center position is taken as the first image processing center point, and the body center point of the second character in the first image who is in a double-center position is taken as the second image processing center point. Based on the first image processing center point and the first deformation intensity, the two sides of the first figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. Based on the second image processing center point and the first deformation intensity, the two sides of the second figure's body contours are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the first image processing center point and the second image processing center point, the greater the deformation of the body contour.
5. The image processing method according to claim 1, characterized in that, The step of determining the image processing center point based on the person's standing position type, and using the image processing center point as a reference, correcting the body contour of the person in the first image, includes: When the character's position type is a single-center position type, the body center point of the third character in the first image who is in a single-center position is taken as the image processing center point. Based on the image processing center point, and based on the first deformation intensity, the body contours of the second side of the third person are subjected to flexible deformation in the horizontal direction, shrinking inward toward the center. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
6. The image processing method according to claim 1, characterized in that, The step of determining the image processing center point based on the person's standing position type, and using the image processing center point as a reference, correcting the body contour of the person in the first image, includes: When the character's position type is other types, the geometric center point of the first image is used as the image processing center point; wherein, the other types refer to position types other than the dual-center position type and the single-center position type; Based on the image processing center point, and based on the first deformation intensity, the body contours of the fifth character on both sides are symmetrically deformed and inwardly contracted towards the center in the horizontal direction. In the vertical direction, the closer the part is to the center point of the image processing, the greater the deformation of the body contour.
7. The method according to claim 6, characterized in that, The method further includes: The fifth person is determined based on the size of each person in the first image and the distance between each person and the image processing center point.
8. The image processing method according to any one of claims 4 to 6, characterized in that, The method further includes: Based on the second deformation intensity, the body contours of other figures in the first image are corrected, where the second deformation intensity is less than the deformation intensity. Wherein, when the character's position type is a double-center position type, the other characters refer to characters other than the first and second characters in the double-center position; when the character's position type is a single-center position type, the other characters refer to characters other than the third character in the single-center position; when the character's position type is other types, the other characters refer to characters other than the fifth character.
9. The image processing method according to claim 1, characterized in that, The scaling process of the original image in a single direction to obtain the first image includes: Based on a preset stretching strength, the original image is stretched in the height direction, and the stretched image is cropped to obtain the first image with the same size as the original image. The step of adjusting the facial proportions of the person in the second image based on the image scaling information when scaling the original image to obtain the target image includes: Based on the preset stretching strength, the facial area of the person in the second image is shortened to obtain the target image.
10. An image processing apparatus, characterized in that, The device includes: The detection module is configured to detect people in the original image; The determination module is configured to determine the position type of the person in the original image based on the person detection results; The first processing module is configured to scale the original image in a single direction to obtain a first image; The second processing module is configured to determine the image processing center point based on the person's standing position type, and use the image processing center point as a reference to correct the body contour of the person in the first image to obtain the second image. The third processing module is configured to adjust the facial proportions of the person in the second image based on the image scaling information when scaling the original image, so as to obtain the target image.
11. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the image processing method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the image processing method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, It includes a computer program that, when executed by a processor of an electronic device, implements the image processing method as described in any one of claims 1 to 9.