Image editing method and device, equipment and storage medium

By receiving the interactive operation of multiple layers in the image editing interface and generating target images, the problem of lack of realism in the image combination in the prior art is solved, and more flexible and efficient layer fusion is achieved, which improves the efficiency of image editing and effects.

CN118918221APending Publication Date: 2024-11-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410962621.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing image editing tools lack realism when combining different images, making it difficult to achieve flexible layer fusion and efficient image editing.

Method used

By displaying the image editing interface, receiving the interaction of multiple layers, obtaining the target image generated by the fusion layer, and creating the target layer in the interface to display the newly generated image, supporting a more flexible layer fusion process.

Benefits of technology

It improves the efficiency and realism of image editing, allowing users to more flexibly combine image elements and create new layers, thereby improving image editing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918221A_ABST
    Figure CN118918221A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image editing method and device, equipment and a storage medium. The method comprises the steps that an image editing interface is displayed, the image editing interface comprises a canvas component, and the canvas component is associated with a plurality of image layers; receiving an interaction operation for the plurality of layers, wherein the interaction operation indicates selection of one group of layers in the plurality of layers; obtaining a target image generated by fusing the group of layers; and creating a target layer corresponding to the target image in the image editing interface to display the target image in the canvas component. In this way, the image editing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to methods, devices, apparatuses, and computer-readable storage media for image editing. Background Art

[0002] With the development of computer technology, image editing tools have become common tools for people in daily life. Such image editing tools can, for example, support users to edit the size of an image, adjust the color of an image, etc. Summary of the invention

[0003] In a first aspect of the present disclosure, a method for image editing is provided. The method includes: displaying an image editing interface, the image editing interface including a canvas component, the canvas component being associated with multiple layers; receiving an interactive operation for the multiple layers, the interactive operation indicating a selection of a group of layers from the multiple layers; acquiring a target image generated by fusing the group of layers; and creating a target layer corresponding to the target image in the image editing interface to display the target image in the canvas component.

[0004] In a second aspect of the present disclosure, a device for image editing is provided. The device includes: a display module configured to display an image editing interface, the image editing interface includes a canvas component, and the canvas component is associated with multiple layers; a receiving module configured to receive an interactive operation for the multiple layers, the interactive operation indicating a selection of a group of layers in the multiple layers; an acquisition module configured to display a target image generated by fusing the group of layers; and a creation module configured to create a target layer corresponding to the target image in the image editing interface to display the target image in the canvas component.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The device includes at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit. When the instructions are executed by the at least one processing unit, the device executes the method of the first aspect.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and the computer program can be executed by a processor to implement the method of the first aspect.

[0007] It should be understood that the contents described in this content section are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0009] Figure 1 A schematic diagram showing an example environment in which embodiments of the present disclosure can be implemented;

[0010] FIG. 2A to FIG. 2D Shows a schematic diagram of an interface according to some embodiments of the present disclosure;

[0011] Figure 3 A flowchart showing a process of image editing according to some embodiments of the present disclosure;

[0012] Figure 4 A schematic structural block diagram of an apparatus for image editing according to some embodiments of the present disclosure is shown;

[0013] Figure 5 A block diagram of an electronic device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0014] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0015] It should be noted that the titles of any sections / subsections provided herein are not restrictive. Various embodiments are described throughout this article, and any type of embodiment may be included under any section / subsection. In addition, the embodiments described in any section / subsection may be combined in any manner with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0016] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below. The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may be included below.

[0017] The embodiments of the present disclosure may involve user data, data acquisition and / or use, etc. These aspects are subject to the corresponding laws, regulations and relevant provisions. In the embodiments of the present disclosure, all data collection, acquisition, processing, processing, forwarding, use, etc. are carried out on the premise that the user knows and confirms. Accordingly, when implementing each embodiment of the present disclosure, the type, scope of use, usage scenario, etc. of the data or information that may be involved should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with the relevant laws and regulations. The specific notification and / or authorization method can vary according to the actual situation and application scenario, and the scope of the present disclosure is not limited in this respect.

