Image Processing Method, Apparatus, Electronic Device, and Storage Medium
By detecting object and determining image type of cropping images, accurately defining the cropping center, the problem of poor cropping effect in the prior art is solved, and efficient image cropping is achieved in different application scenarios.
Patent Information
- Application Number
- CN202210364933.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-07
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-04-07
AI Technical Summary
The prior art is difficult to effectively crop images in different application scenarios, and it is impossible to accurately determine the main objects and crop centers in the image, resulting in poor cropping effect.
By performing object detection on the cropped image, determining the image type, and determining the cropping center according to the image type, and cropping the image in combination with the cropping parameters.
It realizes accurate definition and cropping of the main objects in the image, which is suitable for different application scenarios, and improves the cropping effect and applicability.
Smart Images

Figure CN114842024B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image data processing, and in particular, to an image processing method, apparatus, electronic device, and storage medium. Background Art
[0002] With the rapid development of the multimedia era, image cropping is increasingly widely used in many scenarios such as news display and product introduction. The cropped image usually includes the main content in the image to be cropped and meets the cropping requirements of different application scenarios, such as cropping size. Therefore, how to crop an image to achieve the above cropping effect has become an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0003] The present disclosure provides an image processing method, apparatus, electronic device, and storage medium to improve the applicability of image cropping in application scenarios with different cropping requirements and improve the image cropping effect. The technical solution of the present disclosure is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, including:
[0005] Obtain an image to be cropped;
[0006] Respond to a cropping instruction for the image to be cropped, and determine cropping parameters;
[0007] Detect an object in the image to be cropped to obtain a detection result;
[0008] Based on the detection result, determine the image type of the image to be cropped;
[0009] According to the image type, determine the cropping center of the image to be cropped, where the cropping center is the center of the cropped image obtained after cropping the image to be cropped;
[0010] Based on the cropping center, crop the image to be cropped according to the cropping parameters to obtain the cropped image.
[0011] Optionally, the determining the image type of the image to be cropped based on the detection result includes:
[0012] Based on the detection result, determine the number of face objects in the image to be cropped and the area ratio of the face objects in the image to be cropped;
[0013] Based on the number of face objects and the area ratio of the face objects in the image to be cropped, determine the image type of the image to be cropped; the image type includes a close-up image of a person, a close-up image of a non-person, and a non-person image.
[0014] Optionally, determining the image type of the image to be cropped based on the number of the face objects and the area ratio of the face objects in the image to be cropped includes:
[0015] When the number of the face objects is 1 and the area ratio of the face object in the image to be cropped is greater than a preset ratio, determining that the image to be cropped is a close-up image of a person;
[0016] When the number of the face objects is 1 but the area ratio of the face object in the image to be cropped is less than the preset ratio; or when the number of the face objects is greater than 1, determining that the image to be cropped is a non-close-up image of a person.
[0017] Optionally, determining the cropping center of the image to be cropped according to the image type includes:
[0018] When the image to be cropped is a close-up image of a person, determining the center point of the face object and using the center point of the face object as the cropping center of the image to be cropped;
[0019] When the image to be cropped is a non-close-up image of a person, determining at least one key point of the image to be cropped and the frequency of appearance of each of the at least one key point in the image to be cropped, determining a key point center according to the at least one key point and their respective corresponding frequencies, and determining a saliency score of at least one pixel point in the image to be cropped, determining the pixel point with the highest saliency score as the saliency center, and determining the cropping center of the image to be cropped based on the key point center and the saliency center.
[0020] Optionally, determining the key point center according to the at least one key point and their respective corresponding frequencies includes:
[0021] Determining the weight coefficient corresponding to each of the at least one key point according to the frequency corresponding to each of the at least one key point;
[0022] Performing a product calculation on the coordinates and weight coefficients of each of the at least one key point to obtain a plurality of first key point coordinates, and performing a summation calculation on the plurality of first key point coordinates to obtain a second key point coordinate, and using the second key point as the key point center.
[0023] Optionally, determining the cropping center of the image to be cropped based on the key point center and the saliency center includes:
[0024] Calculating the mean value of the coordinates of the key point center and the coordinates of the saliency center, and using the mean value as the coordinates of the cropping center.
[0025] Optionally, the cropping parameter includes at least one of a cropping size, a cropping shape, and a cropping type, and the cropping type includes a full cropping type and a partial cropping type;
[0026] Cropping the to-be-cropped image according to the cropping parameter based on the cropping center to obtain the cropped image includes:
[0027] Cropping the to-be-cropped image based on the cropping center according to at least one of the cropping size, the cropping shape, and the cropping type to obtain the cropped image.
[0028] According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus, including:
[0029] An acquisition module configured to acquire a to-be-cropped image;
[0030] A first determination module configured to determine a cropping parameter in response to a cropping instruction for the to-be-cropped image;
[0031] A detection module configured to detect an object in the to-be-cropped image to obtain a detection result;
[0032] A second determination module configured to determine an image type of the to-be-cropped image based on the detection result;
[0033] A third determination module configured to determine a cropping center of the to-be-cropped image according to the image type, where the cropping center is the center of the cropped image obtained after cropping the to-be-cropped image;
[0034] A cropping module configured to crop the to-be-cropped image according to the cropping parameter based on the cropping center to obtain the cropped image.
[0035] Optionally, the second determination module is specifically configured to determine the number of face objects in the to-be-cropped image and the area ratio of the face objects in the to-be-cropped image based on the detection result; and determine the image type of the to-be-cropped image based on the number of face objects and the area ratio of the face objects in the to-be-cropped image, where the image type includes a close-up image of a person, a close-up image of a non-person, and a non-person image.
[0036] Optionally, the second determination module is specifically configured to determine the number of face objects in the image to be cropped and the area ratio of the face objects in the image to be cropped based on the detection result; when the number of face objects is 1 and the area ratio of the face objects in the image to be cropped is greater than a preset ratio, determine that the image to be cropped is a close-up portrait image; when the number of face objects is 1 but the area ratio of the face objects in the image to be cropped is less than the preset ratio; or when the number of face objects is greater than 1, determine that the image to be cropped is not a close-up portrait image.
[0037] Optionally, the third determination module is specifically configured to, when the image to be cropped is a close-up portrait image, determine the center point of the face object and use the center point of the face object as the cropping center of the image to be cropped; when the image to be cropped is not a close-up portrait image, determine at least one key point of the image to be cropped and the frequency of occurrence of each of the at least one key point in the image to be cropped, determine a key point center according to the at least one key point and the respective corresponding frequencies, and determine the saliency scores of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and determine the cropping center of the image to be cropped based on the key point center and the saliency center.
[0038] Optionally, the third determination module is specifically configured to, when the image to be cropped is a close-up portrait image, determine the center point of the face object and use the center point of the face object as the cropping center of the image to be cropped; when the image to be cropped is not a close-up portrait image, determine at least one key point of the image to be cropped and the frequency of occurrence of each of the at least one key point in the image to be cropped, determine the respective weight coefficients of the at least one key point according to the respective frequencies of the at least one key point; perform a product calculation on the respective coordinates and weight coefficients of the at least one key point to obtain a plurality of first key point coordinates, and perform a summation calculation on the plurality of first key point coordinates to obtain a second key point coordinate, use the second key point as the key point center, and determine the saliency scores of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and determine the cropping center of the image to be cropped based on the key point center and the saliency center.
[0039] Optionally, the third determination module is specifically configured to: when the image to be cropped is a close-up image of a person, determine the center point of the face object, and use the center point of the face object as the cropping center of the image to be cropped; when the image to be cropped is not a close-up image of a person, determine at least one key point of the image to be cropped and the frequency of occurrence of each of the at least one key point in the image to be cropped, determine the weight coefficient corresponding to each of the at least one key point according to the frequency corresponding to each of the at least one key point; perform a product calculation on the coordinates and weight coefficients of each of the at least one key point to obtain a plurality of first key point coordinates, and perform a summation calculation on the plurality of first key point coordinates to obtain a second key point coordinate, use the second key point as the key point center, and determine the saliency score of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and calculate the mean value of the coordinates of the key point center and the coordinates of the saliency center, and use the mean value as the coordinate of the cropping center.
[0040] Optionally, the cropping parameters include at least one of a cropping size, a cropping shape, and a cropping type, and the cropping type includes a full cropping type and a partial cropping type; the cropping module is specifically configured to crop the image to be cropped based on the cropping center according to at least one of the cropping size, the cropping shape, and the cropping type to obtain the cropped image.
[0041] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0042] A processor;
[0043] A memory for storing executable instructions of the processor;
[0044] Wherein, the processor is configured to execute the instructions to implement the image processing method as described in the first aspect.
[0045] According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enabling the electronic device to execute the image processing method as described in the first aspect.
[0046] According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, including computer instructions, where the computer instructions, when executed by a processor, implement the image processing method as described in the first aspect.
[0047] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0048] Obtain the image to be cropped, and in response to a cropping instruction for the image to be cropped, determine the cropping parameters. By detecting the objects in the image to be cropped, obtain the detection result, and based on the detection result, determine the image type of the image to be cropped, so as to determine the cropping center of the image to be cropped according to the image type, realize the determination of the main objects included in the image to be cropped, and based on the cropping center, crop the image to be cropped according to the cropping parameters, and it is possible to crop and obtain an image that includes the main objects in the image to be cropped and matches the cropping parameters, which can be applicable to different application scenarios with different cropping requirements and obtain a better cropping effect.
[0049] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Brief Description of the Drawings
[0050] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure and do not constitute an improper limitation of the present disclosure.
[0051] Figure 1 It is a flowchart of an image processing method shown according to an exemplary embodiment.
[0052] Figure 2-1 It is a schematic diagram of an image to be cropped shown according to an exemplary embodiment.
[0053] Figure 2-2 It is a schematic diagram of a cropped image shown according to an exemplary embodiment.
[0054] Figure 3 It is a flowchart of an image processing method shown according to another exemplary embodiment.
[0055] Figure 4 It is a schematic structural diagram of an image processing device shown according to an exemplary embodiment.
[0056] Figure 5 It is a schematic structural diagram of an electronic device shown according to an exemplary embodiment.
[0057] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0058] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of the present disclosure are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0059] The technical solution of the present disclosure is applicable to the image processing scenario, especially in the image cropping scenario. With the rapid development of the multimedia era, image cropping is increasingly widely used in many scenarios such as news display and product introduction. The cropped image usually includes the main content of the image to be cropped and meets the cropping requirements of different application scenarios, such as the cropping size. Therefore, how to crop the image to achieve the above cropping effect has become an urgent problem for those skilled in the art.
[0060] To solve the above technical problems, after a series of considerations and experiments, the inventors proposed the technical solution of the present disclosure, providing an image processing method, including obtaining an image to be cropped; responding to a cropping instruction for the image to be cropped to determine cropping parameters; detecting an object in the image to be cropped to obtain a cropping result; determining the image type of the image to be cropped based on the detection result; determining the cropping center of the image to be cropped according to the image type, where the cropping center is the center of the cropped image obtained after cropping the image to be cropped; and cropping the image to be cropped according to the cropping parameters based on the cropping center to obtain the cropped image.
[0061] In the present disclosure, an image to be cropped can be obtained, and cropping parameters can be determined in response to a cropping instruction for the image to be cropped. By detecting an object in the image to be cropped to obtain a detection result and determining the image type of the image to be cropped based on the detection result, the main object included in the image to be cropped can be determined, and based on the cropping center, the image to be cropped can be cropped according to the cropping parameters, so that an image including the main object in the image to be cropped and matching the cropping parameters can be obtained, which can be applicable to different application scenarios with different cropping requirements and obtain a better cropping effect.
[0062] Next, the technical solutions in the embodiments of the present disclosure will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present disclosure.
[0063] Figure 1 is a flowchart of an image processing method shown according to an exemplary embodiment. This method can be applied to a client, and the client can be configured in a user device such as a mobile phone, a tablet computer, etc., or can also be applied to a server such as a cloud server, without limitation.
[0064] This method can include the following steps:
[0065] In step S11, obtain the image to be cropped.
[0066] In this embodiment, the image to be cropped can be any type of image, such as a human image, a non-human image, which can include a landscape image, a building image, etc., without limitation. The image to be cropped can also be an image of any size, such as a rectangular image, a square image, a circular image, etc., also without limitation.
[0067] The image to be cropped can include at least one object. After cropping the image to be cropped, an image containing the main object can be obtained. The specific implementation process will be described in subsequent embodiments and will not be elaborated here. The cropped image can be used for display. Taking the pop-up window scenario as an example, in a news pop-up window scenario, in order to highlight the main content in the image, the cropped image containing the main object can be used to generate a news pop-up window message and be displayed.
[0068] Among them, there are various implementation manners for obtaining the image to be cropped. Optionally, when this method is applied to the client, the client can determine the uploaded image as the image to be cropped in response to an upload operation of an image stored in the media file database in the user device. Optionally, when this method is applied to the server, the server can receive the image to be cropped sent by the client.
[0069] In step S12, in response to a cropping instruction for the image to be cropped, determine the cropping parameters.
[0070] After obtaining the above-mentioned image to be cropped, the cropping parameters for the image to be cropped can also be determined. Specifically, in response to a cropping instruction for the image to be cropped, the cropping parameters can be determined. The cropping instruction can be triggered by the user. Corresponding parameter buttons can be set in the interface of the client for the user to trigger the corresponding cropping instruction, or the corresponding cropping instruction issued by the user's voice can be recognized through voice recognition, etc., without specific limitation.
[0071] Among them, the cropping parameters may include the cropping size, for example, specific pixel values such as 200x200, 540x720, etc. The cropping parameters may also include the cropping shape, such as rectangle, square, etc., without specific limitation. The cropping parameters may also include the cropping type. For example, it may include the full cropping type. When the image to be cropped is a portrait image, the full cropping type may be the complete portrait object included in the image, or when the image to be cropped is a landscape image including trees, the full cropping type may be the complete tree object included in the image, etc. It may also include the partial cropping type. When the image to be cropped is a portrait image, the partial cropping type may be the face object included in the image, or when the image to be cropped is a landscape image including trees, the partial cropping type may be the tree crown object included in the image, etc.
[0072] In step S13, the objects in the image to be cropped are detected to obtain the detection result.
[0073] Before performing the cropping process on the above-mentioned image to be cropped, the objects in the image to be cropped can be detected. Specifically, image recognition technologies such as object detection can be used to recognize the objects in the image to be cropped and determine the objects included in the image to be cropped. Among them, object detection refers to using theories and methods in the fields of image processing and pattern recognition to detect the target objects existing in the image, determine the semantic categories of these target objects, and calibrate the positions of the target objects in the image. For the sake of understanding, Figure 2-1 FIG. shows a schematic diagram of an embodiment of the image to be cropped, which includes a portrait object A.
[0074] In step S14, based on the detection result, the image type of the image to be cropped is determined.
[0075] Based on the above detection result, the image type of the image to be cropped can be determined. The image type may include, for example, portrait images, non-portrait images, etc. Among them, portrait images may further include different types such as single-portrait images, multi-portrait images, portrait close-up images, non-portrait close-up images, etc., and non-portrait images may further include different types such as landscape images, building images, etc., without limitation.
[0076] For each of the above image types, in this embodiment, a non-human image may refer to an image that does not contain a human object. A human object may include a face object, that is, an image with the number of face objects being 0. A human object may refer to an image that contains a face object, that is, an image with the number of face objects being greater than 0. Specifically, a single-person image may refer to an image that contains a face object and the number of face objects is 1. A multi-person image may refer to an image that contains a face object and the number of face objects is greater than 1. A human close-up image may refer to an image that contains a face object, the number of face objects is 1, and the area ratio of the face object in the image exceeds a preset ratio. A non-human close-up image may refer to an image that contains a face object, the number of face objects is 1, and the area ratio of the face object in the image does not exceed the preset ratio, or the number of face objects is greater than 1.
[0077] Specifically, it can be determined according to the type, number, etc. of the objects in the image to be cropped obtained by detection. For example, when it is detected that the image to be cropped includes multiple human objects, the image type can be determined as a multi-person image. Or, when it is detected that the image to be cropped includes a building such as a house, the image type can be determined as a building image, a non-human image, etc.
[0078] In practical applications, based on the detection result of the image to be cropped, there may be other implementation manners to determine the image type of the image to be cropped, which will be described in subsequent embodiments and will not be elaborated here.
[0079] In step S15, according to the image type, determine the cropping center of the image to be cropped.
[0080] Among them, the cropping center may refer to the center of the cropped image obtained after cropping the image to be cropped.
[0081] After the image type of the above image to be cropped is determined, the cropping center of the image to be cropped can be determined according to the image type. Taking the image to be cropped as a human image as an example, the main object in the image to be cropped may be a face object, and the cropped image obtained after cropping the image to be cropped may be an image containing the face object, etc. Taking the image to be cropped as a building object as an example, the main object in the image to be cropped may be a house object, and the cropped image obtained after cropping the image to be cropped may be an image containing the house object, etc.
[0082] Specifically, the method for determining the cropping center will be described in subsequent embodiments and will not be elaborated here.
[0083] In step S16, based on the cropping center, crop the image to be cropped according to the cropping parameters to obtain a cropped image.
[0084] Combined with the cropping center and cropping parameters, the image to be cropped can be cropped. For example, when the cropping parameter is a square with side length a, a square area with side length a centered on the cropping center can be determined, and the image to be cropped can be cropped according to this square area to obtain an image that matches the cropping parameter, that is, a square image with side length a. For ease of understanding, Figure 2-2 shows a schematic diagram of an embodiment of a cropped image, which is obtained by cropping the Figure 2-1 shown image to be cropped. The cropped image includes a face object A1 and is a square image with side length a.
[0085] In this embodiment, the image to be cropped can be obtained, and in response to a cropping instruction for the image to be cropped, the cropping parameters can be determined. By detecting the objects in the image to be cropped, a detection result is obtained, and based on this detection result, the image type of the image to be cropped is determined, so as to determine the cropping center of the image to be cropped according to the image type. The determination of the main object included in the image to be cropped is realized, and based on the cropping center, the image to be cropped is cropped according to the cropping parameters, and an image that includes the main object in the image to be cropped and matches the cropping parameters can be obtained by cropping, which can be applicable to different application scenarios with different cropping requirements and obtain a better cropping effect.
[0086] In practical applications, after cropping the above-mentioned image to be cropped, a cropped image can be obtained, and for the cropped image, other subsequent processing operations can also be performed.
[0087] Taking the pop-up window scenario as an example, optionally, pop-up window information can be generated based on the cropped image. Specifically, pop-up window information can be generated based on the cropped image and the corresponding text information. Taking the news pop-up window scenario as an example, news pop-up window information can be generated based on the cropped image and the corresponding news text information. Taking the product introduction pop-up window scenario as an example, product introduction pop-up window information can be generated based on the cropped image and the corresponding product introduction text information.
[0088] Optionally, when the above image cropping method is applied to the client, the client can also display the generated pop-up window information on the interface. When the above image cropping method is applied to the server, the server can also send the pop-up window information to the client to instruct the client to display it.
[0089] In practical applications, there are various implementation manners for determining the image type of the image to be cropped based on the detection result of the image to be cropped, which will be described below.
[0090] As an alternative implementation, after detecting the objects in the image to be cropped, it can be determined whether the image to be cropped contains a face object. If the determination result is yes, it can be determined that the image to be cropped is a portrait image; if the determination result is no, it can be determined that the image to be cropped is a non-portrait image.
[0091] Object detection technology can be used to identify each object in the image to be cropped, determine all the object types included in the image to be cropped, and then determine whether the image to be cropped contains a face object. Face object detection technology can also be used to detect the face objects in the image to be cropped. If a detection result is obtained, it can be determined that the image to be cropped contains a face object; otherwise, it can be determined that the image to be cropped does not contain a face object. Among them, the above face object detection technology can be set according to the actual application scenario. For example, a neural network model can be used for detection, such as the Multi-task convolutional neural network (MTCNN) model, which can support the detection of multi-angle, multi-task, and tiny face objects. The specific detection process will not be elaborated here.
[0092] As another alternative implementation for determining the image type, after detecting the objects in the image to be cropped, the number of face objects in the image to be cropped and the area ratio of the face objects in the image to be cropped can be determined, and based on the number of face objects and the area ratio of the face objects in the image to be cropped, the image type of the image to be cropped can be determined. The image type can include a portrait close-up image, a non-portrait close-up image, and a non-portrait image. By determining the number of face objects and the area ratio of the face objects in the image to be cropped based on the above detection results, the image type of the image to be cropped is determined, which is convenient for subsequently determining the cropping center according to different image types for cropping processing.
[0093] After detecting the objects in the image to be cropped, the number of face objects included in the image to be cropped can be determined, and the area of the face objects and the total area of the image to be cropped can be calculated, and the ratio of the area of the face objects to the total area of the image to be cropped can be determined. In practical applications, the corresponding relationship between the number of face objects, the area ratio of the face objects to the total area of the image to be cropped, and the image type can be preset. For example, when the number of face objects in the image to be cropped is 0 and the area ratio of the face objects to the total area of the image to be cropped is also 0, the corresponding image type is a non-portrait image; another example is when the number of face objects is 3, and the area ratios of the three face objects to the total area of the image to be cropped are 30%, 10%, and 20% respectively, the corresponding image type is a portrait image, specifically a non-portrait close-up image, etc., which can be set according to the actual application scenario.
[0094] This corresponding relationship can be stored, so that after the number of face objects in the image to be cropped and the area ratio of the face objects in the image to be cropped are determined, the image type of the image to be cropped can be determined according to this corresponding relationship.
[0095] Optionally, when the number of face objects in the image to be cropped is greater than 0, it indicates that the image to be cropped contains at least one face object. It is also possible to determine whether the area ratio of the face object with the largest area among the at least one face object in the image to be cropped is greater than a preset ratio. If the judgment result is yes, it indicates that the image to be cropped contains at least one face object, and the face object with the largest area is the main object of the image to be cropped. At this time, the image type of the image to be cropped can be determined as a portrait image. Among them, this preset ratio can be set according to the actual application scenario, such as set to 50%, 70%, etc., without limitation.
[0096] Optionally, when the number of face objects in the image to be cropped is greater than 0, it is also possible to determine whether the number of face objects is greater than 1. If the judgment result is no, it indicates that the image to be cropped contains only one face object. At this time, it is further determined whether the area ratio of this face object in the image to be cropped is greater than a preset ratio. If the judgment result is yes, it indicates that the image to be cropped contains a face object, and the face object is the main object of the image to be cropped. The image type of the image to be cropped is determined as a portrait image, and specifically a close-up portrait image. If the judgment result is no, it indicates that although the image to be cropped contains a face object, the face object is not the main object of the image to be cropped. The image type of the image to be cropped is determined as a non-close-up portrait image. If the number of face objects is greater than 1, it indicates that the image to be cropped contains more than one face object. Considering that the proportions, positions, etc. of multiple face objects in the image to be cropped are inconsistent, the face object may not be used as the main object in the image to be cropped. At this time, the image type of the image to be cropped can be determined as a non-portrait image. By determining the number of face objects and the area ratio of the face objects in the image to be cropped based on the above detection results, combined with the preset corresponding relationship between the number of face objects, the area ratio of the face objects in the image to be cropped, and the image type, the determination of the image type of the image to be cropped is realized, which is convenient for subsequent determination of the cropping center according to different image types for cropping processing.
[0097] Furthermore, after the image type is determined, the cropping center of the image to be cropped can be determined. In practical applications, the image types of the images to be cropped are different, and the main objects in the images are also different. When cropping the image to be cropped to obtain an image containing the main object, the corresponding cropping centers are also different. Therefore, the cropping center can be determined according to the image type of the image to be cropped.
[0098] Specifically, the method for determining the cropping center of the image to be cropped according to the image type may include:
[0099] When the image to be cropped is a close-up portrait image, determine the center point of the face object, and use the center point of the face object as the cropping center of the image to be cropped;
[0100] When the image to be cropped is not a close-up portrait image, determine at least one key point of the image to be cropped and the frequency of each at least one key point in the image to be cropped, determine the key point center according to the at least one key point and their respective frequencies, and determine the saliency score of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and determine the cropping center of the image to be cropped based on the key point center and the saliency center.
[0101] Among them, when it is determined that the image to be cropped is a close-up portrait image, the main object in the image to be cropped is the face object, so the center point of the face object can be determined as the cropping center. The center point of the face object can be obtained according to the detection of the face object. Optionally, the built-in Haar model in OpenCV (a cross-platform computer vision and machine learning software library distributed under the Apache 2.0 license (open source)) can be used for face object detection. This model can detect the face object, obtain the position information of the face object and the center point of the face object, and the specific detection process will not be elaborated.
[0102] When it is determined that the image to be cropped is not a close-up portrait image, the main object in the image to be cropped is not the face object, and there is no need to perform face object detection. At this time, saliency detection can be performed on the image to be cropped. Saliency detection can refer to locating the most "salient" region or pixel point in the image. This "salient" region or pixel point can refer to the region or pixel point in the image that is eye-catching or relatively important. The saliency detection technology can be set according to the actual application scenario, such as visual saliency detection technology, saliency detection using a fully convolutional neural network, etc., without limitation. Optionally, the built-in saliency detection technology (cv2.saliency) in OpenCV can be used to perform saliency detection on the image to be cropped, determine the saliency score of at least one pixel point in the image to be cropped, and determine the pixel point with the highest saliency score as the saliency center. The specific detection process will not be elaborated. After obtaining this saliency center, this saliency center can be used as the cropping center.
[0103] In the above process of determining the cropping center, by adopting different methods to determine the cropping center for different cropping types, the accuracy of the cropping center in the image to be cropped is improved.
[0104] Optionally, when the image to be cropped is a non-close-up image of a person, key point detection can also be performed on the image to be cropped. The key points in the image can refer to the feature points in the image, which can refer to the relatively important points in the image. Taking a human object as an example, the key points can refer to the edge points of the human body limbs, the edge points of the face area, etc. The saliency detection technology can be set according to the actual application scenario. Optionally, the built-in image key point detection technology (cv2.goodFeaturesToTrack) in OpenCV can be used to perform key point detection on the image to be cropped, determine at least one key point in the image to be cropped, and the frequency of each of the at least one key point in the image to be cropped respectively. The key point center can be determined based on the at least one key point and their respective frequencies. The specific detection process will not be elaborated. Based on the determined key point center and saliency center, the cropping center of the image to be cropped can be determined. By performing key point detection on the image to be cropped and combining the key point center and saliency center to determine the cropping center, the saliency detection effect is improved, and the accuracy of the cropping center in the image to be cropped is increased.
[0105] Specifically, when determining the above key point center, the weight coefficient corresponding to each of the at least one key point can be determined according to the frequency corresponding to each of the at least one key point. The frequency corresponding to the key point can refer to the number of times the key point appears in the image. For example, when there are two human objects in the image, the key point in the nose area of the face can appear twice, etc. The coordinates of each of the at least one key point and the weight coefficient are multiplied to obtain multiple first key point coordinates. The multiple first key point coordinates are added to obtain a second key point coordinate, and this second key point can be used as the key point center. Further, when determining the cropping center of the image to be cropped based on the key point center and saliency center, specifically, the mean value of the coordinates of the key point center and the coordinates of the saliency center can be calculated, and the mean value is used as the coordinates of the cropping center, which can be set according to the actual application scenario. By setting the weight coefficient according to the frequency corresponding to each of the at least one key point to calculate the key point center, the accuracy of the key point center coordinates is improved. Combining the key point center and saliency center to determine the cropping center improves the saliency detection effect and further increases the accuracy of the cropping center in the image to be cropped.
[0106] Further, the image to be cropped can be cropped in combination with the cropping center and cropping parameters. There can be multiple implementation methods, which will be described below.
[0107] As an alternative implementation, the cropping parameters may include a cropping size. In this case, based on the cropping center, the image to be cropped can be cropped according to the cropping size. Taking the cropping size as 200x200 pixels as an example, a square area with a side length of 200 pixels can be determined with the cropping center as the center of the square, and the image to be cropped can be cropped according to this square area to obtain an image matching the cropping size, that is, a square image with a side length of 200 pixels.
[0108] As another alternative implementation, the cropping parameters may include a cropping shape. In this case, based on the cropping center, the image to be cropped can be cropped according to the cropping shape. Taking the cropping size as a circle with a radius of R as an example, a circular area with a radius of R can be determined with the cropping center as the center of the circle, and the image to be cropped can be cropped according to this circular area to obtain an image matching the cropping size, that is, a circular image with a radius of R.
[0109] As yet another alternative implementation, the cropping parameters may include a cropping type. In this case, based on the cropping center, the image to be cropped can be cropped according to the cropping type. Taking the image to be cropped as a close-up image of a person and the cropping type as a partial cropping type as an example, an area containing the face object can be determined with the cropping center as the center, and the image to be cropped can be cropped according to this area to obtain an image matching the cropping type, that is, an image containing the face object.
[0110] As yet another alternative implementation, the cropping parameters may include at least one of a cropping size, a cropping shape, and / or a cropping type. Among them, the cropping type may include a full cropping type and a partial cropping type. In this case, the size of the image to be cropped, such as the length and width, can also be determined. When the cropping type is the full cropping type, a rectangular area with the cropping center as the center can be determined, where the first side length of the rectangular area is the minimum size of the image to be cropped, such as the minimum value of the length and width, and the second side length of the rectangular area can be determined based on the cropping size. The image to be cropped is cropped according to the rectangular area to obtain an image matching the cropping type and the cropping size. When the cropping type is the partial cropping type, a square area with the cropping center as the center can be determined, where the side length of the square area can be determined based on the cropping size. The image to be cropped is cropped according to the square area to obtain an image matching the cropping type and the cropping size. By cropping the image to be cropped according to multiple cropping parameters, the applicability of image cropping in different application scenarios with different cropping requirements is improved.
[0111] Figure 3 It is a flowchart of an image processing method shown according to another exemplary embodiment, and this method may include the following steps.
[0112] In step S31, an image to be cropped is acquired.
[0113] In step S32, in response to a cropping instruction for the image to be cropped, cropping parameters are determined.
[0114] In step S33, an object in the image to be detected is detected, and it is determined whether the image to be detected contains a face object. If the determination result is yes, the operation in step S34 is performed; if the determination result is no, the operation in step S37 is performed.
[0115] In step S34, it is determined whether the number of face objects included in the image to be cropped is greater than 1. If the determination result is no, the operation in step S35 is performed; if the determination result is yes, the operation in step S37 is performed.
[0116] In step S35, it is determined whether the area ratio of the face object in the image to be cropped is greater than a preset ratio. If the determination result is yes, the operation in step S36 is performed; if the determination result is no, the operation in step S37 is performed.
[0117] In step S36, it is determined that the image to be cropped is a close-up image of a person, and the center point of the face object is determined, and the center point of the face object is used as the cropping center of the image to be cropped.
[0118] In step S37, it is determined that the image to be cropped is not a close-up image of a person, and the key point center and the saliency center of the image to be cropped are determined, and the cropping center of the image to be cropped is determined based on the key point center and the saliency center.
[0119] In step S38, based on the cropping center, the image to be cropped is cropped according to the cropping parameters.
[0120] In this embodiment, the specific implementation processes of steps S31 to S38 have been described in the above embodiment, and will not be elaborated here.
[0121] Figure 4 It is a schematic structural diagram of an image processing apparatus shown according to an exemplary embodiment, and the apparatus may include the following several modules.
[0122] An obtaining module 401, configured to obtain an image to be cropped;
[0123] A first determination module 402, configured to determine cropping parameters in response to a cropping instruction for the image to be cropped;
[0124] A detection module 403, configured to detect an object in the image to be cropped and obtain a detection result;
[0125] A second determination module 404, configured to detect an object in the image to be cropped and determine the image type of the image to be cropped based on the detection result;
[0126] A third determination module 405, configured to determine a cropping center of the image to be cropped according to the image type, where the cropping center is the center of the cropped image obtained after cropping the image to be cropped;
[0127] A cropping module 406, configured to crop the image to be cropped according to the cropping parameters based on the cropping center to obtain a cropped image.
[0128] In this embodiment, the image processing device can implement Figure 1 the image processing method in the illustrated embodiment, can obtain an image to be cropped, and in response to a cropping instruction for the image to be cropped, determine cropping parameters. By detecting an object in the image to be cropped, obtaining a detection result, and determining the image type of the image to be cropped based on the detection result, the main object included in the image to be cropped is determined according to the image type, and based on the cropping center, the image to be cropped is cropped according to the cropping parameters, and an image including the main object in the image to be cropped and matching the cropping parameters can be obtained by cropping, which can be applicable to different application scenarios with different cropping requirements and obtain a good cropping effect.
[0129] In some embodiments, the second determination module 404 may be specifically configured to detect an object in the image to be detected, and determine whether a face object is included in the image to be detected; if the determination result is yes, determine that the image to be cropped is a person image; if the determination result is no, determine that the image to be cropped is a non-person image.
[0130] In some embodiments, the second determination module 404 may be specifically configured to detect an object in the image to be cropped, and determine the number of face objects in the image to be cropped and the area ratio of the face objects in the image to be cropped; based on the number of face objects and the area ratio of the face objects in the image to be cropped, determine the image type of the image to be cropped, where the image type includes a person close-up image, a non-person close-up image, and a non-person image.
[0131] In some embodiments, the second determination module 404 may be specifically configured to detect an object in the image to be cropped, and determine the number of face objects in the image to be cropped and the area ratio of the face objects in the image to be cropped; when the number of face objects is 1 and the area ratio of the face objects in the image to be cropped is greater than a preset ratio, determine that the image to be cropped is a person close-up image; when the number of face objects is 1, but the area ratio of the face objects in the image to be cropped is less than the preset ratio; or when the number of face objects is greater than 1, determine that the image to be cropped is a non-person close-up image.
[0132] In some embodiments, the third determination module 405 may be specifically configured to, when the image to be cropped is a close-up image of a person, determine the center point of the face object and use the center point of the face object as the cropping center of the image to be cropped; when the image to be cropped is not a close-up image of a person, determine at least one key point of the image to be cropped and the frequency of each of the at least one key point in the image to be cropped, determine the key point center according to the at least one key point and their respective frequencies, and determine the saliency scores of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and determine the cropping center of the image to be cropped based on the key point center and the saliency center.
[0133] In some embodiments, the third determination module 405 may be specifically configured to, when the image to be cropped is a close-up image of a person, determine the center point of the face object and use the center point of the face object as the cropping center of the image to be cropped; when the image to be cropped is not a close-up image of a person, determine at least one key point of the image to be cropped and the frequency of each of the at least one key point in the image to be cropped, determine the weight coefficient corresponding to each of the at least one key point according to the frequency corresponding to each of the at least one key point; perform a product calculation on the coordinates and weight coefficients of each of the at least one key point to obtain a plurality of first key point coordinates, and perform a summation calculation on the plurality of first key point coordinates to obtain a second key point coordinate, use the second key point as the key point center, and determine the saliency scores of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and calculate the mean value of the coordinates of the key point center and the coordinates of the saliency center, and use the mean value as the coordinates of the cropping center.
[0134] In some embodiments, the cropping parameter may include a cropping size; the cropping module 406 may be specifically configured to crop the image to be cropped based on the cropping center according to the cropping size to obtain a cropped image.
[0135] In some embodiments, the cropping parameter may include a cropping shape; the cropping module 406 may be specifically configured to crop the image to be cropped based on the cropping shape according to the cropping shape to obtain a cropped image.
[0136] In some embodiments, the cropping parameter may include a cropping type; the cropping module 406 may be specifically configured to crop the image to be cropped based on the cropping center according to the cropping type to obtain a cropped image.
[0137] In some embodiments, the cropping type may include a full cropping type and a partial cropping type; the apparatus may further include:
[0138] A fourth determination module, configured to determine the length and width of the image to be cropped;
[0139] The cropping module 406 can be specifically configured to, if the cropping type is the full cropping type, determine a rectangular area centered on the cropping center, where the first side length of the rectangular area is the minimum of the length and width in the image to be cropped, the second side length of the rectangular area is determined based on the cropping size, and crop the image to be cropped according to the rectangular area; if the cropping type is the partial cropping type, determine a square area centered on the cropping center, where the side length of the square area is determined based on the cropping size, and crop the image to be cropped according to the square area to obtain a cropped image.
[0140] In some embodiments, the cropping parameters may include at least one of a cropping size, a cropping shape, and a cropping type. The cropping type may include a full cropping type and a partial cropping type. The cropping module 406 can be specifically configured to crop the image to be cropped based on the cropping center according to at least one of the cropping size, the cropping shape, and / or the cropping type to obtain a cropped image.
[0141] In some embodiments, the apparatus may further include:
[0142] A generation module, configured to generate pop-up information based on the image after cropping;
[0143] A sending module, configured to send the pop-up information to a client, and the pop-up information is used to instruct the client to display.
[0144] Regarding the apparatus in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0145] Figure 5 It is a block diagram of an electronic device shown according to an exemplary embodiment, and may include a processor 501 and a memory 502 for storing instructions executable by the processor.
[0146] Wherein, the processor 501 is configured to execute instructions to implement Figure 1 or Figure 3 The image processing method of any one of the embodiments.
[0147] The processor 501 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processor may also be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for executing the above method.
[0148] The memory 502 is configured to store various types of data to support the operation of the terminal. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disc.
[0149] Of course, the electronic device may also necessarily include other components, such as an input / output interface, a communication component, etc.
[0150] The input / output interface provides an interface between the processing component and the peripheral interface module, and the above-mentioned peripheral interface module can be an output device, an input device, etc.
[0151] The communication component is configured to facilitate wired or wireless communication between the electronic device and other devices, etc.
[0152] Among them, the electronic device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. At this time, the computing device can refer to a cloud server, and the above-mentioned processing component, storage component, etc. can be basic server resources leased or purchased from the cloud computing platform.
[0153] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions. The above instructions can be executed by a processor of the electronic device to complete the above image processing method. Optionally, the computer-readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0154] In an exemplary embodiment, a computer program product is also provided, including a computer program, which when executed by a processor implements Figure 1 or Figure 3 the image processing method of any of the embodiments shown.
[0155] Those skilled in the art will readily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0156] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. An image processing method, characterized in that, it includes: Obtain the image to be cropped; Respond to a cropping instruction for the image to be cropped, and determine cropping parameters; Detect the objects in the image to be cropped to obtain a detection result; Based on the detection result, determine the image type of the image to be cropped; According to the image type, determine the cropping center of the image to be cropped, where the cropping center is the center of the cropped image obtained after cropping the image to be cropped; Based on the cropping center, crop the image to be cropped according to the cropping parameters to obtain the cropped image; The step of determining the cropping center of the image to be cropped according to the image type includes: When the image to be cropped is a non-human close-up image, determine at least one key point of the image to be cropped and the frequency of occurrence of each of the at least one key point in the image to be cropped, determine the key point center according to the at least one key point and their respective frequencies, and determine the saliency scores of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and determine the cropping center of the image to be cropped based on the key point center and the saliency center; the non-human close-up image is an image in which the number of face objects is 1, but the area ratio of the face object in the image to be cropped is less than a preset ratio, or the number of face objects is greater than 1.
2. The method according to claim 1, characterized in that, The step of determining the image type of the image to be cropped based on the detection result includes: Based on the detection result, determine the number of face objects in the image to be cropped and the area ratio of the face object in the image to be cropped; Based on the number of face objects and the area ratio of the face object in the image to be cropped, determine the image type of the image to be cropped; the image types include human close-up images, non-human close-up images, and non-human images.
3. The method according to claim 2, characterized in that, The step of determining the image type of the image to be cropped based on the number of face objects and the area ratio of the face object in the image to be cropped includes: When the number of face objects is 1 and the area ratio of the face object in the image to be cropped is greater than a preset ratio, determine that the image to be cropped is a human close-up image.
4. The method according to claim 3, characterized in that, The step of determining the cropping center of the image to be cropped according to the image type includes: When the image to be cropped is a human close-up image, determine the center point of the face object, and use the center point of the face object as the cropping center of the image to be cropped.
5. The method according to claim 1, characterized in that, The step of determining the key point center according to the at least one key point and their respective frequencies includes: According to the frequencies corresponding to the at least one key point, determine the weight coefficients corresponding to the at least one key point; Calculate the product of the coordinates and weight coefficients of each of the at least one key point to obtain a plurality of first key point coordinates, and perform a summation calculation on the plurality of first key point coordinates to obtain a second key point coordinate, and use the second key point as the key point center.
6. The method according to claim 1, wherein, determining the cropping center of the image to be cropped based on the key point center and the saliency center includes: calculating the mean of the coordinates of the key point center and the coordinates of the saliency center, and using the mean as the coordinates of the cropping center.
7. The method according to claim 1, wherein, the cropping parameters include at least one of a cropping size, a cropping shape, and a cropping type, and the cropping type includes a full cropping type and a partial cropping type; cropping the image to be cropped according to the cropping parameters based on the cropping center to obtain the cropped image includes: cropping the image to be cropped based on the cropping center according to at least one of the cropping size, the cropping shape, and the cropping type to obtain the cropped image.
8. An image processing apparatus, wherein, comprising: an acquisition module configured to acquire an image to be cropped; a first determination module configured to determine cropping parameters in response to a cropping instruction for the image to be cropped; a detection module configured to detect an object in the image to be cropped to obtain a detection result; a second determination module configured to determine the image type of the image to be cropped based on the detection result; a third determination module configured to determine the cropping center of the image to be cropped according to the image type, where the cropping center is the center of the cropped image obtained after cropping the image to be cropped; a cropping module configured to crop the image to be cropped according to the cropping parameters based on the cropping center to obtain the cropped image; the third determination module is specifically configured to, when the image to be cropped is a non-human close-up image, determine at least one key point of the image to be cropped and the frequency of occurrence of each of the at least one key point in the image to be cropped, determine the key point center according to the at least one key point and the respective corresponding frequencies, and determine the saliency score of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and determine the cropping center of the image to be cropped based on the key point center and the saliency center; wherein, the non-human close-up image is an image in which the number of face objects is 1, but the area ratio of the face object in the image to be cropped is less than a preset ratio, or the number of face objects is greater than 1.
9. The apparatus according to claim 8, wherein, the second determination module is specifically configured to determine the number of face objects in the image to be cropped and the area ratio of the face object in the image to be cropped based on the detection result. Determine the image type of the image to be cropped based on the number of face objects and the area ratio of the face objects in the image to be cropped, where the image type includes a close-up portrait image, a non-portrait close-up image, and a non-portrait image.
10. The apparatus according to claim 9, wherein, the second determination module is specifically configured to determine the number of face objects in the image to be cropped and the area ratio of the face objects in the image to be cropped based on the detection result; when the number of face objects is 1 and the area ratio of the face objects in the image to be cropped is greater than a preset ratio, determine that the image to be cropped is a close-up portrait image.
11. The apparatus according to claim 10, wherein, the third determination module is specifically configured to, when the image to be cropped is a close-up portrait image, determine the center point of the face object, and use the center point of the face object as the cropping center of the image to be cropped.
12. The apparatus according to claim 11, wherein, the third determination module is specifically configured to, when the image to be cropped is a close-up portrait image, determine the center point of the face object, and use the center point of the face object as the cropping center of the image to be cropped; when the image to be cropped is a non-portrait close-up image, determine at least one key point of the image to be cropped and the frequency of occurrence of each of the at least one key point in the image to be cropped, determine the weight coefficient corresponding to each of the at least one key point according to the frequency corresponding to each of the at least one key point; perform a product calculation on the coordinates and weight coefficients of each of the at least one key point to obtain a plurality of first key point coordinates, and perform a summation calculation on the plurality of first key point coordinates to obtain a second key point coordinate, use the second key point as the key point center, and determine the saliency score of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and determine the cropping center of the image to be cropped based on the key point center and the saliency center.
13. The apparatus according to claim 12, wherein, The third determination module is specifically configured to: when the image to be cropped is a close-up image of a person, determine the center point of the face object, and use the center point of the face object as the cropping center of the image to be cropped; when the image to be cropped is not a close-up image of a person, determine at least one key point of the image to be cropped and the frequency of occurrence of each of the at least one key point in the image to be cropped, determine the weight coefficient corresponding to each of the at least one key point according to the frequency corresponding to each of the at least one key point; perform a product calculation on the coordinates and weight coefficients of each of the at least one key point to obtain a plurality of first key point coordinates, and perform a summation calculation on the plurality of first key point coordinates to obtain a second key point coordinate, use the second key point as the key point center, and determine the saliency score of at least one pixel point in the image to be cropped, determine the pixel point with the highest saliency score as the saliency center, and calculate the mean value of the coordinates of the key point center and the coordinates of the saliency center, and use the mean value as the coordinate of the cropping center.
14. The apparatus according to claim 8, wherein, the cropping parameter includes at least one of a cropping size, a cropping shape, and a cropping type, and the cropping type includes a complete cropping type and a partial cropping type; the cropping module is specifically configured to crop the image to be cropped based on the cropping center according to at least one of the cropping size, the cropping shape, and the cropping type to obtain the cropped image.
15. An electronic device, wherein, it includes: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to execute the instructions to implement the image processing method according to any one of claims 1 to 7.
16. A computer-readable storage medium, wherein, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image processing method according to any one of claims 1 to 7.
17. A computer program product, including computer instructions, wherein, when the computer instructions are executed by a processor, the image processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Display control device, and method for forming display image
CN102771120A
Image processing method and device
CN108776970A
Intelligent picture cutting method and system, computer equipment and storage medium
CN111524145A