Image cutting method, electronic equipment and computer readable storage medium

CN121532797APending Publication Date: 2026-02-13HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480003694.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-13
Filing Date
2024-12-20
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In existing technologies, electronic devices fail to highlight the aesthetic appeal of images during image cropping, resulting in a poor user experience.

Method used

By determining the aesthetic appeal of the target object's limbs and/or face, the image is cropped using a limb-first or face-first cropping method to preserve the aesthetic appeal of the target object's posture and/or face.

Benefits of technology

It improves the aesthetics of cropped images and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121532797A_ABST
    Figure CN121532797A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of terminals, and particularly relates to an image cutting method, electronic equipment and a computer readable storage medium. According to the method, after an original image including a target object is obtained, the electronic equipment can determine the limb attractiveness and / or the face attractiveness of the target object. Then, the electronic equipment can determine a target cutting mode capable of highlighting the posture aesthetic feeling and / or the facial aesthetic feeling of the target object according to the limb aesthetic degree and / or the facial aesthetic degree of the target object, and can cut the original image according to the target cutting mode to obtain a cut image; the cut image can keep the posture aesthetic feeling and / or the facial aesthetic feeling of the original image, the aesthetic feeling of the cut image can be improved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Image cropping method, electronic device and computer readable storage medium

[0001] The present application claims priority to the Chinese patent application No. 202410767538.9, filed on June 13, 2024, and entitled "Image cropping method, electronic device and computer readable storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application belongs to the technical field of terminals, and particularly relates to an image cropping method, an electronic device and a computer readable storage medium. BACKGROUND

[0003] Electronic devices such as mobile phones and tablets generally have the function of automatically cropping images, that is, they can automatically crop images according to a default cropping mode. For example, when setting a screen saver or a lock screen image, a user can upload a personalized image. After obtaining the personalized image, the electronic device can automatically crop the personalized image into a cropped image of a specified size according to the default cropping mode, and apply the cropped image to the screen saver or the lock screen, etc. Cropping all images according to the default cropping mode can result in images that do not highlight the beauty of the images themselves, resulting in poor user experience. SUMMARY

[0004] The embodiments of the present application provide an image cropping method, an electronic device and a computer readable storage medium, which can improve the beauty of cropped images and enhance user experience.

[0005] In a first aspect, the embodiments of the present application provide an image cropping method, which can include:

[0006] obtaining an original image, the original image including a target object;

[0007] determining a body aesthetic degree of the target object, and / or determining a face aesthetic degree of the target object;

[0008] determining a target cropping mode corresponding to the original image according to the body aesthetic degree and / or the face aesthetic degree;

[0009] cropping the original image according to the target cropping mode to obtain a cropped image, the cropped image including all or part of the target object.

[0010] In the image cropping method provided above, after obtaining an original image including a target object, the electronic device can determine a limb aesthetic degree and / or a facial aesthetic degree of the target object. Subsequently, the electronic device can determine a target cropping manner that can highlight the posture aesthetic and / or the facial aesthetic of the target object according to the limb aesthetic degree and / or the facial aesthetic degree of the target object, and can crop the original image according to the target cropping manner to obtain a cropped image, so that the cropped image can retain the posture aesthetic and / or the facial aesthetic of the original image itself, the aesthetic of the cropped image can be improved, and user experience can be improved.

[0011] The target cropping manner can be a limb-priority cropping manner or a face-priority cropping manner. The limb-priority cropping manner can refer to that, when the image is cropped, the limb can be taken as a priority factor, i.e., the integrity of the limb can be taken as a priority factor. The face-priority cropping manner can refer to that, when the image is cropped, the face can be taken as a priority factor, i.e., the facial features can be taken as a priority factor.

[0012] That is, when it is determined that the target cropping manner is the limb-priority cropping manner, the electronic device can preferentially retain the integrity of the limb when the original image is cropped according to the target cropping manner, for example, the original image can be cropped into a full-body image. When it is determined that the target cropping manner is the face-priority cropping manner, the electronic device can preferentially highlight the facial features when the original image is cropped according to the target cropping manner, for example, the original image can be cropped into a half-body image highlighting the facial features.

[0013] In some embodiments, the determination of the limb aesthetic degree of the target object can include:

[0014] determining a limb dynamic degree of the target object, the limb dynamic degree being used to represent a motion state of the target object;

[0015] determining the limb aesthetic degree of the target object according to the limb dynamic degree.

[0016] It should be noted that the limb aesthetic degree when in a motion state is generally considered to be higher than the limb aesthetic degree when in a static state.

[0017] In the image cropping method provided in this embodiment, when it is determined that the limb dynamic degree of the target object is high, for example, when it is determined that the movement speed of the target object is fast, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, it can be determined that the target cropping manner corresponding to the original image is the limb-priority cropping manner. When it is determined that the limb dynamic degree of the target object is low, for example, when it is determined that the movement speed of the target object is low (for example, in a static state), the electronic device can determine that the limb aesthetic degree of the target object is low, that is, it can be determined that the target cropping manner corresponding to the original image is the face-priority cropping manner. When it is determined that the limb dynamic degree of the target object is moderate, the electronic device can determine that the limb aesthetic degree of the target object is moderate, that is, it can be determined that the target cropping manner corresponding to the original image is the default cropping manner.

[0018] It should be understood that the limb aesthetic degree being high and the limb aesthetic degree being high in the embodiments of the present application can be the same concept, and the limb aesthetic degree being low and the limb aesthetic degree being low can be the same concept. The default cropping manner can be determined according to the actual scene. For example, the default cropping manner can be determined to be the face-priority cropping manner according to the actual scene. For example, the default cropping manner can be determined to be that the face center of the target object is located at 1 / 3 of the upper part of the cropped image, that is, the cropped image can be equally divided into three parts from top to bottom, and the face center of the target object can be located at the uppermost 1 / 3.

[0019] In one example, the determining the limb dynamic degree of the target object can include:

[0020] obtaining a first angle corresponding to the target object, the first angle being an angle between a line connecting a top of the head of the target object and a midpoint of a pelvis and a vertical direction;

[0021] determining the limb dynamic degree of the target object according to the first angle.

[0022] In the image cropping method provided in this example, the electronic device can determine the limb dynamic degree of the target object according to the first angle (that is, angle a) between the line connecting the top of the head of the target object and the midpoint of the pelvis and the vertical direction, for example, the angle a can be determined as the limb dynamic degree of the target object. When the target object is in a motion state, the angle a is generally large, and the faster the movement speed, the larger the angle a will be. When the target object is in a static state, the angle a is generally small.

[0023] In a possible implementation, the determining the limb aesthetic degree of the target object according to the limb dynamic degree can include:

[0024] when the limb dynamic degree is greater than or equal to a first threshold, determining that the limb aesthetic degree of the target object satisfies a first condition;

[0025] When the limb dynamic degree is less than a second threshold value, it is determined that the limb aesthetic degree of the target object satisfies a second condition, and the first threshold value is greater than or equal to the second threshold value.

[0026] It should be understood that the first condition can refer to a high limb aesthetic degree, and the second condition can refer to a low limb aesthetic degree.

[0027] In the image cropping method provided in this implementation, when the target object is in a motion state, the angle a will be greater than or equal to a first threshold value (i.e., threshold value A1). When the target object is in a static state, the angle a will be less than a second threshold value (i.e., threshold value A2). The threshold value A1 and the threshold value A2 can be specific numerical values or numerical ranges. The threshold value A1 and the threshold value A2 can be the same or different, and the threshold value A1 is greater than or equal to the threshold value A2. That is, when it is determined that the limb dynamic degree is greater than or equal to the first threshold value (i.e., threshold value A1), the electronic device can determine that the limb aesthetic degree of the target object is high. When it is determined that the limb dynamic degree is less than the second threshold value (i.e., threshold value A2), the electronic device can determine that the limb aesthetic degree of the target object is low. When it is determined that the limb dynamic degree is greater than or equal to the second threshold value and less than the first threshold value, the electronic device can determine that the limb aesthetic degree of the target object is moderate.

[0028] In another possible implementation, the determining the limb aesthetic degree of the target object according to the limb dynamic degree can include:

[0029] determining a limb stretch degree of the target object, the limb stretch degree being used to represent a stretch degree of the limb of the target object;

[0030] determining the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretch degree.

[0031] In the image cropping method provided in this implementation, the electronic device can determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretch degree of the target object, so as to comprehensively consider the limb dynamic degree and the limb stretch degree of the target object to determine the limb aesthetic degree of the target object, which can improve the accuracy of the determination of the limb aesthetic degree, thereby improving the accuracy of the determination of the target cropping manner and improving the aesthetic sense of the cropped image.

[0032] In one example, the determining the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretch degree can include:

[0033] when the limb dynamic degree is greater than or equal to a first threshold value and the limb stretch degree is greater than or equal to a third threshold value, it is determined that the limb aesthetic degree of the target object satisfies a first condition;

[0034] determine that the limb aesthetic degree of the target object meets a second condition when the limb dynamic degree is less than a second threshold value and the limb stretch degree is less than a fourth threshold value;

[0035] wherein the first threshold value is greater than or equal to the second threshold value, and the third threshold value is greater than or equal to the fourth threshold value.

[0036] It should be noted that the third threshold value can be threshold value B1, or can be threshold value C1. The fourth threshold value can be threshold value B2, or can be threshold value C2. Among them, threshold value B1 and threshold value B2, and threshold value C1 and threshold value C2 can be specific numerical values, or can be a numerical range. Threshold value B1 and threshold value B2 can be the same or different, and threshold value B1 is greater than or equal to threshold value B2. Threshold value C1 and threshold value C2 can be the same or different, and threshold value C1 is greater than or equal to threshold value C2.

[0037] In the image cropping method provided in this example, when it is determined that the limb dynamic degree is greater than or equal to the first threshold value (i.e. threshold value A1), and the limb stretch degree is greater than or equal to the third threshold value (i.e. threshold value B1 or threshold value C1), the electronic device can determine that the limb aesthetic degree of the target object is high. When it is determined that the limb dynamic degree is less than the second threshold value (i.e. threshold value A2), and the limb stretch degree is less than the fourth threshold value (i.e. threshold value B2 or threshold value C2), the electronic device can determine that the limb aesthetic degree of the target object is low. Otherwise, the electronic device can determine that the limb aesthetic degree of the target object is moderate.

[0038] In another possible implementation, the determining the limb aesthetic degree of the target object according to the limb dynamic degree can include:

[0039] determining a limb twist degree of the target object, the limb twist degree being used to represent a twist degree of the limb of the target object;

[0040] determining the limb aesthetic degree of the target object according to the limb dynamic degree and the limb twist degree.

[0041] In the image cropping method provided in this implementation, the electronic device can determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb twist degree of the target object, so as to comprehensively consider the limb dynamic degree and the limb twist degree of the target object to determine the limb aesthetic degree of the target object, which can improve the accuracy of the determination of the limb aesthetic degree, thereby improving the accuracy of the determination of the target cropping manner, and improving the aesthetic sense of the cropped image.

[0042] In one example, the determining the limb aesthetic degree of the target object according to the limb dynamic degree and the limb twist degree can include:

[0043] determine that the limb aesthetic degree of the target object meets a first condition when the limb dynamic degree is greater than or equal to a first threshold value and the limb torsion degree is greater than or equal to a fifth threshold value;

[0044] determine that the limb aesthetic degree of the target object meets a second condition when the limb dynamic degree is less than a second threshold value and the limb torsion degree is less than a sixth threshold value;

[0045] wherein the first threshold value is greater than or equal to the second threshold value, and the fifth threshold value is greater than or equal to the sixth threshold value.

[0046] It should be noted that the fifth threshold value can be threshold value D1. The sixth threshold value can be threshold value D2. The threshold value D1 and the threshold value D2 can be specific numerical values, or can be a numerical range. The threshold value D1 and the threshold value D2 can be the same or different, and the threshold value D1 is greater than or equal to the threshold value D2.

[0047] In the image cropping method provided in this example, when it is determined that the limb dynamic degree is greater than or equal to a first threshold value (i.e., threshold value A1) and the limb torsion degree is greater than or equal to a fifth threshold value (i.e., threshold value D1), the electronic device can determine that the limb aesthetic degree of the target object is high. When it is determined that the limb dynamic degree is less than a second threshold value (i.e., threshold value A2) and the limb torsion degree is less than a sixth threshold value (i.e., threshold value D2), the electronic device can determine that the limb aesthetic degree of the target object is low. Otherwise, the electronic device can determine that the limb aesthetic degree of the target object is moderate.

[0048] In another possible implementation, the determining the limb aesthetic degree of the target object according to the limb dynamic degree can include:

[0049] determining a limb stretch degree and a limb torsion degree of the target object, and determining the limb aesthetic degree of the target object according to the limb dynamic degree, the limb stretch degree and the limb torsion degree.

[0050] In the image cropping method provided in this implementation, the electronic device can determine the limb aesthetic degree of the target object according to the limb dynamic degree, the limb stretch degree and the limb torsion degree of the target object, so as to comprehensively consider the limb dynamic degree, the limb stretch degree and the limb torsion degree of the target object to determine the limb aesthetic degree of the target object. This can improve the accuracy of the determination of the limb aesthetic degree, and thus can improve the accuracy of the determination of the target cropping manner and the aesthetic sense of the cropped image.

[0051] In some other embodiments, the determining the limb aesthetic degree of the target object can include:

[0052] determining a limb stretch degree of the target object;

[0053] determine a limb aesthetic degree of the target object according to the limb stretch degree of the target object.

[0054] It should be noted that when the limb stretch degree is high, that is, the stretch degree of the limb is high, it is generally considered that the limb aesthetic degree is high. When the limb stretch degree is low, that is, the stretch degree of the limb is low, it is generally considered that the limb aesthetic degree is poor. That is, the limb aesthetic degree of the limb with a higher stretch degree is generally higher than the limb aesthetic degree of the limb with a lower stretch degree.

[0055] In the image cropping method provided in this embodiment, when it is determined that the limb stretch degree of the target object is high, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, it can be determined that the target cropping manner corresponding to the original image is the limb-priority cropping manner. When it is determined that the limb stretch degree of the target object is low, the electronic device can determine that the limb aesthetic degree of the target object is low, that is, it can be determined that the target cropping manner corresponding to the original image is the face-priority cropping manner. When it is determined that the limb stretch degree of the target object is moderate, the electronic device can determine that the limb aesthetic degree of the target object is moderate, that is, it can be determined that the target cropping manner corresponding to the original image is the default cropping manner.

[0056] In one example, the determining the limb stretch degree of the target object can include:

[0057] determining a first width and a second width, the first width being a width of a first set of symmetrical joints of the target object, and the second width being a width of a second set of symmetrical joints of the target object;

[0058] determining the limb stretch degree of the target object according to the first width and the second width.

[0059] Exemplarily, the first set of symmetrical joints can include a set of joints corresponding to a shoulder and / or a set of joints corresponding to a pelvis, and the second set of symmetrical joints can include at least one of a set of joints corresponding to a wrist, a set of joints corresponding to a knee, and a set of joints corresponding to an ankle.

[0060] In the image cropping method provided in this example, the electronic device can determine the limb stretch degree of the target object according to the width of each set of symmetrical joints in the at least two sets of symmetrical joints. Wherein, the higher the limb stretch degree of the target object is, the greater the difference between the widths of the at least two sets of symmetrical joints of the target object (i.e., the width difference) will be; the lower the limb stretch degree of the target object is, the smaller the width difference of the target object will be.

[0061] It should be understood that each group of symmetrical joints can refer to laterally symmetrical joints. That is, each group of symmetrical joints can include two joints, and the two joints are laterally symmetrical joints. The width of each group of symmetrical joints can refer to the length of the line between the two joints included in the group of symmetrical joints.

[0062] In another example, the determining the limb stretch degree of the target object can include:

[0063] determining a first horizontal coordinate and a second horizontal coordinate, the first horizontal coordinate being a horizontal coordinate of a first target joint of the target object, and the second horizontal coordinate being a horizontal coordinate of a second target joint of the target object, the first target joint and the second target joint being joints on the same side of the target object;

[0064] determining the limb stretch degree of the target object according to the first horizontal coordinate and the second horizontal coordinate.

[0065] For example, the first target joint can include a joint corresponding to a shoulder and / or a joint corresponding to a pelvis, and the second target joint can include at least one of a joint corresponding to a wrist, a joint corresponding to a knee, and a joint corresponding to an ankle.

[0066] In the image cropping method provided in this example, the electronic device can determine the limb stretch degree of the target object according to the horizontal coordinates of at least two joints on one side. For example, when the number of groups of symmetrical joints of the target object is less than two, the electronic device can determine the limb stretch degree of the target object according to the horizontal coordinates of at least two joints on one side. Wherein, when the limb stretch degree of the target object is higher, the difference between the horizontal coordinates of the at least two joints on one side of the target object (i.e., the horizontal coordinate difference) will be greater; when the limb stretch degree of the target object is lower, the horizontal coordinate difference of the target object on one side will be smaller.

[0067] In a possible implementation, the determining the limb aesthetic degree of the target object according to the limb stretch degree can include:

[0068] when the limb stretch degree is greater than or equal to a third threshold value, determining that the limb aesthetic degree of the target object satisfies a first condition;

[0069] when the limb stretch degree is less than a fourth threshold value, determining that the limb aesthetic degree of the target object satisfies a second condition, the third threshold value being greater than or equal to the fourth threshold value.

[0070] In the image cropping method provided in this implementation, when it is determined that the limb stretch degree is greater than or equal to a third threshold (i.e., threshold B1 or threshold C1), the electronic device can determine that the limb aesthetic degree of the target object is high. When it is determined that the limb stretch degree is less than a fourth threshold (i.e., threshold B2 or threshold C2), the electronic device can determine that the limb aesthetic degree of the target object is low. When it is determined that the limb dynamic degree is greater than or equal to the fourth threshold and less than the third threshold, the electronic device can determine that the limb aesthetic degree of the target object is moderate.

[0071] In another possible implementation, the determining the limb aesthetic degree of the target object according to the limb stretch degree can include:

[0072] determining a limb twist degree of the target object, and determining the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree.

[0073] In the image cropping method provided in this implementation, the electronic device can determine the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree of the target object, so as to comprehensively consider the limb stretch degree and the limb twist degree of the target object to determine the limb aesthetic degree of the target object, which can improve the accuracy of the determination of the limb aesthetic degree, and thus can improve the accuracy of the determination of the target cropping manner and improve the aesthetic sense of the cropped image.

