WO2024251092A1 - 图像处理方法、装置、设备、存储介质和程序产品 - Google Patents

图像处理方法、装置、设备、存储介质和程序产品 Download PDF

Info

Publication number
WO2024251092A1
WO2024251092A1 PCT/CN2024/097128 CN2024097128W WO2024251092A1 WO 2024251092 A1 WO2024251092 A1 WO 2024251092A1 CN 2024097128 W CN2024097128 W CN 2024097128W WO 2024251092 A1 WO2024251092 A1 WO 2024251092A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
target element
target
cutout
background
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2024/097128
Other languages
English (en)
French (fr)
Inventor
陈天琪
贺笑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to EP24818624.9A priority Critical patent/EP4726519A1/en
Priority to KR1020257042509A priority patent/KR20260011767A/ko
Publication of WO2024251092A1 publication Critical patent/WO2024251092A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, device, storage medium and program product.
  • the embodiments of the present disclosure provide an image processing method, apparatus, device, storage medium and program product for editing target element images in an image to be edited, so as to achieve rapid creation of high-quality images while improving image creation efficiency.
  • an embodiment of the present disclosure provides an image processing method, including:
  • an image to be edited wherein the image to be edited includes a target element image and a background image;
  • a background generation page is displayed; wherein a first area of the background generation page is used to display the target element, and a second area of the background generation page is used to display a target style option control;
  • the target element image in the to-be-edited image is replaced with the target element style map.
  • an image processing device including:
  • the to-be-edited image acquisition module is used to acquire the to-be-edited image, wherein the to-be-edited image includes a target element image and a background image;
  • a background generation page display module for displaying a background generation page in response to a triggering operation on an editing control corresponding to the target element image; wherein a first area of the background generation page is used to display the target element, and a second area of the background generation page is used to display a target style option control;
  • a target element style map generating module used for generating a target element style map in response to a triggering operation on the target style option control
  • the to-be-edited image processing module is configured to replace the target element image in the to-be-edited image with the target element style map in response to a confirmation operation on the target element style map.
  • an embodiment of the present disclosure provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method as described in any one of the first aspects above.
  • an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method as described in any one of the above-mentioned first aspects.
  • an embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the image processing method as described in any one of the first aspects above is implemented.
  • the embodiments of the present disclosure provide an image processing method, apparatus, device, storage medium and program product, the method comprising: acquiring an image to be edited, wherein the image to be edited comprises a target element image and a background image; in response to a triggering operation on an editing control corresponding to the target element image, displaying a background generation page; wherein a first area of the background generation page is used to display a target element, and a second area of the background generation page is used to display a target style option control; in response to a triggering operation on the target style option control, generating a target element style map; in response to a confirmation operation on the target element style map, replacing the target element image in the image to be edited with the target element style map.
  • FIG1 is a schematic diagram of replacing an image background in the prior art
  • FIG2 is a schematic flow chart of an image processing method according to an embodiment of the present invention.
  • FIG3 is a schematic diagram of an image processing page in an embodiment of the present disclosure.
  • FIG4 is a schematic diagram of an image generation page including cutout prompt information in an embodiment of the present disclosure
  • FIG5 is a schematic diagram of an image generation page including a mask image in an embodiment of the present disclosure
  • FIG6 is a schematic diagram of a cutout page in an embodiment of the present disclosure.
  • FIG. 7 is an image generation page including a prompt message of image cutout failure in an embodiment of the present disclosure
  • FIG8 is a schematic diagram of the structure of an image processing device in an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of the structure of an electronic device in an embodiment of the present disclosure.
  • the method of adaptively adjusting the background image of an image is to replace the background of the image.
  • the commonly used method of replacing the background of an image is: as shown in Figure 1, one of the background images is selected from multiple background images as the target background image 11, and the target element image 12 whose background needs to be replaced is added to the target background image 11 as an image element.
  • the added background image can only be selected from a limited number of candidate background images, and a completely new background image cannot be automatically generated. It is difficult to create a high-quality image that meets the requirements.
  • the present disclosure provides an image processing method, which includes: obtaining an image to be edited, wherein the image to be edited includes a target element image and a background image; in response to a triggering operation on an editing control corresponding to the target element image, a background generation page is displayed; wherein the first area of the background generation page is used to display the target element, and the second area of the background generation page is used to display the target style option control; in response to a triggering operation on the target style option control, a target element style map is generated; in response to a confirmation operation on the target element style map, the target element image in the image to be edited is replaced with the target element style map, wherein the target element style map is related to the aesthetic attributes of the background image.
  • the disclosed embodiment implements editing processing of the target element image in the image to be edited by performing style processing on the element image included in the image to be edited, so as to achieve rapid creation of high-quality images while improving image creation efficiency.
  • the disclosed embodiment performs style processing on the background image of the element image included in the image to be edited, thereby performing editing processing on the target element image in the image to be edited, so as to achieve rapid creation of high-quality images and improve image creation efficiency.
  • the image processing method provided by the present disclosure can be used to automatically generate a new image background to improve the image quality.
  • the image background is not perfect, but too monotonous, and the atmosphere is not strong enough to attract the user's attention.
  • the image processing method provided by the present invention can be used to automatically generate a new image background to provide an atmosphere for the image and attract the user's attention.
  • FIG2 is a flow chart of an image processing method in an embodiment of the present disclosure.
  • the present embodiment is applicable to the case of automatically generating an image background.
  • the method can be executed by an image processing device, and the image processing device can be implemented in software and/or hardware.
  • the image processing method provided by the embodiment of the present disclosure mainly includes steps S110 - S140 .
  • S110 Acquire an image to be edited, wherein the image to be edited includes a target element image and a background image.
  • the image to be edited may be an editable poster or magazine cover. As shown in FIG3 , the image to be edited 21 is displayed in the image processing page 20, and the image to be edited 21 includes at least one element image in the form of a picture and a background image 22, and the element images in the form of pictures are element images 23, element images 24, and element images 25. Any element image in the image to be edited can be used as a target element image.
  • the element image includes a target element image and a background element image, wherein the target element image refers to the main photographed object in the target element image, that is, the foreground element image in the target element image, and the background element image refers to the image of the background area included in the target element image.
  • the target element may be a person, an object, etc., wherein the person may be the entire human body or a specific part of the human body, such as the face, hands, upper body, etc.
  • the object may be a table, clothes, beauty tools, etc.
  • the specific type of the target element is not limited in the embodiments of the present disclosure.
  • the image to be edited includes at least one After acquiring the image to be edited, the method further comprises: in response to a selection operation on any of the element images to be processed, taking the element image to be processed corresponding to the selection operation as the target element image.
  • the selected element image to be processed in response to a user selecting any element image to be processed in the image to be edited, is used as a target element image.
  • the element image 25 to be processed is used as a target element image.
  • the user can select the element image to be processed displayed in the image to be edited, or can select it through the image identifier in the image selection area 26.
  • the element image to be processed corresponding to the selected image identifier is used as the target element image, wherein the image identifier and the element image to be processed in the image to be edited are in a one-to-one correspondence.
  • the method further includes: in response to an operation of adding a control to an element image, acquiring an added image corresponding to the operation, and using the added image as a target element image.
  • the image selection area 26 further includes an image adding control 27. Specifically, in response to an operation on the image adding control 27, an image adding page is displayed, and in response to a selection operation on the image adding page, the selected adding image is used as a target element image. Further, the adding image is added to the image to be edited.
  • an editing function area in response to a trigger operation for an image identifier corresponding to the target element image, an editing function area is displayed, wherein the editing function area displays at least one editing control, specifically, a background generation control is displayed in the editing function area, and the element Image replacement control and image capture control.
  • the background generation control is used to respond to the user's trigger operation to enter the background generation page, so that the user can stylize the background area of the target element image.
  • the element image replacement control is used to respond to the user's trigger operation to enter the image replacement page to select a new element image to replace the current target element image.
  • the image capture control is used to respond to the user's trigger operation to enter the screenshot page, so that the user can screenshot the target element image.
  • the target element displayed in the first area of the background generation page is obtained by performing a cutout process on the target element image, and the background of the target element displayed in the first area is a transparent background.
  • the target element image in response to the user's triggering operation on the background generation control, is automatically cut out.
  • a cutout prompt box 31 is displayed, and the cutout prompt box 31 displays cutout prompt information, and the cutout prompt information is used to prompt the user that the cutout process is in progress, wherein the cutout prompt information also includes the cutout progress, wherein the cutout progress is used to prompt the user the proportion of the automatic cutout that has been completed.
  • the cutout progress can be displayed in the form of a progress bar or in the form of a number, which is not specifically limited in the embodiment of the present disclosure.
  • the image obtained by the cutout processing is displayed in the background generation page 30.
  • the cutout prompt box in the background generation page 30 is controlled to no longer be displayed.
  • the background generation page 30 includes a first area 32 and a second area 33.
  • the first area 32 is used to display the target element after the cutout, and the background area of the target element is transparent.
  • the second area 33 is used to display multiple image style option controls to be selected.
  • the target element with transparent background is displayed in the first area 32 included in the background generation page 30, and the target element editing control 34 is also displayed in the background generation page 30.
  • the target element editing control 34 is used to edit the target element in response to a trigger operation by the user.
  • the target element editing control 34 is an edit box, and the edit box is in a selected state. Furthermore, the edit box in the selected state edits the target element in response to an operation on the edit box.
  • the above-mentioned editing of the target element may include scaling the target element, and may also include moving the target element, and rotating the target element.
  • the scaling process is used to control the size of the target element in the entire image
  • the moving process is used to control the position of the target element in the entire image
  • the rotation process is used to control the direction of the target element in the entire image.
  • a style map of the target element is generated based on the editing results of the target element, such as its position, size, rotation angle and other parameters.
  • control edit box disappears, and the second image can no longer be edited. If the user wants to edit the second image again, the control edit box can be selected again to edit the second image again.
  • the target style option control refers to an image style option control selected by a user.
  • S130 In response to a triggering operation on the target style option control, generate a target element style map.
  • a plurality of image style option controls are included in the background generation page 30, and the image style option controls can display more by sliding left and right.
  • the image style option controls include a style image and a style name.
  • Each image style option control corresponds to a stylized processing model.
  • Each image style option control is used to identify a type of image style, such as summer beach, wild jungle, snowy mountain top, etc.
  • the target element style map is generated in response to a triggering operation on the target style option control, including: obtaining a target stylization model corresponding to the target style option control; inputting the target element into the target stylization model so that the target stylization model performs stylization processing on the background area in the target element, and outputting a target element style map, wherein the style information of the background image in the target element style map is consistent with the style information corresponding to the target style option control.
  • the image style option control corresponding to the selection operation in response to receiving a selection operation on any of the image style option controls, is used as a target style option control; a target stylization model corresponding to the target style option control is obtained, and the background area in the target element image is stylized using the target stylization model to obtain a target element style map, wherein the style information of the background element in the target original color style map is consistent with the style information corresponding to the target style option control, and the target element style map is related to the aesthetic attributes of the background image.
  • the image style option control 1 in response to a selection operation on the image style option control 1, is used as a target style option control, and a stylized model corresponding to the image style option control 1 is obtained as a target stylized model, and the target stylized model is used to perform stylized processing on the background area in the target element image.
  • the aesthetic attribute is used to describe the attribute of the image, and the aesthetic attribute may include balance elements, content, color harmony, depth of field, light, object, rule of thirds, color vividness, repetitiveness, symmetry, motion blur, etc.
  • the target element style map is related to the aesthetic attribute of the background image, including: the target element style map is consistent with the aesthetic attribute of the background image, making the image to be edited more harmonious.
  • the target element style map is related to the aesthetic attribute of the background image, including: the target element style map is opposite to the aesthetic attribute of the background image, making the elements in the image to be edited more conflicting.
  • a target element image with a transparent background area is input into the target stylization model, so that the target stylization model The target element image with transparent background area is stylized and the target element style map is output.
  • the target element image with a transparent background area is processed using a summer beach stylized model corresponding to the summer beach to obtain a target element style map, wherein the background style of the target element style map is summer beach.
  • a background generation animation is displayed. After the background is generated, a target element style map is obtained. As shown in FIG5 , the target element style map is displayed in the first area 32 in the background generation page 30.
  • the background generation animation supports cancellation. Clicking the cancel button will cause the animation to disappear and stop the process of stylizing the background area by the target stylization model.
  • a background image of a target element is automatically generated through a stylized model, thereby avoiding the need to select a background image from an existing image and improving the image quality and the atmosphere of the image.
  • the method also includes: in response to receiving a repeated trigger operation on the target style option control, inputting the target element image with a transparent background area into the target stylization model again, so that the target stylization model performs stylization processing on the target element image with a transparent background area again, and outputs a new target element style map, wherein the target elements included in the new target element style map are the same as the target elements included in the target element style map output for the first time, the new target element style map is different from the background elements included in the target element style map output for the first time, and the style information corresponding to the background elements of the target element style map output for the first time is the same as the style information corresponding to the background elements included in the new target element style map.
  • the target element stylized image obtained after the background image is generated is displayed in the first area 32 of the background generation page 30 as shown in FIG. 5 .
  • the user can also select a new image style option control again and use the new
  • the stylized model corresponding to the image style option control performs stylized processing on the background area in the target element image where the background area is transparent.
  • the new image style option control selected by the user again may be an image style option control selected before, for example, the image style option control selected by the user for the first time is image style option control 1, and the image style option control selected again is still image style option control 1.
  • the stylized model corresponding to image style option control 1 is still called to perform stylized processing on the background area of the target element image whose background area is transparent.
  • the stylized model since the stylized model performs stylized processing on the background area of the target element image in which the background area is transparent, the image of the background area is generated after the stylized model performs stylized processing. Therefore, even if the same image style option control is selected twice at the same time, the specific elements in the background area in the generated image are different.
  • the target style is a summer beach as an example for explanation.
  • a target element style map is generated, and when the summer beach is selected again, a new target element style map is generated, and the target elements in the two target element style maps are completely consistent.
  • the style information of the background area in the two target element style maps is also consistent.
  • the style of the background area of the target element style map is a summer beach
  • the style of the background area of the new target element style map is also a summer beach.
  • the specific image elements in the background area of the two target element style maps are different. For example: when both are in the summer beach style, the number, position, and size of the shells in the image are inconsistent. It can also be that the proportion of the area occupied by the sea water is inconsistent, the color of the sea water is inconsistent, and so on.
  • the style information in the image background generated each time is consistent, but the specific image elements are inconsistent. In this way, users can generate different background images for the same style, so that users can get images that they are satisfied with.
  • S140 In response to a confirmation operation on the target element style map, replace the target element image in the image to be edited with the target element style map.
  • a background generation operation is performed on a target element image.
  • an image confirmation control is included in the background generation page.
  • an image processing page as shown in FIG3 is displayed, and the target element image in the image to be edited is replaced with the target element style map.
  • aesthetic attribute information in the background image is extracted, and based on the aesthetic attribute information of the background image, an image style option control related to the aesthetic attribute information is pulled.
  • the above operation can be performed for all element images included in the image to be edited.
  • the image processing page includes an image export control, and in response to a trigger operation on the image export control, a picture is generated for the image to be edited in the image processing page.
  • a technical solution for generating backgrounds for multiple images in the same image to be edited is provided to improve the image processing efficiency.
  • the cutout process can be performed again on the second image.
  • the cutout process can be performed again on the second image including the target element and the transparent background.
  • the embodiments of the present disclosure further optimize the above-mentioned embodiments.
  • the target element image in response to the user's triggering operation on the background generation control, the target element image is automatically cut out and the background generation page is entered.
  • the embodiments of the present disclosure provide a solution for optimizing the cutout after the automatic cutout is successful.
  • the first area of the background generation page also includes: a cutout entry control, which displays the cutout entry control in response to receiving the triggering operation on the cutout entry control.
  • the cutout page includes at least one cutout operation control and a mask image corresponding to the target element; in response to an operation on the cutout operation control, the mask image corresponding to the target element is cutout processed.
  • the cutout page 40 in response to the trigger operation on the cutout entry control 36, the cutout page is entered.
  • the cutout page 40 includes an image display area 41 and a cutout operation control display area 42.
  • the mask image corresponding to the target element is displayed in the image display area 41.
  • the mask image corresponding to the target element maintains the position and size before entering the cutout page 40, and cannot be moved, scaled, or rotated.
  • the cutout operation control display area 42 includes a plurality of cutout operation controls for responding to user operations to the mask image corresponding to the target element.
  • the cutout operation control display area 42 includes a smart brush control, a manual smear control, an eraser control, a reset control, and a cutout completion control.
  • the corresponding cutout area of the mask image corresponding to the target element is automatically drawn and the cutout processing is performed.
  • the manual painting mode is entered.
  • the cutout area corresponding to the mask image corresponding to the target element is determined, and the cutout processing is performed.
  • the smart brush or manual painting mode when using a brush to paint the screen with the mask image corresponding to the target element, the mask image needs to be displayed in real time at the painting position.
  • the brush supports adjustment parameters: size, hardness, and transparency. As shown in Figure 6, the brush parameters are adjusted in the form of sliders: the slider value is 1-100.
  • the smear traces of the mask image corresponding to the target element are erased.
  • the eraser brush supports adjustment parameters: size, hardness, transparency, and the brush parameters are adjusted in the form of a slider: the slider value is 1-100. The sliders of the eraser and the brush are set separately.
  • a mask image corresponding to the target element is reset.
  • a reset operation is performed, that is, the cutout operation of the mask image corresponding to the target element is deleted, and the mask image corresponding to the target element is restored to the initial state when the cutout page is entered.
  • the cutout page also includes a cutout completion control.
  • the cutout processing of the mask image corresponding to the target element is ended, and the cutout operation performed on the cutout page is applied, and the background generation page is returned to as shown in FIG5 .
  • the user can perform manual cutout to optimize the cutout effect and improve the quality of the image.
  • the embodiment of the present disclosure further optimizes the above-mentioned embodiment.
  • the target element image in response to the user's triggering operation on the background generation control, the target element image is automatically cut out. If an instruction of successful automatic cutout is received, the background generation page is entered.
  • the target element image and the cutout entry control are displayed in the first area of the background generation page; in response to receiving a triggering operation for the cutout entry control, a cutout page is displayed, wherein the cutout page includes at least one cutout operation control and the target element image; in response to the operation on the cutout operation control, the target element image is cut out.
  • the target element image and the cutout entry control are displayed in the background generation page.
  • the background generation page 30 displays the target element image of the original background element in the background area and a cutout failure prompt box 36, wherein the cutout failure prompt box 36 includes a cutout failure prompt message, a cutout entry control, and a cancel control.
  • a cutout page in response to a trigger operation on the cutout entry control, a cutout page is displayed.
  • the cutout page is consistent with the layout and control content display in the cutout page in the above embodiment.
  • the background area is displayed in the image display area of the cutout page as The target element image of the original background element.
  • the cutout entry control is displayed, and in response to the triggering operation of the cutout entry control, the cutout page is displayed, and the target element image with the background area being the original background element is displayed in the image display area of the cutout page.
  • the cutout page is entered through the cutout control 35 in the background generation page, and the mask image corresponding to the target element in the target element image is displayed in the image display area of the cutout page, and the background is transparent.
  • cutout page except for the image displayed in the image display area, other contents are the same.
  • the cutout method for the target element image is the same as the cutout method for the mask image corresponding to the target element of the target element image described in the above embodiment. Please refer to the description in the above embodiment for details, and will not be repeated in the present disclosed embodiment.
  • a manual cutout solution is provided to improve the success rate of background generation and avoid the situation where the background generation fails due to the cutout failure.
  • a background generation page in response to a trigger operation for a cancel control, a background generation page is displayed, and the background generation page is shown in FIG6.
  • the background generation page is entered by triggering the cancel control, and the image display area in the background generation page is used to display the target element image, that is, including the target element and the original background element in the target element image.
  • the background generation page is entered, and the image display area in the background generation page is used to display an image including the target element and a transparent background.
  • the target element image can still be further processed through the controls in the background generation page.
  • further processing includes cutting out the target element image. It also includes directly using the target element after manual cutout to perform background stylization processing.
  • FIG8 is a schematic diagram of the structure of an image processing device in an embodiment of the present disclosure.
  • the present embodiment is applicable to the case of generating an image background.
  • the image processing device can be implemented in software and/or hardware.
  • the image processing device 80 mainly includes: an image acquisition module 81 for editing, a background generation page display module 82 , a target element style map generation module 83 and an image processing module 84 for editing.
  • the image to be edited acquisition module 81 is used to acquire the image to be edited, wherein the image to be edited includes a target element image and a background image;
  • the background generation page display module 82 is used to display the background generation page in response to the triggering operation of the editing control corresponding to the target element image; wherein the first area of the background generation page is used to display the target element, and the second area of the background generation page is used to display the target style option control;
  • the target element style map generation module 83 is used to generate a target element style map in response to the triggering operation of the target style option control;
  • the image to be edited processing module 84 is used to replace the target element image in the image to be edited with the target element style map in response to the confirmation operation of the target element style map.
  • the image to be edited includes at least one element image to be processed
  • the device also includes: a target element image determination module, which is used to, after acquiring the image to be edited, respond to a selection operation on any of the element images to be processed and use the element image to be processed corresponding to the selection operation as the target element image.
  • the target element image determination module is further used to, after acquiring the image to be edited, in response to an operation of adding a control to the element image, acquire an added image corresponding to the operation, and use the added image as the target element image.
  • the target element displayed in the first area of the background generation page is obtained by performing a cutout process on the target element image, and the background of the target element displayed in the first area is a transparent background.
  • the target element style map generation module 83 includes: a target stylized model acquisition unit, used to acquire the target stylized model corresponding to the target style option control; a target stylized model processing unit, used to input the target element into the target stylized model so that the target stylized model can be used to generate the target element style map;
  • the background area in the target element is stylized and a target element style map is output, wherein style information of the background element in the target element style map is consistent with style information corresponding to the target style option control, wherein the target element style map is related to the aesthetic attributes of the background image.
  • the first area of the background generation page further includes: a target element editing control, and the target element editing control is used to edit the target element in response to a trigger operation of the user.
  • the first area of the background generation page also includes: a cutout entry control
  • the device also includes: a cutout page display module, which is used to display a cutout page in response to receiving a trigger operation for the cutout entry control, wherein the cutout page includes at least one cutout operation control and a mask image corresponding to the target element; a cutout processing module, which is used to perform cutout processing on the mask image corresponding to the target element in response to an operation on the cutout operation control.
  • the background generation page display module 82 is further used to display the target element image and the cutout entry control in the first area of the background generation page in response to receiving an instruction of cutout failure; the cutout page display module is further used to display the cutout page in response to receiving a trigger operation for the cutout entry control, wherein the cutout page includes at least one cutout operation control and the target element image; the cutout processing module is further used to perform cutout processing on the target element image in response to an operation on the cutout operation control.
  • the image processing device provided in the embodiment of the present disclosure can execute the steps executed in the image processing method provided in the method embodiment of the present disclosure, and the execution steps and beneficial effects are no longer repeated here.
  • FIG9 is a schematic diagram of the structure of an electronic device in an embodiment of the present disclosure. Referring to FIG9 in detail below, it shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure.
  • the electronic device 900 in the embodiment of the present disclosure may include but is not limited to a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD
  • the electronic device shown in FIG9 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903 to implement the image processing method of the embodiment described in the present disclosure.
  • a processing device e.g., a central processing unit, a graphics processing unit, etc.
  • RAM random access memory
  • Various programs and data required for the operation of the terminal device 900 are also stored in the RAM 903.
  • the processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904.
  • An input/output (I/O) interface 905 is also connected to the bus 904.
  • the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909.
  • the communication devices 909 may allow the terminal device 900 to communicate wirelessly or wired with other devices to exchange data.
  • FIG. 9 shows a terminal device 900 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the image processing method as described above.
  • the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902.
  • the processing device 901 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above.
  • Computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried.
  • This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.
  • the computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device.
  • the program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network).
  • HTTP HyperText Transfer Protocol
  • Examples of communication networks include a local area network ("LAN”), a wide area network ("WAN”), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
  • the computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the terminal device obtains an image to be edited, wherein the image to be edited includes a target element image and a background image; in response to a triggering operation on an editing control corresponding to the target element image, displays a background generation page; wherein a first area of the background generation page is used to display a target element, and a second area of the background generation page is used to display a target style option control; in response to a triggering operation on the target style option control, generates a target element style map; in response to a confirmation operation on the target element style map, replaces the target element image in the image to be edited with the target element style map, wherein the target element style map is related to the aesthetic properties of the background image.
  • the terminal device may also execute other steps described in the above embodiments.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages.
  • the program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
  • the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
  • LAN local area network
  • WAN wide area network
  • Internet service provider e.g., AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each box in the flowchart or block diagram may represent a module, a program segment, or a portion of code, which contains one or more executable instructions for implementing the specified logical functions.
  • the box The functions noted in the figures may also occur in a different order than that noted in the figures. For example, two boxes shown in succession may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved.
  • each box in the block diagram and/or flow chart, and combinations of boxes in the block diagram and/or flow chart may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
  • exemplary types of hardware logic components include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOCs systems on chips
  • CPLDs complex programmable logic devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing.
  • a more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM portable compact disk read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device or any suitable combination of the foregoing.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本公开涉及一种图像处理方法、装置、设备、存储介质和程序产品,该方法包括:获取待编辑图像,其中,待编辑图像包括目标元素图像和背景图像;响应于对与目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,背景生成页面中展示目标元素和目标风格选项控件;响应于对目标风格选项控件的触发操作,生成目标元素风格图;响应于对目标元素风格图的确认操作,将待编辑图像中的目标元素图像替换为目标元素风格图。