[0018] In this specification and the embodiments, if personal information processing is involved, it will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or it is necessary to perform a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.

[0019] As discussed above, image editing tools can improve people's ability to edit various images. In some image editing scenarios, people want to combine different images. For example, people can add some visual elements to the background image to achieve superimposed display. However, the image obtained in this way lacks realism.

[0020] The embodiment of the present disclosure proposes a solution for image editing. The solution includes: displaying an image editing interface, the image editing interface includes a canvas component, the canvas component is associated with multiple layers; receiving an interactive operation for the multiple layers, the interactive operation indicates the selection of a group of layers in the multiple layers; obtaining a target image generated by fusing the group of layers; and creating a target layer corresponding to the target image in the image editing interface to display the target image in the canvas component.

[0021] In this way, the embodiments of the present disclosure can support a more flexible layer fusion process and can create a newly generated image as a new layer, thereby improving the efficiency of image editing.

[0022] Example Environment

[0023] Figure 1 1 is a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, example environment 100 may include electronic device 110 .

[0024] In the example environment 100, an application 120 is installed in an electronic device 110. A user 140 can interact with the application 120 via the electronic device 110 and / or its attached device. The application 120 can be a media editing application, etc., or any other appropriate application. For example, the application 120 can be a browser, and provides a media editing service by accessing a website.

[0025] exist Figure 1 In the environment 100 of FIG. 1 , if the application 120 is in an active state, the application 120 may provide a presentation interface 150 for the user 140 . The user 140 may perform a media editing operation based on the interface 150 .

[0026] In some embodiments, the electronic device 110 communicates with the server 130 to provide services for the application 120. The electronic device 110 can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. In some embodiments, the electronic device 110 can also support any type of interface for the user (such as a "wearable" circuit, etc.).

[0027] The server 130 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms. The server 130 may include, for example, a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, etc. The server 130 may provide background services for the application 120 that supports content presentation in the electronic device 110.

[0028] A communication connection may be established between the server 130 and the electronic device 110. The communication connection may be established in a wired manner or a wireless manner. The communication connection may include, but is not limited to, a Bluetooth connection, a mobile network connection, a universal serial bus connection, a wireless fidelity connection, etc., and the embodiments of the present disclosure are not limited in this respect. In the embodiments of the present disclosure, the server 130 and the electronic device 110 may implement signaling interaction through the communication connection between the two.

[0029] It should be understood that the structure and function of the various elements in the environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0030] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

[0031] Example Interaction

[0032] The following will refer to FIG. 2A to FIG. 2D To describe an example interaction process according to an embodiment of the present disclosure. FIG. 2A to FIG. 2D Example interfaces 200A to 200D according to some embodiments of the present disclosure are shown. Interfaces 200A to 200D may be composed of, for example, Figure 1 The electronic device 110 is provided as shown.

[0033] Figure 2A FIG. 2 shows an image editing interface 200A according to some embodiments of the present disclosure. Figure 2A As shown, the interface 200A includes a canvas component 215 , which may be associated with one or more layers, such as layer 205 - 1 , layer 205 - 2 , and layer 205 - 3 (individually or collectively referred to as layers 205 ).

[0034] In some embodiments, the electronic device 110 can add, delete or edit the layer 205 based on the layer editing operation. Accordingly, the canvas component 215 can display the visual content corresponding to each layer in an overlapping manner based on the order of the layers. For example, the canvas component 215 can display an image 210-1 corresponding to the layer 205-1, an image 210-2 corresponding to the layer 205-2, and an image 210-3 corresponding to the layer 205-3. The images 210-1 to 210-3 may also be referred to individually or collectively as images 210.

[0035] In some embodiments, the layer 205 may also correspond to other types of visual content, such as stickers, text, etc. Such types of layers may also support the layer fusion operation of the present disclosure, and the visual content corresponding to the layer may be converted into an image to perform layer fusion. The following will take a layer corresponding to image content as an example to describe an example process of layer fusion.