[0074] In one example, the determining the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree can include:

[0075] when the limb stretch degree is greater than or equal to a third threshold and the limb twist degree is greater than or equal to a fifth threshold, determining that the limb aesthetic degree of the target object satisfies a first condition;

[0076] when the limb stretch degree is less than a fourth threshold and the limb twist degree is less than a sixth threshold, determining that the limb aesthetic degree of the target object satisfies a second condition;

[0077] wherein the third threshold is greater than or equal to the fourth threshold, and the fifth threshold is greater than or equal to the sixth threshold.

[0078] In the image cropping method provided in this example, when it is determined that the limb stretch degree is greater than or equal to a third threshold (i.e., threshold B1 or threshold C1) and the limb twist degree is greater than or equal to a fifth threshold (i.e., threshold D1), the electronic device can determine that the limb aesthetic degree of the target object is high. When it is determined that the limb stretch degree is less than a fourth threshold (i.e., threshold B2 or threshold C2) and the limb twist degree is less than a sixth threshold (i.e., threshold D2), the electronic device can determine that the limb aesthetic degree of the target object is low. Otherwise, the electronic device can determine that the limb aesthetic degree of the target object is moderate.

[0079] In some embodiments, the determining the body beauty degree of the target object can include:

[0080] determining a body twist degree of the target object;

[0081] determining the body beauty degree of the target object according to the body twist degree.

[0082] It should be noted that when the body twist degree is high, i.e., the twist degree of the body is high, it is generally considered that the body beauty degree is high. When the body twist degree is low, i.e., the twist degree of the body is low, it is generally considered that the body beauty degree is poor. That is, the body beauty degree of the body with a high twist degree is generally higher than the body beauty degree of the body with a low twist degree.

[0083] In the image cropping method provided in this embodiment, when it is determined that the body twist degree of the target object is high, the electronic device can determine that the body beauty degree of the target object is high, i.e., it can be determined that the target cropping manner corresponding to the original image is the body-priority cropping manner. When it is determined that the body twist degree of the target object is low, the electronic device can determine that the body beauty degree of the target object is low, i.e., it can be determined that the target cropping manner corresponding to the original image is the face-priority cropping manner. When it is determined that the body twist degree of the target object is moderate, the electronic device can determine that the body beauty degree of the target object is moderate, i.e., it can be determined that the target cropping manner corresponding to the original image is the default cropping manner.

[0084] In one example, the determining the body twist degree of the target object can include:

[0085] obtaining a second angle corresponding to the target object, the second angle being an angle between a first line and a second line, the first line being a line corresponding to a third symmetrical joint of the target object, and the second line being a line corresponding to a fourth symmetrical joint of the target object;

[0086] determining the body twist degree of the target object according to the second angle.

[0087] For example, the third symmetrical joint can include a group of joints corresponding to a shoulder, and the fourth symmetrical joint can include a group of joints corresponding to a pelvis.

[0088] In the image cropping method provided in this example, the electronic device can determine the body twist degree of the target object according to the second angle (i.e., angle b) between the line of the group of joints corresponding to the shoulder and the line of the group of joints corresponding to the pelvis, e.g., the angle b can be determined as the body twist degree of the target object. Wherein, when the body twist degree of the target object is large, the angle b is generally large. When the body twist degree of the target object is small, the angle b is generally small.

[0089] In a possible implementation, the determining the limb aesthetic degree of the target object according to the limb twist degree can include:

[0090] When the limb twist degree is greater than or equal to a fifth threshold, it is determined that the limb aesthetic degree of the target object meets a first condition.

[0091] When the limb twist degree is less than a sixth threshold, it is determined that the limb aesthetic degree of the target object meets a second condition, the fifth threshold being greater than or equal to the sixth threshold.

[0092] In the image cropping method provided by this implementation, when it is determined that the limb twist degree is greater than or equal to a fifth threshold (i.e., threshold D1), the electronic device can determine that the limb aesthetic degree of the target object is high. When it is determined that the limb twist degree is less than a sixth threshold (i.e., threshold D2), the electronic device can determine that the limb aesthetic degree of the target object is low. When it is determined that the limb twist degree is greater than or equal to the sixth threshold and less than the fifth threshold, the electronic device can determine that the limb aesthetic degree of the target object is moderate.

[0093] In some embodiments, the determining the facial aesthetic degree of the target object can include:

[0094] Determining an expression arousal degree and an expression pleasure degree of the target object, and determining the facial aesthetic degree of the target object according to the expression arousal degree and the expression pleasure degree.

[0095] It should be understood that the facial aesthetic degree can include an expression aesthetic degree. The expression arousal degree can be used to measure the degree (or intensity) of emotion. The expression pleasure degree can be used to measure the positive degree of emotion. That is, the electronic device can determine the expression arousal degree and the expression pleasure degree of the target object according to the original image, to determine the expression aesthetic degree of the target object according to the expression arousal degree and the expression pleasure degree, and to determine the facial aesthetic degree of the target object.

[0096] In a possible implementation, the determining the facial aesthetic degree of the target object according to the expression arousal degree and the expression pleasure degree can include:

[0097] When the expression arousal degree is greater than or equal to a seventh threshold, or the expression pleasure degree is greater than or equal to an eighth threshold, it is determined that the facial aesthetic degree meets a third condition.

[0098] When the expression arousal degree is less than the seventh threshold, and the expression pleasure degree is less than the eighth threshold, it is determined that the facial aesthetic degree meets a fourth condition.

[0099] It should be understood that the third condition can refer to a high facial aesthetic degree, and the fourth condition can refer to a low facial aesthetic degree.

[0100] In the image cropping method provided in this implementation, when it is determined that the absolute value of the expression arousal degree is less than a seventh threshold value (i.e., threshold value E) and the absolute value of the expression pleasure degree is less than an eighth threshold value (i.e., threshold value F), the electronic device can determine that the facial aesthetic degree of the target object is low, i.e., it can be determined that the facial expression of the target object is flat. When it is determined that the absolute value of the expression arousal degree is greater than or equal to the threshold value E, or the absolute value of the expression pleasure degree is greater than or equal to the threshold value F, the electronic device can determine that the facial aesthetic degree of the target object is high, i.e., it can be determined that the facial expression of the target object has tension.

[0101] In some embodiments, the determining the target cropping manner corresponding to the original image according to the body aesthetic degree and / or the facial aesthetic degree can include:

[0102] When the body aesthetic degree satisfies a first condition, the target cropping manner is determined as a first cropping manner, and the first cropping manner is a body-priority cropping manner.

[0103] When the body aesthetic degree satisfies a second condition, the target cropping manner is determined as a second cropping manner, and the second cropping manner is a face-priority cropping manner.

[0104] In the image cropping method provided in this embodiment, the electronic device can determine the target cropping manner corresponding to the original image according to the body aesthetic degree. When the body aesthetic degree satisfies a first condition, i.e., the body aesthetic degree is high, the electronic device can determine that the target cropping manner is a body-priority cropping manner. When the body aesthetic degree satisfies a second condition, i.e., the body aesthetic degree is low, the electronic device can determine that the target cropping manner is a face-priority cropping manner. When the body aesthetic degree does not satisfy the first condition and does not satisfy the second condition, i.e., the body aesthetic degree is moderate, the electronic device can determine that the target cropping manner is a default cropping manner.

[0105] In other embodiments, the determining the target cropping manner corresponding to the original image according to the body aesthetic degree and / or the facial aesthetic degree can include:

[0106] When the facial aesthetic degree satisfies a third condition, the target cropping manner is determined as a second cropping manner, and the second cropping manner is a face-priority cropping manner.

[0107] When the facial aesthetic degree satisfies a fourth condition, the target cropping manner is determined as a first cropping manner, and the first cropping manner is a body-priority cropping manner.

[0108] In the image cropping method provided in this embodiment, the electronic device can determine a target cropping manner corresponding to the original image according to the face aesthetic degree. When the face aesthetic degree meets a third condition, i.e., the face aesthetic degree is high, the electronic device can determine that the target cropping manner is a face-priority cropping manner. When the face aesthetic degree meets a fourth condition, i.e., the face aesthetic degree is low, the electronic device can determine that the target cropping manner is a body-priority cropping manner. When the face aesthetic degree does not meet the third condition and does not meet the fourth condition, i.e., the face aesthetic degree is moderate, the electronic device can determine that the target cropping manner is a default cropping manner.

[0109] In some embodiments, the determining the target cropping manner corresponding to the original image according to the body aesthetic degree and / or the face aesthetic degree can include:

[0110] When the body aesthetic degree meets a first condition and the face aesthetic degree meets the fourth condition, the electronic device can determine that the target cropping manner is a first cropping manner, and the first cropping manner is a body-priority cropping manner.

[0111] When the body aesthetic degree meets the first condition and the face aesthetic degree meets a third condition, or when the body aesthetic degree meets a second condition, the electronic device can determine that the target cropping manner is a second cropping manner, and the second cropping manner is a face-priority cropping manner.

[0112] In the image cropping method provided in this embodiment, the electronic device can determine a target cropping manner corresponding to the original image according to the body aesthetic degree and the face aesthetic degree. When the body aesthetic degree meets a first condition and the face aesthetic degree meets a fourth condition, i.e., the body aesthetic degree is high and the face aesthetic degree is low, the electronic device can determine that the target cropping manner is a body-priority cropping manner. When the body aesthetic degree meets the first condition and the face aesthetic degree meets a third condition, i.e., the body aesthetic degree is high and the face aesthetic degree is high, the electronic device can determine that the target cropping manner is a face-priority cropping manner. When the body aesthetic degree meets a second condition, i.e., the body aesthetic degree is low, the electronic device can determine that the target cropping manner is a face-priority cropping manner. Otherwise, the electronic device can determine that the target cropping manner is a default cropping manner.

[0113] In some embodiments, the cropping the original image according to the target cropping manner to obtain a cropped image can include:

[0114] determining a face orientation of the target object;

[0115] The target position of the target object in the cropped image is determined according to the face orientation of the target object, and the original image is cropped according to the target position and the target cropping manner, so that the cropped image is obtained, and the target object is located at the target position in the cropped image.

[0116] It should be understood that the face orientation of the target object can include a front direction, a side direction and a back direction. The front direction can mean that the original image includes a front face of the face of the target object. The side direction can mean that the original image includes a side face of the face of the target object. The back direction can mean that the original image does not include the face of the target object.

[0117] In the image cropping method provided in this embodiment, the electronic device can determine the target position of the target object in the cropped image according to the face orientation of the target object, and can crop the original image according to the target position and the target cropping manner, so that the aesthetic feeling of the cropped image can be improved, and the user experience can be improved.

[0118] In a possible implementation, the determining the target position of the target object in the cropped image according to the face orientation of the target object can include:

[0119] When the face orientation is the front direction or the back direction, the target position of the target object in the cropped image is determined as the middle position.

[0120] In the image cropping method provided in this implementation, when the face orientation of the target object is the front direction or the back direction, the electronic device can determine the target position of the target object in the cropped image as the middle position, so that when the original image is cropped according to the target cropping manner, the original image can be cropped in such a way that the target object is located at the middle position of the cropped image, the aesthetic feeling of the cropped image can be improved, and the user experience can be improved.

[0121] In another possible implementation, the determining the target position of the target object in the cropped image according to the face orientation of the target object can include:

[0122] When the face orientation is the side direction, the offset distance of the target object is determined according to a preset aspect ratio, the preset aspect ratio is an aspect ratio corresponding to the cropped image, and the offset distance is a distance between the target position of the target object in the cropped image and the middle position of the cropped image.

[0123] The target position of the target object in the cropped image is determined according to the offset distance of the target object.

[0124] It should be understood that the aspect ratio can be the ratio of the length (i.e., the length in the transverse direction) to the width (i.e., the width in the longitudinal direction). The offset distance can refer to the distance of the target position of the target object in the cropped image relative to the middle position of the cropped image.

[0125] In the image cropping method provided in this implementation, when the face orientation of the target object is lateral, the electronic device can determine the offset distance of the target object, so as to determine the target position of the target object in the cropped image according to the offset distance of the target object, so that when the original image is cropped according to the target cropping manner, the original image can be cropped in such a manner that the target object is located at the target position in the cropped image, the aesthetic feeling of the cropped image can be improved, and the user experience can be improved.

[0126] In one example, the determining the target position of the target object in the cropped image according to the offset distance of the target object comprises:

[0127] When the face orientation is lateral, determining the offset direction of the target object according to the face orientation;

[0128] Determining the target position of the target object in the cropped image according to the offset distance and the offset direction of the target object.

[0129] In the image cropping method provided in this example, when the face orientation of the target object is lateral, the electronic device can further determine the offset direction of the target object, so as to determine the target position of the target object in the cropped image according to the offset distance and the offset direction of the target object, so that when the original image is cropped according to the target cropping manner, the original image can be cropped in such a manner that the target object is located at the target position in the cropped image, the aesthetic feeling of the cropped image can be improved, and the user experience can be improved.

[0130] For example, when the face orientation of the target object is toward the left side, the electronic device can determine that the offset direction of the target object is to the right. That is, when it is determined that the face orientation of the target object is to the left side, the electronic device determines that the target position of the target object in the cropped image can be biased to the right side of the cropped image. When the face orientation of the target object is toward the right side, the electronic device can determine that the offset direction of the target object is to the left. When it is determined that the face orientation of the target object is to the right side, the electronic device determines that the target position of the target object in the cropped image can be biased to the left side of the cropped image.

[0131] In a second aspect, the embodiments of the present application provide an image cropping method, comprising:

[0132] Obtaining an original image, the original image comprising a target object;

[0133] Determining the aesthetic degree of the limbs of the target object;

[0134] determine a target cropping manner corresponding to the original image according to the body aesthetic degree; when the body aesthetic degree is high, the target cropping manner is a body-priority cropping manner; when the body aesthetic degree is low, the target cropping manner is a face-priority cropping manner;

[0135] crop the original image according to the target cropping manner to obtain a cropped image, the cropped image including all or part of the target object; when the target cropping manner is the body-priority cropping manner, the cropped image includes all of the target object; when the target cropping manner is the face-priority cropping manner, the cropped image includes part of the target object, the part including a face.

[0136] In the image cropping method provided above, after obtaining the original image including the target object, the electronic device can determine the body aesthetic degree of the target object. When it is determined that the body aesthetic degree of the target object is high, the electronic device can crop the original image in the body-priority cropping manner, so that the cropped image can retain the relatively aesthetic body of the target object, the aesthetic feeling of the cropped image can be improved, and the user experience can be improved. When it is determined that the body aesthetic degree of the target object is low, the electronic device can crop the original image in the face-feature-highlighting cropping manner, the proportion of the body with low aesthetic degree in the cropped image can be reduced, the aesthetic feeling of the cropped image can be improved, and the user experience can be improved.

[0137] It should be noted that the body aesthetic degree being high and the body aesthetic degree being low are a relative concept. The body aesthetic degree being high and the body aesthetic degree being low can be determined by setting a threshold. For example, when the body aesthetic degree is higher than a certain threshold, the body aesthetic degree is considered to be high; when the body aesthetic degree is lower than a certain threshold, the body aesthetic degree is considered to be low. The threshold can be a numerical value or a numerical range.

[0138] For example, when the body aesthetic degree is represented by the body dynamic degree, and the body dynamic degree is represented by an angle a, when the angle a is greater than or equal to a threshold A1, the body aesthetic degree is considered to be high; when the angle a is less than a threshold A2, the body aesthetic degree is considered to be low; when the angle a is greater than or equal to the threshold A2 and less than the threshold A1, the body aesthetic degree is considered to be moderate. It should be understood that when the body aesthetic degree is moderate, the electronic device can determine that the target cropping manner corresponding to the original image is a default cropping manner. The default cropping manner can be determined according to actual scenarios.

[0139] In some embodiments, the determination of the body aesthetic degree of the target object can include:

[0140] determine a limb dynamic degree of the target object, the limb dynamic degree being used to represent a motion state of the target object;

[0141] determine a limb aesthetic degree of the target object according to the limb dynamic degree; wherein the limb aesthetic degree is high when the limb dynamic degree is greater than or equal to a first threshold value, and the limb aesthetic degree is low when the limb dynamic degree is less than a second threshold value, the first threshold value being greater than or equal to the second threshold value.

[0142] In some embodiments, the determining the limb aesthetic degree of the target object can include:

[0143] determine a limb stretch degree of the target object, the limb stretch degree being used to represent a stretch degree of a limb of the target object;

[0144] determine a limb aesthetic degree of the target object according to the limb stretch degree; wherein the limb aesthetic degree is high when the limb stretch degree is greater than or equal to a third threshold value, and the limb aesthetic degree is low when the limb stretch degree is less than a fourth threshold value, the third threshold value being greater than or equal to the fourth threshold value.

[0145] In some embodiments, the determining the limb aesthetic degree of the target object can include:

[0146] determine a limb twist degree of the target object, the limb twist degree being used to represent a twist degree of a limb of the target object;

[0147] determine a limb aesthetic degree of the target object according to the limb twist degree; wherein the limb aesthetic degree is high when the limb twist degree is greater than or equal to a fifth threshold value, and the limb aesthetic degree is low when the limb twist degree is less than a sixth threshold value, the fifth threshold value being greater than or equal to the sixth threshold value.

[0148] It should be noted that the specific content of determining the limb aesthetic degree according to the limb dynamic degree, the limb stretch degree or the limb twist degree can refer to the related description in the foregoing first aspect, which will not be described here. In addition, the electronic device can also determine the limb aesthetic degree according to at least two of the limb dynamic degree, the limb stretch degree or the limb twist degree. The specific content of determining the limb aesthetic degree according to at least two of the limb dynamic degree, the limb stretch degree or the limb twist degree can also refer to the related description in the foregoing first aspect, which will not be described here.

[0149] In some embodiments, the cropping the original image according to the target cropping manner to obtain a cropped image can include:

[0150] determine a face orientation of the target object;

[0151] determine a target position of the target object in the cropped image according to the face orientation of the target object, and crop the original image according to the target position and the target cropping manner, so as to obtain the cropped image, wherein a position of the target object in the cropped image is the target position.

[0152] In a possible implementation, the determining the target position of the target object in the cropped image according to the face orientation of the target object can include:

[0153] When the face orientation is a front direction or a back direction, the target position of the target object in the cropped image is determined as a middle position.