Description

图像处理方法、装置、设备、存储介质和程序产品
相关申请的交叉引用
本申请要求于2023年6月6日提交中国国家知识产权局、申请号为2023106665385、发明名称为“图像处理方法、装置、设备、存储介质和程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及图像处理技术领域,尤其涉及一种图像处理方法、装置、设备、存储介质和程序产品。
背景技术
随着人工智能技术的快速发展,计算机视觉的各项任务也发展迅速,为我们生活的方方面面带来了便利。
在实际应用中,用户可以使用终端设备创作图像。在一些图像创作场景中,通常需要在待编辑图像中添加一些小的图像元素。如何对待编辑图像中的小图像元素进行编辑处理,是一个亟待解决的问题。
发明内容
为了解决上述技术问题,本公开实施例提供了一种图像处理方法、装置、设备、存储介质和程序产品,对待编辑图像中的目标元素图像进行编辑处理,以实现快速创作高质量图像,同时提高图像创作效率。
第一方面,本公开实施例提供一种图像处理方法,包括:
获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像;
响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;
响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;
响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
第二方面,本公开实施例提供一种图像处理装置,包括:
待编辑图像获取模块,用于获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像;
背景生成页面展示模块,用于响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;
目标元素风格图生成模块,用于响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;
待编辑图像处理模块,用于响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
第三方面,本公开实施例提供一种电子设备,所述电子设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述第一方面中任一项所述的图像处理方法。
第四方面,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述第一方面中任一项所述的图像处理方法。
第五方面,本公开实施例提供一种计算机程序产品,该计算机程序产品包括计算机程序或指令,该计算机程序或指令被处理器执行时实现如上述第一方面中任一项所述图像处理方法。
本公开实施例提供了一种图像处理方法、装置、设备、存储介质和程序产品,该方法包括:获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像;响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1是现有技术中替换图像背景的示意图;
图2是本发明实施例的一种图像处理方法的流程示意图;
图3为本公开实施例中图像处理页面的示意图;
图4为本公开实施例中包括抠图提示信息的图像生成页面的示意图;
图5本公开实施例中包括掩膜图像的图像生成页面的示意图;
图6为本公开实施例中一种抠图页面的示意图;
图7为本公开实施例中包括抠图失败提示信息的图像生成页面;
图8为本公开实施例中的一种图像处理装置的结构示意图;
图9为本公开实施例中的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称 仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
对本公开实施例进行进一步详细说明之前,对本公开实施例中涉及的名词和术语进行说明,本公开实施例中涉及的名词和术语适用于如下的解释。
响应于,用于表示所执行的操作所依赖的条件或者状态,当满足所依赖的条件或状态时,所执行的一个或多个操作可以是实时的,也可以具有设定的延迟;在没有特别说明的情况下,所执行的多个操作不存在执行先后顺序的限制。
随着人工智能技术的快速发展,计算机视觉的各项任务也发展迅速,为我们生活的方方面面带来了便利。随着人工智能技术的快速发展,计算机视觉的各项任务也发展迅速,为我们生活的方方面面带来了便利。在实际应用中,用户可以使用终端设备创作图像。在一些图像创作场景中,通常需要在待编辑图像中添加一些小的图像元素。对于一些待编辑图像中的小图像元素,在待编辑图像的背景图像发生变化时,通过需要对小图像的背景图像进行相适应的调整。
相关技术中对图像的背景图像进行相适应的调整的方式是替换图像的背景,常用的替换图像背景的方式是:如图1所示,从多个背景图像中选取其中一个背景图像作为目标背景图像11,将需要替换背景的目标元素图像12整体作为一个图像元素,添加至目标背景图像11中。
在上述技术方案中,仅仅是给目标元素图像添加了一个背景图像,并没有对目标元素图像中的背景进行处理,且添加的背景图像只能在有限的待选背景图像中进行选取,无法自动生成一个全新的背景图像,很难创作出符合要求的高质量图像。
为解决上述技术问题,本公开实施例提供了一种图像处理方法,该方法包括:获取待编辑图像,其中,所述待编辑图像包括目标元素图像 和背景图像;响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图,其中,所述目标元素风格图与所述背景图像的美学属性相关。本公开实施例通过对待编辑图像中包括的元素图像进行风格处理,实现对待编辑图像中的目标元素图像进行编辑处理,以实现快速创作高质量图像,同时提高图像创作效率。
本公开实施例通过通过对待编辑图像中包括的元素图像的背景图像进行风格处理,实现对待编辑图像中的目标元素图像进行编辑处理,以实现快速创作高质量图像,同时提高图像创作效率。
下面对本公开提供的图像处理方法的使用场景进行简单的介绍。
在一个具体的使用场景中,由于拍摄环境限制,导致拍摄到的图像背景杂乱无章,影响图像的使用效果,可以采用本公开提供的图像处理方法,自动生成新的图像背景,以提高图像质量。
在另一个具体的使用场景中,在一个商品图像中,图像背景不够完美,过于单调,氛围感不够足,不能吸引用户关注,可以采用本公开提供的图像处理方法,自动生成新的图像背景,以提供图像的氛围感,能够吸引用户关注。
在另一个具体的使用场景中,不同场景或者不同的推荐平台需要不同风格的商品图像,如果重复拍摄会浪费大量的人物屋里,可以采用本公开提供的图像处理方法,对同一个商品生成不同场景下的背景图像,避免重复拍摄带来的资源浪费。
在另一个具体的使用场景中,由于拍摄条件有限,没有合适的背景道具,可以在有限的条件下,拍摄一张照片,然后采用本公开提供的图 像处理方法,对拍摄到的图像进行处理,为该图像生成一个新的背景图像,实现在有限的拍摄条件下,创作出高质量的图像。
下面,将参考附图详细地说明本公开的实施例。应当注意的是,不同的附图中相同的附图标记将用于指代已描述的相同的元件。
图2为本公开实施例中的一种图像处理方法的流程图,本实施例可适用于自动生成图像背景的情况,该方法可以由图像处理装置执行,该图像处理装置可以采用软件和/或硬件的方式实现。
如图2所示,本公开实施例提供的图像处理方法主要包括步骤S110-S140。
S110、获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像。
在本公开的一个实施方式中,所述待编辑图像可以是一个可编辑的海报或者杂志封面。如图3所示,图像处理页面20中展示待编辑图像21,在待编辑图像21中包括至少一个以图片形式存在的元素图像和背景图像22,以图片形式存在的元素图像如元素图像23,元素图像24,元素图像25。其中,待编辑图像中的任意一个元素图像均可以作为目标元素图像。
在本公开的一个实施方式中,所述元素图像中包括目标元素图像和背景元素图像,其中,目标元素图像是指目标元素图像中的主要拍摄对象,即目标元素图像中的前景元素图像,背景元素图像是指目标元素图像中包括的背景区域的图像。进一步的,所述目标元素可以是人物、物品等等,其中,人物可以是整个人体,也可以是人体的具体部位,例如:脸部、手部、上半身等等。物品可以是桌子、衣服、美妆工具等等。本公开实施例中并不限定目标元素的具体类型。
在本公开的一个实施方式中,所述待编辑图像包括至少一个待处 理元素图像,所述获取待编辑图像之后,所述方法还包括:响应于针对任一所述待处理元素图像的选取操作,将所述选取操作对应的待处理元素图像作为目标元素图像。
在本公开的一个实施方式中,如图3所示,响应于用户对待编辑图像中任一个待处理元素图像的选取操作,将选取的待处理元素图像作为目标元素图像。例如:响应于用户对待编辑图像中的待处理元素图像25的点击操作,将待处理元素图像25作为目标元素图像。
在本公开实施例中,用户可以通过待编辑图像中显示的待处理元素图像进行选取,也可以通过图像选取区域26中的图像标识进行选取。具体的,响应于用户针对图像选取区域26中的图像标识选取操作,将选取的图像标识对应的待处理元素图像作为目标元素图像,其中,所述图像标识和待编辑图像中的待处理元素图像是一一对应的关系。
在本公开的一个实施方式中,所述获取待编辑图像之后,所述方法还包括:响应于针对元素图像添加控件的操作,获取所述操作对应的添加图像,并将所述添加图像作为目标元素图像。
在本公开实施例中,如图3所示,在图像选取区域26中还包括图像添加控件27。具体的,响应于针对图像添加控件27的操作,显示图像添加页面,响应于针对所述图像添加页面的选取操作,将选取的添加图像作为目标元素图像。进一步的,将所述添加图像添加至待编辑图像中。
S120、响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件。
在本公开的一个实施方式中,响应于针对所述目标元素图像对应的图像标识的触发操作,显示编辑功能区域,其中,编辑功能区域展示至少一个编辑控件,具体的,编辑功能区域中展示背景生成控件,元素 图像替换控件和图像截取控件。进一步的,其中,所述背景生成控件用于响应于用户的触发操作,进入背景生成页面,以使得用户对目标元素图像的背景区域进行风格化处理。所述元素图像替换控件用于响应于用户的触发操作,进入图像替换页面,以选取新的元素图像替换当前的目标元素图像。所述图像截取控件,用于响应于用户的触发操作,进入截图页面,以供用户对所述目标元素图像进行截图处理。
在本公开的一个实施方式中,所述背景生成页面的第一区域展示的目标元素由所述目标元素图像进行抠图处理后得到,所述第一区域中展示的目标元素的背景为透明背景。
在本公开的一个实施方式中,响应于用户对背景生成控件的触发操作,对所述目标元素图像进行自动抠图处理。具体的,如图4所示,在所述背景生成页面30中,显示抠图提示框31,所述抠图提示框31中显示抠图提示信息,所述抠图提示信息用于提示用户正在进行抠图处理,其中,所述抠图提示信息还包括抠图进度,其中,所述抠图进度用于提示用户自动抠图的已经完成的比例。其中,所述抠图进度可以用进度条的形式显示,也可以用数字的形式显示,本公开实施例中不再具体限定。
在本公开的一个实施方式中,如果接收到自动抠图成功的指令,则在背景生成页面30中显示经过抠图处理得到图像。如图5所示,在接收到自动抠图成功的指令后,控制背景生成页面30中抠图提示框不再显示。在背景生成页面30中包括第一区域32和第二区域33,第一区域32用于展示抠图后的目标元素,且目标元素的背景区域为透明,第二区域33用于展示多个待选取的图像风格选项控件。
在本公开的一个实施方式中,在接收到自动抠图成功的指令后,控制在背景生成页面30中包括的第一区域32中显示背景为透明的目标元素的同时,在背景生成页面30还显示目标元素编辑控件34,所述目 标元素编辑控件34用于响应于用户的触发操作,对所述目标元素进行编辑。
在本公开实施例中,如图5所示,所述目标元素编辑控件34为一个编辑框,此时所述编辑框处于选中态。进一步的,处于选中态的编辑框,响应于对编辑框的操作,对目标元素进行编辑。具体的,上述目标元素进行编辑,可以包括对所述目标元素进行缩放处理,还可以包括对所述目标元素进行移动处理,所述目标元素进行旋转处理。其中,所述缩放处理用于控制所述目标元素在整个图像中的大小,所述移动处理用于控制所述目标元素在整个图像中的位置,所述旋转处理用于控制所述目标元素在整个图像中的方向。
后续处理过程中,基于对目标元素的编辑结果,例如其位置、大小、旋转角度等参数,生成目标元素风格图。
在本公开实施例中,响应于接收到编辑完成指令后,控制编辑框消失,此时,不可以再在对第二图像进行编辑操作。如果用户想要对第二图像再次进行编辑,可以重新控制编辑框处于选中态,再次对第二图像进行编辑。
在本公开的一个实施方式中,所述目标风格选项控件是指用户选取的图像风格选项控件。
S130、响应于对所述目标风格选项控件的触发操作,生成目标元素风格图。
在本公开实施例中,如图5所示,在背景生成页面30中包括多个图像风格选项控件,图像风格选项控件可以通过左右滑动的形式展示更多。所述图像风格选项控件包括风格图像和风格名称。其中,每个图像风格选项控件识对应一个风格化处理模型。每个图像风格选项控件用于标识一类图像风格,例如:夏日海滩、野外丛林、雪山之巅等等。
在本公开的一个实施方式中,所述响应于对所述目标风格选项控件的触发操作,生成目标元素风格图,包括:获取所述目标风格选项控件对应的目标风格化模型;将所述目标元素中输入至所述目标风格化模型,以使得所述目标风格化模型对所述目标元素中的背景区域进行风格化处理,并输出目标元素风格图,其中,目标元素风格图中的背景图像的风格信息与目标风格选项控件对应的风格信息一致。
在本公开的一个实施方式中,响应于接收到对任一所述图像风格选项控件的选取操作,将所述选取操作对应的图像风格选项控件作为目标风格选项控件;获取所述目标风格选项控件对应的目标风格化模型,利用所述目标风格化模型对所述目标元素图像中的背景区域进行风格化处理,得到目标元素风格图,其中,目标原色风格图中的背景元素的风格信息与目标风格选项控件对应的风格信息一致,所述目标元素风格图与所述背景图像的美学属性相关。
在本公开实施例中,如图5所示,响应于针对图像风格选项控件1选取操作,将图像风格选项控件1作为目标风格选项控件,并获取图像风格选项控件1对应的风格化模型作为目标风格化模型,利用所述目标风格化模型对目标元素图像中的背景区域进行风格化处理。
其中,美学属性为用于描述图像的属性,美学属性可以包括平衡元素、内容、色彩和谐、景深、光线、对象、三分法则、色彩鲜明度、重复性、对称性、运动模糊等。其中,所述目标元素风格图与所述背景图像的美学属性相关,包括:所述目标元素风格图与所述背景图像的美学属性一致,使得待编辑图像更加和谐。所述目标元素风格图与所述背景图像的美学属性相关,包括:所述目标元素风格图与所述背景图像的美学属性相反,使得待编辑图像中的元素更加有冲突性。
在本公开的一个实施方式中,将背景区域为透明的目标元素图像中输入至所述目标风格化模型,以使得所述目标风格化模型对所述背 景区域为透明的目标元素图像进行风格化处理,并输出目标元素风格图。
具体的,在目标风格标识是夏日海滩时,利用夏日海滩对应的夏日海滩风格化模型,对所述背景区域为透明的目标元素图像进行处理,得到目标元素风格图,其中,目标元素风格图的背景风格为夏日海滩。
在本公开实施例中,利用目标风格化模型对所述背景区域为透明的目标元素图像的背景区域进行风格化处理的过程中,显示背景生成动画,在生成背景之后,得到目标元素风格图,如图5所示,在背景生成页面30中的第一区域32中显示目标元素风格图。其中,背景生成动画支持取消,点击取消按钮动画消失,并且停止目标风格化模型对所述背景区域进行风格化处理的过程。
在本公开实施例中,通过风格化模型,自动生成目标元素的背景图像,避免了从已有的图像中选取背景图像,提高了图像质量和图像的氛围感。
在上述实施例的基础上,所述方法还包括:响应于接收到对所述目标风格选项控件的重复触发操作,将所述背景区域为透明的目标元素图像再次输入至目标风格化模型,以使得所述目标风格化模型对所所述背景区域为透明的目标元素图像再次进行风格化处理,并输出新的目标元素风格图,其中,所述新的目标元素风格图中包括的目标元素与所述首次输出的目标元素风格图中包括的目标元素相同,所述新的目标元素风格图与所述首次输出的目标元素风格图中包括的背景元素不相同,所述首次输出的目标元素风格图的背景元素对应的风格信息与所述新的目标元素风格图中包括的背景元素对应的风格信息相同。
在本公开实施例中,将生成背景图像之后得到的目标元素风格化图,在如图5所示的背景生成页面30中的第一区域32中显示目标元素风格化图,用户还可以再次选取新的图像风格选项控件,并利用新的 图像风格选项控件对应的风格化模型对所述背景区域为透明的目标元素图像中的背景区域进行风格化处理。
在本公开实施例中,用户再次选取的新的图像风格选项控件,可以是之前选取过的图像风格选项控件,例如:用户第一次选取的是图像风格选项控件1,再次选取的仍然是图像风格选项控件1。当用户再次选取图像风格选项控件1作为目标风格选项控件时,仍然调用图像风格选项控件1对应的风格化模型对所述背景区域为透明的目标元素图像的背景区域进行风格化处理。
在本公开实施例中,由于风格化模型在对所述背景区域为透明的目标元素图像的背景区域进行风格化处理的过程中,对于背景区域的图像是由风格化模型进行风格化处理后生成的,因此,即使两次同时选取相同的图像风格选项控件,其生成的图像中背景区域中的具体元素也不相同。
在本公开实施例中,以目标风格是夏日海滩为例进行说明。在首次选取夏日海滩时,生成的目标元素风格图,在再次选取夏日海滩时,生成新的目标元素风格图,两张目标元素风格图中的目标元素是完全一致的。两张目标元素风格图中的背景区域的风格信息也是一致的,换句话说,目标元素风格图的背景区域的风格是夏日海滩,新的目标元素风格图的背景区域的风格也是夏日海滩。但是在两张目标元素风格图中的背景区域中的具体图像元素是不同的。例如:在同样都是夏日海滩风格时,贝壳所在图像中的数量不一致、位置不一致、大小不一致,还可以是海水所占区域的比例不一致,海水颜色不一致等等。
在本公开实施例中,仅以第一次和第二次为例进行说明,每次触发同一个图像风格选项控件时,每次生成的图像背景中风格信息是一致的,但是具体图像元素是不一致的。这样,可以使得用户针对同一风格,生成不同的背景图像,以使得用户可以得到自己满意的图像。
S140、响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
在本公开实施例中,针对目标元素图像,进行背景生成操作,得到目标元素风格图之后,在背景生成页面中包括图像确认控件,响应于针对所述图像确认控件的触发操作,显示如图3所示图像处理页面,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
在本公开的一个实施方式中,提取所述背景图像中的美学属性信息,基于所述背景图像的美学属性信息,拉取与该美学属性信息的图像风格选项控件。
在本公开的一个实施方式中,针对待编辑图像中包括的元素图像均可以执行上述操作。具体的,图像处理页面中包括图像导出控件,响应于针对图像导出控件的触发操作,针对图像处理页面中的待编辑图像生成一个图片。
在本公开实施例中,提供了针对同一张待编辑图像中的多个图像进行背景生成的技术方案,提高图像的处理效率。
在本公开的一个实施方式中,将生成背景图像之后得到的目标元素风格图像,在如图5所示的背景生成页面中的图像显示区域中显示之后,响应于针对背景生成页面中抠图入口控件的触发操作,可以再次针对第二图像进行抠图处理。换句话说,可以针对包括目标元素和透明背景的第二图像再次进行抠图处理。
在上述实施例的基础上,本公开实施例对上述实施例进行了进一步的优化。在上述实施例中,响应于用户对背景生成控件的触发操作,对所述目标元素图像进行自动抠图处理并进入背景生成页面。在上述实施例的基础上,本公开实施例中提供了一种自动抠图成功后,进行优化抠图的方案。具体的,所述背景生成页面的第一区域中还包括:抠图入口控件,响应于接收到针对所述抠图入口控件的触发操作,显示抠 图页面,其中,所述抠图页面中包括至少一个抠图操作控件以及所述目标元素对应的掩膜图像;响应于针对所述抠图操作控件的操作,对所述目标元素对应的掩膜图像进行抠图处理。
在本公开实施例中,响应于针对所述抠图入口控件36的触发操作,进入抠图页面,如图6所示,所述抠图页面40中包括图像显示区域41和抠图操作控件显示区域42。在图像显示区域41中显示目标元素对应的掩膜图像。在抠图页面40中,目标元素对应的掩膜图像保持进入抠图页面40前的位置大小,并且不可移动、缩放、旋转。
在所述抠图操作控件显示区域42中包括多个抠图操作控件,用于响应于用户的操作,对目标元素对应的掩膜图像。具体的,在抠图操作控件显示区域42中包括智能画笔控件、手动涂抹控件、橡皮擦控件、重置控件和抠图完成控件。
具体的,响应于用户对智能画笔控件的触发操作,对所述目标元素对应的掩膜图像自动画出其对应的抠图区域并进行抠图处理。响应于用户对手动涂抹的触发操作,进入手动涂抹模式,在手动涂抹模式下,响应于用户对目标元素对应的掩膜图像的涂抹操作,确定目标元素对应的掩膜图像对应的抠图区域,并进行抠图处理。在智能画笔或者手动涂抹模式下,对目标元素对应的掩膜图像使用画笔涂抹画面时,需要在涂抹位置实时显示掩膜图像。进一步的,画笔支持调节参数:大小、硬度、透明度,如图6所示,画笔的参数以滑杆形式调整:滑杆数值1-100。
在本公开的一个实施方式中,响应于针对橡皮擦控件的触发操作,擦除对目标元素对应的掩膜图像的涂抹痕迹。进一步的,橡皮擦的画笔支持调节参数:大小、硬度、透明度,画笔的参数以滑杆形式调整:滑杆数值1-100。其中,橡皮擦和画笔的滑杆单独设置。
响应于接收到对重置控件的触发操作,对目标元素对应的掩膜图 像进行重置操作,即删除目标元素对应的掩膜图像的抠图操作,将目标元素对应的掩膜图像恢复至进入抠图页面时的初始状态。
在本公开的一个实施方式中,所述抠图页面中还包括抠图完成控件,响应于针对所述抠图完成控件的触发操作,结束对目标元素对应的掩膜图像的抠图处理,并应用于在抠图页面执行的抠图操作,并返回至如图5所示的背景生成页面。
在本公开实施例中,在自动抠图成功之后,用户可以进行手动抠图,以优化抠图效果,提高图像的质量。
在上述实施例的基础上,本公开实施例对上述实施例进行了进一步的优化。在上述实施例中,响应于用户对背景生成控件的触发操作,对所述目标元素图像进行自动抠图处理。如果接收到自动抠图成功的指令,则进入背景生成页面。在另一个实施方式中,响应于接收到响应于接收到抠图失败的指令,在所述背景生成页面的第一区域中显示所述目标元素图像以及抠图入口控件;响应于接收到针对所述抠图入口控件的触发操作,显示抠图页面,其中,所述抠图页面中包括至少一个抠图操作控件以及所述目标元素图像;响应于针对所述抠图操作控件的操作,对所述目标元素图像进行抠图处理。
在本公开的一个实施方式中,如果接收到自动抠图失败的指令,则在背景生成页面中目标元素图像和抠图入口控件。如图7所示,在背景生成页面30中显示背景区域为原始背景元素的目标元素图像和抠图失败提示框36,所述抠图失败提示框36包括抠图失败提示信息,抠图入口控件以及取消控件。
在本公开的一个实施方式中,响应于针对所述抠图入口控件的触发操作,显示抠图页面。在本公开实施例中,所述抠图页面与上述实施例中的抠图页面中的布局及控件内容的显示均一致。在通过该抠图入口控件进入抠图页面后,在抠图页面的图像显示区域显示背景区域为 原始背景元素的目标元素图像。换句话会说,在自动抠图失败之后,显示抠图入口控件,响应于与该抠图入口控件的触发操作,显示抠图页面,在抠图页面的图像显示区域中显示背景区域为原始背景元素的目标元素图像。在自动抠图成功之后,通过背景生成页面中的抠图控件35进入抠图页面,在抠图页面的图像显示区域中显示目标元素图像中的目标元素对应的掩膜图像,且背景为透明。
需要说明的是,在抠图页面中,除图像显示区域中显示的图像不同之外,其他内容均相同,对于目标元素图像的抠图方式与上述实施例中描述的对目标元素图像目标元素对应的掩膜图像的抠图方式相同,具体可参照上述实施例中的描述,本公开实施例中不再赘述。
在本公开实施例中,在自动抠图失败之后,提供手动抠图方案,提高背景生成的成功率,避免因抠图失败导致的背景生成失败的情况。
在本公开的一个实施方式中,响应于针对取消控件的触发操作,显示背景生成页面,该背景生成页面如图6所示。在自动抠图失败之后,通过触发取消控件进入背景生成页面,背景生成页面中的图像展示区域用于展示目标元素图像,即包括目标元素,也包括目标元素图像中的原始背景元素。在自动抠图成功之后,进入背景生成页面,背景生成页面中的图像展示区域用于展示包括目标元素且背景为透明的图像。
需要说明的是,即使自动抠图失败进入背景生成页面,仍然可以通过背景生成页面中的控件,对目标元素图像进行进一步的处理。其中,进一步的处理,包括对目标元素图像进行抠图。也包括直接利用手动抠图后的目标元素进行背景风格化处理。
图8为本公开实施例中的一种图像处理装置的结构示意图,本实施例可适用于生成图像背景的情况,该图像处理装置可以采用软件和/或硬件的方式实现。
如图8所示,本公开实施例提供的图像处理装置80主要包括:待编辑图像获取模块81、背景生成页面展示模块82、目标元素风格图生成模块83和待编辑图像处理模块84。
其中,待编辑图像获取模块81,用于获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像;背景生成页面展示模块82,用于响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;目标元素风格图生成模块83,用于响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;待编辑图像处理模块84,用于响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
在本公开的一个实施方式中,所述待编辑图像包括至少一个待处理元素图像,所述装置还包括:目标元素图像确定模块,用于在所述获取待编辑图像之后,响应于针对任一所述待处理元素图像的选取操作,将所述选取操作对应的待处理元素图像作为目标元素图像。
在本公开的一个实施方式中,目标元素图像确定模块,还用于在所述获取待编辑图像之后,响应于针对元素图像添加控件的操作,获取所述操作对应的添加图像,并将所述添加图像作为目标元素图像。
在本公开的一个实施方式中,所述背景生成页面的第一区域展示的目标元素由所述目标元素图像进行抠图处理后得到,所述第一区域中展示的目标元素的背景为透明背景。
在本公开的一个实施方式中,目标元素风格图生成模块83,包括:目标风格化模型获取单元,用于获取所述目标风格选项控件对应的目标风格化模型;目标风格化模型处理单元,用于将所述目标元素中输入至所述目标风格化模型,以使得所述目标风格化模型对所述目标元素 中的背景区域进行风格化处理,并输出目标元素风格图,其中,目标元素风格图中的背景元素的风格信息与目标风格选项控件对应的风格信息一致,其中,所述目标元素风格图与所述背景图像的美学属性相关。
在本公开的一个实施方式中,所述背景生成页面的第一区域中还包括:目标元素编辑控件,所述目标元素编辑控件用于响应于用户的触发操作,对所述目标元素进行编辑。
在本公开的一个实施方式中,所述背景生成页面的第一区域中还包括:抠图入口控件,所述装置还包括:抠图页面显示模块,用于响应于接收到针对所述抠图入口控件的触发操作,显示抠图页面,其中,所述抠图页面中包括至少一个抠图操作控件以及所述目标元素对应的掩膜图像;抠图处理模块,用于响应于针对所述抠图操作控件的操作,对所述目标元素对应的掩膜图像进行抠图处理。
在本公开的一个实施方式中,背景生成页面展示模块82,还用于响应于接收到抠图失败的指令,在所述背景生成页面的第一区域中显示所述目标元素图像以及抠图入口控件;抠图页面显示模块,还用于响应于接收到针对所述抠图入口控件的触发操作,显示抠图页面,其中,所述抠图页面中包括至少一个抠图操作控件以及所述目标元素图像;抠图处理模块,还用于响应于针对所述抠图操作控件的操作,对所述目标元素图像进行抠图处理。
本公开实施例提供的图像处理装置,可执行本公开方法实施例所提供的图像处理方法中所执行的步骤,具备执行步骤和有益效果此处不再赘述。
图9为本公开实施例中的一种电子设备的结构示意图。下面具体参考图9,其示出了适于用来实现本公开实施例中的电子设备900的结构示意图。本公开实施例中的电子设备900可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD (平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)、可穿戴终端设备等等的移动终端以及诸如数字TV、台式计算机、智能家居设备等等的固定终端。图9示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图9所示,电子设备900可以包括处理装置(例如中央处理器、图形处理器等)901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储装置908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理以实现如本公开所述的实施例的图像处理方法。在RAM903中,还存储有终端设备900操作所需的各种程序和数据。处理装置901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许终端设备900与其他设备进行无线或有线通信以交换数据。虽然图9示出了具有各种装置的终端设备900,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码,从而实现如上所述的图像处理方法。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM 902被安装。在该计算机程序被处理装置901执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该终端设备执行时,使得该终端设备:获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像;响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图,其中,所述目标元素风格图与所述背景图像的美学属性相关。
可选的,当上述一个或者多个程序被该终端设备执行时,该终端设备还可以执行上述实施例所述的其他步骤。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框 中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述 技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (12)

  1. 一种图像处理方法,包括:
    获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像;
    响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;
    响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;
    响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
  2. 根据权利要求1所述的图像处理方法,其中所述待编辑图像包括至少一个待处理元素图像,所述获取待编辑图像之后,所述方法还包括:
    响应于针对任一所述待处理元素图像的选取操作,将所述选取操作对应的待处理元素图像作为目标元素图像。
  3. 根据权利要求1所述的图像处理方法,其中所述获取待编辑图像之后,所述方法还包括:
    响应于针对元素图像添加控件的操作,获取所述操作对应的添加图像,并将所述添加图像作为目标元素图像。
  4. 根据权利要求1所述的图像处理方法,其中所述背景生成页面的第一区域展示的目标元素由所述目标元素图像进行抠图处理后得到,所述第一区域中展示的目标元素的背景为透明背景。
  5. 根据权利要求1所述的图像处理方法,其中所述响应于对所述 目标风格选项控件的触发操作,生成目标元素风格图,包括:
    获取所述目标风格选项控件对应的目标风格化模型;
    将所述目标元素中输入至所述目标风格化模型,以使得所述目标风格化模型对所述目标元素中的背景区域进行风格化处理,并输出目标元素风格图,其中,目标元素风格图中的背景区域的风格信息与目标风格选项控件对应的风格信息一致,所述目标元素风格图与所述背景图像的美学属性相关。
  6. 根据权利要求1所述的图像处理方法,其中所述背景生成页面的第一区域中还包括:目标元素编辑控件,所述目标元素编辑控件用于响应于用户的触发操作,对所述目标元素进行编辑。
  7. 根据权利要求4所述的图像处理方法,其中所述背景生成页面的第一区域中还包括:抠图入口控件,所述方法还包括:
    响应于接收到针对所述抠图入口控件的触发操作,显示抠图页面,其中,所述抠图页面中包括至少一个抠图操作控件以及所述目标元素对应的掩膜图像;
    响应于针对所述抠图操作控件的操作,对所述目标元素对应的掩膜图像进行抠图处理。
  8. 根据权利要求4所述的图像处理方法,所述方法还包括:
    响应于接收到抠图失败的指令,在所述背景生成页面的第一区域中显示所述目标元素图像以及抠图入口控件;
    响应于接收到针对所述抠图入口控件的触发操作,显示抠图页面,其中,所述抠图页面中包括至少一个抠图操作控件以及所述目标元素图像;
    响应于针对所述抠图操作控件的操作,对所述目标元素图像进行 抠图处理。
  9. 一种图像处理装置,包括:
    待编辑图像获取模块,用于获取待编辑图像,其中,所述待编辑图像包括目标元素图像和背景图像;
    背景生成页面展示模块,用于响应于对与所述目标元素图像对应的编辑控件的触发操作,展示背景生成页面;其中,所述背景生成页面的第一区域用于展示目标元素,所述背景生成页面的第二区域用于展示目标风格选项控件;
    目标元素风格图生成模块,用于响应于对所述目标风格选项控件的触发操作,生成目标元素风格图;
    待编辑图像处理模块,用于响应于对所述目标元素风格图的确认操作,将所述待编辑图像中的所述目标元素图像替换为所述目标元素风格图。
  10. 一种电子设备,所述电子设备包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-8中任一项所述的图像处理方法。
  11. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-8中任一项所述的图像处理方法。
  12. 一种计算机程序产品,该计算机程序产品包括计算机程序或指令,该计算机程序或指令被处理器执行时实现如权利要求1-8中任一项所述的图像处理方法。