[0036] As an example, the electronic device 110 may edit the image 210 corresponding to each layer 205 in the canvas component 215 based on the received editing operation, for example, move the image 210, scale the image 210, and so on.

[0037] In some embodiments, the electronic device 110 may receive a user's selection of the layer 205-1 or the image 210-1 corresponding to the layer 205-1. For example, the electronic device 110 may receive a user's selection of the layer 205-1 in the layer list. Alternatively, the user may also select the image 210-1 corresponding to the layer 205-1 through the canvas component 215.

[0038] Accordingly, the electronic device 110 may present a set of editing controls associated with the layer 205-1. Figure 2A As shown, the set of editing controls may include a fused control 220 .

[0039] In some embodiments, after receiving a trigger on the fusion control 220, the electronic device 110 may display the following Figure 2B The interface 200B shown. Figure 2B As shown, the electronic device 110 may provide a foreground layer selection control 225 (also referred to as a first layer selection control) and a background layer selection control 230 (also referred to as a second layer selection control).

[0040] As an example, the foreground layer selection control 225 can be used to select one or more layers and determine the one or more layers as the foreground layers to be fused. The background layer selection control 230 can be used to select one or more layers and determine the one or more layers as the background layers to be fused.

[0041] In some embodiments, the electronic device 110 may also automatically add the layer 205-1 as a foreground layer or a background layer based on the layer order of the layer 205-1 selected by the user in the multiple layers. Figure 2B As an example, the layer 205 - 1 may correspond to a top layer in the plurality of layers 205 , for example, and the layer 205 - 1 may be added as a foreground layer.

[0042] In some scenarios, the user may select layer 205 - 2 , for example, and trigger the layer fusion operation. Accordingly, since layer 205 - 2 is the bottom layer in multiple layers 205 , layer 205 - 2 may be added as a background layer.

[0043] In some embodiments, the foreground layer selection control 225 or the background layer selection control 230 may also display a preview image of the selected foreground layer or background layer, for example.

[0044] In some embodiments, when the layer 205-1 is determined to be the foreground layer, the electronic device 110 may also display a first marking element corresponding to the outline of the image 210-1 in the canvas component 215 to indicate that the corresponding layer 205-1 is selected as the foreground layer.

[0045] Additionally, the electronic device 110 may receive a selection of the background layer selection control 230 and may enter a background layer selection mode. For example, the user may select the layer 205-2 as the background layer to be merged by clicking the layer 205-2 in the layer list or clicking the image 210-2 corresponding to the layer 205-2 in the canvas component 215.

[0046] Similarly, the electronic device 110 may display a second marking element corresponding to the outline of the image 210-2 in the canvas component 215 to indicate that the corresponding layer 205-2 is selected as the background layer. As an example, the first marking element and the second marking element may have different styles, such as different outline colors, different styles of outline lines, etc.

[0047] In some embodiments, the electronic device 110 may also provide a prompt item input control 232 to obtain a prompt item input by the user. In some embodiments, such a prompt item may be used to describe the hue information or light and shadow information of the fused image to be generated.

[0048] In some embodiments, the electronic device 110 may also support the user to configure control parameters of the fusion process. As an example, the control parameters may be used to indicate the degree to which the image in the foreground layer is retained.

[0049] Further, the electronic device 110 may receive a user selection of the merge button 234 to trigger the execution of a merge process based on the selected set of layers (eg, the layer 205 - 1 and the layer 205 - 2 ).

[0050] In some embodiments, the fusion process may be performed by the electronic device 110 and / or the server 130. The specific details of the fusion process will be described in detail below. Further, the electronic device 110 may obtain one or more images generated by fusing the set of layers.

[0051] In some embodiments, the electronic device 110 may obtain multiple images generated by fusing the set of layers. Figure 2C In the example shown, a single fusion request may trigger the generation of four images. Figure 2C The target image 245 is shown in the image viewing window 200C.