[0154] In a possible implementation, the determining the target position of the target object in the cropped image according to the face orientation of the target object includes:

[0155] When the face orientation is a side direction, a preset aspect ratio is used to determine an offset distance of the target object, the preset aspect ratio is an aspect ratio corresponding to the cropped image, and the offset distance is a distance between the target position of the target object in the cropped image and a middle position of the cropped image.

[0156] The target position of the target object in the cropped image is determined according to the offset distance of the target object.

[0157] It should be noted that the specific content of the determining the target position of the target object in the cropped image according to the face orientation of the target object, and the cropping the original image according to the target position and the target cropping manner can refer to the related description in the first aspect, which will not be repeated here. In addition, the electronic device can also determine the target cropping manner corresponding to the original image according to the body aesthetic degree and the face aesthetic degree. The specific content of the determining the target cropping manner corresponding to the original image according to the body aesthetic degree and the face aesthetic degree can refer to the related description in the first aspect, which will not be repeated here.

[0158] In a third aspect, an embodiment of the present application provides an image cropping apparatus, which can include:

[0159] An original image acquisition module is configured to acquire an original image, wherein the original image includes a target object.

[0160] An aesthetic degree determination module is configured to determine a body aesthetic degree of the target object and / or a face aesthetic degree of the target object.

[0161] A cropping manner determination module is configured to determine a target cropping manner corresponding to the original image according to the body aesthetic degree and / or the face aesthetic degree.

[0162] an image cropping module configured to crop the original image according to the target cropping manner to obtain a cropped image, the cropped image comprising all or part of the target object.

[0163] In some embodiments, the aesthetic degree determination module is specifically configured to determine a limb dynamic degree of the target object, the limb dynamic degree being used to represent a motion state of the target object; and determine a limb aesthetic degree of the target object according to the limb dynamic degree.

[0164] In one example, the aesthetic degree determination module is further configured to obtain a first angle corresponding to the target object, the first angle being an angle between a line connecting a top of the head of the target object and a midpoint of a pelvis of the target object and a vertical direction; and determine the limb dynamic degree of the target object according to the first angle.

[0165] In one possible implementation, the aesthetic degree determination module is further configured to determine that the limb aesthetic degree of the target object satisfies a first condition when the limb dynamic degree is greater than or equal to a first threshold value; and determine that the limb aesthetic degree of the target object satisfies a second condition when the limb dynamic degree is less than a second threshold value, the first threshold value being greater than or equal to the second threshold value.

[0166] In another possible implementation, the aesthetic degree determination module is further configured to determine a limb stretch degree of the target object, the limb stretch degree being used to represent a stretch degree of a limb of the target object; and determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretch degree.

[0167] In one example, the aesthetic degree determination module is further configured to determine that the limb aesthetic degree of the target object satisfies a first condition when the limb dynamic degree is greater than or equal to a first threshold value and the limb stretch degree is greater than or equal to a third threshold value; and determine that the limb aesthetic degree of the target object satisfies a second condition when the limb dynamic degree is less than a second threshold value and the limb stretch degree is less than a fourth threshold value, the first threshold value being greater than or equal to the second threshold value, and the third threshold value being greater than or equal to the fourth threshold value.

[0168] In another possible implementation, the aesthetic degree determination module is further configured to determine a limb twist degree of the target object, the limb twist degree being used to represent a twist degree of a limb of the target object; and determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb twist degree.

[0169] In one example, the beauty degree determining module is further configured to determine that the limb beauty degree of the target object satisfies a first condition when the limb dynamic degree is greater than or equal to a first threshold value and the limb torsion degree is greater than or equal to a fifth threshold value, and determine that the limb beauty degree of the target object satisfies a second condition when the limb dynamic degree is less than a second threshold value and the limb torsion degree is less than a sixth threshold value, wherein the first threshold value is greater than or equal to the second threshold value, and the fifth threshold value is greater than or equal to the sixth threshold value.

[0170] In another possible implementation, the beauty degree determining module is further configured to determine a limb stretch degree and a limb torsion degree of the target object, and determine the limb beauty degree of the target object according to the limb dynamic degree, the limb stretch degree and the limb torsion degree.

[0171] In some other embodiments, the beauty degree determining module is further configured to determine a limb stretch degree of the target object, and determine the limb beauty degree of the target object according to the limb stretch degree.

[0172] In one example, the beauty degree determining module is further configured to determine a first width and a second width, the first width being a width of a first symmetrical joint node of the target object, and the second width being a width of a second symmetrical joint node of the target object, and determine the limb stretch degree of the target object according to the first width and the second width.

[0173] For example, the first symmetrical joint node includes a group of joint nodes corresponding to a shoulder and / or a group of joint nodes corresponding to a pelvis, and the second symmetrical joint node includes at least one of a group of joint nodes corresponding to a wrist, a group of joint nodes corresponding to a knee and a group of joint nodes corresponding to an ankle.

[0174] In another example, the beauty degree determining module is further configured to determine a first horizontal coordinate and a second horizontal coordinate, the first horizontal coordinate being a horizontal coordinate of a first target joint node of the target object, and the second horizontal coordinate being a horizontal coordinate of a second target joint node of the target object, the first target joint node and the second target joint node being joint nodes on a same side of the target object, and determine the limb stretch degree of the target object according to the first horizontal coordinate and the second horizontal coordinate.

[0175] For example, the first target joint node includes a joint node corresponding to a shoulder and / or a joint node corresponding to a pelvis, and the second target joint node includes at least one of a joint node corresponding to a wrist, a joint node corresponding to a knee and a joint node corresponding to an ankle.

[0176] In a possible implementation, the aesthetic degree determining module is further configured to determine that the limb aesthetic degree of the target object meets a first condition when the limb stretch degree is greater than or equal to a third threshold value, and determine that the limb aesthetic degree of the target object meets a second condition when the limb stretch degree is less than a fourth threshold value, the third threshold value being greater than or equal to the fourth threshold value.

[0177] In another possible implementation, the aesthetic degree determining module is further configured to determine a limb twist degree of the target object, and determine the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree.

[0178] In an example, the aesthetic degree determining module is further configured to determine that the limb aesthetic degree of the target object meets a first condition when the limb stretch degree is greater than or equal to a third threshold value and the limb twist degree is greater than or equal to a fifth threshold value, and determine that the limb aesthetic degree of the target object meets a second condition when the limb stretch degree is less than a fourth threshold value and the limb twist degree is less than a sixth threshold value, the third threshold value being greater than or equal to the fourth threshold value, and the fifth threshold value being greater than or equal to the sixth threshold value.

[0179] In some embodiments, the aesthetic degree determining module is further configured to determine a limb twist degree of the target object, and determine the limb aesthetic degree of the target object according to the limb twist degree.

[0180] In an example, the aesthetic degree determining module is further configured to obtain a second angle corresponding to the target object, the second angle being an angle between a first line and a second line, the first line being a line corresponding to a third symmetric joint of the target object, and the second line being a line corresponding to a fourth symmetric joint of the target object, and determine the limb twist degree of the target object according to the second angle.

[0181] For example, the third symmetric joint includes a group of joints corresponding to a shoulder of the target object, and the fourth symmetric joint includes a group of joints corresponding to a pelvis of the target object.

[0182] In a possible implementation, the aesthetic degree determining module is further configured to determine that the limb aesthetic degree of the target object meets a first condition when the limb twist degree is greater than or equal to a fifth threshold value, and determine that the limb aesthetic degree of the target object meets a second condition when the limb twist degree is less than a sixth threshold value, the fifth threshold value being greater than or equal to the sixth threshold value.

[0183] In some embodiments, the aesthetic degree determining module is further configured to determine an expression arousal degree and an expression pleasure degree of the target object, and determine the facial aesthetic degree of the target object according to the expression arousal degree and the expression pleasure degree.

[0184] In a possible implementation, the beauty degree determining module is further configured to: determine that the face beauty degree meets a third condition when the expression arousal degree is greater than or equal to a seventh threshold value or the expression pleasure degree is greater than or equal to an eighth threshold value; and determine that the face beauty degree meets a fourth condition when the expression arousal degree is less than the seventh threshold value and the expression pleasure degree is less than the eighth threshold value.

[0185] In some embodiments, the cropping manner determining module is specifically configured to: determine that the target cropping manner is a first cropping manner when the body beauty degree meets a first condition, the first cropping manner being a body-priority cropping manner; and determine that the target cropping manner is a second cropping manner when the body beauty degree meets a second condition, the second cropping manner being a face-priority cropping manner.

[0186] In some other embodiments, the cropping manner determining module is further configured to: determine that the target cropping manner is the second cropping manner when the face beauty degree meets a third condition, the second cropping manner being the face-priority cropping manner; and determine that the target cropping manner is the first cropping manner when the face beauty degree meets a fourth condition, the first cropping manner being the body-priority cropping manner.

[0187] In some other embodiments, the cropping manner determining module is further configured to: determine that the target cropping manner is the first cropping manner when the body beauty degree meets the first condition and the face beauty degree meets the fourth condition, the first cropping manner being the body-priority cropping manner; and determine that the target cropping manner is the second cropping manner when the body beauty degree meets the first condition and the face beauty degree meets the third condition, or when the body beauty degree meets the second condition, the second cropping manner being the face-priority cropping manner.

[0188] In some embodiments, the image cropping module is specifically configured to: determine a face orientation of the target object; determine a target position of the target object in the cropped image according to the face orientation of the target object; and crop the original image according to the target position and the target cropping manner to obtain the cropped image, the position of the target object in the cropped image being the target position.

[0189] In a possible implementation, the image cropping module is further configured to: determine that the target position of the target object in the cropped image is a middle position when the face orientation is a front direction or a back direction.

[0190] In another possible implementation, the image cropping module is configured to: when the face orientation is lateral, determine an offset distance of the target object according to a preset aspect ratio, the preset aspect ratio being an aspect ratio corresponding to the cropped image, the offset distance being a distance between a target position of the target object in the cropped image and a middle position of the cropped image; and determine the target position of the target object in the cropped image according to the offset distance of the target object.

[0191] In one example, the image cropping module is further configured to: when the face orientation is lateral, determine an offset direction of the target object according to the face orientation; and determine the target position of the target object in the cropped image according to the offset distance and the offset direction of the target object.

[0192] In a fourth aspect, an embodiment of the present application provides an image cropping apparatus, which can include:

[0193] An original image acquisition module is configured to acquire an original image, the original image including a target object.

[0194] An aesthetic degree determination module is configured to determine an aesthetic degree of a limb of the target object.

[0195] A cropping mode determination module is configured to determine a target cropping mode corresponding to the original image according to the aesthetic degree of the limb, wherein when the aesthetic degree of the limb is high, the target cropping mode is a limb-priority cropping mode; and when the aesthetic degree of the limb is low, the target cropping mode is a face-priority cropping mode.

[0196] An image cropping module is configured to crop the original image according to the target cropping mode to obtain a cropped image, the cropped image including all or part of the target object, wherein when the target cropping mode is the limb-priority cropping mode, the cropped image includes all of the target object; and when the target cropping mode is the face-priority cropping mode, the cropped image includes part of the target object, the part including a face.

[0197] In some embodiments, the aesthetic degree determination module is specifically configured to: determine a limb dynamic degree of the target object, the limb dynamic degree being used to represent a motion state of the target object; determine the aesthetic degree of the limb of the target object according to the limb dynamic degree, wherein when the limb dynamic degree is greater than or equal to a first threshold value, the aesthetic degree of the limb is high; and when the limb dynamic degree is less than a second threshold value, the aesthetic degree of the limb is low, the first threshold value being greater than or equal to the second threshold value.

[0198] In some embodiments, the beauty degree determining module is further configured to determine a limb stretch degree of the target object, the limb stretch degree being used to represent a stretch degree of a limb of the target object; determine a limb beauty degree of the target object according to the limb stretch degree; and when the limb stretch degree is greater than or equal to a third threshold value, the limb beauty degree is high; and when the limb stretch degree is less than a fourth threshold value, the limb beauty degree is low, the third threshold value being greater than or equal to the fourth threshold value.

[0199] In some embodiments, the beauty degree determining module is further configured to determine a limb twist degree of the target object, the limb twist degree being used to represent a twist degree of a limb of the target object; determine a limb beauty degree of the target object according to the limb twist degree; and when the limb twist degree is greater than or equal to a fifth threshold value, the limb beauty degree is high; and when the limb twist degree is less than a sixth threshold value, the limb beauty degree is low, the fifth threshold value being greater than or equal to the sixth threshold value.

[0200] In some embodiments, the image cropping module is specifically configured to determine a face orientation of the target object; determine a target position of the target object in the cropped image according to the face orientation of the target object, and crop the original image according to the target position and the target cropping manner to obtain the cropped image, the position of the target object in the cropped image being the target position.

[0201] In a possible implementation, the image cropping module is further configured to, when the face orientation is a front orientation or a back orientation, determine the target position of the target object in the cropped image as a middle position.

[0202] In a possible implementation, the image cropping module is further configured to, when the face orientation is a side orientation, determine an offset distance of the target object according to a preset aspect ratio, the preset aspect ratio being an aspect ratio corresponding to the cropped image, the offset distance being a distance between the target position of the target object in the cropped image and a middle position of the cropped image; and determine the target position of the target object in the cropped image according to the offset distance of the target object.

[0203] In a fifth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, when the processor executes the computer program, the electronic device implements the image cropping method in any one of the first aspect or the second aspect.

[0204] In a sixth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a computer, and causes the computer to implement the image cropping method in any one of the first aspect or the second aspect.

[0205] In a seventh aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, causes the electronic device to perform the image cropping method in any one of the first aspect or the second aspect.

[0206] It can be understood that the beneficial effects of the third aspect to the seventh aspect can be referred to the related description of the first aspect or the second aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0207] FIG. 1 is an example of cropping an image;

[0208] FIG. 2 is a structural schematic diagram of an electronic device to which the image cropping method provided by an embodiment of the present application is applicable;

[0209] FIG. 3 is a software architecture schematic diagram to which the image cropping method provided by an embodiment of the present application is applicable;

[0210] FIG. 4 is a flow schematic diagram of an image cropping method provided by an embodiment of the present application;

[0211] FIG. 5 is an example of cropping an image provided by an embodiment of the present application;

[0212] FIG. 6 is a flow schematic diagram of determining a target cropping mode corresponding to an original image according to a limb aesthetic degree of a target object provided by an embodiment of the present application;

[0213] FIG. 7 is a schematic diagram of an angle a provided by an embodiment of the present application;

[0214] FIG. 8 is a schematic diagram of a symmetrical joint node provided by an embodiment of the present application;

[0215] FIG. 9 is a schematic diagram of a unilateral joint node provided by an embodiment of the present application;

[0216] FIG. 10 is a schematic diagram of an angle b provided by an embodiment of the present application;

[0217] FIG. 11 is an application scenario schematic diagram one provided by an embodiment of the present application;

[0218] FIG. 12 is a flow schematic diagram of determining a target cropping mode corresponding to an original image according to a facial aesthetic degree of a target object provided by an embodiment of the present application;

[0219] FIG. 13 is an example of a corresponding relationship between an expression category and an expression arousal degree and an expression valence;

[0220] FIG. 14 is a flowchart illustrating a process of determining a target cropping manner corresponding to an original image according to a body beauty degree and a face beauty degree of a target object according to an embodiment of the present application;

[0221] FIG. 15 is a flowchart illustrating another image cropping method according to an embodiment of the present application;

[0222] FIG. 16 is a schematic diagram of an application scenario according to an embodiment of the present application;

[0223] FIG. 17 is a schematic diagram of a relationship between a preset aspect ratio and an offset rate corresponding to a target object according to an embodiment of the present application;

[0224] FIG. 18 is a schematic diagram of an application scenario according to an embodiment of the present application; DETAILED DESCRIPTION

[0225] It should be understood that the term “includes” when used in the specification and the appended claims herein, specifies the presence of stated features, integers, steps, operations, elements, and / or components but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0226] It should also be understood that the term “and / or” when used in the specification and the appended claims herein, means any one and / or all possible combinations of one or more of the associated listed items.

[0227] As used in the specification and the appended claims herein, the term “if’ can be interpreted as meaning “when” or “upon” or “in response to a determination” or “in response to a detection” depending on the context. Similarly, the phrase “if determined” or “if detected [a described condition or event]” can be interpreted as meaning “upon a determination” or “in response to a determination” or “upon a detection of [a described condition or event]” or “in response to a detection of [a described condition or event]” depending on the context.

[0228] In addition, in the description of the specification and the appended claims herein, the terms “first”, “second”, “third”, etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0229] ​Reference within the specification of this application to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places within specified

[0230] Furthermore, "a plurality" should be construed as meaning two or more.

[0231] The steps involved in the image cropping method provided in the embodiments of the present application are merely examples, and not all the steps are necessarily performed, or not all the contents in each information or message are necessarily selected. In use, they can be increased or reduced as needed. The same step or the step with the same function or message in different embodiments can be mutually referenced.

[0232] The business scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation to the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of network architecture and the appearance of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0233] Electronic devices such as mobile phones and tablet computers generally have the function of automatically cropping images, that is, they can automatically crop images according to a default cropping manner. For example, when setting a screen saver or a lock screen image, a user can upload a personalized image. After the electronic device obtains the personalized image, it can automatically crop the personalized image into a cropped image with a specified aspect ratio according to the default cropping manner, and apply the cropped image to the screen saver or the lock screen, etc. Cropping all images according to the default cropping manner can result in images that cannot highlight the beauty of the images themselves, causing poor user experience.

[0234] For example, refer to FIG. 1, which shows an example of cropping an image.

[0235] In the automatic cropping of the image, after the original image shown in (a) of FIG. 1 is obtained, the electronic device can automatically crop the original image according to a default cropping manner (for example, a face-priority cropping manner) to obtain a cropped image, referred to as a cropped image for short, for example, the cropped image shown in (b) of FIG. 1 can be obtained. That is, the electronic device crops the original image with a more beautiful posture into a half-length portrait according to the default cropping manner, resulting in that the cropped image loses the beauty of the original image, and causing a poor user experience. In some other cases, the posture of the person in the original image is relatively formal, but the full-length portrait is retained, lacking impact, and the user experience is also poor.