PCT/CN2024/097128 2023-06-06 2024-06-03 图像处理方法、装置、设备、存储介质和程序产品 Ceased WO2024251092A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP24818624.9A EP4726519A1 (en) 2023-06-06 2024-06-03 Image processing method and apparatus, and device, storage medium and program product
KR1020257042509A KR20260011767A (ko) 2023-06-06 2024-06-03 이미지 처리 방법 및 장치, 및 디바이스, 저장 매체 및 프로그램 제품

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310666538.5A CN116578226A (zh) 2023-06-06 2023-06-06 图像处理方法、装置、设备、存储介质和程序产品
CN202310666538.5 2023-06-06

Publications (1)

Publication Number Publication Date
WO2024251092A1 true WO2024251092A1 (zh) 2024-12-12

Family

ID=87545261

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/097128 Ceased WO2024251092A1 (zh) 2023-06-06 2024-06-03 图像处理方法、装置、设备、存储介质和程序产品

Country Status (4)

Country Link
EP (1) EP4726519A1 (zh)
KR (1) KR20260011767A (zh)
CN (1) CN116578226A (zh)
WO (1) WO2024251092A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116578226A (zh) * 2023-06-06 2023-08-11 北京字跳网络技术有限公司 图像处理方法、装置、设备、存储介质和程序产品
CN117112826A (zh) * 2023-08-24 2023-11-24 北京火山引擎科技有限公司 一种图像生成方法、装置、计算机设备及存储介质
CN116977493A (zh) * 2023-08-31 2023-10-31 抖音视界有限公司 图像生成方法、装置、计算机可读介质及电子设备
CN117392280A (zh) * 2023-10-24 2024-01-12 北京字跳网络技术有限公司 图像处理方法、装置、设备、计算机可读存储介质及产品
CN117908743A (zh) * 2024-01-18 2024-04-19 北京字跳网络技术有限公司 一种媒体数据处理方法、装置、电子设备及存储介质
CN121170044A (zh) * 2024-06-19 2025-12-19 华为云计算技术有限公司 图像处理方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763233A (zh) * 2021-08-04 2021-12-07 深圳盈天下视觉科技有限公司 一种图像处理方法、服务器及拍照设备
CN114913061A (zh) * 2022-06-02 2022-08-16 北京字跳网络技术有限公司 一种图像处理方法、装置、存储介质及电子设备
CN115578278A (zh) * 2022-09-30 2023-01-06 北京字跳网络技术有限公司 图像处理方法、装置、设备、计算机可读存储介质及产品
US20230091423A1 (en) * 2021-11-22 2023-03-23 Beijing Baidu Netcom Science Technology Co., Ltd. Method of displaying image, electronic device and storage medium
CN116578226A (zh) * 2023-06-06 2023-08-11 北京字跳网络技术有限公司 图像处理方法、装置、设备、存储介质和程序产品

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113763233A (zh) * 2021-08-04 2021-12-07 深圳盈天下视觉科技有限公司 一种图像处理方法、服务器及拍照设备
US20230091423A1 (en) * 2021-11-22 2023-03-23 Beijing Baidu Netcom Science Technology Co., Ltd. Method of displaying image, electronic device and storage medium
CN114913061A (zh) * 2022-06-02 2022-08-16 北京字跳网络技术有限公司 一种图像处理方法、装置、存储介质及电子设备
CN115578278A (zh) * 2022-09-30 2023-01-06 北京字跳网络技术有限公司 图像处理方法、装置、设备、计算机可读存储介质及产品
CN116578226A (zh) * 2023-06-06 2023-08-11 北京字跳网络技术有限公司 图像处理方法、装置、设备、存储介质和程序产品