[0052] Further, the electronic device 110 may, for example, switch to display other images in the generated multiple images based on the received first preset operation (e.g., selection of the control 250). Additionally, the electronic device 110 may, for example, trigger the generation of a new set of images based on the set of layers based on the received second preset operation (e.g., selection of the control 255).

[0053] For example, after receiving the selection of control 255, electronic device 110 may obtain four additional images that are re-uploaded by fusing the set of layers, and may provide eight images for the user to view and / or select.

[0054] Additionally, the electronic device 110 may also provide, for example, a control 235 for reselecting a foreground layer and a control 240 for reselecting a background layer in the window 200C. After receiving the selection of the control 235 or the control 240, the electronic device 110 may, for example, reselect the foreground layer. Figure 2B The layer selection interface shown.

[0055] In some embodiments, the electronic device 110 may, for example, receive a user trigger on the control 260 to indicate a selection of the target image 245 displayed in the window 200C.

[0056] Furthermore, if Figure 2D As shown, the electronic device 110 may create a layer 265 corresponding to the selected target image 245 in the image editing interface. In addition, the electronic device 110 may display the selected target image 245 in the canvas component 215.

[0057] In some embodiments, the created layer 265 may have the highest layer priority, for example, so as to be displayed superimposed on the existing layer 205 .

[0058] Furthermore, the electronic device 110 may support the user to further edit the created layer 265 in the image editing interface. The present disclosure is not intended to limit the specific subsequent editing process of the layer 265.

[0059] In some embodiments, Figure 2D As shown, the electronic device 110 can also display an image selection area 270 corresponding to the layer 265 in the interface 200D. The image selection area 270 can display an image generated by fusing the layer 205-1 and the layer 205-2. For example, the image selection area 270 can display four images corresponding to the image viewing window 200C.

[0060] Furthermore, the electronic device 110 may support the user to select another image in the image selection area 270 to associate the layer 265 with the selected another image. Accordingly, the electronic device 110 may update the canvas component 215 to display the selected another image.

[0061] Based on the process described above, the embodiments of the present disclosure can support a more flexible layer fusion process and can create a newly generated image as a new layer, thereby improving the efficiency of image editing.

[0062] The specific generation process of the target image 245 will be further described below. In some embodiments, the electronic device 110 and / or the server 130 may perform a fusion process using a target model to generate the target image 245. As an example, such a target model may include an image generation model.

[0063] Specifically, the electronic device 110 and / or the server 130 may extract foreground objects from a foreground layer in a set of layers. Taking layer 205-1 as an example of a foreground layer, the electronic device 110 and / or the server 130 may extract foreground objects, such as a bucket and a shovel, from layer 205-1 by using appropriate entity extraction techniques.

[0064] Further, the electronic device 110 and / or the server 130 may add the foreground object to the background layer in the set of layers to generate an intermediate image. For example, the electronic device 110 and / or the server 130 may directly superimpose the extracted bucket and shovel onto the corresponding positions of the background layer 205-2 to obtain an intermediate image.

[0065] Additionally, the electronic device 110 and / or the server 130 may construct input information of the target model based on the intermediate image and mask information corresponding to the foreground object. As an example, the mask information may indicate the area of ​​the foreground object in the background layer.

[0066] Specifically, the electronic device 110 and / or the server 130 may use the intermediate image as the initial input of the image generation model, and may control the mixing of the feature representation corresponding to the intermediate image and the feature representation corresponding to the foreground object through mask information.

[0067] In some embodiments, the input information of the image generation model may also include a control parameter corresponding to the foreground object. As an example, the control parameter indicates the degree of change of the foreground object. In some embodiments, as described above, the control parameter may be input by a user configuring the image editing interface. Alternatively, the control parameter may also be a preset parameter, for example.

[0068] Additionally, the input information of the image generation model may also include a prompt item input by the user. As described above, the prompt item may describe the color information and / or light and shadow information of the fused image to be generated.