[0236] To solve the above problems, the embodiments of the present application provide an image cropping method, an electronic device and a computer readable storage medium. In the method, when cropping an image, the electronic device can obtain an original image containing a target object, and can determine the limb beauty degree of the target object and / or the face beauty degree of the target object in the original image. Subsequently, the electronic device can determine a target cropping manner that can highlight the beauty of the original image according to the limb beauty degree and / or the face beauty degree of the target object, so that the original image can be cropped according to the target cropping manner to obtain a cropped image, so that the cropped image can highlight the beauty of the original image, improve the user experience, and have strong ease of use and practicality.

[0237] In the embodiments of the present application, the electronic device can be a mobile phone, a tablet computer, a wearable device, a notebook computer, a smart large screen or a desktop computer, and the like, which has an image cropping function. The specific type of the electronic device is not limited in the embodiments of the present application.

[0238] The electronic device related to the embodiments of the present application will be introduced first. Please refer to FIG. 2, which shows a structural schematic diagram of an electronic device 200.

[0239] The electronic device 200 can include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, an antenna 1, an antenna 2, a mobile communication module 240, a wireless communication module 250, a sensor module 260, a camera 270, and a display screen 280, etc. The sensor module 260 can include a pressure sensor 260A, a gyroscope sensor 260B, and a touch sensor 260C, etc.

[0240] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 can include more or fewer components than shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0241] The processor 210 can include one or more processing units. For example, the processor 210 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.

[0242] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0243] The processor 210 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory can save instructions or data that the processor 210 has just used or repeatedly uses. If the processor 210 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 210, thereby improving the efficiency of the system.

[0244] In some embodiments, the processor 210 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0245] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 can include multiple sets of I2C bus. The processor 210 can be coupled to the touch sensor 260C, the camera 270, etc. through different I2C bus interfaces, respectively. For example, the processor 210 can be coupled to the touch sensor 260C through an I2C interface, so that the processor 210 and the touch sensor 260C communicate through the I2C bus interface, and realize the touch function of the electronic device 200.

[0246] The UART interface is a universal serial data bus, which is used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually used to connect the processor 210 and the wireless communication module 250. The MIPI interface can be used to connect the processor 210 and the display screen 280, the camera 270, etc. peripheral devices. The MIPI interface includes a camera serial interface (CSI), a display screen serial interface (DSI), etc. In some embodiments, the processor 210 and the camera 270 communicate through the CSI interface, realizing the shooting function of the electronic device 200. The processor 210 and the display screen 280 communicate through the DSI interface, realizing the display function of the electronic device 200.

[0247] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 to the camera 270, the display 280, the wireless communication module 250, the sensor module 260, and the like. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, and the like.

[0248] The USB interface 230 is an interface that conforms to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 230 can be used to transmit data between the electronic device 200 and a peripheral device. The interface can also be used to connect other electronic devices, such as an AR device, and the like.

[0249] It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only illustrative and does not constitute a structural limitation on the electronic device 200. In some other embodiments of the present application, the electronic device 200 can also use different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0250] The wireless communication function of the electronic device 200 can be realized by the antenna 1, the antenna 2, the mobile communication module 240, the wireless communication module 250, the modem processor, and the baseband processor, and the like.

[0251] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0252] The mobile communication module 240 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the electronic device 200. The mobile communication module 240 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 240 can receive electromagnetic waves from the antenna 1 and perform filtering, amplification, and the like on the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 240 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves to be radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 240 can be disposed in the processor 210. In some embodiments, at least part of the functional modules of the mobile communication module 240 and at least part of the modules of the processor 210 can be disposed in the same device.

[0253] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transmitted to the application processor. The application processor displays images or videos through the display screen 280. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 210 and be disposed in the same device as the mobile communication module 240 or other functional modules.

[0254] The wireless communication module 250 can provide wireless communication solutions including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. The wireless communication module 250 can be one or more devices that integrate at least one communication processing module. The wireless communication module 250 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 210. The wireless communication module 250 can also receive a signal to be transmitted from the processor 210, modulate it, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.

[0255] In some embodiments, the antenna 1 and the mobile communication module 240 of the electronic device 200 are coupled, and the antenna 2 and the wireless communication module 250 are coupled, so that the electronic device 200 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).

[0256] The electronic device 200 implements a display function through a GPU, a display screen 280, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 280 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 can include one or more GPUs, which execute program instructions to generate or change display information.

[0257] The display screen 280 is configured to display images, videos, and the like. The display screen 280 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 200 can include one or N display screens 280, where N is a positive integer greater than 1.

[0258] The electronic device 200 can implement the photographing function through the ISP, the camera 270, the video codec, the GPU, the display screen 280, and the application processor.

[0259] The ISP is configured to process the data fed back by the camera 270. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 270.

[0260] The camera 270 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the electronic device 100 can include one or N cameras 270, where N is a positive integer greater than 1.

[0261] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 200 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0262] The video codec is used to compress or decompress digital video. The electronic device 200 can support one or more video codecs. In this way, the electronic device 200 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0263] The NPU is a neural-network (NN) calculation processor, which can quickly process input information by drawing on the structure of a biological neural network, such as drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, the electronic device 200 can realize intelligent cognition applications, such as: image recognition, face recognition, voice recognition, text understanding, etc.

[0264] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 210 through the external memory interface 220 to realize data storage functions. For example, music, video, etc. Files are saved in the external memory card.

[0265] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various function applications and data processing of the electronic device 100 by running instructions stored in the internal memory 221 and / or instructions stored in the memory arranged in the processor.

[0266] The pressure sensor 260A is configured to sense a pressure signal and convert the pressure signal to an electrical signal. In some embodiments, the pressure sensor 260A can be disposed on the display screen 280. The pressure sensor 260A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. A capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 260A, the capacitance between the electrodes changes. The electronic device 200 determines the intensity of the force based on the change in capacitance. When a touch operation is applied to the display screen 280, the electronic device 200 detects the intensity of the touch operation based on the pressure sensor 260A. The electronic device 200 can also calculate the location of the touch based on the detection signal of the pressure sensor 260A. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0267] The gyroscope sensor 260B can be configured to determine the motion attitude of the electronic device 200. In some embodiments, the angular velocity of the electronic device 200 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 260B. The gyroscope sensor 260B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 260B detects the angle of shaking of the electronic device 200, calculates the distance that the lens module needs to compensate based on the angle, and lets the lens offset the shaking of the electronic device 200 by moving in the opposite direction, thereby achieving anti-shake. The gyroscope sensor 260B can also be used for navigation and motion sensing game scenarios.

[0268] The touch sensor 260C, also referred to as a "touch device". The touch sensor 260C can be disposed on the display screen 280, and the touch sensor 260C and the display screen 280 together form a touch screen, also referred to as a "touch screen". The touch sensor 260C is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 260C can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 280. In other embodiments, the touch sensor 260C can also be disposed on the surface of the electronic device 200, which is different from the location of the display screen 280.

[0269] The software system of the electronic device 200 can employ a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. For example, the software system of the electronic device 200 can employ an Android operating system (OS) of a layered architecture, a Harmony OS, or an IOS. Embodiments of the present application take the Android system of a layered architecture as an example to illustrate the software structure of the electronic device 200.

[0270] FIG. 3 is a block diagram of the software structure of the electronic device 200 according to an embodiment of the present application.

[0271] The layered architecture divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Android runtime and system library, and a kernel layer.

[0272] The application layer can include a series of application packages.

[0273] As shown in FIG. 3, the application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, and the like.

[0274] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0275] As shown in FIG. 3, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0276] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and take screenshots, and the like.

[0277] The content provider is used to store and obtain data, and make the data accessible to the applications. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phone books, and the like.

[0278] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and the like. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.

[0279] The telephony manager is used to provide the communication function of the electronic device 200. For example, the management of the call state (including the connection, the hang-up, etc.).

[0280] The resource manager provides various resources for the application program, such as the localized string, the icon, the picture, the layout file, the video file, etc.

[0281] The notification manager enables the application program to display the notification information in the status bar, which can be used to convey the notification type of message, which can automatically disappear after a short stay without the user interaction. For example, the notification manager is used to notify the download completion, the message reminder, etc. The notification manager can also be the notification in the form of the chart or the scroll bar text appearing in the top status bar of the system, for example, the notification of the application program running in the background, and can also be the notification in the form of the dialogue window appearing on the screen. For example, the text information is prompted in the status bar, the prompt sound is emitted, the electronic device is vibrated, the indicator light is blinked, etc.

[0282] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0283] The core library contains two parts: one part is the function function required to be called by the java language, and the other part is the core library of the Android.

[0284] The application program layer and the application program framework layer run in the virtual machine. The virtual machine executes the java file of the application program layer and the application program framework layer into the binary file. The virtual machine is used to execute the management of the object life cycle, the stack management, the thread management, the security and the exception management, and the garbage collection, etc.

[0285] The system library can include multiple function modules. For example: the surface manager, the media library, the three-dimensional graphics processing library (for example: OpenGLES), the 2D graphics engine (for example: SGL), etc.

[0286] The surface manager is used to manage the display subsystem, and provides the fusion of the 2D and 3D layers for multiple application programs.

[0287] The media library supports the playback and recording of multiple commonly used audio, video formats, and static image files, etc. The media library can support multiple audio and video coding formats, for example: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0288] The three-dimensional graphics processing library is used to realize the three-dimensional graphics drawing, the image rendering, the synthesis, and the layer processing, etc.

[0289] The 2D graphics engine is the drawing engine of the 2D drawing.

[0290] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.

[0291] The image cropping method provided in the embodiments of the present application will be described in detail below in combination with the accompanying drawings and specific application scenarios.

[0292] Please refer to FIG. 4, which shows a schematic flowchart of an image cropping method provided in the embodiments of the present application. The method can be applied to electronic devices such as mobile phones, tablet computers, or notebook computers, which have an image cropping function. The image cropping function can be a function of automatically cropping an image. The image cropping function can be a system function of the electronic device, or a function provided by an application installed in the electronic device. As shown in FIG. 4, the method can include the following steps.

[0293] S401, the electronic device acquires an original image including a target object.

[0294] S402, the electronic device determines the limb aesthetic degree of the target object and / or the facial aesthetic degree of the target object.

[0295] S403, the electronic device determines a target cropping manner corresponding to the original image according to the limb aesthetic degree and / or the facial aesthetic degree.

[0296] S404, the electronic device crops the original image according to the target cropping manner to obtain a cropped image, the cropped image including all or part of the target object.

[0297] In the embodiments of the present application, after acquiring the original image including the target object, the electronic device can determine the limb aesthetic degree and / or the facial aesthetic degree of the target object. Subsequently, the electronic device can determine the target cropping manner that can highlight the pose aesthetic and / or facial aesthetic of the target object according to the limb aesthetic degree and / or the facial aesthetic degree of the target object, and can crop the original image according to the target cropping manner to obtain the cropped image, so that the cropped image can retain the pose aesthetic and / or facial aesthetic of the original image itself, and the aesthetic of the cropped image can be improved, and the user experience can be improved.

[0298] It should be noted that the image cropping method provided in the embodiments of the present application can be used to crop the original image into a cropped image with a preset aspect ratio. Therefore, after obtaining the original image including the target object, the electronic device can determine the aspect ratio of the original image (which can be referred to as an original aspect ratio below), and can determine whether the original image needs to be cropped according to the original aspect ratio and the preset aspect ratio. When the original image needs to be cropped, the electronic device can crop the original image by using the image cropping method provided in the embodiments of the present application. When the original image does not need to be cropped, the electronic device can not crop the original image.

[0299] For example, when the original aspect ratio is equal to the preset aspect ratio, the electronic device can determine that the original image does not need to be cropped, that is, the electronic device can not crop the original image. When the original aspect ratio is greater than the preset aspect ratio, the electronic device can determine that the original image needs to be cropped, and at this time, the electronic device can crop the original image according to the preset aspect ratio to obtain a cropped image. When the original aspect ratio is less than the preset aspect ratio, the electronic device can magnify the original image according to the preset aspect ratio, or can supplement the original image according to the preset aspect ratio. If the aspect ratio of the original image after magnification or supplementation is greater than the preset aspect ratio, the electronic device can determine that the original image needs to be cropped, and at this time, the electronic device can crop the original image after magnification or supplementation to obtain a cropped image.

[0300] It should be understood that the preset aspect ratio can be determined according to an actual scene, and the embodiments of the present application do not limit this.

[0301] For example, the preset aspect ratio can be an aspect ratio that is customized by a user. For example, in a scenario of setting the original image as a screen saver or a lock screen image, the electronic device can determine the preset aspect ratio according to the aspect ratio of the screen of the electronic device, such as the preset aspect ratio can be the aspect ratio of the screen of the electronic device, and the like. Hereinafter, the preset aspect ratio will be exemplarily described as the aspect ratio of the screen of the electronic device.

[0302] Exemplarily, the original image can be an image collected by the electronic device, such as an image collected by the camera of the electronic device. Alternatively, the original image can be an image received by the electronic device. The original image can be an image selected by a user for cropping. For example, when setting a screen saver or a lock screen image, the user can select an image. The electronic device can crop the image selected by the user, and can apply the obtained cropped image to the screen saver or the lock screen, and the like. Exemplarily, the user can also use the scheme provided in the embodiments of the present application when setting a profile picture.

[0303] It should be noted that the image cropping method provided in the embodiments of the present application can be used to crop an image including a target object. That is, after obtaining an original image, the electronic device can determine whether the original image includes the target object. When it is determined that the original image includes the target object, the electronic device can crop the original image by using the image cropping method provided in the embodiments of the present application. When it is determined that the original image does not include the target object, the electronic device can crop the original image by using other image cropping methods.

[0304] It should be understood that other image cropping methods can be determined according to actual scenarios, and the embodiments of the present application do not limit this. In addition, the specific manner in which the electronic device determines whether the original image includes the target object can be determined according to actual scenarios, and the embodiments of the present application do not limit this. For example, the electronic device can perform target detection on the original image by using an existing target detection network or target detection algorithm to determine whether the original image includes the target object.

[0305] In some embodiments, the target object can be a portrait. The portrait can refer to an image of a person. That is, the image cropping method provided in the embodiments of the present application can be used to crop an image including a portrait. For example, after obtaining an original image, the electronic device can determine whether the original image includes a portrait. When it is determined that the original image includes a portrait, the electronic device can crop the original image by using the image cropping method provided in the embodiments of the present application. When it is determined that the original image does not include a portrait, the electronic device can crop the original image by using other image cropping methods.

[0306] It should be noted that the embodiments of the present application do not limit the specific manner in which the electronic device determines whether the original image includes a portrait, which can be determined according to actual scenarios. For example, the electronic device can determine whether the original image includes a portrait by using a face detection network. For example, the electronic device can determine whether the original image includes a portrait by using a body detection network, and the like.

[0307] In other embodiments, the target object can also be an animal, or other objects with faces and / or body movements, such as sculptures, paintings, and the like.

[0308] In some embodiments, the target cropping manner can be a body-priority cropping manner, or can be a face-priority cropping manner. The body-priority cropping manner can refer to that, when cropping an image, the body can be considered as a priority factor, that is, the integrity of the body can be considered as a priority factor. The face-priority cropping manner can refer to that, when cropping an image, the face can be considered as a priority factor, that is, the face features can be considered as a priority factor.

[0309] That is, when the target cropping manner is determined to be the body-priority cropping manner, the electronic device can preferentially retain the integrity of the body when cropping the original image according to the target cropping manner, for example, the original image can be cropped into a full-body image. When the target cropping manner is determined to be the face-priority cropping manner, the electronic device can preferentially highlight the facial features when cropping the original image according to the target cropping manner, for example, the original image can be cropped into a half-body image highlighting the facial features.

[0310] For example, refer to FIG. 5, which shows an example of cropping an image according to an embodiment of the present application.

[0311] When the original image shown in (a) of FIG. 5 is cropped in the body-priority cropping manner, the electronic device can preferentially retain the integrity of the body of the target object. For example, the electronic device can crop the original image into a full-body image as shown in (b) of FIG. 5 to retain all the bodies of the target objects.

[0312] When the original image shown in (a) of FIG. 5 is cropped in the face-priority cropping manner, the electronic device can highlight the facial features of the target object. For example, the electronic device can crop the original image into a half-body image as shown in (c) of FIG. 5 to highlight the facial features of the target object.

[0313] In some embodiments, the original image can include one or more target objects. That is, after obtaining the original image, the electronic device can determine the number of target objects included in the original image.

[0314] When the original image includes one target object, the electronic device can determine the body aesthetic degree and / or the facial aesthetic degree of the target object, and can determine the target cropping manner corresponding to the original image according to the body aesthetic degree and / or the facial aesthetic degree of the target object, to crop the original image according to the target cropping manner.

[0315] When the original image includes multiple target objects, the electronic device can determine the body aesthetics and / or the face aesthetics of each target object, i.e., for each target object, the electronic device can determine the body aesthetics and / or the face aesthetics of the target object. Subsequently, the electronic device can determine a target object (e.g., the target object T) with the highest body aesthetics and / or the highest face aesthetics according to the body aesthetics and / or the face aesthetics of each target object, and can determine a target cropping manner corresponding to the original image according to the body aesthetics and / or the face aesthetics of the target object T, to crop the original image according to the target cropping manner. That is, when the original image includes multiple target objects, the electronic device can crop the original image according to the target object T with the highest body aesthetics and / or the highest face aesthetics. The body aesthetics can be used to indicate the aesthetics of the body movement, i.e., the aesthetics of the posture. The face aesthetics can be used to indicate the aesthetics of the facial expression.

[0316] In other embodiments, the scheme provided by the embodiments of the present application can be used only in the case of one target object, and other types of cropping manners can be used in the case of multiple target objects, such as a cropping manner that highlights a group of images.

[0317] The following will take an original image including one target object as an example to exemplarily describe the process of determining the body aesthetics and / or the face aesthetics of the target object by the electronic device, and determining a target cropping manner corresponding to the original image according to the body aesthetics and / or the face aesthetics of the target object.

[0318] As described above, after obtaining the original image including one target object, the electronic device can determine the body aesthetics of the target object, and can determine a target cropping manner corresponding to the original image according to the body aesthetics of the target object. Alternatively, the electronic device can determine the face aesthetics of the target object, and can determine a target cropping manner corresponding to the original image according to the face aesthetics of the target object. Alternatively, the electronic device can determine the body aesthetics and the face aesthetics of the target object, and can determine a target cropping manner corresponding to the original image according to the body aesthetics and the face aesthetics of the target object.