Also Published As

Publication number Publication date
EP4726519A1 (en) 2026-04-15
KR20260011767A (ko) 2026-01-23
CN116578226A (zh) 2023-08-11

Similar Documents

Publication Publication Date Title
WO2024251092A1 (zh) 图像处理方法、装置、设备、存储介质和程序产品
JP7568378B2 (ja) 画像表示方法、装置、機器及び媒体
US20110113361A1 (en) Adjustment presets for digital images
WO2024251228A1 (zh) 媒体内容展示方法、装置、电子设备及存储介质
CN113613067A (zh) 视频处理方法、装置、设备及存储介质
CN110134300A (zh) 一种图片编辑方法及装置
WO2024140166A1 (zh) 特效处理方法、装置、电子设备及存储介质
WO2024198947A1 (zh) 虚拟场景处理方法、装置、电子设备及存储介质
WO2024067144A1 (zh) 图像处理方法、装置、设备、计算机可读存储介质及产品
CN113705156A (zh) 字符处理方法及装置
WO2025118949A1 (zh) 特效处理方法、装置、电子设备及存储介质
WO2025031371A1 (zh) 特效的生成方法、装置、电子设备和存储介质
WO2025011490A1 (zh) 视频特效添加方法、装置、设备、存储介质和程序产品
WO2024099353A1 (zh) 视频处理方法、装置、电子设备及存储介质
CN118411436A (zh) 漫画生成方法、装置、电子设备和存储介质
WO2026002162A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2025087159A1 (zh) 图像处理方法、装置、设备、计算机可读存储介质及产品
WO2025036409A1 (zh) 媒体内容处理方法、设备、存储介质及程序产品
WO2025011491A1 (zh) 视频处理方法、装置、设备、存储介质和程序产品
WO2025098269A1 (zh) 视频处理方法、装置、电子设备及存储介质
CN108536510B (zh) 基于人机交互应用程序的实现方法和装置
WO2024078409A1 (zh) 图像预览方法、装置、电子设备及存储介质
CN113559503B (zh) 视频生成方法、设备及计算机可读介质
WO2023185968A1 (zh) 相机功能页面切换方法、装置、电子设备及存储介质
CN116459516A (zh) 分屏特效道具生成方法、装置、设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24818624

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 1020257042509

Country of ref document: KR

Free format text: ST27 STATUS EVENT CODE: A-0-1-A10-A15-NAP-PA0105 (AS PROVIDED BY THE NATIONAL OFFICE)

WWE Wipo information: entry into national phase

Ref document number: 1020257042509

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 2024818624

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2024818624

Country of ref document: EP

Effective date: 20260107

ENP Entry into the national phase

Ref document number: 2024818624

Country of ref document: EP

Effective date: 20260107

WWP Wipo information: published in national office

Ref document number: 1020257042509

Country of ref document: KR

ENP Entry into the national phase

Ref document number: 2024818624

Country of ref document: EP

Effective date: 20260107

ENP Entry into the national phase

Ref document number: 2024818624

Country of ref document: EP

Effective date: 20260107

ENP Entry into the national phase

Ref document number: 2024818624

Country of ref document: EP

Effective date: 20260107

WWP Wipo information: published in national office

Ref document number: 2024818624

Country of ref document: EP