[0069] Furthermore, the image generation model can perform an image fusion process based on the received input information, thereby completing the fusion between different layers.

[0070] Example Process

[0071] Figure 3FIG. 3 is a flowchart of a process 300 for image editing according to some embodiments of the present disclosure. The process 300 may be implemented at the electronic device 110. Figure 1 Process 300 is described.

[0072] In box 310, the electronic device 110 displays an image editing interface, where the image editing interface includes a canvas component associated with multiple layers.

[0073] In block 320 , the electronic device 110 receives an interaction operation for the plurality of layers, the interaction operation indicating a selection of a group of layers among the plurality of layers.

[0074] In block 330 , the electronic device 110 obtains a target image generated by fusing a set of layers.

[0075] In box 340, the electronic device 110 creates a target layer corresponding to the target image in the image editing interface to display the target image in the canvas component.

[0076] In some embodiments, receiving interactive operations for multiple layers includes: receiving a fusion request for a first layer among the multiple layers; in response to the fusion request, displaying a first layer selection control for selecting a foreground layer and / or a second layer selection control for selecting a background layer; and determining a set of layers to be fused via the first layer selection control and / or the second layer control.

[0077] In some embodiments, receiving a fusion request for a first layer among multiple layers includes: receiving a selection of the first layer or an image corresponding to the first layer; displaying a fusion control associated with the first layer; and receiving the fusion request in response to the selection of the fusion control.

[0078] In some embodiments, the method 300 further includes: adding the first layer as a foreground layer or a background layer based on a layer order of the first layer in the plurality of levels.

[0079] In some embodiments, determining a group of layers to be fused via the first layer selection control and / or the second layer control includes: selecting a second layer from multiple layers via the first layer selection control and / or the second layer selection control; and determining a group of layers to be fused based on the first layer and the second layer.

[0080] In some embodiments, obtaining a target image generated by fusing a set of layers includes: obtaining an input target prompt item via a prompt item input control; and obtaining a target image, wherein the target image is generated by fusing a set of layers by a target model based on the target prompt item.

[0081] In some embodiments, the prompt item describes color information and / or light and shadow information of the fused image to be generated.

[0082] In some embodiments, acquiring a target image generated by fusing a group of layers includes: acquiring a first group of images generated by fusing a group of layers; and displaying the target image in the first group of images in an image viewing window.

[0083] In some embodiments, method 300 further includes: in response to receiving a first preset operation, displaying another image in the first set of images in the image viewing window; and / or in response to receiving a second preset operation, triggering generation of a second set of images by fusing a set of layers.

[0084] In some embodiments, the method 300 further includes: displaying an image selection area corresponding to the target layer in the image editing interface, the image selection area displaying a first group of images generated by fusing a group of layers.

[0085] In some embodiments, a target image is generated based on the following process: extracting a foreground object in a foreground layer in a set of layers; adding the foreground object to a background layer in a set of layers to generate an intermediate image; and constructing input information of a target model based on the intermediate image and mask information corresponding to the foreground object to control the target model to generate the target image.

[0086] In some embodiments, the input information further indicates: a control parameter corresponding to the foreground object, the control parameter indicating the degree of change of the foreground object; and / or a prompt item, the prompt item describing the color information and / or light and shadow information of the fused image to be generated.

[0087] Example devices and equipment

[0088] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 4 A schematic structural block diagram of an apparatus 400 for image editing according to some embodiments of the present disclosure is shown. The apparatus 400 may be implemented as or included in the electronic device 110 discussed above. Each module / component in the apparatus 400 may be implemented by hardware, software, firmware, or any combination thereof.

[0089] like Figure 4 As shown, the device 400 includes a display module 410, which is configured to display an image editing interface, the image editing interface includes a canvas component, and the canvas component is associated with multiple layers; a receiving module 420, which is configured to receive interactive operations for multiple layers, the interactive operations indicate the selection of a group of layers among the multiple layers; an acquisition module 430, which is configured to display a target image generated by fusing a group of layers; and a creation module 440, which is configured to create a target layer corresponding to the target image in the image editing interface to display the target image in the canvas component.