[0319] The following will describe the following three cases respectively: 1) the electronic device determines the body aesthetics of the target object, and determines a target cropping manner corresponding to the original image according to the body aesthetics of the target object; 2) the electronic device determines the face aesthetics of the target object, and determines a target cropping manner corresponding to the original image according to the face aesthetics of the target object; and 3) the electronic device determines the body aesthetics and the face aesthetics of the target object, and determines a target cropping manner corresponding to the original image according to the body aesthetics and the face aesthetics of the target object.

[0320] In one example, after obtaining the original image including the target object, the electronic device can determine the body aesthetic degree of the target object according to the original image. When it is determined that the body aesthetic degree of the target object is high, the electronic device can determine that the target cropping manner corresponding to the original image is the body-priority cropping manner. When it is determined that the body aesthetic degree of the target object is low, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0321] In one example, after obtaining the original image including the target object, the electronic device can determine the body aesthetic degree of the target object according to the original image. When it is determined that the body aesthetic degree of the target object is high, the electronic device can determine that the target cropping manner corresponding to the original image is the body-priority cropping manner. When it is determined that the body aesthetic degree of the target object is low, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0322] In one example, after obtaining the original image including the target object, the electronic device can determine the body aesthetic degree of the target object according to the original image. When it is determined that the body aesthetic degree of the target object is high, the electronic device can determine that the target cropping manner corresponding to the original image is the body-priority cropping manner. When it is determined that the body aesthetic degree of the target object is low, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0323] It should be understood that the body aesthetic degree being high and the body aesthetic degree being high in the embodiments of the present application can be the same concept, and the body aesthetic degree being low and the body aesthetic degree being low can be the same concept.

[0324] Referring to FIG. 6, FIG. 6 shows a flowchart of determining the target cropping manner corresponding to the original image according to the body aesthetic degree of the target object according to an embodiment of the present application.

[0325] In one example, as shown in FIG. 6, after obtaining the original image including the target object, the electronic device can detect whether the original image includes a face image. When no face image is detected in the original image, for example, when the original image is an image including a back view of the target object, the electronic device can directly determine that the target cropping manner corresponding to the original image is the body-priority cropping manner. That is, when the electronic device does not detect a face image in the original image, the electronic device can directly crop the original image by the body-priority cropping manner.

[0326] When a face image is detected in the original image, the electronic device can determine the body aesthetic degree of the target object according to the original image. When it is determined that the body aesthetic degree of the target object is high, the electronic device can determine that the target cropping manner corresponding to the original image is the body-priority cropping manner. When it is determined that the body aesthetic degree of the target object is low, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0327] It should be understood that the embodiments of the present application do not make any limitation on the specific way of detecting whether the original image includes a face, and the specific determination can be made according to the actual scene. For example, a general algorithm of face recognition or other artificial intelligence algorithm, etc.

[0328] The following will be exemplarily described by taking a face image of a target object as an example.

[0329] In the embodiments of the present application, the electronic device can determine the limb aesthetic degree of the target object according to at least one of the limb dynamic degree, the limb stretch degree, and the limb twist degree of the target object. The limb dynamic degree can be used to represent the motion state of the target object, for example, can be used to represent the motion speed of the target object. The limb stretch degree can be used to represent the stretch degree of the limb of the target object. The limb twist degree can be used to represent the twist degree of the limb of the target object.

[0330] In some embodiments, the electronic device can determine the limb aesthetic degree of the target object according to the limb dynamic degree of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the limb dynamic degree of the target object according to the original image, and can determine the limb aesthetic degree of the target object according to the limb dynamic degree.

[0331] It should be noted that research has found that people prefer images containing motion to static images. That is, people generally consider that the limb aesthetic degree when in a motion state is higher than the limb aesthetic degree when in a static state.

[0332] In one example, when it is determined that the limb dynamic degree of the target object is high, for example, when it is determined that the motion speed of the target object is fast, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, can determine that the target cropping manner corresponding to the original image is the limb-priority cropping manner. When it is determined that the limb dynamic degree of the target object is low, for example, when it is determined that the motion speed of the target object is low (for example, in a static state), the electronic device can determine that the limb aesthetic degree of the target object is low, that is, can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0333] In one possible implementation, the electronic device can determine the limb dynamic degree of the target object according to the angle (hereinafter can be referred to as angle a) between the line connecting the top of the head and the midpoint of the pelvis and the vertical direction.

[0334] For example, refer to FIG. 7, FIG. 7 shows a schematic diagram of angle a provided by the embodiments of the present application.

[0335] As shown in FIG. 7, the angle a can be the angle between the line 701 connecting the top of the head and the midpoint of the pelvis and the straight line 702 where the vertical direction is located.

[0336] For example, the electronic device can determine the angle a as the limb dynamic degree of the target object. Alternatively, the electronic device can be provided with a conversion relationship (which can be referred to as conversion relationship R1 below) between the angle a and the limb dynamic degree, and the electronic device can determine the limb dynamic degree of the target object according to the angle a and the conversion relationship R1. The conversion relationship R1 between the angle a and the limb dynamic degree can be determined according to an actual scenario, and the embodiments of the present application do not make any limitation in this regard. The following will be exemplarily described by taking the electronic device determining the angle a as the limb dynamic degree of the target object as an example.

[0337] It should be noted that when the target object is in a motion state, the angle a is generally larger, and the faster the motion speed, the larger the angle a. When the target object is in a static state, the angle a is generally smaller. That is, when the target object is in a motion state, the angle a will be greater than or equal to a certain threshold value (which can be referred to as threshold value A1 below). When the target object is in a static state, the angle a will be less than a certain threshold value (which can be referred to as threshold value A2 below).

[0338] It should be understood that the threshold value A1 and the threshold value A2 can be the same or different. The threshold value A1 and the threshold value A2 can be a specific value or a value range. The specific value of the threshold value A1 and the specific value of the threshold value A2 can be determined according to an actual scenario, and the embodiments of the present application do not make any limitation in this regard. For example, the threshold value A1 and the threshold value A2 can be determined according to the angle a when the target object and / or other objects are in a motion state, such as determining the threshold value A1 as any one of 10 degrees, 15 degrees or 20 degrees, and determining the threshold value A2 as any one of 0 degrees, 3 degrees, 5 degrees or 10 degrees.

[0339] Optionally, the electronic device can determine the limb aesthetic degree of the target object according to whether the limb dynamic degree (i.e., the angle a) is greater than or equal to the threshold value A1 and / or whether the limb dynamic degree (i.e., the angle a) is less than or equal to the threshold value A2.

[0340] In one example, when the threshold value A1 and the threshold value A2 are the same, when it is determined that the angle a is greater than or equal to the threshold value A1, the electronic device can determine that the limb dynamic degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb-priority cropping manner. When it is determined that the angle a is less than the threshold value A2, the electronic device can determine that the limb dynamic degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0341] In another example, when the threshold value A1 is not equal to the threshold value A2, when it is determined that the angle a is greater than or equal to the threshold value A1, the electronic device can determine that the limb dynamic degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is a limb-priority cropping manner. When it is determined that the angle a is less than the threshold value A2, the electronic device can determine that the limb dynamic degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is a face-priority cropping manner. When it is determined that the angle a is greater than or equal to the threshold value A2 and less than the threshold value A1, the electronic device can determine that the limb dynamic degree of the target object is moderate, that is, it can be determined that the limb aesthetic degree of the target object is moderate. Moderate can mean between high and low.

[0342] It should be understood that when it is determined that the limb aesthetic degree of the target object is moderate, the electronic device can determine that the target cropping manner corresponding to the original image is a default cropping manner. That is, when it is determined that the limb aesthetic degree of the target object is moderate, the electronic device can crop the original image according to the default cropping manner to obtain a cropped image. The default cropping manner can be determined according to the actual scene, and the embodiments of the present application do not make any limitation thereto. For example, the default cropping manner can be a face-priority cropping manner. For example, the default cropping manner can be that the center of the face of the target object is located at the upper 1 / 3 of the cropped image, that is, the cropped image can be equally divided into three parts from top to bottom, and the center of the face of the target object can be located at the uppermost 1 / 3.

[0343] In other embodiments, the electronic device can determine the limb aesthetic degree of the target object according to the limb stretch degree of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the limb stretch degree of the target object according to the original image, and can determine the limb aesthetic degree of the target object according to the limb stretch degree of the target object.

[0344] In one example, when it is determined that the limb stretch degree of the target object is high, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, it can be determined that the target cropping manner corresponding to the original image is a limb-priority cropping manner. When it is determined that the limb stretch degree of the target object is low, the electronic device can determine that the limb aesthetic degree of the target object is low, that is, it can be determined that the target cropping manner corresponding to the original image is a face-priority cropping manner.

[0345] In a possible implementation, the electronic device can determine the limb stretch degree of the target object according to the width of each of the at least two groups of symmetrical joints. That is, after obtaining the original image including the target object, the electronic device can determine the at least two groups of symmetrical joints of the target object, and can determine the width of each group of symmetrical joints. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the width of each group of symmetrical joints.

[0346] It should be understood that each group of symmetrical joints can refer to a group of joints that are laterally symmetrical. That is, each group of symmetrical joints can include two joints, and the two joints are laterally symmetrical joints. The width of each group of symmetrical joints can refer to the length of the line segment between the two joints included in the group of symmetrical joints.

[0347] It should be noted that the manner of determining the width of the symmetrical joint is not specifically limited in the embodiments of the present application, and can be determined according to the actual scene. For example, an image coordinate system can be established with the top left corner or the center of the original image as the origin, and the coordinates of the symmetrical joint in the image coordinate system can be determined to determine the width of the symmetrical joint according to the coordinates of the symmetrical joint in the image coordinate system.

[0348] In one example, the at least two groups of symmetrical joints can include symmetrical joint M and symmetrical joint N. The symmetrical joint M can be a symmetrical joint whose width can change within a smaller range. The symmetrical joint N can be a symmetrical joint whose width can change within a larger range.

[0349] For example, the symmetrical joint M can include a group of joints corresponding to the shoulder (i.e., a joint corresponding to the left shoulder and a joint corresponding to the right shoulder) and / or a group of joints corresponding to the pelvis (i.e., a joint corresponding to the leftmost side of the pelvis and a joint corresponding to the rightmost side of the pelvis). That is, the symmetrical joint M can include a joint corresponding to the left shoulder and a joint corresponding to the right shoulder, and / or can include a joint corresponding to the leftmost side of the pelvis and a joint corresponding to the rightmost side of the pelvis.

[0350] For example, the symmetrical joint N can include at least one of a group of joints corresponding to the wrist (i.e., a joint corresponding to the left wrist and a joint corresponding to the right wrist), a group of joints corresponding to the knee (i.e., a joint corresponding to the left knee and a joint corresponding to the right knee), and a group of joints corresponding to the ankle (i.e., a joint corresponding to the left ankle and a joint corresponding to the right ankle).

[0351] That is, after obtaining the original image including the target object, the electronic device can determine the symmetrical joint node M and the symmetrical joint node N of the target object, and can determine the width of the symmetrical joint node M and the width of the symmetrical joint node N. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the width of the symmetrical joint node M and the width of the symmetrical joint node N.

[0352] Referring to FIG. 8, FIG. 8 shows a schematic diagram of a symmetrical joint node according to an embodiment of the present application.

[0353] As shown in FIG. 8, when the symmetrical joint node M includes a group of joint nodes corresponding to the shoulder, and the symmetrical joint node N includes a group of joint nodes corresponding to the wrist, after obtaining the original image including the target object, the electronic device can determine the width (hereinafter referred to as width M1) between the joint node corresponding to the left shoulder and the joint node corresponding to the right shoulder according to the original image. In addition, the electronic device can also determine the width (hereinafter referred to as width N1) between the joint node corresponding to the left wrist and the joint node corresponding to the right wrist according to the original image. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the width M1 and the width N1.

[0354] As shown in FIG. 8, when the symmetrical joint node M includes a group of joint nodes corresponding to the shoulder and a group of joint nodes corresponding to the pelvis, and the symmetrical joint node N includes a group of joint nodes corresponding to the wrist, after obtaining the original image including the target object, the electronic device can determine the width M1 between the joint node corresponding to the left shoulder and the joint node corresponding to the right shoulder, and the width (hereinafter referred to as width M2) between the joint node corresponding to the leftmost side of the pelvis and the joint node corresponding to the rightmost side of the pelvis according to the original image. In addition, the electronic device can also determine the width N1 between the joint node corresponding to the left wrist and the joint node corresponding to the right wrist according to the original image. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the width M1, the width M2 and the width N1.

[0355] As shown in FIG. 8, when the symmetrical joint point M includes a group of joint points corresponding to the shoulder and a group of joint points corresponding to the pelvis, and the symmetrical joint point N includes a group of joint points corresponding to the wrist, a group of joint points corresponding to the knee, and a group of joint points corresponding to the ankle, after obtaining an original image including the target object, the electronic device can determine, according to the original image, a width M1 between the joint point corresponding to the left shoulder and the joint point corresponding to the right shoulder, and a width M2 between the joint point corresponding to the leftmost side of the pelvis and the joint point corresponding to the rightmost side of the pelvis. In addition, the electronic device can also determine, according to the original image, a width N1 between the joint point corresponding to the left wrist and the joint point corresponding to the right wrist, a width (which can be referred to as width N2 below) between the joint point corresponding to the left knee and the joint point corresponding to the right knee, and a width (which can be referred to as width N3 below) between the joint point corresponding to the left ankle and the joint point corresponding to the right ankle. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the width M1, the width M2, the width N1, the width N2 and the width N3.

[0356] It should be noted that the embodiments of the present application do not make specific limitations on the manner in which the electronic device determines the symmetrical joint points, and the determination can be made according to actual scenarios.

[0357] It should be understood that the higher the limb stretch degree of the target object is, the greater the difference between the widths of the at least two groups of symmetrical joint points of the target object (which can be referred to as width difference for short) will be; the lower the limb stretch degree of the target object is, the smaller the width difference of the target object will be.

[0358] In one example, the electronic device can determine the limb stretch degree of the target object according to the width difference of the target object, so as to determine the limb aesthetic degree of the target object according to the width difference of the target object.

[0359] For example, the electronic device can determine the width difference of the target object as the limb stretch degree of the target object. Alternatively, a conversion relationship (which can be referred to as conversion relationship R2) between the width difference and the limb stretch degree can be set in the electronic device, and the electronic device can determine the limb stretch degree of the target object according to the width difference and the conversion relationship R2. The conversion relationship R2 between the width difference and the limb stretch degree can be determined according to actual scenarios, and the embodiments of the present application do not make limitations thereon. The following will be exemplarily described by taking the example that the electronic device determines the width difference as the limb stretch degree of the target object.

[0360] For example, the electronic device can determine the limb aesthetic degree of the target object according to whether the width difference of the target object is greater than or equal to a certain threshold (which can be referred to as threshold B1), and / or according to whether the width difference of the target object is less than a certain threshold (which can be referred to as threshold B2).

[0361] It should be noted that the threshold value B1 and the threshold value B2 can be the same or different. The threshold value B1 and the threshold value B2 can be a specific value or a value range. The specific value of the threshold value B1 and the specific value of the threshold value B2 can be determined according to the actual scene, and the embodiments of the present application do not make any limitation thereon. For example, the threshold value B1 and the threshold value B2 can be determined according to the width of the symmetrical joint M and the width of the symmetrical joint N when the stretching degree of the limb of the target object and / or other objects is high, and the width of the symmetrical joint M and the width of the symmetrical joint N when the stretching degree of the limb of the target object and / or other objects is low.

[0362] In one example, when the threshold value B1 and the threshold value B2 are the same, when it is determined that the width difference of the target object is greater than or equal to the threshold value B1, the electronic device can determine that the limb stretching degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb priority cropping manner. When it is determined that the width difference of the target object is less than the threshold value B2, the electronic device can determine that the limb stretching degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face priority cropping manner.

[0363] In another example, when the threshold value B1 and the threshold value B2 are different, when it is determined that the width difference of the target object is greater than or equal to the threshold value B1, the electronic device can determine that the limb stretching degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb priority cropping manner. When it is determined that the width difference of the target object is less than the threshold value B2, the electronic device can determine that the limb stretching degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face priority cropping manner. When it is determined that the width difference of the target object is greater than or equal to the threshold value B2, and it is determined that the width difference of the target object is less than the threshold value B1, the electronic device can determine that the limb stretching degree of the target object is moderate, that is, it can be determined that the limb aesthetic degree of the target object is moderate.

[0364] It should be understood that when it is determined that the limb aesthetic degree of the target object is moderate, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner. The specific content of the default cropping manner can refer to the related content of the default cropping manner in the foregoing determining the target cropping manner corresponding to the original image according to the limb dynamic degree of the target object, which will not be described here.

[0365] In one example, when the at least two groups of symmetric joint nodes include two groups of symmetric joint nodes, the electronic device can determine the width difference according to the difference between the widths. For example, the electronic device can determine the difference between the widths of the two groups of symmetric joint nodes, and can determine the difference as the width difference.

[0366] In another example, when the at least two groups of symmetric joint nodes include three or more groups of symmetric joint nodes, the electronic device can determine the width difference according to the average of the differences between the widths. For example, the electronic device can determine the difference between the widths of any two groups of symmetric joint nodes, and can determine the average of all the differences as the width difference.

[0367] In another example, when the at least two groups of symmetric joint nodes include three or more groups of symmetric joint nodes, the electronic device can determine the width difference according to the variance or standard deviation of the widths. For example, the electronic device can determine the widths of the groups of symmetric joint nodes, and can determine the variance or standard deviation of the widths of the groups of symmetric joint nodes as the width difference.

[0368] It should be noted that the specific values of the threshold B1 and the threshold B2 in different scenarios can be determined according to actual scenarios. The threshold B1 in different scenarios can be the same or different, and the threshold B2 in different scenarios can be the same or different. That is, the threshold B1 in the scenario of determining the width difference according to the difference between the widths, the threshold B1 in the scenario of determining the width difference according to the average of the differences between the widths, and the threshold B1 in the scenario of determining the width difference according to the variance or standard deviation of the widths can be the same or different. Similarly, the threshold B2 in the scenario of determining the width difference according to the difference between the widths, the threshold B2 in the scenario of determining the width difference according to the average of the differences between the widths, and the threshold B2 in the scenario of determining the width difference according to the variance or standard deviation of the widths can be the same or different.

