Image processing method and device, electronic equipment and storage medium
By automatically identifying the portrait area and performing cropping and enlarging, the problem of cumbersome and inefficient steps in the prior art for producing images with the effect of portraits jumping out of the frame is solved, and images with rich visual effects are efficiently generated.
Patent Information
- Application Number
- CN202410642778.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-05-22
AI Technical Summary
In the prior art, when producing an image with the effect of a portrait jumping out of the frame, the steps are tedious, complicated, inefficient, and time-consuming.
Through image processing methods, the portrait area is automatically identified, the target background image is cropped, and the portrait is cut out and enlarged to generate an image with a character-breaking effect.
The efficiency of generating character breaking images has been improved, ensuring that the images have rich visual effects and an efficient production process.
Smart Images

Figure CN118470213B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, in particular to the field of artificial intelligence such as computer vision, and specifically to an image processing method and device, an electronic device, and a storage medium. BACKGROUND
[0002] With the development of computer technology, some application programs can compile various types of photo stories according to user photos. A photo story is generally a collection of a group of related pictures. In order to improve the interest and freshness of the story, the photo story can be made or processed before being issued. SUMMARY
[0003] The present application provides an image processing method and device, an electronic device, and a storage medium.
[0004] According to an aspect of the present application, an image processing method is provided, comprising:
[0005] obtaining a to-be-processed image;
[0006] determining a portrait region in the to-be-processed image, and cutting out a target background image from the to-be-processed image according to the portrait region;
[0007] performing portrait cutout on the to-be-processed image to obtain a portrait, and enlarging the portrait to obtain an enlarged portrait; wherein the height of the enlarged portrait is greater than the height of the target background image;
[0008] generating a target image according to the target background image and the enlarged portrait.
[0009] According to another aspect of the present application, an image processing device is provided, comprising:
[0010] an obtaining module configured to obtain a to-be-processed image;
[0011] a cutting module configured to determine a portrait region in the to-be-processed image, and cut out a target background image from the to-be-processed image according to the portrait region;
[0012] a cutout and enlargement module configured to perform portrait cutout on the to-be-processed image to obtain a portrait, and enlarge the portrait to obtain an enlarged portrait; wherein the height of the enlarged portrait is greater than the height of the target background image;
[0013] a generating module configured to generate a target image according to the target background image and the enlarged portrait.
[0014] According to another aspect of the present application, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory in communication with the at least one processor; wherein
[0017] the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described in the above embodiments.
[0018] According to another aspect of the present application, there is provided a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in the above embodiments.
[0019] According to another aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method described in the above embodiments.
[0020] It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0021] The accompanying drawings are used to better understand the present application, and do not limit the present application. Among them:
[0022] Figure 1 a flowchart of an image processing method provided by an embodiment of the present application;
[0023] Figure 2 a schematic diagram of a to-be-processed image provided by an embodiment of the present application Figure 1 ;
[0024] Figure 3 a schematic diagram of a target image generated based on Figure 2 an embodiment of the present application;
[0025] Figure 4 a flowchart of an image processing method provided by another embodiment of the present application;
[0026] Figure 5 a cutting schematic diagram of a to-be-processed image provided by an embodiment of the present application Figure 1 ;
[0027] Figure 6 a cutting schematic diagram of a to-be-processed image provided by an embodiment of the present application Figure 2 ;
[0028] Figure 7 a schematic diagram of a to-be-processed image provided by an embodiment of the present application Figure 2 ;
[0029] Figure 8 The image processing method provided in the embodiment of the present application is based on Figure 7 the generated target image schematic diagram;
[0030] Figure 9 The image processing method provided in the embodiment of the present application is based on Figure 3 the generated target image schematic diagram;
[0031] Figure 10 The image processing method provided in the embodiment of the present application is based on Figure 9 the generated target image schematic diagram;
[0032] Figure 11 The structure schematic diagram of the image processing device provided in the embodiment of the present application is shown in the figure.
[0033] Figure 12 The block diagram of the electronic device for implementing the image processing method of the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0034] The exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to help understanding, and should be considered as merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Also, in order to be clear and concise, the description below omits the description of well-known functions and structures.
[0035] The image processing method, device, electronic device and storage medium of the embodiments of the present application are described below with reference to the accompanying drawings.
[0036] In order to enrich the style of the image, in some embodiments, the image can be processed to obtain an image with a portrait jumping out of a photo frame effect, which can be referred to as a portrait breaking type image or a portrait highlighting image, etc.
[0037] In some embodiments, a portrait breaking type image can be manually made by using an application program with image processing function. However, this way is tedious, complex and inefficient, and takes a long time.
[0038] Figure 1 The flowchart of the image processing method provided in the embodiment of the present application is shown in the figure.
[0039] The image processing method of the embodiments of the present application can be executed by the image processing device of the embodiments of the present application, which can be configured in an electronic device.
[0040] The electronic device can be any device with computing capability, such as a personal computer, a mobile terminal, a server, and the like. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and the like, which are hardware devices with various operating systems, touch screens, and / or display screens.
[0041] As shown in Figure 1 The image processing method includes the following steps.
[0042] In step 101, an image to be processed is obtained.
[0043] In this application, the image to be processed can be an image including a portrait. For example, the image to be processed can be an image obtained by shooting, or an image selected from a plurality of images provided by a user, or an image extracted from a video, and the like, or an image obtained by other means, which is not limited.
[0044] For example, a candidate image can be obtained, and it is determined whether the candidate image meets a preset condition. If the candidate image meets the preset condition, the candidate image is determined as the image to be processed. The candidate image can be one or more, which is not limited. If there are multiple candidate images, it can be determined whether each candidate image meets the preset condition.
[0045] For example, the preset condition can include, but is not limited to, the number of included portraits being a preset number, the included portrait being a partial region image of a human body, the shooting mode label being a preset label, and the image being an original image, and the like.
[0046] For example, the preset number can be one, such as the image to be processed including one portrait. For example, face recognition can be performed on the image to be processed, and the number of portraits in the image to be processed is determined according to the face recognition result.
[0047] For example, the included portrait is a partial region image of a human body, that is, the included portrait is not a full-body shot. For example, a portrait segmentation operator can be used to process the image to be processed, and it is determined whether the portrait is edge-adhered according to the segmentation result. If the portrait is not edge-adhered, it can be considered that the portrait is a full-body shot.
[0048] For example, the shooting mode label can be used to represent the shooting mode of the image, such as self-shooting, shooting by others, tripod shooting, and the like. The preset label can be shooting by others, tripod shooting, and the like, such as the image to be processed not being a self-shooting image.
[0049] For example, the image to be processed is an original image, rather than a spliced image.
[0050] For example, the image to be processed can meet the preset conditions of having only one portrait, the portrait not being a full-body shot, the image not being a self-shooting image, and the image not being a spliced image.
[0051] Therefore, the candidate image can be screened based on the preset condition to obtain an image suitable for being a figure breaking type image, so that the figure breaking effect of the final target image can be improved.
[0052] In order to ensure that the figure can be broken smoothly, the candidate image can be background erased to obtain a background erased figure, and the candidate image can be figure cutout to obtain a cutout figure.
[0053] The background erased figure can be understood as a figure obtained by background erasing the candidate image. For example, the candidate image can be processed by a background erasing operator to obtain the background erased figure.
[0054] The cutout figure can be understood as a figure obtained by figure cutout of the candidate image. For example, the candidate image can be processed by a figure cutout operator to obtain the cutout figure.
[0055] Since the figure obtained by background erasing the candidate image can contain a background with a depth close to that of the figure, such as a bag carried by the figure in the candidate image, the bag can be contained in the figure obtained by background erasing, while the figure obtained by figure cutout can only contain the figure without the bag. In order to determine whether the figure background of the candidate image is clear, the background erased figure and the cutout figure can be compared to determine the proportion of different pixel points in the cutout figure in the background erased figure and the cutout figure. If the proportion is less than a third threshold, it means that the figure background of the candidate image is clear.
[0056] For example, the third threshold can be 0.25.
[0057] It should be noted that the third threshold can be determined according to actual needs, and no limitation is made thereto.
[0058] Therefore, by background erasing and figure cutout of the candidate image, and according to the comparison result between the processing results, the candidate image can be screened, so that the image to be processed can be ensured to be an image with clear figure background, and the figure breaking effect of the final target image can be improved.
[0059] Step 102, determining a figure region in the image to be processed, and cutting a target background image from the image to be processed according to the figure region.
[0060] In this application, the image to be processed can be detected to determine the position of the figure in the image to be processed, and the region occupied by the figure in the image to be processed can be determined according to the position of the figure, that is, the figure region can be determined.
[0061] In the present application, the target background image cut from the portrait region in the image to be processed can include part of the portrait region or the entire portrait region, which is not limited.
[0062] For example, the target background image can be a square, and the side length of the square can be equal to the width or height of the image to be processed. For example, the width of the image to be processed is less than the height, and the side length of the square can be equal to the width of the image to be processed; the height of the image to be processed is less than the width, and the side length of the square can be equal to the height of the image to be processed.
[0063] For example, the target background image can be a rectangle, and the short side of the rectangle can be equal to the width or height of the image to be processed. For example, the width of the image to be processed is less than the height, and the side length of the short side of the rectangle can be equal to the width of the image to be processed, and the side length of the long side of the rectangle can be less than the height of the image to be processed; the height of the image to be processed is less than the width, and the side length of the short side of the rectangle can be equal to the height of the image to be processed, and the side length of the long side of the rectangle can be less than the width of the image to be processed.
[0064] Step 103, performing portrait matting on the image to be processed to obtain a portrait, and enlarging the portrait to obtain an enlarged portrait.
[0065] For example, a background erasing operator can be used to perform portrait matting on the image to be processed to obtain a portrait. For example, a portrait segmentation operator can be used to perform portrait matting on the image to be processed to obtain a portrait. For example, a pre-trained portrait segmentation model can be used to perform portrait matting on the image to be processed to obtain a portrait segmented by the portrait segmentation model.
[0066] In the present application, the height of the enlarged portrait can be greater than the height of the target background image to achieve a portrait overflow effect, for example, the height of the target background image is 0.9 times the height of the enlarged portrait. Further, the width of the enlarged portrait is less than the width of the target background image to avoid portrait width overflow and cause portrait cutting.
[0067] It should be noted that in the present application, the height of the target background image can be a preset multiple of the enlarged portrait, and the preset multiple can be set according to actual needs, which is not limited.
[0068] Step 104, generating a target image according to the target background image and the enlarged portrait.
[0069] In the present application, a preset number of transparent lines can be added horizontally and vertically in the target background picture to obtain a processed background picture, and the processed background picture is pasted in a background picture with a preset aspect ratio, and then the enlarged portrait is pasted along the bottom edge of the portrait in the processed background picture to obtain a target image. Thus, after adding a preset number of transparent lines horizontally and vertically in the target background picture, and then pasting the enlarged portrait, the target image with the character breaking effect can be further enriched while ensuring that the target image has the character breaking effect.
[0070] For example, the preset number can be 2, that is, two horizontal transparent lines with equal intervals and two vertical transparent lines with equal intervals can be added in the target background picture, so that the processed background picture has a nine-square effect, and the final target image has a portrait jumping out of the nine-square frame effect. Such a target image can be called a nine-square character breaking picture.
[0071] For example, Figure 2 For the to-be-processed image, the image processing method is used to process Figure 2 , and a Figure 3 .
[0072] It should be noted that the preset number 2 is only an example and should not be regarded as a limitation of the present application.
[0073] For example, the preset aspect ratio can be four by three or three by two, or other values, which are not limited.
[0074] For example, the color of the background picture with the preset aspect ratio can be white or black, or other colors, which are not limited.
[0075] Optionally, the target background picture can be pasted in a background picture with a preset aspect ratio, and then the enlarged portrait is pasted along the bottom edge of the portrait in the target background picture to obtain a target image.
[0076] In the embodiment of the present application, the portrait region in the to-be-processed image is determined, the target background picture is cut out from the to-be-processed image according to the portrait region, the to-be-processed image is subjected to portrait cutout to obtain and enlarge the portrait, and since the height of the enlarged portrait is greater than the height of the target background picture, the target image with the character breaking effect can be generated according to the target background picture and the enlarged portrait. Thus, the target background picture can be automatically cut out according to the portrait region in the to-be-processed image, and the character breaking effect can be realized by enlarging the portrait, thereby improving the generation efficiency of the character breaking picture.
[0077] Figure 4 The flowchart of the image processing method provided by another embodiment of the present application is shown.
[0078] For example, Figure 4As shown, the image processing method comprises the following steps:
[0079] In step 401, an image to be processed is acquired.
[0080] In the present application, step 401 can adopt any of the implementation manners of the embodiments of the present application, and thus will not be repeated here.
[0081] In step 402, a portrait region in the image to be processed is determined.
[0082] In the present application, step 402 can adopt any of the implementation manners of the embodiments of the present application, and thus will not be repeated here.
[0083] In step 403, the size of the image to be processed is acquired.
[0084] In the present application, the attribute information of the image to be processed can be acquired, and the size of the image to be processed is acquired from the attribute information. The size includes width and height.
[0085] In step 404, according to the size relationship between the width and the height in the size of the image to be processed, a cutting strategy of the image to be processed is determined.
[0086] In the present application, the size relationship between the width and the height is different, and the corresponding cutting strategy is also different. That is to say, the width smaller than the height has a corresponding cutting strategy, and the width larger than the height also has a corresponding cutting strategy.
[0087] For example, if the width of the image to be processed is smaller than the height, that is, the image to be processed is a portrait image, the cutting strategy can include cutting the image to be processed from bottom to top or from top to bottom. For example, if the height of the image to be processed is smaller than the width, that is, the image to be processed is a landscape image, the cutting strategy can include cutting the image to be processed from left to right or from right to left.
[0088] In step 405, according to the portrait region, the image to be processed is cut by using the cutting strategy, and a target background image is acquired.
[0089] In the present application, if the width of the image to be processed is smaller than the height, that is, the image to be processed is a portrait image, a first cutting region can be determined in the image to be processed in the order from bottom to top, if the first cutting region contains all the regions of the portrait region, that is, contains the complete portrait region, the first cutting region is cut to obtain the target background image.
[0090] If the first to-be-cut region does not contain the entire portrait region, that is, does not contain the complete portrait region, a second to-be-cut region can be determined in the to-be-processed image in a top-to-bottom order. If the proportion of the portrait region contained in the second to-be-cut region to the entire portrait region is greater than the first threshold, the second to-be-cut region is cut to obtain the target background image.
[0091] For example, the width of the first to-be-cut region is the same as the width of the to-be-processed image, the width of the second to-be-cut region is the same as the width of the to-be-processed image, and the width of the target background image is also the same as the width of the to-be-processed image.
[0092] For example, if the width of the to-be-processed image is less than the height, the to-be-processed image can be cut by using a rectangle, and the region of the to-be-processed image occupied by the rectangle is used as the first to-be-cut region or the second to-be-cut region. For example, the rectangle can be a square, and the side length of the square is the same as the width of the to-be-processed image. For example, the rectangle can also be a rectangle with different side lengths of two adjacent sides, for example, the side length of the short side of the preset rectangle is the same as the width of the to-be-processed image, and the side length of the long side of the preset rectangle is less than the height of the to-be-processed image.
[0093] For example, if the second to-be-cut region contains more than 60% of the entire portrait region, the second to-be-cut region can be cut to obtain the target background image.
[0094] It should be noted that the first threshold can be determined according to actual needs, and is not limited.
[0095] Therefore, for the to-be-processed image with a width less than a height, the first to-be-cut region can be determined in a bottom-to-top order, and whether the first to-be-cut region is cut is determined according to whether the first to-be-cut region contains the complete portrait region. If the first to-be-cut region does not contain the complete portrait region, the second to-be-cut region can be determined in a top-to-bottom order, and whether the second to-be-cut region is cut is determined according to whether the proportion of the portrait region contained in the second to-be-cut region to the entire portrait region is greater than the first threshold, so that the portrait region contained in the target background image obtained by cutting meets the requirements, and the finally obtained image has a figure-breaking effect.
[0096] Optionally, it can be judged whether the portrait region reaches the bottom of the to-be-processed image, and the cutting mode of the to-be-processed image is determined according to the judgment result. If the portrait region does not reach the bottom of the to-be-processed image, the to-be-processed image can be cut in the order from top to bottom, and if the proportion of the portrait region in the to-be-cut region to the whole portrait region is greater than the first threshold, the to-be-cut region can be cut. If the portrait region reaches the bottom of the to-be-processed image, the cutting can be performed in the order from bottom to top first, and if the first to-be-cut region does not contain all the regions of the portrait region, the cutting can be performed in the order from top to bottom. In this way, while ensuring that the target background image meets the requirements, the cutting time can be saved and the efficiency can be improved.
[0097] For the convenience of understanding, for a portrait image, the following will be described in combination with Figure 5 Taking cutting a target background image in a square as an example. Figure 5 In the figure, the rectangle A1B1C1D1 is a to-be-processed image region, and a1b1c1d1 is a portrait region. It can be seen that the portrait region does not reach the bottom of the to-be-processed image, so the to-be-processed image can be cut in the order from top to bottom. Since the proportion of the portrait region in the square A1E1F1D1 to the whole portrait region is greater than the first threshold, the square A1E1F1D1 can be cut to obtain a target background image.
[0098] Optionally, if the proportion of the portrait region contained in the second to-be-cut region to the whole portrait region is less than the first threshold, it can be considered that the target image generation fails, and a prompt information that the target image generation fails can be returned. Exemplarily, the prompt information includes the reason for the generation failure.
[0099] It should be noted that if the proportion of the portrait region contained in the second to-be-cut region to the whole portrait region is equal to the first threshold, the second to-be-cut region can be cut to obtain a target background image, or a prompt information that the target image generation fails can be returned. The specific determination can be made according to actual needs, and no limitation is made thereto.
[0100] If the height of the to-be-processed image is less than the width, that is, the to-be-processed image is a landscape image, a preset rectangle can be slid horizontally in the to-be-processed image, and the region occupied by the preset rectangle in the to-be-processed image can be determined as a third to-be-cut region. If it is determined that the portrait region is located in the preset region of the third to-be-cut region, the third to-be-cut region is cut to obtain a target background image.
[0101] The to-be-processed image contains a preset rectangle, and one side of the preset rectangle is parallel to the longitudinal side of the to-be-processed image, and the length of the side is the same as the height of the to-be-processed image.
[0102] Exemplarily, the preset rectangle can be a square, and the length of the side of the square is the same as the height of the to-be-processed image.
[0103] For example, the preset rectangle can also be a rectangle with different lengths of two adjacent sides. For example, the length of the short side of the preset rectangle can be the same as the height of the image to be processed, and the length of the long side of the preset rectangle can be less than the width of the image to be processed. For another example, the length of the long side of the preset rectangle can be the same as the height of the image to be processed.
[0104] The preset region can be a left region or a right region of the third region to be cut, and the proportion of the portrait region in the third region to be cut is less than the second threshold.
[0105] For example, the second threshold is one third. If the portrait region is located in the left one third of the third region to be cut or the right one third of the third region to be cut, the third region to be cut can be cut to obtain the target background image.
[0106] For the convenience of understanding, for the horizontal image, the following will be combined with the horizontal sliding of the preset rectangle in the third region to be cut. Figure 6 Taking the cutting of the target background image by using a square as an example. Figure 6 In the figure, the rectangle A2B2C2D2 is the region of the image to be processed, and a2b2c2d2 is the portrait region. The square E2F2G2H2 can be horizontally slid in the rectangle A2B2C2D2. When the square E2F2G2H2 is in the position shown in the figure, the portrait region is in the preset region of the square E2F2G2H2. The square E2F2G2H2 can be cut to obtain the target background image. Figure 6 In the figure, the rectangle A2B2C2D2 is the region of the image to be processed, and a2b2c2d2 is the portrait region. The square E2F2G2H2 can be horizontally slid in the rectangle A2B2C2D2. When the square E2F2G2H2 is in the position shown in the figure, the portrait region is in the preset region of the square E2F2G2H2. The square E2F2G2H2 can be cut to obtain the target background image.
[0107] It should be noted that the second threshold can be determined according to actual needs, and no limitation is made thereto.
[0108] Therefore, for the image to be processed with a height less than a width, the preset rectangle is horizontally slid in the image to be processed to determine the third region to be cut, and the third region to be cut is cut when the portrait region is in the preset region of the third region to be cut, so that the portrait is in the preset region of the target background image, thereby improving the visual effect.
[0109] Exemplarily, for the to-be-processed image with a height less than a width, taking a preset rectangle as a square as an example, a point at a top left corner of the to-be-processed image can be taken as an origin, a right direction is taken as an x-axis positive direction, and a downward direction is taken as a y-axis positive direction to establish a rectangular coordinate system, a position of a center point of the portrait is determined, and an initial position and a moving direction of the square are determined according to the position of the center point of the portrait. A moving length range is determined according to a horizontal coordinate of a left side edge of the portrait or a horizontal coordinate of a right side edge of the portrait and a side length of the square. Then, the square is moved from the initial position to the moving direction based on the moving length range to obtain a third to-be-cut region. If the portrait region is located in a preset region of the third to-be-cut region, the third to-be-cut region can be cut to obtain a target background image. In this way, the to-be-cut region meeting the requirement is determined based on the moving length range, and the cutting efficiency can be improved.
[0110] For example, the square can be moved from the initial position to the moving direction by a to-be-moved length, where the to-be-moved length is in the moving length range. Then, the square can be moved from the initial position to the moving direction by adjusting the to-be-moved length, and the to-be-cut region meeting the requirement can be obtained.
[0111] Exemplarily, if the center point of the portrait is located in a right side region of the to-be-processed image, a right boundary of the square can be coincided with a right side boundary of the portrait as the initial position of the square. Since the portrait region is to be located in the square, the moving direction of the square can be determined as moving to the right. Then, the moving length range can be determined according to the horizontal coordinate of the right side edge of the portrait, the side length of the square, the width of the to-be-processed image, and the like. The square is moved to the right from the initial position based on the moving length range to obtain the third to-be-cut region meeting the requirement.
[0112] For example, the minimum moving length can be determined according to the horizontal coordinate of the right side edge of the portrait and the side length of the square, and the maximum moving length can be determined according to the horizontal coordinate of the right side edge of the portrait and the width of the to-be-processed image. Then, the moving length range is greater than or equal to the minimum moving length and less than or equal to the maximum moving length.
[0113] Exemplarily, if the center point of the portrait is located in a left side region of the to-be-processed image or a center point, a left side boundary of the square can be coincided with a left side boundary of the portrait as the initial position of the square. Since the portrait region is to be located in the square, the moving direction of the square can be determined as moving to the left. Then, the moving length range can be determined according to the horizontal coordinate of the left side edge of the portrait, the side length of the square, the width of the to-be-processed image, and the like. The square is moved to the left from the initial position based on the moving length range to obtain the third to-be-cut region meeting the requirement.
[0114] For example, the maximum movement length can be determined based on the horizontal coordinate of the left edge of the portrait, and the minimum movement length can be determined based on the horizontal coordinate of the left edge of the portrait, the side length of the square and the width of the image to be processed. Then the movement length range is greater than or equal to the minimum movement length and less than or equal to the maximum movement length.
[0115] For example, for an image to be processed whose height is smaller than its width, if the width of the portrait region is greater than the height of the image to be processed, it can be determined that the target image generation has failed. Furthermore, a prompt message indicating the generation failure can be returned, which can include the reason for the generation failure.
[0116] Step 406 , performing a portrait cutout on the image to be processed to obtain a portrait, and then enlarging the portrait to obtain an enlarged portrait.
[0117] In this application, step 406 can be implemented in any of the embodiments of this application, so it will not be described in detail here.
[0118] Optionally, if the width of the image to be processed is smaller than the height, and the target background image obtained by cropping from top to bottom does not include the entire area of the portrait area, in order to ensure that the final generated image has a character-breaking effect, the portrait can be cropped according to the portrait area included in the target background image to obtain a cropped portrait, and the cropped portrait can be enlarged to obtain an enlarged portrait.
[0119] Illustratively, the cropped portrait is the same as the portrait included in the target background image.
[0120] Step 407: Generate a target image based on the target background image and the enlarged portrait.
[0121] In this application, step 407 can be implemented in any of the embodiments of this application, so it will not be described here in detail.
[0122] For example, Figure 2 As the image to be processed, Figure 2 The width is smaller than the height, and the image to be processed is cropped using a square with the same side length as the width of the image to be processed. Figure 2 The first area to be cropped is determined from bottom to top. The first area to be cropped includes the complete portrait area. Then, the first area to be cropped is cropped to obtain the target background image. After that, two equally spaced transparent lines are added horizontally and vertically to the target background image to obtain a nine-square grid effect image. The nine-square grid effect image is pasted on a white background image with a preset aspect ratio. Then, the enlarged portrait is pasted along the bottom edge of the portrait in the nine-square grid effect image to obtain Figure 3 The image shown.
[0123] For example, Figure 7As the image to be processed, Figure 7 The width is smaller than the height, and a square with the same side length as the width of the image to be processed is used to Figure 7 Cutting, in Figure 7 First, the first area to be cropped is determined from bottom to top, but the first area to be cropped does not contain the complete portrait area, and then the second area to be cropped is determined from top to bottom, and the proportion of the portrait area contained in the second area to be cropped to the entire portrait area is greater than the first threshold value of 60%. Then the second area to be cropped is cropped to obtain the target background image. Since the target background image does not contain the complete portrait area, the portrait is cropped according to the target background image to obtain a cropped portrait, and the cropped portrait is enlarged to obtain an enlarged portrait. Afterwards, two equally spaced transparent lines are added horizontally and vertically to the target background image to obtain a nine-square effect image, and the nine-square effect image is pasted on a white background image with an aspect ratio of a preset ratio, and then the enlarged portrait is pasted along the bottom edge of the portrait in the nine-square effect image to obtain Figure 8 The image shown.
[0124] For example, Figure 9 As the image to be processed, Figure 9 The height is less than the width, and the side length is Figure 9 The same height of the square Figure 9 Slide in the middle to determine the third area to be cropped. When the portrait area is within the left range of the third area to be cropped, crop the third area to be cropped to obtain the target background image. Then, add two equally spaced transparent lines horizontally and vertically to the target background image to obtain a nine-square grid effect image. Paste the nine-square grid effect image on a black background image with a preset aspect ratio, and then paste the enlarged portrait along the bottom edge of the portrait in the nine-square grid effect image to obtain Figure 10 The image shown.
[0125] In this embodiment, a cropping strategy for the image to be processed is determined based on the relationship between its width and height. The image to be processed is then cropped using the appropriate cropping strategy based on the portrait region to produce a target background image. Thus, different cropping strategies can be used for vertical and horizontal images to produce target background images that meet the requirements, thereby improving the final target image's character definition.
[0126] In order to facilitate understanding of the image processing method of the present application, the following is an example of obtaining a target background image by square cutting and generating a nine-square grid pattern.
[0127] The image processing process of this application may include the following steps:
[0128] (1) Making photo pre-selection, that is, selecting the photos to be made. Since some photos may not be suitable for making a portrait break type, the photos used to generate a portrait break type with amazing effects can meet the following preset conditions: there is only one person in the photo, the person is not a full-body photo, it is not a selfie, and it is not a spliced picture. For photos with only one person, the face information in the photo can be identified to determine that there is only one face in the photo, and photos with multiple faces are filtered. For a photo where the person is not a full-body photo, the segmentation result of the person segmentation operator is used to determine whether the person is edge-adhered. If the person is not edge-adhered, it is determined that the person is a full-body photo, and the photo is filtered. After the photo is stored in the network disk for processing, it can have a shooting method tag, and photos with a selfie tag are filtered out. To ensure that the person can be successfully broken, it can be ensured that the photo has a clear background level, and the background erasing operator and the person cutout operator can be used to perform difference operation on the results. If the difference operation result is less than the threshold value 0.25, it indicates that the photo can be made into a good break type, and photos that do not meet the requirements are filtered out.
[0129] (2) Nine-square square cutting. A suitable square background can be cut from the photo to be used for nine-square cutting. The person area can be calculated first, and it is determined whether the original picture is a horizontal picture (the width is greater than the height) or a vertical picture (the height is greater than the width).
[0130] For a vertical picture, the length of the square can be defined as the width of the vertical picture. When cutting, the square is cut from the bottom up. If the cut-out square does not completely contain the person rectangle area, the square is cut from the top down. If the person area in the cut-out square is greater than 60% of the complete person area, the cutting is successful, and the nine-square break type generation is successful.
[0131] For a horizontal picture, the length of the square can be defined as the height of the horizontal picture. The square slides in the horizontal picture to cut the person area to the left and right sides of the square or to the right side of the square to ensure a good visual effect. Since the square is cut from the horizontal picture, the key to cutting the square is to determine the coordinates of the top-left corner of the square.
[0132] (3) Person cutout enlargement. The person can be cut out using the person segmentation operator, and the key to the person break type is that the person overflows the background. The height of the person can be calculated to enlarge it to be higher than the height of the cut-out square to obtain the overflow effect. During the person enlargement process, the person width does not overflow the photo, otherwise the body will be cut. If the body left and right sides overflow the square background edge after enlargement, it is considered that the nine-square break type generation fails.
[0133] (4) portrait map. Two transparent horizontal and vertical lines with equal intervals can be added in the cut-out square to obtain a nine-square effect picture, and the nine-square effect picture is pasted in a background picture with a four-by-three aspect ratio. Then, the enlarged portrait is pasted along the bottom edge of the square original portrait, so as to generate an image with a portrait breaking effect.
[0134] To implement the above-mentioned embodiments, an image processing device is further provided in the embodiments of the present application. Figure 11 The structure schematic diagram of the image processing device provided by an embodiment of the present application is shown in the figure.
[0135] As shown in the figure, the image processing device 1100 comprises: Figure 11 An acquisition module 1100 is configured to acquire a to-be-processed image.
[0136] A cutting module 1120 is configured to determine a portrait region in the to-be-processed image, and cut a target background picture from the to-be-processed image according to the portrait region.
[0137] A cutout and enlargement module 1130 is configured to perform portrait cutout on the to-be-processed image to acquire a portrait, and enlarge the portrait to acquire an enlarged portrait; wherein the height of the enlarged portrait is greater than the height of the target background picture.
[0138] A generation module 1140 is configured to generate a target image according to the target background picture and the enlarged portrait.
[0139] Optionally, the cutting module 1120 is configured to:
[0140] acquire the size of the to-be-processed image;
[0141] determine a cutting strategy of the to-be-processed image according to the size relationship between the width and the height of the to-be-processed image;
[0142] cut the to-be-processed image according to the cutting strategy to acquire the target background picture.
[0143] Optionally, the size relationship is that the width is less than the height, and the cutting module 1120 is configured to:
[0144] determine a first to-be-cut region in the to-be-processed image in a top-down order; wherein the width of the first to-be-cut region is the same as the width of the to-be-processed image;
[0145] cut the first to-be-cut region to acquire the target background picture in response to the first to-be-cut region containing all regions of the portrait region;
[0146]
[0147] In response to the first to-be-cut region not containing all of the portrait region, a second to-be-cut region is determined in the to-be-processed image in a top-to-bottom order, wherein a width of the second to-be-cut region is the same as a width of the to-be-processed image.
[0148] In response to a proportion of the portrait region contained in the second to-be-cut region being greater than a first threshold, a target background image is obtained for the second to-be-cut region.
[0149] Optionally, the cutout magnification module 1130 is configured to:
[0150] In response to the target background image not containing all of the portrait region, the portrait is cut according to the portrait region contained in the target background image, to obtain a cut portrait.
[0151] The cut portrait is magnified to obtain a magnified portrait.
[0152] Optionally, the size relationship is that the height is less than the width, and the cut module 1120 is configured to:
[0153] The preset rectangle is slid horizontally in the to-be-processed image to determine a third to-be-cut region, wherein the to-be-processed image contains the preset rectangle.
[0154] In response to determining that the portrait region is located in a preset region of the third to-be-cut region, the third to-be-cut region is cut to obtain a target background image.
[0155] The preset region is a left region or a right region of the third to-be-cut region, and a proportion of the portrait region in the third to-be-cut region is less than a second threshold.
[0156] Optionally, the preset rectangle is a square, and the cut module 1120 is configured to:
[0157] A position of a center point of the portrait is determined.
[0158] An initial position and a moving direction of the square are determined according to the position of the center point of the portrait.
[0159] A moving length range is determined according to a horizontal coordinate of a left edge of the portrait or a horizontal coordinate of a right edge of the portrait and a side length of the square.
[0160] The square is moved from the initial position to the moving direction based on the moving length range, to obtain the third to-be-cut region, wherein the portrait region is located in the preset region of the third to-be-cut region.
[0161] Optionally, the generation module 1140 is configured to:
[0162] A preset number of transparent lines are added in the target background image in a horizontal direction and a vertical direction, to obtain a processed background image.
[0163] The processed background image is pasted in a background image with a preset aspect ratio, and the enlarged portrait is pasted along the bottom edge of the portrait in the processed background image to generate a target image.
[0164] Optionally, the obtaining module 1110 is configured to:
[0165] obtain a candidate image;
[0166] determine the candidate image as the image to be processed if the candidate image meets a preset condition;
[0167] The preset condition includes at least one of the following: the number of contained portraits is a preset number; the contained portrait is a human body partial region image; a shooting mode label is a preset label; and the image is an original image.
[0168] Optionally, the obtaining module 1110 is configured to:
[0169] perform background erasing on the candidate image to obtain a background-erased portrait;
[0170] perform portrait matting on the candidate image to obtain a matted portrait;
[0171] compare the background-erased portrait with the matted portrait to determine a proportion of different pixel points in pixel points of the matted portrait;
[0172] determine the candidate image as the image to be processed if the proportion is less than a third threshold.
[0173] It should be noted that the above description of the image processing method embodiment is also applicable to the image processing apparatus of the embodiment, and thus will not be described here again.
[0174] In the embodiment of the application, by determining a portrait region in the image to be processed, a target background image is cut out from the image to be processed according to the portrait region, the image to be processed is subjected to portrait matting to obtain a portrait and enlarge the portrait, and since the height of the enlarged portrait is greater than the height of the target background image, a target image with a character breaking effect can be generated according to the target background image and the enlarged portrait. Thus, the target background image can be automatically cut out according to the portrait region in the image to be processed, and the character breaking effect can be realized by enlarging the portrait, thereby improving the generation efficiency of the character breaking image.
[0175] According to the embodiments of the application, the application further provides an electronic device, a readable storage medium and a computer program product.
[0176] Figure 12A schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0177] As shown in Figure 12 The device 1200 includes a computing unit 1201 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 1202 or a computer program loaded into a RAM (Random Access Memory) 1203 from the storage unit 1208. Various programs and data required for the operation of the device 1200 can also be stored in the RAM 1203. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other through a bus 1204. An I / O (Input / Output) interface 1205 is also connected to the bus 1204.
[0178] Various components in the device 1200 are connected to the I / O interface 1205, including an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 1208, such as a magnetic disk, an optical disk, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows the device 1200 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0179] The computing unit 1201 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 1201 performs various methods and processes described above, such as the image processing method. For example, in some embodiments, the image processing method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1208. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 1200 via the ROM 1202 and / or the communication unit 1209. When the computer program is loaded onto the RAM 1203 and executed by the computing unit 1201, one or more steps of the image processing method described above can be performed. Alternatively, in other embodiments, the computing unit 1201 can be configured to perform the image processing method by any other appropriate means, such as by means of firmware.
[0180] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an ASSP (Application Specific Standard Product), a SOC (System On Chip), a CPLD (Complex Programmable Logic Device), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0181] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0182] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage media can include, without limitation, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include, but are not limited to, an electrical connection based on one or more wires, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory), or flash memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0183] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0184] The systems and techniques described herein can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described herein, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.
[0185] The computer system can include clients and servers. The clients and the servers are generally remote from each other and typically interact through a communication network. The relationship of client and server is one of communication and distribution, with the server receiving requests from the client and transmitting data to the client. The server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service (Virtual Private Server). The server can also be a server of a distributed system, or a server combined with a blockchain.
[0186] According to the embodiments of the present application, the present application also provides a computer program product, when the instruction processor in the computer program product executes, executes the image processing method proposed in the above embodiments of the present application.
[0187] It should be understood that the various forms of flow shown above can be used to reorder, add, or delete steps. For example, the steps described in the present application can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, which are not limited herein.
[0188] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. An image processing method, characterized in that: The method comprises: Get the image to be processed; Determining a portrait area in the image to be processed; Obtaining the size of the image to be processed; Determining a cropping strategy for the image to be processed according to a size relationship between width and height of the image to be processed; According to the portrait area, the image to be processed is cropped using the cropping strategy to obtain a target background image; If the size relationship is that the height is smaller than the width, the cropping strategy is used to crop the image to be processed according to the portrait area to obtain the target background image, including: Slide a preset rectangle horizontally in the image to be processed to determine a third area to be cropped; wherein the image to be processed includes the preset rectangle; In response to determining that the portrait area is located in a preset area of the third area to be cropped, cropping the third area to be cropped to obtain the target background image; The preset area is a left area or a right area of the third area to be cropped, and the proportion of the portrait area in the third area to be cropped is less than a second threshold; Performing a portrait cutout on the image to be processed to obtain a portrait, and enlarging the portrait to obtain an enlarged portrait; wherein the height of the enlarged portrait is greater than the height of the target background image; A target image is generated according to the target background image and the enlarged portrait.
2. The method according to claim 1, wherein If the size relationship is that the width is smaller than the height, the cropping strategy is used to crop the image to be processed according to the portrait area to obtain the target background image, including: Determining a first area to be cropped in the image to be processed in order from bottom to top; wherein the width of the first area to be cropped is the same as the width of the image to be processed; In response to the first area to be cropped including the entire area of the portrait area, cropping the first area to be cropped to obtain the target background image; In response to the first area to be cropped not including the entire area of the portrait area, determining a second area to be cropped in the image to be processed in descending order; wherein a width of the second area to be cropped is the same as a width of the image to be processed; In response to the proportion of the portrait area included in the second area to be cropped to the portrait area being greater than a first threshold, the target background image is acquired for the second area to be cropped.
3. The method according to claim 2, wherein: The step of enlarging the portrait to obtain an enlarged portrait includes: In response to the target background image not including the entire area of the portrait region, cropping the portrait according to the portrait region included in the target background image to obtain a cropped portrait; The cropped portrait is enlarged to obtain the enlarged portrait.
4. The method according to claim 1, wherein The preset rectangle is a square, and determining that the portrait area is located in the preset area of the third area to be cropped includes: Determining the position of the center point of the portrait; Determining the initial position and moving direction of the square according to the position of the center point of the portrait; Determining a moving length range according to the horizontal coordinate of the left edge of the portrait or the horizontal coordinate of the right edge of the portrait and the side length of the square; Based on the moving length range, the square is moved from the initial position to the moving direction to obtain the third area to be cropped, wherein the portrait area is located in the preset area of the third area to be cropped.
5. The method according to any one of claims 1 to 4, wherein Generating a target image according to the target background image and the enlarged portrait includes: Adding a preset number of transparent lines horizontally and vertically to the target background image to obtain a processed background image; The processed background image is pasted on a background image with a preset aspect ratio, and the enlarged portrait is pasted along the bottom edge of the portrait in the processed background image to generate the target image.
6. The method according to any one of claims 1 to 4, wherein The acquiring of the image to be processed comprises: Obtain candidate images; If the candidate image meets a preset condition, determining the candidate image as the image to be processed; The preset conditions include at least one of the following: the number of portraits included is a preset number; the included portraits are images of partial human body areas; the shooting mode label is a preset label; and the image is an original image.
7. The method according to claim 6, wherein: Determining the candidate image as the image to be processed includes: Erasing the background of the candidate image to obtain a background-erased portrait; Performing a cutout portrait cutout on the candidate image to obtain a cutout portrait; Comparing the background-erased portrait with the cutout portrait to determine the proportion of different pixels to the pixels of the cutout portrait; When the ratio is smaller than a third threshold, the candidate image is determined as the image to be processed.
8. An image processing device, characterized in that: The device comprises: An acquisition module, used for acquiring an image to be processed; a cropping module configured to determine a portrait region in the image to be processed; obtain a size of the image to be processed; determine a cropping strategy for the image to be processed based on a size relationship between width and height in the image to be processed; and crop the image to be processed using the cropping strategy based on the portrait region to obtain a target background image; a cutout and magnification module, configured to cut out a portrait of the image to be processed to obtain a portrait, and to magnify the portrait to obtain an enlarged portrait; wherein the height of the enlarged portrait is greater than the height of the target background image; A generating module, configured to generate a target image based on the target background image and the magnified portrait; If the size relationship is that the height is smaller than the width, the cropping module is configured to: Slide a preset rectangle horizontally in the image to be processed to determine a third area to be cropped; wherein the image to be processed includes the preset rectangle; In response to determining that the portrait area is located in a preset area of the third area to be cropped, cropping the third area to be cropped to obtain the target background image; The preset area is a left area or a right area of the third area to be cropped, and the proportion of the portrait area in the third area to be cropped is less than a second threshold.
9. The device according to claim 8, wherein The size relationship is that the width is smaller than the height, and the cutting module is used to: Determining a first area to be cropped in the image to be processed in order from bottom to top; wherein the width of the first area to be cropped is the same as the width of the image to be processed; In response to the first area to be cropped including the entire area of the portrait area, cropping the first area to be cropped to obtain the target background image; In response to the first area to be cropped not including the entire area of the portrait area, determining a second area to be cropped in the image to be processed in descending order; wherein a width of the second area to be cropped is the same as a width of the image to be processed; In response to the proportion of the portrait area included in the second area to be cropped to the portrait area being greater than a first threshold, the target background image is acquired for the second area to be cropped.
10. The device according to claim 9, wherein The cutout and magnification module is used to: In response to the target background image not including the entire area of the portrait region, cropping the portrait according to the portrait region included in the target background image to obtain a cropped portrait; The cropped portrait is enlarged to obtain the enlarged portrait.
11. The device according to claim 8, wherein The preset rectangle is a square, and the cutting module is used to: Determining the position of the center point of the portrait; Determining the initial position and moving direction of the square according to the position of the center point of the portrait; Determining a moving length range according to the horizontal coordinate of the left edge of the portrait or the horizontal coordinate of the right edge of the portrait and the side length of the square; Based on the moving length range, the square is moved from the initial position to the moving direction to obtain the third area to be cropped, wherein the portrait area is located in the preset area of the third area to be cropped.
12. The device according to any one of claims 8 to 11, wherein: The generating module is used to: Adding a preset number of transparent lines horizontally and vertically to the target background image to obtain a processed background image; The processed background image is pasted on a background image with a preset aspect ratio, and the enlarged portrait is pasted along the bottom edge of the portrait in the processed background image to generate the target image.
13. The device according to any one of claims 8 to 11, wherein: The acquisition module is used to: Obtain candidate images; If the candidate image meets a preset condition, determining the candidate image as the image to be processed; The preset conditions include at least one of the following: the number of portraits included is a preset number; the included portraits are images of partial human body areas; the shooting mode label is a preset label; and the image is an original image.
14. The apparatus of claim 13, wherein: The acquisition module is used to: Erasing the background of the candidate image to obtain a background-erased portrait; Performing a cutout portrait cutout on the candidate image to obtain a cutout portrait; Comparing the background-erased portrait with the cutout portrait to determine the proportion of different pixels to the pixels of the cutout portrait; When the ratio is smaller than a third threshold, the candidate image is determined as the image to be processed.
15. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.
17. A computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method, device and equipment and computer readable storage medium
CN111862124A