[0090] In some embodiments, the receiving module 420 is further configured to: receive a fusion request for a first layer among multiple layers; display a first layer selection control for selecting a foreground layer and / or a second layer selection control for selecting a background layer in response to the fusion request; and determine a group of layers to be fused via the first layer selection control and / or the second layer control.

[0091] In some embodiments, the receiving module 420 is further configured to: receive a selection of the first layer or an image corresponding to the first layer; display a fusion control associated with the first layer; and receive a fusion request in response to the selection of the fusion control.

[0092] In some embodiments, the apparatus 400 further includes an adding module, which is configured to add the first layer as a foreground layer or a background layer based on a layer order of the first layer in multiple levels.

[0093] In some embodiments, the receiving module 420 is further configured to: select a second layer from the multiple layers via a first layer selection control and / or a second layer selection control; and determine a set of layers to be merged based on the first layer and the second layer.

[0094] In some embodiments, the acquisition module 430 is further configured to: acquire an input target prompt item via a prompt item input control; and acquire a target image, where the target image is generated by fusing a group of layers by a target model based on the target prompt item.

[0095] In some embodiments, the prompt item describes color information and / or light and shadow information of the fused image to be generated.

[0096] In some embodiments, the acquisition module 430 is further configured to: acquire a first group of images generated by fusing a group of layers; and display a target image in the first group of images in the image viewing window.

[0097] In some embodiments, the device 400 also includes a first processing module, which is configured to: display another image in the first group of images in the image viewing window in response to receiving a first preset operation; and / or trigger the generation of a second group of images by fusing a group of layers in response to receiving a second preset operation.

[0098] In some embodiments, the device 400 further includes a second processing module, which is configured to: display an image selection area corresponding to the target layer in the image editing interface, wherein the image selection area displays a first group of images generated by fusing a group of layers.

[0099] In some embodiments, a target image is generated based on the following process: extracting a foreground object in a foreground layer in a set of layers; adding the foreground object to a background layer in a set of layers to generate an intermediate image; and constructing input information of a target model based on the intermediate image and mask information corresponding to the foreground object to control the target model to generate the target image.

[0100] In some embodiments, the input information further indicates: a control parameter corresponding to the foreground object, the control parameter indicating the degree of change of the foreground object; and / or a prompt item, the prompt item describing the color information and / or light and shadow information of the fused image to be generated.

[0101] The units included in the device 400 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 400 can be implemented at least in part by one or more hardware logic components. As an example and not limitation, exemplary types of hardware logic components that can be used 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.

[0102] Figure 5 1 shows a block diagram of an electronic device 500 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 5 The electronic device 500 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. Figure 5 The electronic device 500 shown can be used to implement Figure 1 An electronic device 110 is shown.

[0103] like Figure 5 As shown, the electronic device 500 is in the form of a general electronic device. The components of the electronic device 500 may include, but are not limited to, one or more processors or processing units 510, a memory 520, a storage device 530, one or more communication units 540, one or more input devices 550, and one or more output devices 560. The processing unit 510 may be an actual or virtual processor and is capable of performing various processes according to a program stored in the memory 520. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of the electronic device 500.

[0104] The electronic device 500 typically includes a plurality of computer storage media. Such media may be any accessible media that is accessible to the electronic device 500, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 520 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 530 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the electronic device 500.

[0105] The electronic device 500 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 5 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. The memory 520 may include a computer program product 525 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.