[0369] In one example, the electronic device can also determine the binocular distance (e.g., the distance between the center points of the left eye and the right eye) of the target object according to the original image. When determining the limb stretch degree of the target object according to the widths of the at least two groups of symmetric joint nodes, for each group of symmetric joint nodes, after determining the width of the group of symmetric joint nodes, the electronic device can normalize the width of the group of symmetric joint nodes according to the binocular distance of the target object. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the normalized widths of the groups of symmetric joint nodes, to reduce the influence of limbs of different body types on the determination of the limb stretch degree, improve the accuracy of the determination of the limb stretch degree, and improve the accuracy of the determination of the target cropping manner.

[0370] It should be understood that for each group of symmetrical joints, the electronic device can normalize the width of the group of symmetrical joints according to X=L / e. Wherein, X is the width of the group of symmetrical joints after normalization, L is the width of the group of symmetrical joints before normalization, and e is the distance between the two eyes of the target object.

[0371] In another possible implementation, the electronic device can determine the limb stretch of the target object according to the horizontal coordinates of the at least two joints on one side. That is, after obtaining the original image including the target object, the electronic device can determine the at least two joints on the same side of the target object according to the original image, and can determine the horizontal coordinates of each joint. Then, the electronic device can determine the limb stretch of the target object according to the horizontal coordinates of the joints.

[0372] Optionally, the electronic device can determine the limb stretch of the target object according to the horizontal coordinates of the at least two joints on one side when the number of groups of symmetrical joints of the target object is less than two. That is, when the number of groups of symmetrical joints of the target object is less than two according to the original image, for example, when it is determined that the target object only includes one group of symmetrical joints or no symmetrical joints, the electronic device can determine the limb stretch of the target object according to the horizontal coordinates of the at least two joints on one side.

[0373] For example, when the original image includes a side image of the target object, the electronic device can determine that the number of groups of symmetrical joints of the target object is less than two, and at this time, the electronic device can determine the limb stretch of the target object according to the horizontal coordinates of the at least two joints on one side of the target object.

[0374] It should be noted that the electronic device can establish an image coordinate system with the top left corner or the center of the original image as the origin, to determine the horizontal coordinates of the joints according to the image coordinate system.

[0375] In one example, the at least two joints on one side can include joint Q and joint W. Wherein, joint Q can be a joint whose horizontal coordinate can change in a small range. Joint W can be a joint whose horizontal coordinate can change in a large range. The one side can be the left side of the target object, that is, joint Q and joint W can be joints on the left side of the target object. Alternatively, the one side can be the right side of the target object, that is, joint Q and joint W can be joints on the right side of the target object.

[0376] For example, when the one side is the left side of the target object, joint Q can include a joint corresponding to the left shoulder, and / or a joint corresponding to the leftmost side of the pelvis. Joint W can include at least one of a joint corresponding to the left wrist, a joint corresponding to the left knee, and a joint corresponding to the left ankle.

[0377] Exemplarily, when the single side is the right side of the target object, the joint Q can include a joint corresponding to the right shoulder, and / or a joint corresponding to the rightmost side of the pelvis. The joint W can include at least one of a joint corresponding to the right wrist, a joint corresponding to the right knee, and a joint corresponding to the right ankle.

[0378] That is, after obtaining the original image including the target object, the electronic device can determine the joint Q and the joint W of the single side of the target object, and can determine the horizontal coordinates of the joint Q and the horizontal coordinates of the joint W. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the horizontal coordinates of the joint Q and the horizontal coordinates of the joint W.

[0379] For example, refer to FIG. 9, which shows a schematic diagram of the single-side joint provided by the embodiments of the present application.

[0380] As shown in FIG. 9, when the joint Q includes a joint 910 corresponding to the left shoulder and a joint 911 corresponding to the leftmost side of the pelvis, and the joint W includes a joint 920 corresponding to the left wrist, a joint 921 corresponding to the left knee, and a joint 922 corresponding to the left ankle, after obtaining the original image including the target object, the electronic device can determine the horizontal coordinates of the joint 910 corresponding to the left shoulder and the horizontal coordinates of the joint 911 corresponding to the leftmost side of the pelvis according to the original image. In addition, the electronic device can also determine the horizontal coordinates of the joint 920 corresponding to the left wrist, the horizontal coordinates of the joint 921 corresponding to the left knee, and the horizontal coordinates of the joint 922 corresponding to the left ankle according to the original image. Subsequently, the electronic device can determine the limb stretch degree of the target object according to the horizontal coordinates of the joint 910 corresponding to the left shoulder, the horizontal coordinates of the joint 911 corresponding to the leftmost side of the pelvis, the horizontal coordinates of the joint 920 corresponding to the left wrist, the horizontal coordinates of the joint 921 corresponding to the left knee, and the horizontal coordinates of the joint 922 corresponding to the left ankle.

[0381] It should be noted that when the original image includes the side image of the target object, the higher the limb stretch degree of the target object is, the greater the difference between the horizontal coordinates of the at least two joints of the single side of the target object (hereinafter referred to as the horizontal coordinate difference) will be; the lower the limb stretch degree of the target object is, the smaller the horizontal coordinate difference of the single side of the target object will be.

[0382] In one example, the electronic device can determine the limb stretch degree of the target object according to the horizontal coordinate difference of the single side of the target object, and determine the limb aesthetic degree of the target object according to the horizontal coordinate difference of the single side of the target object.

[0383] For example, the electronic device can determine the lateral coordinate difference of the single side of the target object as the limb stretch degree of the target object. Alternatively, a conversion relationship (which can be referred to as conversion relationship R3 below) between the lateral coordinate difference and the limb stretch degree can be set in the electronic device, and the electronic device can determine the limb stretch degree of the target object according to the width difference and the conversion relationship R3. The conversion relationship R3 between the lateral coordinate difference and the limb stretch degree can be determined according to an actual scene, which is not limited in the embodiments of the present application. The embodiments of the present application will be exemplarily described below by taking the electronic device determining the lateral coordinate difference of the single side of the target object as the limb stretch degree of the target object as an example.

[0384] For example, the electronic device can determine the limb aesthetic degree of the target object according to whether the lateral coordinate difference of the single side of the target object is greater than or equal to a certain threshold (which can be referred to as threshold C1), and / or according to whether the lateral coordinate difference of the single side of the target object is less than a certain threshold (which can be referred to as threshold C2).

[0385] It should be noted that the threshold C1 and the threshold C2 can be the same or different. The threshold C1 and the threshold C2 can be a specific value or a value range. The specific value of the threshold C1 and the specific value of the threshold C2 can be determined according to an actual scene, which is not limited in the embodiments of the present application. For example, the threshold C1 and the threshold C2 can be determined according to the lateral coordinates of the joint Q and the lateral coordinates of the joint W when the stretch degree of the limb of the target object and / or other object is high, and the lateral coordinates of the joint Q and the lateral coordinates of the joint W when the stretch degree of the limb of the target object and / or other object is low.

[0386] In one example, when the threshold C1 and the threshold C2 are the same, when it is determined that the lateral coordinate difference of the target object is greater than or equal to the threshold C1, the electronic device can determine that the limb stretch degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb priority cropping manner. When it is determined that the lateral coordinate difference of the target object is less than the threshold C2, the electronic device can determine that the limb stretch degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face priority cropping manner.

[0387] In another example, when the threshold value C1 is different from the threshold value C2, when it is determined that the horizontal coordinate difference of the target object is greater than or equal to the threshold value C1, the electronic device can determine that the limb stretch degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb priority cropping manner. When it is determined that the horizontal coordinate difference of the target object is less than the threshold value C2, the electronic device can determine that the limb stretch degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face priority cropping manner. When it is determined that the horizontal coordinate difference of the target object is greater than or equal to the threshold value C2, and it is determined that the horizontal coordinate difference of the target object is less than the threshold value C1, the electronic device can determine that the limb stretch degree of the target object is moderate, that is, it can be determined that the limb aesthetic degree of the target object is moderate.

[0388] It should be understood that when it is determined that the limb aesthetic degree of the target object is moderate, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner. Wherein the specific content of the default cropping manner can refer to the related content of the default cropping manner in the foregoing determining the target cropping manner corresponding to the original image according to the limb dynamic degree of the target object, which will not be described here.

[0389] In one example, when the at least two joint points of the single side include two joint points, the electronic device can determine the horizontal coordinate difference according to the difference between the horizontal coordinates. For example, the electronic device can determine the difference between the horizontal coordinates of the two joint points, and can determine the difference as the horizontal coordinate difference.

[0390] In another example, when the at least two joint points of the single side include three or more joint points, the electronic device can determine the horizontal coordinate difference according to the average of the differences between the horizontal coordinates. For example, the electronic device can determine the difference between the horizontal coordinates of any two joint points, and can determine the average according to all the differences to determine the average as the horizontal coordinate difference.

[0391] In another example, when the at least two joint points of the single side include three or more joint points, the electronic device can determine the horizontal coordinate difference according to the variance or standard deviation of the horizontal coordinates. For example, the electronic device can determine the horizontal coordinates of each joint point, can determine the variance or standard deviation of the horizontal coordinates according to the horizontal coordinates of each joint point, and can determine the variance or standard deviation of the horizontal coordinates as the horizontal coordinate difference.

[0392] It should be noted that the specific values of the threshold C1 and the threshold C2 in different scenarios can be determined according to actual scenarios. The threshold C1 in different scenarios can be the same or different, and the threshold C2 in different scenarios can be the same or different. That is, the threshold C1 in the scenario of determining the difference between the horizontal coordinates according to the difference between the horizontal coordinates, the threshold C1 in the scenario of determining the difference between the horizontal coordinates according to the average of the difference between the horizontal coordinates, and the threshold C1 in the scenario of determining the difference between the horizontal coordinates according to the variance or standard deviation of the horizontal coordinates can be the same or different. Similarly, the threshold C2 in the scenario of determining the difference between the horizontal coordinates according to the difference between the horizontal coordinates, the threshold C2 in the scenario of determining the difference between the horizontal coordinates according to the average of the difference between the horizontal coordinates, and the threshold C2 in the scenario of determining the difference between the horizontal coordinates according to the variance or standard deviation of the horizontal coordinates can be the same or different.

[0393] In some embodiments, the electronic device can determine the body beauty degree of the target object according to the body twist degree of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the body twist degree of the target object according to the original image, and can determine the body beauty degree of the target object according to the body twist degree of the target object.

[0394] It should be noted that when the body twist degree is high, that is, the twist degree of the body is high, it is generally considered that the body beauty degree is high. When the body twist degree is low, that is, the twist degree of the body is low, it is generally considered that the body beauty degree is low. That is, the body beauty degree of the body with a high twist degree is generally higher than the body beauty degree of the body with a low twist degree.

[0395] In one example, when it is determined that the body twist degree of the target object is high, the electronic device can determine that the body beauty degree of the target object is high, that is, it can be determined that the target cropping manner corresponding to the original image is the body priority cropping manner. When it is determined that the body twist degree of the target object is low, the electronic device can determine that the body beauty degree of the target object is low, that is, it can be determined that the target cropping manner corresponding to the original image is the face priority cropping manner.

[0396] In one possible implementation, the electronic device can determine the body twist degree of the target object according to an angle (hereinafter referred to as angle b) between a line where the shoulder is located and a line where the pelvis is located.

[0397] For example, refer to FIG. 10, which shows a schematic diagram of the angle b provided by the embodiments of the present application.

[0398] As shown in FIG. 10, the angle b can be the angle between the line 1010 where the shoulder is located and the line 1020 where the pelvis is located.

[0399] For example, the electronic device can determine the angle b as the limb twist degree of the target object. Alternatively, a conversion relationship (which can be referred to as conversion relationship R4 below) between the angle b and the limb twist degree can be set in the electronic device, and the electronic device can determine the limb twist degree of the target object according to the angle b and the conversion relationship R4. It should be understood that the conversion relationship R4 between the angle b and the limb twist degree can be determined according to the actual scene, and the embodiments of the present application do not limit this. The following will be exemplarily described by taking the electronic device determining the angle b as the limb twist degree of the target object as an example.

[0400] It should be noted that when the twist degree of the limb of the target object is high, the angle b is generally large. When the twist degree of the limb of the target object is low, the angle b is generally small. That is, the higher the limb twist degree of the target object, the larger the angle b will be; the lower the limb twist degree of the target object, the smaller the angle b will be.

[0401] In one example, the electronic device can determine the limb aesthetic degree of the target object according to whether the limb twist degree of the target object is greater than or equal to a certain threshold (which can be referred to as threshold D1 below) and / or according to whether the limb twist degree of the target object is less than a certain threshold (which can be referred to as threshold D2 below).

[0402] It should be noted that the threshold D1 and the threshold D2 can be the same or different. The threshold D1 and the threshold D2 can be a specific value or a value range. The specific value of the threshold D1 and the specific value of the threshold D2 can be determined according to the actual scene, and the embodiments of the present application do not limit this. For example, the threshold D1 and the threshold D2 can be determined according to the angle b when the twist degree of the limb of the target object and / or other object is high, and the angle b when the twist degree of the limb of the target object and / or other object is low.

[0403] In one example, when the threshold D1 and the threshold D2 are the same, when it is determined that the angle b is greater than or equal to the threshold D1, the electronic device can determine that the limb twist degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb priority cropping manner. When it is determined that the angle b is less than the threshold D2, the electronic device can determine that the limb twist degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face priority cropping manner.

[0404] In another example, when the threshold D1 is not equal to the threshold D2, when it is determined that the angle b is greater than or equal to the threshold D1, the electronic device can determine that the limb twisting degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb-priority cropping manner. When it is determined that the angle b is less than the threshold D2, the electronic device can determine that the limb twisting degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low, at this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner. When it is determined that the angle b is greater than or equal to the threshold D2 and it is determined that the angle b is less than the threshold D1, the electronic device can determine that the limb twisting degree of the target object is moderate, that is, it can be determined that the limb aesthetic degree of the target object is moderate.

[0405] It should be understood that when it is determined that the limb aesthetic degree of the target object is moderate, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner. The specific content of the default cropping manner can refer to the related content of the default cropping manner in the foregoing determining the target cropping manner corresponding to the original image according to the limb dynamic degree of the target object, which will not be described here.

[0406] In some other embodiments, the electronic device can determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretching degree of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the limb dynamic degree and the limb stretching degree of the target object according to the original image, and can determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretching degree of the target object, so as to comprehensively consider the limb dynamic degree and the limb stretching degree to determine the limb aesthetic degree of the target object, which can improve the accuracy of the determination of the limb aesthetic degree, thereby improving the accuracy of the determination of the target cropping manner and improving the aesthetic sense of the cropped image.

[0407] In a possible implementation, when it is determined that the limb dynamic degree of the target object is high and it is determined that the limb stretching degree of the target object is high, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, it can be determined that the target cropping manner corresponding to the original image is the limb-priority cropping manner.

[0408] When it is determined that the limb dynamic degree of the target object is low and it is determined that the limb stretching degree of the target object is low, the electronic device can determine that the limb aesthetic degree of the target object is low, that is, it can be determined that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0409] When it is determined that the limb dynamic degree of the target object is high and the limb stretch degree of the target object is low, or when it is determined that the limb dynamic degree of the target object is low and the limb stretch degree of the target object is high, or when it is determined that the limb dynamic degree of the target object is moderate, or when it is determined that the limb stretch degree of the target object is moderate, the electronic device can determine that the limb aesthetic degree of the target object is moderate, that is, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner.

[0410] In some embodiments, the electronic device can determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretch degree of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the limb dynamic degree and the limb stretch degree of the target object according to the original image, and can determine the limb aesthetic degree of the target object according to the limb dynamic degree and the limb stretch degree of the target object, so as to comprehensively consider the limb dynamic degree and the limb stretch degree to determine the limb aesthetic degree of the target object, thereby improving the accuracy of the determination of the limb aesthetic degree, and improving the accuracy of the determination of the target cropping manner and the aesthetic sense of the cropped image.

[0411] In a possible implementation, when it is determined that the limb dynamic degree of the target object is high and the limb stretch degree of the target object is high, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, the electronic device can determine that the target cropping manner corresponding to the original image is the limb-priority cropping manner.

[0412] When it is determined that the limb dynamic degree of the target object is low and the limb stretch degree of the target object is low, the electronic device can determine that the limb aesthetic degree of the target object is low, that is, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0413] When it is determined that the limb dynamic degree of the target object is high and the limb stretch degree of the target object is low, or when it is determined that the limb dynamic degree of the target object is low and the limb stretch degree of the target object is high, or when it is determined that the limb dynamic degree of the target object is moderate, or when it is determined that the limb stretch degree of the target object is moderate, the electronic device can determine that the limb aesthetic degree of the target object is moderate, that is, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner.

[0414] In some embodiments, the electronic device can determine the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the limb stretch degree and the limb twist degree of the target object according to the original image, and can determine the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree of the target object, so as to comprehensively consider the limb stretch degree and the limb twist degree to determine the limb aesthetic degree of the target object, thereby improving the accuracy of the determination of the limb aesthetic degree, and improving the accuracy of the determination of the target cropping manner, and improving the aesthetic sense of the cropped image.

[0415] In a possible implementation, when it is determined that the limb stretch degree of the target object is high, and it is determined that the limb twist degree of the target object is high, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, it can be determined that the target cropping manner corresponding to the original image is the limb-priority cropping manner.

[0416] When it is determined that the limb stretch degree of the target object is low, and it is determined that the limb twist degree of the target object is low, the electronic device can determine that the limb aesthetic degree of the target object is low, that is, it can be determined that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0417] When it is determined that the limb stretch degree of the target object is high, and it is determined that the limb twist degree of the target object is low, or when it is determined that the limb stretch degree of the target object is low, and it is determined that the limb twist degree of the target object is high, or when it is determined that the limb stretch degree of the target object is moderate, or when it is determined that the limb twist degree of the target object is moderate, the electronic device can determine that the limb aesthetic degree of the target object is moderate, that is, it can be determined that the target cropping manner corresponding to the original image is the default cropping manner.

[0418] Please refer to FIG. 11, which shows an application scenario schematic diagram one provided by the embodiments of the present application. The application scenario takes the limb stretch degree as the width difference and the limb twist degree as the angle b as an example for illustrative description. In FIG. 11, the horizontal coordinate is the limb twist degree, and the vertical coordinate is the limb stretch degree.

[0419] As shown in FIG. 11, through analysis of a large number of sample images, it is found that when the limb stretch degree and the limb twist degree of the target object are located in the region 1110, it can be considered that the limb aesthetic degree of the target object is high, that is, it can be considered that the limb stretch degree of the target object is high, and it can be considered that the limb twist degree of the target object is high.

[0420] When the limb stretch degree and the limb twist degree of the target object are located in the region 1120, it can be considered that the limb aesthetic degree of the target object is low, that is, it can be considered that the limb stretch degree of the target object is low, and it can be considered that the limb twist degree of the target object is low.

[0421] When the limb stretch degree and the limb twist degree of the target object are neither located in the region 1110 nor located in the region 1120, it can be considered that the limb aesthetic degree of the target object is moderate, that is, it can be considered that the limb stretch degree of the target object is high, and it can be considered that the limb twist degree of the target object is low; or it can be considered that the limb stretch degree of the target object is low, and it can be considered that the limb twist degree of the target object is high; or it can be considered that the limb stretch degree of the target object is moderate; or it can be considered that the limb twist degree of the target object is moderate.

[0422] That is, as can be known from FIG. 11, the threshold value B1 corresponding to the limb stretch degree can be 13, and the threshold value B2 can be 7. The threshold value D1 corresponding to the limb twist degree can be 7, and the threshold value D2 can be 4.

[0423] That is, when it is determined that the limb stretch degree of the target object is greater than or equal to 13, and it is determined that the limb twist degree of the target object is greater than or equal to 7, the electronic device can determine that the limb stretch degree of the target object is high, and can determine that the limb twist degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is high. At this time, the electronic device can determine that the target cropping manner corresponding to the original image is the limb-priority cropping manner.

[0424] When it is determined that the limb stretch degree of the target object is less than 7, and it is determined that the limb twist degree of the target object is less than 4, the electronic device can determine that the limb stretch degree of the target object is low, and can determine that the limb twist degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is low. At this time, the electronic device can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0425] When it is determined that the limb stretch degree of the target object is greater than or equal to 13, and it is determined that the limb twist degree of the target object is less than 4, the electronic device can determine that the limb stretch degree of the target object is high, and can determine that the limb twist degree of the target object is low, that is, it can be determined that the limb aesthetic degree of the target object is moderate. At this time, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner.

[0426] When it is determined that the limb stretch degree of the target object is less than 7, and it is determined that the limb twist degree of the target object is greater than or equal to 7, the electronic device can determine that the limb stretch degree of the target object is low, and can determine that the limb twist degree of the target object is high, that is, it can be determined that the limb aesthetic degree of the target object is moderate. At this time, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner.

[0427] When it is determined that the limb stretch degree of the target object is greater than or equal to 7 and it is determined that the limb stretch degree of the target object is less than 13, or when it is determined that the limb twist degree of the target object is greater than or equal to 4 and it is determined that the limb twist degree of the target object is less than 7, the electronic device can determine that the limb aesthetic degree of the target object is moderate. At this time, the electronic device can determine that the target cropping manner corresponding to the original image is the default cropping manner.

[0428] In some embodiments, the electronic device can determine the limb aesthetic degree of the target object according to the limb dynamic degree, the limb stretch degree and the limb twist degree of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the limb dynamic degree, the limb stretch degree and the limb twist degree of the target object according to the original image, and can determine the limb aesthetic degree of the target object according to the limb dynamic degree, the limb stretch degree and the limb twist degree of the target object, so as to comprehensively consider the limb dynamic degree, the limb stretch degree and the limb twist degree to determine the limb aesthetic degree of the target object, which can improve the accuracy of the determination of the limb aesthetic degree, and thus can improve the accuracy of the determination of the target cropping manner and improve the aesthetic sense of the cropped image.

[0429] In a possible implementation, when it is determined that the limb dynamic degree, the limb stretch degree and the limb twist degree of the target object are all high, that is, when it is determined that the limb dynamic degree of the target object is high, it is determined that the limb stretch degree of the target object is high, and it is determined that the limb twist degree of the target object is high, the electronic device can determine that the limb aesthetic degree of the target object is high, that is, can determine that the target cropping manner corresponding to the original image is the limb-priority cropping manner.

[0430] When it is determined that the limb dynamic degree, the limb stretch degree and the limb twist degree of the target object are all low, that is, when it is determined that the limb dynamic degree of the target object is low, it is determined that the limb stretch degree of the target object is low, and it is determined that the limb twist degree of the target object is low, the electronic device can determine that the limb aesthetic degree of the target object is low, that is, can determine that the target cropping manner corresponding to the original image is the face-priority cropping manner.

[0431] When it is determined that one or two of the limb dynamic degree, the limb stretch degree and the limb twist degree of the target object are high, or when it is determined that at least one of the limb dynamic degree, the limb stretch degree and the limb twist degree of the target object is moderate, the electronic device can determine that the limb aesthetic degree of the target object is moderate, that is, can determine that the target cropping manner corresponding to the original image is the default cropping manner.

[0432] II. The electronic device determines the face aesthetic degree of the target object, and determines the target cropping manner corresponding to the original image according to the face aesthetic degree of the target object;

[0433] Referring to FIG. 12, FIG. 12 shows a flowchart of determining a target cropping manner corresponding to an original image according to a facial aesthetic degree of a target object according to an embodiment of the present application. For example, the facial aesthetic degree can include an expression aesthetic degree.

[0434] As shown in FIG. 12, after obtaining the original image including the target object, the electronic device can determine the facial aesthetic degree of the target object according to the original image. When it is determined that the facial aesthetic degree of the target object is high, for example, when it is determined that the facial expression of the target object is tense, the electronic device can determine that the target cropping manner corresponding to the original image is a face-priority cropping manner. When it is determined that the facial aesthetic degree of the target object is low, for example, when it is determined that the facial expression of the target object is flat, the electronic device can determine that the target cropping manner corresponding to the original image is a body-priority cropping manner.

[0435] That is, when cropping the original image, when it is determined that the facial expression of the target object is tense, the electronic device can use a cropping manner that highlights the facial expression to crop the original image, so that the cropped image can retain the more aesthetic facial expression of the target object, can improve the aesthetic of the cropped image, and improve the user experience. When the facial expression of the target object is flat, the electronic device can use a cropping manner that prioritizes retaining the body to crop the original image, which can reduce the proportion of the low-aesthetic facial expression in the cropped image, improve the aesthetic of the cropped image, and improve the user experience.

[0436] In a possible implementation, the electronic device can determine the facial aesthetic degree of the target object according to the expression arousal (A) and the expression pleasantness (P) of the target object. That is, after obtaining the original image including the target object, the electronic device can determine the expression arousal A and the expression pleasantness P of the target object according to the original image, and can determine the facial aesthetic degree of the target object according to the expression arousal A and the expression pleasantness P of the target object.

[0437] In some embodiments, when the absolute value of the expression arousal A is less than a certain threshold (which can be referred to as threshold E below), and the absolute value of the expression pleasantness P is less than a certain threshold (which can be referred to as threshold F below), the electronic device can determine that the facial aesthetic degree of the target object is low, that is, it can be determined that the facial expression of the target object is flat. When the absolute value of the expression arousal A is greater than or equal to the threshold E, or the absolute value of the expression pleasantness P is greater than or equal to the threshold F, the electronic device can determine that the facial aesthetic degree of the target object is high, that is, it can be determined that the facial expression of the target object is tense.

[0438] It should be understood that the threshold E and the threshold F can be determined according to actual scenarios, and the embodiments of the present application do not make any limitation in this regard.

[0439] It should be noted that the expression arousal degree A can be used to measure the degree (or intensity) of emotion. The expression pleasure degree P can be used to measure the positive degree of emotion. The determination manner of the expression arousal degree A and the expression pleasure degree P can be determined according to actual scenes, and the embodiments of the present application do not limit this.

[0440] For example, after obtaining the original image including the target object, the electronic device can directly determine the expression arousal degree A and the expression pleasure degree P of the target object according to the original image. The manner in which the electronic device directly determines the expression arousal degree A and the expression pleasure degree P of the target object according to the original image can be any existing manner.

[0441] For example, after obtaining the original image including the target object, the electronic device can determine the expression category of the target object according to the original image, and can determine the expression arousal degree A and the expression pleasure degree P of the target object according to the corresponding relationship between the expression category of the target object and the expression arousal degree A and the expression pleasure degree P.

[0442] It should be understood that the determination manner of the expression category can be determined according to actual scenes, and the embodiments of the present application do not limit this. The corresponding relationship between the expression category and the expression arousal degree A and the expression pleasure degree P can be determined according to actual scenes, and the embodiments of the present application do not limit this.

[0443] For example, please refer to FIG. 13, which shows an example diagram of the corresponding relationship between the expression category and the expression arousal degree and the expression pleasure degree.

[0444] The horizontal coordinate in FIG. 13 is the expression pleasure degree P, and the vertical coordinate is the expression arousal degree A.

[0445] As shown in FIG. 13, when the expression category is excitement, like / love, happy, proud, curious, agree, angry / angry, fear, sad, pain, surprise, or flattery, the absolute value of the expression arousal degree A corresponding to the expression category is greater than or equal to the threshold value E, or the absolute value of the expression pleasure degree P of the expression category is greater than or equal to the threshold value F. When the expression category is satisfaction, calm, lazy, ashamed, bored, bored, speechless, helpless or tired, the absolute value of the expression arousal degree A corresponding to the expression category is greater than or equal to the threshold value E, or the absolute value of the expression pleasure degree P of the expression category is greater than or equal to the threshold value F.

[0446] That is, when the expression category of the target object is determined to be excited, like / love, happy, proud, curious, agree, angry / angry, fear, sad, pain, surprise, or flattery, the electronic device can determine that the absolute value of the expression arousal degree A corresponding to the expression category is greater than or equal to the threshold value E, or can determine that the absolute value of the expression pleasure degree P of the expression category is greater than or equal to the threshold value F, at this time, the electronic device can determine that the facial expression of the target object has tension, that is, it can be determined that the facial aesthetics of the target object is high. Therefore, the electronic device can determine that the target cropping mode corresponding to the original image is a face-first cropping mode.

[0447] When the expression category of the target object is determined to be satisfied, calm, lazy, ashamed, bored, bored, speechless, helpless, or tired, the electronic device can determine that the absolute value of the expression arousal degree A corresponding to the expression category is greater than or equal to the threshold value E, or can determine that the absolute value of the expression pleasure degree P of the expression category is greater than or equal to the threshold value F, at this time, the electronic device can determine that the expression of the target object is relatively flat, that is, it can be determined that the facial aesthetics of the target object is low. Therefore, the electronic device can determine that the target cropping mode corresponding to the original image is a body-first cropping mode.

[0448] In some embodiments, when it is determined that the original image does not include a facial image of the target object, for example, when the original image is an image including a back of the target object, the electronic device can directly determine that the facial aesthetics of the target object is low, that is, it can be determined that the target cropping mode corresponding to the original image is a body-first cropping mode.

[0449] III. The electronic device determines the body aesthetics and facial aesthetics of the target object, and determines the target cropping mode corresponding to the original image according to the body aesthetics and facial aesthetics of the target object;

[0450] Please refer to FIG. 14, which shows a flowchart of determining the target cropping mode corresponding to the original image according to the body aesthetics and facial aesthetics of the target object provided by the embodiments of the present application.

[0451] As shown in FIG. 14, after obtaining the original image including the target object, the electronic device can determine the body aesthetics of the target object according to the original image. When it is determined that the body aesthetics of the target object is low, the electronic device can determine that the target cropping mode corresponding to the original image is a face-first cropping mode, so as to reduce the proportion of the body with poor aesthetics in the cropped image and improve the aesthetics of the cropped image.

[0452] When it is determined that the limb aesthetic degree of the target object is high, the electronic device can determine the facial aesthetic degree of the target object. When it is determined that the facial aesthetic degree of the target object is high, the electronic device can determine that the target cropping manner corresponding to the original image is a face-priority cropping manner, so that the cropped image can retain a more aesthetic facial expression of the target object, and the aesthetic feeling of the cropped image can be improved. When it is determined that the facial aesthetic degree of the target object is low, the electronic device can determine that the target cropping manner corresponding to the original image is a limb-priority cropping manner, so that the cropped image can retain a more aesthetic limb of the target object, the proportion of the facial image with a low aesthetic degree in the cropped image can be reduced, and the aesthetic feeling of the cropped image can be improved.

[0453] In one example, as shown in FIG. 14, after obtaining the original image including the target object, the electronic device can detect whether a facial image is included in the original image. When no facial image is detected in the original image, for example, when the original image is an image including a back view of the target object, the electronic device can directly determine that the target cropping manner corresponding to the original image is a limb-priority cropping manner. That is, when the electronic device does not detect a facial image in the original image, the electronic device can directly crop the original image by the limb-priority cropping manner.

[0454] It should be noted that the order of determining the limb aesthetic degree of the target object and the facial aesthetic degree of the target object in FIG. 14 is only illustrative and should not be construed as a limitation on the embodiments of the present application. The order of determining the limb aesthetic degree of the target object and the facial aesthetic degree of the target object in the embodiments of the present application is not limited, and the limb aesthetic degree of the target object and the facial aesthetic degree of the target object can be determined simultaneously, or the limb aesthetic degree of the target object can be determined first and then the facial aesthetic degree of the target object can be determined, or the facial aesthetic degree of the target object can be determined first and then the limb aesthetic degree of the target object can be determined. The specific content of determining the limb aesthetic degree of the target object and the facial aesthetic degree of the target object can refer to the related content of determining the limb aesthetic degree of the target object and the facial aesthetic degree of the target object described above, and will not be described here.

[0455] In the embodiments of the present application, after determining the target cropping manner corresponding to the original image, the electronic device can crop the original image according to the target cropping manner to obtain a cropped image. The process of cropping the original image according to the target cropping manner to obtain the cropped image by the electronic device will be described in detail below.

[0456] In some embodiments, after obtaining the original image including the target object, the electronic device can determine the facial orientation of the target object according to the original image. After determining the target cropping manner corresponding to the original image, the electronic device can crop the original image according to the facial orientation of the target object and the target cropping manner to obtain a cropped image.

[0457] For example, the electronic device can determine the target position of the target object in the cropped image according to the face orientation of the target object, and can crop the original image according to the target position of the target object in the cropped image and the target cropping manner, to obtain the cropped image in which the target object is located at the target position. It should be understood that the face orientation of the target object can include a front direction, a side direction, and a back direction. The front direction can mean that the original image includes a front view of the face of the target object. The side direction can mean that the original image includes a side view of the face of the target object. The back direction can mean that the original image does not include the face of the target object.

[0458] Referring to FIG. 15, FIG. 15 shows a flowchart of another image cropping method provided by an embodiment of the present application. The flowchart takes the determination of the target cropping manner according to the limb aesthetics of the original image shown in FIG. 6 as an example to exemplarily illustrate the cropping of the original image according to the target cropping manner.

[0459] As shown in FIG. 15, after the target cropping manner is determined according to the limb aesthetics, the electronic device can determine the target position of the target object in the cropped image according to the face orientation of the target object, and can crop the original image according to the target position of the target object in the cropped image and the target cropping manner. The specific content of the determination of the target cropping manner according to the limb aesthetics can refer to the related content of the determination of the target cropping manner according to the limb aesthetics shown in FIG. 6.

[0460] In a possible implementation, when the face orientation of the target object is the front direction or the back direction, the electronic device can determine that the target position of the target object in the cropped image is the middle position. At this time, the electronic device can crop the original image according to the middle position of the target object in the cropped image and the target cropping manner, to obtain the cropped image. That is, when the original image is cropped according to the target cropping manner, the original image can be cropped in such a way that the target object is located at the middle position of the cropped image.

[0461] It should be understood that the target position of the target object in the cropped image can mean the position of the center point of the target object on the horizontal coordinate. That is, the target position of the target object in the cropped image being the middle position can mean that the horizontal coordinate of the center point of the target object is the same as the horizontal coordinate of the center point of the cropped image.

[0462] Referring to FIG. 16, FIG. 16 shows a second application scenario provided by an embodiment of the present application. The application scenario takes the cropping manner with the target cropping manner being the limb priority as an example for exemplarily illustration.

[0463] According to the original image shown in (a) of FIG. 16, the electronic device can determine that the face orientation of the target object is positive. Therefore, when cropping the original image, the electronic device can determine the target position of the target object in the cropped image as the middle position according to the face orientation (i.e., positive) of the target object.

[0464] For example, when it is determined that the original aspect ratio of the original image is greater than the preset aspect ratio (e.g., the preset aspect ratio P1), the electronic device can crop the original image according to the body-priority cropping manner, such that the target object is located in the middle position of the cropped image. For example, the cropped image shown in (b) of FIG. 16 can be obtained.

[0465] For example, when it is determined that the original aspect ratio of the original image is less than the preset aspect ratio (e.g., the preset aspect ratio P2), the electronic device can perform a scaling-up process on the original image according to the preset aspect ratio P2. If the aspect ratio of the scaled-up original image is greater than the preset aspect ratio P2, the electronic device can crop the original image according to the body-priority cropping manner, such that the target object is located in the middle position of the cropped image. For example, the cropped image shown in (c) of FIG. 16 can be obtained.

[0466] In another possible implementation, when the face orientation of the target object is lateral, the electronic device can determine the offset distance of the target object according to a preset aspect ratio, and can determine the offset direction of the target object according to the face orientation of the target object. The preset aspect ratio can be, for example, the aspect ratio of the screen of the electronic device, or the aspect ratio of a certain software avatar frame, etc. Subsequently, the electronic device can determine the target position of the target object in the cropped image according to the offset direction and the offset distance of the target object. The aspect ratio can be the ratio of the length (i.e., the length in the horizontal direction) to the width (i.e., the width in the vertical direction). The offset distance can refer to the distance between the target position of the target object in the cropped image and the middle position of the cropped image.

[0467] In one example, when the face orientation of the target object is toward the left side, the electronic device can determine that the offset direction of the target object is right. That is, when it is determined that the face orientation of the target object is toward the left side, the electronic device determines that the target position of the target object in the cropped image can be biased to the right side of the cropped image.

[0468] In another example, when the face orientation of the target object is toward the right side, the electronic device can determine that the offset direction of the target object is left. When it is determined that the face orientation of the target object is toward the right side, the electronic device determines that the target position of the target object in the cropped image can be biased to the left side of the cropped image.