[0106] The communication unit 540 implements communication with other electronic devices through a communication medium. Additionally, the functions of the components of the electronic device 500 can be implemented in a single computing cluster or multiple computing machines that can communicate through a communication connection. Therefore, the electronic device 500 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0107] The input device 550 may be one or more input devices, such as a mouse, a keyboard, a tracking ball, etc. The output device 560 may be one or more output devices, such as a display, a speaker, a printer, etc. The electronic device 500 may also communicate with one or more external devices (not shown) through the communication unit 540 as needed, such as a storage device, a display device, etc., communicate with one or more devices that allow a user to interact with the electronic device 500, or communicate with any device that allows the electronic device 500 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0108] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0109] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0110] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0111] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0112] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0113] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.

Claims

1. A method for image editing, comprising: Displaying an image editing interface, wherein the image editing interface includes a canvas component, and the canvas component is associated with multiple layers; receiving an interaction operation for the plurality of layers, the interaction operation indicating a selection of a group of layers among the plurality of layers; Obtaining a target image generated by fusing the set of layers; as well as A target layer corresponding to the target image is created in the image editing interface to display the target image in the canvas component.

2. The method according to claim 1, wherein receiving the interactive operation for the plurality of layers comprises: receiving a fusion request for a first layer of the plurality of layers; In response to the fusion request, displaying a first layer selection control for selecting a foreground layer and / or a second layer selection control for selecting a background layer; as well as The set of layers to be merged is determined via the first layer selection control and / or the second layer control.

3. The method of claim 2, wherein receiving a fusion request for a first layer among the plurality of layers comprises: receiving a selection of the first layer or visual content corresponding to the first layer; displaying a fusion control associated with the first layer; as well as In response to selection of the merge control, the merge request is received.

4. The method according to claim 2, further comprising: The first layer is added as the foreground layer or the background layer based on a layer order of the first layer in the multiple levels.

5. The method according to claim 2, wherein determining the set of layers to be merged via the first layer selection control and / or the second layer control comprises: Selecting a second layer from among the plurality of layers via the first layer selection control and / or the second layer selection control; as well as The group of layers to be fused is determined based on the first layer and the second layer.

6. The method according to claim 1, wherein obtaining a target image generated by fusing the set of layers comprises: Obtain the input target prompt item through the prompt item input control; as well as The target image is obtained, where the target image is generated by fusing the set of layers by a target model based on the target prompt item. 7 . The method according to claim 6 , wherein the prompt item describes color information and / or light and shadow information of the fused image to be generated.

8. The method according to claim 1, wherein obtaining a target image generated by fusing the set of layers comprises: Obtaining a first set of images generated by fusing the set of layers; as well as The target image in the first group of images is displayed in an image viewing window.

9. The method according to claim 8, further comprising: In response to receiving a first preset operation, displaying another image in the first group of images in the image viewing window; and / or In response to receiving a second preset operation, generating a second set of images by fusing the set of layers is triggered.

10. The method according to claim 8, further comprising: An image selection area corresponding to the target layer is displayed in the image editing interface, and the image selection area displays the first group of images generated by fusing the group of layers.

11. The method according to claim 1, wherein the target image is generated based on the following process: extracting a foreground object in a foreground layer in the set of layers; adding the foreground object to a background layer in the set of layers to generate an intermediate image; as well as Based on the intermediate image and the mask information corresponding to the foreground object, input information of the target model is constructed to control the target model to generate the target image.

12. The method according to claim 11, wherein the input information further indicates: a control parameter corresponding to the foreground object, the control parameter indicating a degree of change of the foreground object; and / or A prompt item, wherein the prompt item describes color information and / or light and shadow information of the fused image to be generated.

13. A device for image editing, comprising: A display module is configured to display an image editing interface, wherein the image editing interface includes a canvas component, and the canvas component is associated with a plurality of layers; A receiving module configured to receive an interaction operation for the plurality of layers, wherein the interaction operation indicates a selection of a group of layers among the plurality of layers; an acquisition module configured to display a target image generated by fusing the set of layers; as well as A creation module is configured to create a target layer corresponding to the target image in the image editing interface to display the target image in the canvas component.

14. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 12 when executed by the at least one processing unit.

15. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 12 when executed by a processor.