[0469] For example, the electronic device can determine the offset rate corresponding to the target object according to the preset aspect ratio and the offset rate, and can determine the offset distance of the target object according to the preset aspect ratio and the offset rate corresponding to the target object. The offset rate corresponding to the target object can refer to the ratio of the offset distance of the target object to half of the length corresponding to the preset aspect ratio. That is, the offset rate = offset distance: (length corresponding to the preset aspect ratio / 2). For example, when the preset aspect ratio is the aspect ratio of the screen of the electronic device, the length corresponding to the preset aspect ratio can be the length of the screen of the electronic device. For example, when the preset aspect ratio is the aspect ratio of a certain software avatar frame, the length corresponding to the preset aspect ratio can be the length of the software avatar frame.

[0470] In one example, the relationship between the preset aspect ratio (x) and the offset rate (y) can be y=0.1307ln(x)+0.2543.

[0471] Optionally, the relationship between the preset aspect ratio (x) and the offset rate (y) can be represented by a curve.

[0472] Referring to FIG. 17, FIG. 17 shows a schematic diagram of the relationship between the preset aspect ratio and the offset rate corresponding to the target object according to an embodiment of the present application. In FIG. 17, the horizontal axis is the preset aspect ratio, and the vertical axis is the offset rate.

[0473] As shown in FIG. 17, when the preset aspect ratio is 0.793:1, the electronic device can determine that the offset rate corresponding to the target object is 0.21, that is, the offset distance of the target object can be determined as (length corresponding to the preset aspect ratio / 2)*0.21. When the preset aspect ratio is 4:3, the electronic device can determine that the offset rate corresponding to the target object is 0.3, that is, the offset distance of the target object can be determined as (length corresponding to the preset aspect ratio / 2)*0.3. When the preset aspect ratio is 7:3, the electronic device can determine that the offset rate corresponding to the target object is 0.35, that is, the offset distance of the target object can be determined as (length corresponding to the preset aspect ratio / 2)*0.35. When the preset aspect ratio is 10:3, the electronic device can determine that the offset rate corresponding to the target object is 0.41, that is, the offset distance of the target object can be determined as (length corresponding to the preset aspect ratio / 2)*0.41.

[0474] Referring to FIG. 18, FIG. 18 shows a schematic diagram of an application scenario three according to an embodiment of the present application. The application scenario takes the target cropping mode as an example of the limb-priority cropping mode.

[0475] According to the original image shown in (a) of FIG. 18, the electronic device can determine that the face of the target object is oriented to the left. Therefore, when cropping the original image, the electronic device can determine, according to the orientation of the face of the target object (i.e., to the left), that the offset direction of the target object is to the right.

[0476] For example, when the original image needs to be cropped into a cropped image with a preset aspect ratio P1, the electronic device can determine the offset rate corresponding to the target object according to the preset aspect ratio P1, and can determine the offset distance of the target object according to the preset aspect ratio P1 and the offset rate corresponding to the target object. Subsequently, the electronic device can determine the target position of the target object in the cropped image according to the offset direction (i.e., to the right) and the offset distance of the target object. Therefore, when the original image is cropped according to the body-priority cropping manner, the electronic device can crop the original image with the target position of the target object in the cropped image. For example, the cropped image shown in (b) of FIG. 18 can be obtained.

[0477] For example, when the original image needs to be cropped into a cropped image with a preset aspect ratio P2, the electronic device can determine the offset rate corresponding to the target object according to the preset aspect ratio P2, and can determine the offset distance of the target object according to the preset aspect ratio P2 and the offset rate corresponding to the target object. Subsequently, the electronic device can determine the target position of the target object in the cropped image according to the offset direction (i.e., to the right) and the offset distance of the target object. When the original image is cropped according to the body-priority cropping manner, the electronic device can crop the original image with the target position of the target object in the cropped image. For example, the cropped image shown in (c) of FIG. 18 can be obtained.

[0478] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0479] Corresponding to the image cropping method described in the above embodiments, the embodiments of the present application also provide an image cropping device, and each module of the device can correspondingly implement each step of the image cropping method.

[0480] It should be noted that the information interaction, execution process and the like between the above devices / units are based on the same concept as the method embodiments of the present application, and the specific functions and technical effects brought by them can be referred to the method embodiments part, which will not be described here.

[0481] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the above described functions. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific name of each functional unit and module is only for convenient distinction, and does not limit the protection scope of the present application. The specific working process of the units and modules in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0482] The embodiment of the present application further provides an electronic device, which comprises at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor, and the processor executes the computer program to enable the electronic device to implement the steps in any of the method embodiments described above. For example, the structure of the electronic device can be as shown in FIG. 2.

[0483] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a computer to enable the computer to implement the steps in any of the method embodiments described above.

[0484] The embodiment of the present application provides a computer program product, which enables an electronic device to implement the steps in any of the method embodiments described above when the computer program product is run on the electronic device.

[0485] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the present application can implement all or part of the processes in the above-mentioned embodiment methods through a computer program to instruct relevant hardware to complete, and the computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable storage medium at least includes any entity or device capable of carrying the computer program code to the device / equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc.

[0486] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0487] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0488] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the above-described device / equipment embodiments are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0489] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may also be distributed to multiple network units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.

[0490] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can still be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

An image cropping method, characterized in that, The method comprises: obtaining an original image, the original image comprising a target object; determining a body aesthetic degree of the target object, and / or determining a face aesthetic degree of the target object; determining a target cropping manner corresponding to the original image according to the body aesthetic degree and / or the face aesthetic degree; cropping the original image according to the target cropping manner to obtain a cropped image, the cropped image comprising all or part of the target object. The method of claim 1, wherein The method further comprises: determining a body dynamic degree of the target object, the body dynamic degree being used to represent a motion state of the target object; determining the body aesthetic degree of the target object according to the body dynamic degree. The method according to claim 2, characterized in that The method further comprises: obtaining a first angle corresponding to the target object, the first angle being an angle between a line connecting a top of the head of the target object and a midpoint of a pelvis of the target object and a vertical direction; determining the body dynamic degree of the target object according to the first angle. The method according to claim 2 or 3, characterized in that The method further comprises: when the body dynamic degree is greater than or equal to a first threshold value, determining that the body aesthetic degree of the target object satisfies a first condition; when the body dynamic degree is less than a second threshold value, determining that the body aesthetic degree of the target object satisfies a second condition, the first threshold value being greater than or equal to the second threshold value. The method according to claim 2 or 3, characterized in that The method further comprises: determining a body stretch degree of the target object, the body stretch degree being used to represent a stretch degree of a body of the target object; determining the body aesthetic degree of the target object according to the body dynamic degree and the body stretch degree. The method according to claim 5, characterized in that The method further comprises: when the body dynamic degree is greater than or equal to a first threshold value and the body stretch degree is greater than or equal to a third threshold value, determining that the body aesthetic degree of the target object satisfies a first condition; when the body dynamic degree is less than a second threshold value and the body stretch degree is less than a fourth threshold value, determining that the body aesthetic degree of the target object satisfies a second condition; wherein the first threshold value is greater than or equal to the second threshold value, and the third threshold value is greater than or equal to the fourth threshold value. The method according to claim 2 or 3, characterized in that The method further comprises: determining a body twist degree of the target object, the body twist degree being used to represent a twist degree of a body of the target object; determining the body aesthetic degree of the target object according to the body dynamic degree and the body twist degree. The method of claim 7, wherein The method further comprises: when the body dynamic degree is greater than or equal to a first threshold value and the body twist degree is greater than or equal to a fifth threshold value, determining that the body aesthetic degree of the target object satisfies a first condition; when the body dynamic degree is less than a second threshold value and the body twist degree is less than a sixth threshold value, determining that the body aesthetic degree of the target object satisfies a second condition. The first threshold is greater than or equal to the second threshold, and the fifth threshold is greater than or equal to the sixth threshold. The method according to claim 2 or 3, characterized in that The method further includes determining a limb aesthetic degree of the target object according to the limb dynamic degree. The method further includes determining a limb stretch degree and a limb twist degree of the target object, and determining the limb aesthetic degree of the target object according to the limb dynamic degree, the limb stretch degree and the limb twist degree. The method of claim 1, wherein The method further includes determining a limb stretch degree of the target object. The method further includes determining a limb stretch degree of the target object. The method further includes determining a limb stretch degree of the target object. The method of claim 10, wherein The method further includes determining a first width and a second width, the first width being a width of a first set of symmetrical joints of the target object, and the second width being a width of a second set of symmetrical joints of the target object. The method further includes determining the limb stretch degree of the target object according to the first width and the second width. The first set of symmetrical joints includes a set of joints corresponding to a shoulder and / or a set of joints corresponding to a pelvis, and the second set of symmetrical joints includes at least one of a set of joints corresponding to a wrist, a set of joints corresponding to a knee and a set of joints corresponding to an ankle. The method of claim 11, wherein The method further includes determining a first horizontal coordinate and a second horizontal coordinate, the first horizontal coordinate being a horizontal coordinate of a first target joint of the target object, and the second horizontal coordinate being a horizontal coordinate of a second target joint of the target object, the first target joint and the second target joint being joints on a same side of the target object. The method of claim 10, wherein The method further includes determining the limb stretch degree of the target object according to the first horizontal coordinate and the second horizontal coordinate. The first target joint includes a joint corresponding to a shoulder and / or a joint corresponding to a pelvis, and the second target joint includes at least one of a joint corresponding to a wrist, a joint corresponding to a knee and a joint corresponding to an ankle. The method further includes determining the limb aesthetic degree of the target object according to the limb stretch degree. The method of claim 13, wherein When the limb stretch degree is greater than or equal to a third threshold, the method further includes determining that the limb aesthetic degree of the target object satisfies a first condition. The method according to any one of claims 10 to 14, characterized in that When the limb stretch degree is less than a fourth threshold, the method further includes determining that the limb aesthetic degree of the target object satisfies a second condition, the third threshold being greater than or equal to the fourth threshold. The method further includes determining a limb twist degree of the target object, and determining the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree. The method further includes determining the limb aesthetic degree of the target object according to the limb stretch degree and the limb twist degree. The method according to any one of claims 10 to 15, characterized in that When the limb stretch degree is greater than or equal to a third threshold and the limb twist degree is greater than or equal to a fifth threshold, the method further includes determining that the limb aesthetic degree of the target object satisfies a first condition. When the limb stretch degree is less than a fourth threshold and the limb twist degree is less than a sixth threshold, the method further includes determining that the limb aesthetic degree of the target object satisfies a second condition. The method of claim 16, wherein ​ ​ ​ The third threshold is greater than or equal to the fourth threshold, and the fifth threshold is greater than or equal to the sixth threshold. The method of claim 1, wherein The determination of the limb aesthetic degree of the target object comprises: Determining a limb twist degree of the target object; According to the limb twist degree, the limb aesthetic degree of the target object is determined. The method of claim 18, wherein The determination of the limb twist degree of the target object comprises: Obtaining a second angle corresponding to the target object, the second angle being an angle between a first connecting line and a second connecting line, the first connecting line being a connecting line corresponding to a third symmetrical joint node of the target object, and the second connecting line being a connecting line corresponding to a fourth symmetrical joint node of the target object; According to the second angle, the limb twist degree of the target object is determined. The method of claim 19, wherein The third symmetrical joint node comprises a group of joint nodes corresponding to a shoulder, and the fourth symmetrical joint node comprises a group of joint nodes corresponding to a pelvis. The method according to any one of claims 18 to 20, characterized in that The determination of the limb aesthetic degree of the target object according to the limb twist degree comprises: When the limb twist degree is greater than or equal to a fifth threshold, it is determined that the limb aesthetic degree of the target object satisfies a first condition; When the limb twist degree is less than a sixth threshold, it is determined that the limb aesthetic degree of the target object satisfies a second condition, and the fifth threshold is greater than or equal to the sixth threshold. The method of claim 1, wherein The determination of the facial aesthetic degree of the target object comprises: Determining an expression arousal degree and an expression pleasure degree of the target object, and determining the facial aesthetic degree of the target object according to the expression arousal degree and the expression pleasure degree. The method of claim 22, wherein The determination of the facial aesthetic degree of the target object according to the expression arousal degree and the expression pleasure degree comprises: When the expression arousal degree is greater than or equal to a seventh threshold, or the expression pleasure degree is greater than or equal to an eighth threshold, it is determined that the facial aesthetic degree satisfies a third condition; When the expression arousal degree is less than the seventh threshold, and the expression pleasure degree is less than the eighth threshold, it is determined that the facial aesthetic degree satisfies a fourth condition. The method according to any one of claims 1 to 23, characterized in that The determination of the target cropping manner corresponding to the original image according to the limb aesthetic degree and / or the facial aesthetic degree comprises: When the limb aesthetic degree satisfies the first condition, it is determined that the target cropping manner is a first cropping manner, and the first cropping manner is a limb-priority cropping manner; When the limb aesthetic degree satisfies the second condition, it is determined that the target cropping manner is a second cropping manner, and the second cropping manner is a face-priority cropping manner. The method according to any one of claims 1 to 23, characterized in that The determination of the target cropping manner corresponding to the original image according to the limb aesthetic degree and / or the facial aesthetic degree comprises: When the facial aesthetic degree satisfies the third condition, it is determined that the target cropping manner is the second cropping manner, and the second cropping manner is the face-priority cropping manner; When the facial aesthetic degree satisfies the fourth condition, it is determined that the target cropping manner is the first cropping manner, and the first cropping manner is the limb-priority cropping manner. The method according to any one of claims 1 to 23, characterized in that The determination of the target cropping manner corresponding to the original image according to the limb aesthetic degree and / or the facial aesthetic degree comprises: determine the target cropping manner as a first cropping manner when the limb aesthetic degree meets a first condition and the face aesthetic degree meets a fourth condition, the first cropping manner being a limb-priority cropping manner; determine the target cropping manner as a second cropping manner when the limb aesthetic degree meets the first condition and the face aesthetic degree meets a third condition, or when the limb aesthetic degree meets a second condition, the second cropping manner being a face-priority cropping manner. The method according to any one of claims 1 to 26, characterized in that the cropping of the original image according to the target cropping manner comprises: determining a face orientation of the target object; determining a target position of the target object in the cropped image according to the face orientation of the target object, and cropping the original image according to the target position and the target cropping manner to obtain the cropped image, the target position being a position of the target object in the cropped image. The method of claim 27, wherein the determining of the target position of the target object in the cropped image according to the face orientation of the target object comprises: when the face orientation is a front orientation or a back orientation, determining the target position of the target object in the cropped image as a middle position. The method of claim 27, wherein the determining of the target position of the target object in the cropped image according to the face orientation of the target object comprises: when the face orientation is a side orientation, determining an offset distance of the target object according to a preset aspect ratio, the preset aspect ratio being an aspect ratio corresponding to the cropped image, the offset distance being a distance between the target position of the target object in the cropped image and a middle position of the cropped image; determining the target position of the target object in the cropped image according to the offset distance of the target object. The method of claim 29, wherein the determining of the target position of the target object in the cropped image according to the offset distance of the target object comprises: when the face orientation is a side orientation, determining an offset direction of the target object according to the face orientation; determining the target position of the target object in the cropped image according to the offset distance and the offset direction of the target object. An image cropping method, characterized in that, comprises: obtaining an original image, the original image comprising a target object; determining a limb aesthetic degree of the target object; determining a target cropping manner corresponding to the original image according to the limb aesthetic degree; when the limb aesthetic degree is high, the target cropping manner is a limb-priority cropping manner; when the limb aesthetic degree is low, the target cropping manner is a face-priority cropping manner; cropping the original image according to the target cropping manner to obtain a cropped image, the cropped image comprising all or part of the target object; when the target cropping manner is the limb-priority cropping manner, the cropped image comprises all of the target object; when the target cropping manner is the face-priority cropping manner, the cropped image comprises part of the target object, the part containing a face. The method of claim 31, wherein the determining of the limb aesthetic degree of the target object comprises: determine a limb dynamic degree of the target object, the limb dynamic degree being used to represent a motion state of the target object; determine a limb aesthetic degree of the target object according to the limb dynamic degree; wherein the limb aesthetic degree is high when the limb dynamic degree is greater than or equal to a first threshold value, and the limb aesthetic degree is low when the limb dynamic degree is less than a second threshold value, the first threshold value being greater than or equal to the second threshold value. The method of claim 31, wherein The determining the limb aesthetic degree of the target object comprises: determine a limb stretch degree of the target object, the limb stretch degree being used to represent a stretch degree of a limb of the target object; determine a limb aesthetic degree of the target object according to the limb stretch degree; wherein the limb aesthetic degree is high when the limb stretch degree is greater than or equal to a third threshold value, and the limb aesthetic degree is low when the limb stretch degree is less than a fourth threshold value, the third threshold value being greater than or equal to the fourth threshold value. The method of claim 31, wherein The determining the limb aesthetic degree of the target object comprises: determine a limb twist degree of the target object, the limb twist degree being used to represent a twist degree of a limb of the target object; determine a limb aesthetic degree of the target object according to the limb twist degree; wherein the limb aesthetic degree is high when the limb twist degree is greater than or equal to a fifth threshold value, and the limb aesthetic degree is low when the limb twist degree is less than a sixth threshold value, the fifth threshold value being greater than or equal to the sixth threshold value. The method according to any one of claims 31 to 34, characterized in that The cropping the original image according to the target cropping manner to obtain a cropped image comprises: determine a face orientation of the target object; determine a target position of the target object in the cropped image according to the face orientation of the target object, and crop the original image according to the target position and the target cropping manner to obtain the cropped image, a position of the target object in the cropped image being the target position. The method of claim 35, wherein The determining the target position of the target object in the cropped image according to the face orientation of the target object comprises: when the face orientation is a front orientation or a back orientation, determine the target position of the target object in the cropped image as a middle position. The method of claim 35, wherein The determining the target position of the target object in the cropped image according to the face orientation of the target object comprises: when the face orientation is a side orientation, determine an offset distance of the target object according to a preset aspect ratio, the preset aspect ratio being an aspect ratio corresponding to the cropped image, the offset distance being a distance between the target position of the target object in the cropped image and a middle position of the cropped image; determine the target position of the target object in the cropped image according to the offset distance of the target object. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the computer, and the computer implements the image cropping method according to any one of claims 1 to 37. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the computer, and the computer implements the image cropping method according to any one of claims 1 to 37. A computer program product, characterized by When the computer program product is run on an electronic device, it causes the electronic device to perform the image cropping method as claimed in any one of claims 1 to 37.