WO2025237178A1 - 一种图像处理方法、装置、设备、介质及程序产品 - Google Patents

一种图像处理方法、装置、设备、介质及程序产品

Info

Publication number
WO2025237178A1
WO2025237178A1 PCT/CN2025/093714 CN2025093714W WO2025237178A1 WO 2025237178 A1 WO2025237178 A1 WO 2025237178A1 CN 2025093714 W CN2025093714 W CN 2025093714W WO 2025237178 A1 WO2025237178 A1 WO 2025237178A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
layer
target
editing
area
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.)
Pending
Application number
PCT/CN2025/093714
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
Publication of WO2025237178A1 publication Critical patent/WO2025237178A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

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/04842Selection of displayed objects or displayed text elements
    • 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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • This disclosure relates to an image processing method, apparatus, device, medium, and program product.
  • image generation tools can be used to visualize users' creative ideas, thereby helping to generate works that meet expectations.
  • This disclosure provides an image processing method, apparatus, device, medium, and program product that can improve design efficiency and user experience.
  • embodiments of this disclosure provide an image processing method, including:
  • an editing area and a preview area are displayed on the image generation page;
  • the target image corresponding to the editing operation is displayed in the editing area
  • a preview image is displayed in the preview area, wherein the preview image is generated based on the target image.
  • embodiments of this disclosure also provide an image processing apparatus, the apparatus comprising:
  • the control display module is used to display the target control on the image generation page
  • the preview area display module is used to display the editing area and the preview area on the image generation page in response to a trigger operation on the target control;
  • An image display module is used to display the target image corresponding to the editing operation in the editing area in response to an editing operation input to the image generation page;
  • An image preview module is used to display a preview image in the preview area, wherein the preview image is generated based on the target image.
  • embodiments of this disclosure also provide an electronic device, the electronic device comprising:
  • One or more processors are One or more processors;
  • 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 embodiment of this disclosure.
  • embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the image processing method as described in any embodiment of this disclosure.
  • embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements the image processing method as described in any embodiment of this disclosure.
  • Figure 1 is a schematic flowchart of an image processing method provided in an embodiment of this disclosure
  • Figure 2 is a schematic diagram of an image generation page provided in an embodiment of this disclosure.
  • Figure 3 is a schematic diagram of another image generation page provided in an embodiment of this disclosure.
  • Figure 4 is a schematic diagram of another image generation page provided in an embodiment of this disclosure.
  • FIG. 5 is a flowchart illustrating another image processing method provided in an embodiment of this disclosure.
  • Figure 6 is a schematic diagram of another image generation page provided in an embodiment of this disclosure.
  • Figure 7 is a schematic diagram of the structure of an image processing device provided in an embodiment of this disclosure.
  • Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.
  • a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information.
  • This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
  • sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format.
  • the pop-up window can also include a selection control allowing the user to choose "agree” or “disagree” to provide personal information to the electronic device.
  • FIG. 1 is a schematic flowchart of an image processing method provided in an embodiment of this disclosure. This embodiment is applicable to situations where image generation tools are used to visualize creative ideas into works, such as generating advertising images, product images, interior design drafts, architectural design drafts, or game/animation design drafts.
  • This method can be executed by an image generation device, which can be implemented in software and/or hardware, optionally through an electronic device, such as a mobile terminal, PC, or server.
  • the method includes:
  • the image generation page represents the interactive page of the image generation tool.
  • the image generation tool can be a client that performs image generation operations.
  • the client includes web clients, applications, or mini-programs, etc.
  • the image generation operation represents the process of generating an image through an image generation model.
  • Image generation operations can include text-to-image operations based on the image generation model, or image-to-image operations based on the image generation model.
  • the image generation model learns the features of existing data to mimic human creativity, generating content with a certain degree of creativity. For example, the image generation model can generate relevant content based on input conditions or prompts.
  • the target control is used to trigger the target editing function.
  • the image generation page displays an editing area and a preview area, and the preview image in the preview area is refreshed in real time based on the interactive operations in the editing area.
  • the target editing function allows for image editing in the editing area and displays the real-time generated preview image in the preview area.
  • the editing area can be a canvas area on the image generation page, where artwork can be created.
  • existing materials can be input into the editing area, and the desired artwork can be generated by splicing the materials.
  • Strokes can be input into the editing area to depict the proportional relationships of elements in the image, the image structure, tone, or style, so as to generate the desired effect through the strokes.
  • the editing area corresponds to at least one layer. If the editing area includes two or more layers, and there is an occlusion relationship between the layers, only the image content that is not completely occluded can be displayed in the editing area. The image content that is not completely occluded is considered the visible image content in the editing area.
  • the text-to-image function can be used to generate an image by inputting text content.
  • the image-to-image function can be used to generate an image by inputting an image.
  • the preview area represents the display area of the preview image on the image generation page.
  • the preview image can be the generated image.
  • an image can be generated from the image content visible in the editing area to obtain the preview image.
  • an editing area and a target control are displayed on the image generation page.
  • the editing area may be a blank area.
  • the editing area may also include an image.
  • an image may be loaded in the editing area before the target control is triggered. Then, based on design requirements, editing operations such as stitching or cropping are performed on the image in the editing area, and/or editing operations such as dragging, rotating, or scaling layers in the editing area are performed to generate an image from the visible image content in the editing area after the target control is triggered.
  • the triggering operations for the target control may include: clicking the target control, looking at the target control, gesture control of the target control, or language control of the target control, etc.
  • the length and width of the editing area in the image generation page are reduced, and a preview area is displayed within a set distance range of the editing area so that the user can compare and view the editing effect corresponding to the editing operation.
  • the target control in response to a trigger operation on the target control, an editing area, a preview area, and a layer display area are displayed on the image generation page; wherein, the layer display area includes layer identifiers sorted according to hierarchical relationships, and the layers displayed in the editing area are determined based on the sorting results and layer visibility settings.
  • FIG. 2 is a schematic diagram of an image generation page provided in an embodiment of this disclosure.
  • the image generation page 200 displays an editing area 210 and a preview area 220 side by side, so that users can view the effect in real time during the image editing process.
  • the image generation page 200 also includes a target control 230, a layer display area 240, a layer reference level setting control 250, and a layer creation control 260.
  • both the editing area and the preview area are simultaneously displayed on the image generation page.
  • the editing area is blank, the set image is displayed in the preview area.
  • the editor area includes multiple layers, and the layers are completely occluded, the topmost layer is displayed in the editing area according to the layer hierarchy.
  • the editing area includes multiple layers, and the layers are not completely occluded, the image content visible in the target layer is displayed in the editing area.
  • the target layer represents the layer that is not completely occluded by other layers in the editing area.
  • the target image is determined based on the image content visible in the editing area. Image generation is performed on the target image to obtain a generated image, which is then displayed in the preview area.
  • the size of the preview area is updated in real time.
  • the editing operations include at least one of image display triggering operations, layer editing operations, and drawing operations.
  • image display triggering operations can include text-to-image operations, image-to-image operations, and image upload operations.
  • the target image represents the visible image within the layer corresponding to the editing area. If the layers corresponding to the editing area are completely occluded, the target image is the image in the topmost layer. If the layers corresponding to the editing area are partially occluded, the layer in the editing area that is not completely occluded by other layers is taken as the target layer, and the target image is the visible image content in the target layer.
  • FIG 3 is a schematic diagram of another image generation page provided by an embodiment of this disclosure.
  • the editing area 300 includes three layers, and the three layers completely overlap.
  • the target image 310 is the image in the topmost layer (i.e., layer a) of the editing area 300. If a layer scaling operation and a layer dragging operation are detected, the size and position of the three layers in the editing area 300 are adjusted to display the first layer 320, the second layer 330, and the third layer 340, respectively.
  • the target image 310 includes the un-overlapping image content in the first layer 320, the second layer 330, and the third layer 340, namely the first image content 350, the second image content 360, and the third image content 370.
  • displaying the target image corresponding to the editing operation in the editing area includes: in response to an image display triggering operation input to the image generation page, displaying the target image corresponding to the image display triggering operation in the editing area, wherein the image display triggering operation includes text-to-image operation, image-to-image operation, and image upload operation.
  • the text-based image settings page is displayed.
  • a target image is generated based on the input text and displayed in the editing area.
  • the image generation settings page can be displayed.
  • a target image can be generated based on an existing image in the editing area, and then displayed in the editing area.
  • the image upload page in response to a click on the image upload trigger control on the image generation page, can be displayed.
  • the target image in response to interactive actions on the image upload page, the target image can be loaded and displayed in the editing area.
  • the target image corresponding to the editing operation is displayed in the editing area, including:
  • the image content visible in the target layer is displayed in the editing area, wherein the target layer represents a layer that is not completely obscured by other layers in the editing area.
  • Layer editing operations can include dragging, cropping, rotating, scaling, adjusting layer visibility, or moving layer levels within the editing area to adjust the properties of layers within the editing area.
  • These layer properties include the visible area of image content within the editing area, the orientation of the image within the layer, the size of the image within the layer, and layer visibility.
  • the target image is determined based on the visible image content of the target layer within the editing area.
  • the target layer represents the layer that is visible in the editing area, that is, the layer that is not completely obscured by other layers in the editing area.
  • layer editing operations can be performed to drag, scale, crop, or rotate the image content. For example, if a drag operation on a layer within the editing area is detected, the visible image content of the target layer is displayed in the editing area. If the editing area includes one layer, after dragging the layer, part of the layer's image content is displayed in the editing area, a preview image is generated based on the visible image content in the editing area, and the original preview image in the preview area is replaced with the preview image. If the editing area includes at least two layers, after dragging the layer, multiple layers are displayed in the editing area, and there is a partial occlusion relationship between the layers. The target image is determined based on the image content in the layer that is not occluded by other layers.
  • the processing is similar to that for dragging operations.
  • the target image displayed in the editing area can be determined in a similar way, which will not be elaborated here.
  • the drawing content can be entered in the editing area, and the target image can be determined by combining the image content visible in the editing area with the drawing content.
  • S140 Display a preview image in the preview area, wherein the preview image is generated based on the target image.
  • the preview image is obtained by generating an image based on the target image.
  • the target image is input into a pre-trained image generation model, and the output of the image generation model is used as the preview image.
  • the image generation model can be a diffusion model, etc.
  • generating the preview image based on the target image includes:
  • the preview image is generated based on the target image and target parameters, wherein the target parameters include at least one of target prompt information, text content, and layer reference level setting value.
  • the target cue information is used to constrain the image generation model to generate a preview image that meets the expected effect.
  • the target cue information represents the text content describing the expected effect of image generation.
  • the image generation page includes a target input control
  • the method further includes: in response to an input operation on the target input control, displaying the target prompt information at a corresponding position of the target input control. Then, a preview image is generated by combining the image content visible in the editing area with the target prompt information.
  • the target input control may include a text box.
  • the target prompt information is displayed within the text box.
  • the image is generated by combining the image content visible in the editing area with the target prompt information, resulting in a preview image.
  • the preview image is refreshed to the preview area for display.
  • the original preview image in the preview area can be updated based on the preview image x milliseconds after the target prompt information is input.
  • the image generation page includes controls for setting the layer reference level, and the method further includes:
  • the layer reference level setting value is displayed at the corresponding position of the layer reference level setting control, wherein the layer reference level setting value is used to control the similarity between the preview image and the target image. Then, a preview image is generated by combining the image content visible in the editing area with the layer reference level setting value. Alternatively, a preview image is generated by combining the image content visible in the editing area, target prompt information, and the layer reference level setting value.
  • This embodiment of the disclosure controls the reference level of the target image during the image generation process by adjusting the layer reference level setting value, thereby adjusting the effect of the preview image.
  • the preview image displayed in the preview area does not meet expectations, it can be adjusted using the layer reference level setting control. If a setting operation of the layer reference level setting control is detected on the image generation page, the corresponding layer reference level setting value is obtained. The layer reference level setting value is then displayed in the corresponding position of the control. The preview image is regenerated by combining the visible image content in the editing area with the layer reference level setting value, and the preview image already displayed in the preview area is updated based on the newly generated preview image. A higher layer reference level setting value results in a more similar preview image to the target image.
  • the image generation page includes text options
  • the method further includes: in response to a trigger operation on the text options, displaying a set of text setting controls on the image generation page and displaying a text layer in the editing area; in response to an input operation on the text layer in the editing area, displaying the text content in the text layer.
  • a preview image is generated by combining the image content and text content visible in the editing area.
  • a preview image is generated by combining the image content, target prompt information, and text content visible in the editing area.
  • a preview image is generated by combining the image content, layer reference level setting value, and text content visible in the editing area.
  • a preview image is generated by combining the image content, target prompt information, layer reference level setting value, and text content visible in the editing area.
  • Figure 4 is a schematic diagram of another image generation page provided in this embodiment of the present disclosure.
  • the toolbar of the image generation page 400 displays a text option 410. If the text option 410 is selected, a text setting control set 420 is displayed within the image generation page 400, and a new text layer 430 is created and displayed in the editing area.
  • the text setting control set 420 includes multiple candidate controls required for text editing.
  • the font of the input text in response to an interactive operation on the font control in the text settings control set, can be set.
  • the font size of the input text can be set.
  • the color of the input text in response to an interactive operation on the color control in the text settings control set, can be set.
  • the font, font size, or color in the text settings control set can be selected by the user through a drop-down menu.
  • the text settings control set may also include controls for character spacing, alignment, font bolding, or font italics.
  • displaying a text layer in the editing area can include displaying a text input box in the editing area, with the text input box containing text layer 430. If text is detected being entered into the text input box, the text content is displayed in the text input box within text layer 430.
  • the preview can be ended using the target control to add a text layer to the editing area, and text content can be entered through the text editing box in the text layer, thereby achieving the effect of adding text to the image.
  • text content can be displayed through text layers, and the format of the text content can be edited through text setting controls, and then a preview image can be generated by combining the text content and the image content visible in the editing area, the preview image can be displayed, text can be added, and richer images can be generated by combining text and images, which can vividly demonstrate the combined effect of text and images.
  • the technical solution of this disclosure by triggering a target control, displays an editing area and a preview area on the image generation page. Based on the editing operations input on the image generation page, the target image is displayed in the editing area, and image generation is performed on the target image to obtain a preview image. This preview image is then displayed in the preview area.
  • This disclosure avoids repeated switching between the image generation page and the result page, solving the problems caused by repeated page switching. Since repeated page switching is unnecessary, design efficiency and user experience are improved.
  • the layer generation page includes layer creation controls and a layer display area, and the method further includes:
  • a new layer is generated based on the preview image, and a new layer identifier is displayed in the layer display area;
  • the layer currently displayed in the editing area is switched to the new layer.
  • the layer creation control is used to trigger the generation of a new layer from the preview image in the preview area. If a click on the layer creation control is detected, a new layer is generated based on the preview image. The layer identifier of the new layer is added to the layer display area, and the currently displayed layer in the editing area is switched to the new layer, so that new images can be generated based on the images in the new layer.
  • the image generation page includes an image replacement control
  • the method further includes:
  • a new preview image is generated based on the target image.
  • the image generation model has powerful generation capabilities, it can trigger a new image generation task via the image replacement control when the current preview image does not meet expectations.
  • the image generation task instructs the image generation model to regenerate the image based on the target image to obtain a new preview image, which is then displayed in the preview area.
  • Figure 5 is a flowchart illustrating another image processing method provided in this embodiment. Based on the above embodiments, after displaying a preview image in the preview area, a brush drawing step is added.
  • the method includes:
  • FIG. 6 is a schematic diagram of another image generation page provided in an embodiment of this disclosure.
  • a brush option 610 is displayed in the toolbar of the image generation page 600. If the brush option 610 is selected, a brush setting control set 620 is displayed on the image generation page 600. If a brush control 630 in the brush setting control set 620 is selected, a brush stroke 640 is displayed in the editing area.
  • the brush stroke 640 is displayed as a circle, for example, a yellow circle. The position of the brush stroke 640 can be adjusted by sliding the mouse to perform drawing processing in the editing area.
  • the brush settings control set can include a brush control, an eraser control, a color control, a brush thickness setting control, a brush transparency setting control, a completion drawing control, and an exit control.
  • the interactive operations for the brush settings control set may include brush selection operations, and at least one of the following: brush thickness adjustment operations, color adjustment operations, and transparency adjustment operations.
  • the brush strokes will be displayed in the editing area.
  • the color, thickness, or transparency of the brush strokes can be adjusted using the color control, brush thickness setting control, or brush transparency setting control.
  • the drawing content is displayed in real time in the editing area according to the trajectory of the brush control.
  • the target image is determined based on the drawing content. In some embodiments, if an image has already been entered into the editing area before drawing, the target image is determined based on the visible image content in the editing area and the drawing content.
  • a brush layer is generated based on the drawing content entered in the editing area.
  • clicking any area outside the editing area signifies completion of drawing, and a brush layer is generated based on the drawing content entered in the editing area. If a click operation to exit the control is detected, the drawn content is discarded and saved.
  • the color of the brush can be changed using the color control.
  • the brush thickness can be adjusted using the brush thickness setting control.
  • the transparency of the drawn content can be adjusted using the brush transparency setting control, etc.
  • the target image is input into the image generation model, and the image generation model generates a preview image based on the target image, which is then displayed in the preview area.
  • a preview image is generated based on the target image and target parameters, wherein the target parameters include at least one of target prompt information, text content, and layer reference level setting value.
  • the target image is determined based on the remaining drawing content. In some embodiments, if an image has already been input to the editing area before drawing, the target image is determined based on the visible image content in the editing area and the remaining drawing content.
  • drawing content visible in the editing area can be content drawn with a brush on the same layer, or content drawn with a brush on different layers.
  • a new preview image is generated based on the target image obtained after erasure using the image generation model, and the new preview image is displayed in the preview area.
  • the eraser control in the brush settings control set can be used to erase the visible drawing content in the editing area. It should be noted that the eraser control can erase drawing content located on different layers, and does not require the drawing content to belong to the same layer, achieving one-click erasure of the drawing content.
  • the brush layer corresponding to the drawing content is converted to an uneditable state, and the layer identifier of the brush layer is displayed in the layer display area of the image generation page.
  • the layer save operation triggers the generation of a brush layer based on the drawn content and displays the brush layer's identifier in the layer display area.
  • the layer save operation can include a click operation on the completed drawing control, or a click operation on any area outside the editing area.
  • a brush layer is generated based on the drawing content in the editing area, the brush layer is converted to a non-editable state, and the layer identifier of the brush layer is displayed in the layer display area of the image generation page.
  • converting a brush layer to a non-editable state can include: not displaying brush strokes in the editing area, thus making it impossible to draw on the brush layer.
  • a selection operation is entered for the brush layer on the image generation page.
  • the brush layer is switched to a selected state.
  • a selection operation is entered for the brush layer in the editing area, and the brush layer is switched to a selected state. Then, in response to a double-click or single-click operation, etc., on the selected brush layer, the brush layer in the editing area is switched to an editable state, and drawing operations can continue to be performed on the brush layer.
  • converting the brush layer in the editing area to an editable state can include displaying brush strokes in the editing area to continue drawing operations in the brush layer.
  • the new drawing content is displayed in the editing area, and a new target image is determined based on the new drawing content. Then, the new target image is input into the image generation model, which generates a preview image based on the new target image, and the preview image is displayed in the preview area.
  • the technical solution of this disclosure embodiment displays a brush option on the image generation page and triggers the display of a brush setting control set through the brush option. Then, the brush setting control set is used to perform drawing operations, display the drawing content in the editing area, and then combine the drawing content and the image content visible in the editing area to generate a preview image and display the preview image. This realizes the control of the style of the generated image through the drawing content, thereby visualizing the vague composition and helping users to convert the inspiration information in their minds into images in the early stages of design.
  • Figure 7 is a schematic diagram of an image processing device provided in an embodiment of this disclosure.
  • the device can be implemented in the form of software and/or hardware, or optionally, in the form of an electronic device, such as a mobile terminal, a PC, or a server.
  • the device includes: a control display module 710, a preview area display module 720, an image display module 730, and an image preview module 740.
  • the control display module 710 is used to display the target control on the image generation page
  • the preview area display module 720 is used to display an editing area and a preview area in the image generation page in response to a trigger operation on the target control;
  • the image display module 730 is used to display the target image corresponding to the editing operation in the editing area in response to an editing operation input to the image generation page;
  • the image preview module 740 is used to display a preview image in the preview area, wherein the preview image is generated based on the target image.
  • the editing operation includes at least one of image display triggering operation, layer editing operation, and drawing operation.
  • the image display module 730 is specifically used for:
  • the target image corresponding to the image display trigger operation is displayed in the editing area, wherein the image display trigger operation includes text-to-image operation, image-to-image operation, and image upload operation.
  • the image display module 730 is specifically used for:
  • the image content visible in the target layer is displayed in the editing area, wherein the target layer represents a layer that is not completely obscured by other layers in the editing area.
  • the image display module 730 is specifically used for:
  • a set of brush settings controls is displayed in the image generation page
  • the brush control is displayed in the editing area
  • the drawn content is displayed in the editing area.
  • the image display module 730 also includes an erasing unit for:
  • the visible content drawn in the editing area is erased, and the remaining content drawn in the editing area is displayed.
  • the image display module 730 also includes a brush layer editing unit for:
  • the brush layer corresponding to the drawing content is converted to an uneditable state, and the layer identifier of the brush layer is displayed in the layer display area of the image generation page;
  • the brush layer in the editing area is converted to an editable state
  • new drawing content is displayed in the editing area.
  • the device further includes an image generation module for:
  • the preview image is generated based on the target image and target parameters, wherein the target parameters include at least one of target prompt information, text content, and layer reference level setting value.
  • the image generation page includes a target input control
  • the image generation module is further configured to:
  • the target prompt information is displayed at the corresponding position of the target input control.
  • the image generation page includes a layer reference level setting control, and the image generation module is further used for:
  • the layer reference level setting value is displayed at the corresponding position of the layer reference level setting control, wherein the layer reference level setting value is used to control the similarity between the preview image and the target image.
  • the image generation page includes text options, and the image generation module is further used for:
  • a set of text setting controls is displayed on the image generation page, and a text layer is displayed in the editing area;
  • the text content is displayed in the text layer.
  • the layer generation page includes layer creation controls and a layer display area
  • the device further includes:
  • a layer generation module is used to generate a new layer based on the preview image in response to a trigger operation on the layer creation control, and to display a new layer identifier in the layer display area;
  • the layer switching module is used to switch the currently displayed layer in the editing area to the new layer based on the visibility setting operation for the new layer identifier.
  • the preview area display module 720 is specifically used for:
  • the target control, editing area, preview area, and layer display area are displayed on the image generation page;
  • the layer display area includes layer identifiers sorted according to hierarchical relationships, and the layers displayed in the editing area are determined based on the sorting results and layer visibility settings.
  • the image generation page includes an image replacement control, and the image generation module is further used for:
  • a new preview image is generated based on the target image.
  • the image processing apparatus provided in this disclosure can execute the image processing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects for executing the method.
  • FIG 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure.
  • a schematic diagram of the structure of an electronic device e.g., the terminal device or server in Figure 8
  • the terminal device in embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers.
  • the electronic device shown in Figure 8 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of this disclosure.
  • the electronic device 800 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803.
  • the RAM 803 also stores various programs and data required for the operation of the electronic device 800.
  • the processing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804.
  • An edit/output (I/O) interface 805 is also connected to the bus 804.
  • I/O interface 805 input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809.
  • Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG8 shows an electronic device 800 with various devices, it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed alternatively.
  • embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts.
  • the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802.
  • the computer program When the computer program is executed by a processing device 801, it performs the functions defined in the methods of embodiments of this disclosure.
  • the electronic device provided in this embodiment and the image processing method provided in the above embodiments belong to the same inventive concept.
  • Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
  • This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the image processing method provided in the above embodiments.
  • the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof.
  • a computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
  • a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
  • a computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
  • clients and servers may communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and may interconnect with digital data communication (e.g., communication networks) of any form or medium.
  • network protocols such as HTTP (Hypertext Transfer Protocol)
  • communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad-hoc end-to-end networks), as well as any currently known or future-developed networks.
  • LANs local area networks
  • WANs wide area networks
  • the Internet e.g., the Internet of Things
  • end-to-end networks e.g., ad-hoc end-to-end networks
  • the aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
  • the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:
  • an editing area and a preview area are displayed on the image generation page;
  • the target image corresponding to the editing operation is displayed in the editing area
  • a preview image is displayed in the preview area, wherein the preview image is generated based on the target image.
  • Computer program code for performing the operations of this disclosure can 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, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
  • LAN local area network
  • WAN wide area network
  • each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function.
  • the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
  • each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of this disclosure can be implemented in software or hardware.
  • the names of the units are not, in some cases, intended to limit the specific unit.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application-Specific Integrated Circuits
  • ASSPs Application Standard Products
  • SoCs System-on-Chip
  • CPLDs Complex Programmable Logic Devices
  • a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, 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 compact disk read-only memory
  • magnetic storage devices or any suitable combination of the foregoing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本公开实施例提供了一种图像处理方法、装置、设备、介质及程序产品。该方法包括在图像生成页面中展示目标控件;响应于针对目标控件的触发操作,在图像生成页面中展示编辑区域和预览区域;响应于针对图像生成页面输入的编辑操作,在编辑区域展示编辑操作对应的目标图像;在预览区域展示预览图像,其中,预览图像基于目标图像进行图像生成得到。本公开实施例可以避免在图像生成页和结果页之间反复切换,解决因页面反复切换导致的问题。还可以实现边编辑图像边查看效果,也可以拼接多种图像内容,并实时查看拼接后图像的生成效果。

Description

一种图像处理方法、装置、设备、介质及程序产品
本申请要求于2024年5月13日递交的中国专利申请第202410592701.2号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开实施例涉及一种图像处理方法、装置、设备、介质及程序产品。
背景技术
随着计算机技术的发展,可以通过图像生成工具将用户的一些创意具象化,从而辅助生成符合预期的作品。
目前,用户在通过图像生成工具生成符合预期作品的过程中,可能需要反复修改设计稿。为了实现对设计稿的反复修改,可能需要在图像生成页和结果页之间反复切换,以修改设计稿和查看设计效果。由于页面的频繁切换而影响设计效率,且用户体验不佳。
发明内容
本公开实施例提供一种图像处理方法、装置、设备、介质及程序产品,可以提升设计效率和用户体验。
第一方面,本公开实施例提供了一种图像处理方法,包括:
在图像生成页面中展示目标控件;
响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域;
响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像;
在所述预览区域展示预览图像,其中,所述预览图像基于所述目标图像进行图像生成得到。
第二方面,本公开实施例还提供了一种图像处理装置,该装置包括:
控件展示模块,用于在图像生成页面中展示目标控件;
预览区域展示模块,用于响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域;
图像展示模块,用于响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像;
图像预览模块,用于在所述预览区域展示预览图像,其中,所述预览图像基于所述目标图像进行图像生成得到。
第三方面,本公开实施例还提供了一种电子设备,所述电子设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开任意实施例所述的图像处理方法。
第四方面,本公开实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如本公开任意实施例所述的图像处理方法。
第五方面,本公开实施例还提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如本公开任意实施例所述的图像处理方法。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1为本公开实施例所提供的一种图像处理方法的流程示意图;
图2为本公开实施例所提供的一种图像生成页面的示意图;
图3为本公开实施例所提供的另一种图像生成页面的示意图;
图4为本公开实施例所提供的又一种图像生成页面的示意图;
图5为本公开实施例所提供的另一种图像处理方法的流程示意图;
图6为本公开实施例所提供的又一种图像生成页面的示意图;
图7为本公开实施例所提供的一种图像处理装置结构示意图;
图8为本公开实施例所提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。
图1为本公开实施例所提供的一种图像处理方法的流程示意图,本公开实施例适用于采用图像生成工具将创意具象化为作品的情形,例如,采用图像生成工具生成广告图、商品图、室内设计稿、建筑设计稿或游戏动漫设计稿等。该方法可以由图像生成装置来执行,该装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、PC端或服务器等。
如图1所示,所述方法包括:
S110、在图像生成页面中展示目标控件。
其中,图像生成页面表征图像生成工具的交互页面。图像生成工具可以为执行图像生成操作的客户端。所述客户端包括网页客户端、应用程序或小程序等。图像生成操作表征通过图像生成模型得到生成图像的过程。图像生成操作可以包括基于图像生成模型的文生图操作。或者,还可以包括基于图像生成模型的图生图操作等。图像生成模型通过学习已有数据的特征,实现模仿人类的创造能力,以生成具有一定创意的内容。例如,图像生成模型可以根据输入的条件或提示信息,生成与之相关的内容。
目标控件用于触发目标编辑功能。在目标编辑功能下,图像生成页面中展示编辑区域和预览区域,且根据编辑区域中的交互操作,预览区域中的预览图像被实时刷新。目标编辑功能可以为在编辑区域进行图像编辑,并在预览区域展示实时生成的预览图像的功能。
本公开实施例中,编辑区域可以为图像生成页面中的画板区域,在编辑区域中进行作品创作。例如,可以在编辑区域中输入已有素材,通过素材拼接生成符合预期的作品。可以在编辑区域中输入笔画,以描绘出图像中元素的比例关系、图片结构、色调或风格,以通过笔画生成符合预期的作用。编辑区域对应至少一个图层。若编辑区域中包括两个以上图层,在图层之间存在遮挡关系,则在编辑区域中只能展示未被完全遮挡住的图像内容。将未被完全遮挡住的图像内容作为编辑区域中可见的图像内容。
可选地,可以结合文生图功能,通过输入文字内容得到生成图像。或者,还可以结合图生图功能,通过输入图像得到生成图像。
预览区域表征图像生成页面中预览图像的展示区域。预览图像可以为生成图像。例如,对编辑区域中可见的图像内容进行图像生成,得到预览图像。
示例性地,在图像生成页面中展示编辑区域和目标控件。编辑区域可能为空白的区域。编辑区域还可能包括图像。例如,可以在目标控件被触发之前,在编辑区域加载图像。然后,在基于设计要求,对编辑区域内的图像进行拼接或裁剪等编辑操作,和/或,对编辑区域中的图层进行拖动、旋转或缩放等编辑操作,以在目标控件被触发后,对编辑区域中可见的图像内容进行图像生成。
S120、响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域。
其中,针对目标控件的触发操作可以包括:对目标控件的点击操作、或者,对目标控件的注视操作,或者对目标控件的手势控制操作,或者对目标控件的语言控制操作等。
示例性地,若检测到针对图像生成页面中目标控件的触发操作,缩小图像生成页面中的编辑区域的长度和宽度,并在编辑区域的设定距离范围内展示预览区域,以便于用户对照查看编辑操作对应的编辑效果。
可选地,响应于针对所述目标控件的触发操作,在所述图像生成页面中展示目标控件、编辑区域、预览区域和图层展示区;其中,所述图层展示区包括按照层级关系排序的图层标识,所述编辑区域中展示的图层基于排序结果及图层可见设置确定。
图2为本公开实施例所提供的一种图像生成页面的示意图,如图2所示,图像生成页面200中并排展示编辑区域210和预览区域220,以便于用户在编辑图像的过程中,实时查看效果。图像生成页面200还包括目标控件230、图层展示区域240、图层参考程度设置控件250和图层创建控件260。
本公开实施例中,若目标控件被触发,则在图像生成页面中同时展示编辑区域和预览区域。若编辑区域为空白区域,则预览区域内展示设定图像。若编辑器区域包括多个图层,且各个图层之间为完全遮挡的关系,则根据图层的层级关系在编辑区域展示最上层的图层。若编辑区域包括多个图层,且各个图层之间为不完全遮挡的关系,则在编辑区域展示目标图层中可见的图像内容。其中,目标图层表征在编辑区域中未被其它图层完全遮挡的图层。基于编辑区域中可见的图像内容确定目标图像。对目标图像进行图像生成,得到生成图像,在预览区域展示所述生成图像。
可选地,若编辑区域的尺寸发生变化,则实时更新预览区域的尺寸。
S130、响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像。
其中,编辑操作包括图像展示触发操作、图层编辑操作和绘制操作中的至少一种。进一步地,图像展示触发操作可以包括文生图操作、图生图操作和图像上传操作。
目标图像表征编辑区域对应的图层中可见的图像。若编辑区域对应的图层间为完全遮挡,则目标图像为最上层的图层中的图像。若编辑区域对应的图层间为部分遮挡,则将编辑区域中未被其它图层完全遮挡的图层作为目标图层,目标图像为目标图层中可见的图像内容。
图3为本公开实施例所提供的另一种图像生成页面的示意图,如图3所示,编辑区域300包括3个图层,且3个图层间完全遮挡,目标图像310为编辑区域300中最上层的图层(即图层a)中的图像。若检测到针对图层缩放操作以及图层拖动操作,调整编辑区域300中3个图层的尺寸和位置,分别展示第一图层320、第二图层330和第三图层340。目标图像310包括第一图层320、第二图层330和第三图层340中未被遮挡的图像内容,即第一图像内容350、第二图像内容360和第三图像内容370。
示例性地,响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像,包括:响应于针对所述图像生成页面输入的图像展示触发操作,在所述编辑区域展示所述图像展示触发操作对应的目标图像,其中,所述图像展示触发操作包括文生图操作、图生图操作和图像上传操作。
例如,响应于图像生成页面中文生图触发控件的点击操作,展示文生图设置页面。响应于文生图设置页面中的交互操作,基于输入文本生成目标图像,在编辑区域展示目标图像。
或者,响应于图像生成页面中图生图触发控件的点击操作,展示图生图设置页面。响应于图生图设置页面中的交互操作,基于编辑区域中已有的图像生成目标图像,在编辑区域展示目标图像。
或者,响应于图像生成页面中图像上传触发控件的点击操作,展示图像上传页面。响应于图像上传页面中的交互操作,加载目标图像,在编辑区域展示目标图像。
其中,可以将目标图像对应的图层覆盖到编辑区域内已展示的图层,以在编辑区域展示目标图像。
可选地,响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像,包括:
响应于针对所述图像生成页面中编辑区域的图层编辑操作,在所述编辑区域中展示目标图层中可见的图像内容,其中,所述目标图层表征在所述编辑区域中未被其它图层完全遮挡的图层。
其中,图层编辑操作可以包括对编辑区域内的图层进行拖动、裁剪、旋转、缩放、调整图层可见性或者移动图层层级等,以调整编辑区域内图层的属性。其中,图层的属性包括图层在编辑区域内可见的图像内容范围,或者,图层内图像的方向,或者,图层内图像的尺寸,或者,图层可见性等。根据编辑区域中目标图层中可见的图像内容确定目标图像。
其中,目标图层表征在编辑区域中可见的图层,即表征在编辑区域中未被其它图层完全遮挡住的图层。
一些实施例中,若编辑区域内已展示图层,且图层中具有图像内容。可以通过图层编辑操作,对图像内容进行拖动、缩放、裁剪或旋转等操作。例如,若检测到针对编辑区域内图层的拖动操作,在编辑区域中展示目标图层中可见的图像内容。若编辑区域包括一个图层,拖动图层后,在编辑区域中展示图层的部分图像内容,基于编辑区域中可见的图像内容生成预览图像,采用预览图像替换预览区域内原有的预览图像。若编辑区域包括至少两个图层,则拖动图层后,在编辑区域展示多个图层,各图层之间存在部分遮挡关系,根据图层中未被其它图层遮挡的图像内容确定目标图像。
对于编辑区域内的图层的裁剪操作、旋转操作和缩放操作,具有与拖动操作相似的处理过程,可以采用相似的方式确定编辑区域中展示的目标图像,此处不再赘述。
可选地,还可以在编辑区域中输入绘制内容,并结合编辑区域中可见的图像内容与绘制内容确定目标图像。
S140、在所述预览区域展示预览图像,其中,所述预览图像基于所述目标图像进行图像生成得到。
一些实施例中,基于所述目标图像进行图像生成得到所述预览图像。例如,将目标图像输入预先训练的图像生成模型,得到图像生成模型的输出结果作为预览图像。其中,图像生成模型可以为扩散模型等。
进一步地,基于所述目标图像进行图像生成得到所述预览图像,包括:
基于所述目标图像和目标参数进行图像生成得到所述预览图像,其中,所述目标参数包括目标提示信息、文字内容和图层参考程度设置值中的至少一种。
其中,目标提示信息用于约束图像生成模型生成满足预期效果的预览图像。目标提示信息表征描述图像生成预期效果的文本内容。
示例性地,所述图像生成页面包含目标输入控件,所述方法还包括:响应于针对所述目标输入控件的输入操作,在所述目标输入控件的对应位置展示所述目标提示信息。然后,结合编辑区域中可见的图像内容与目标提示信息生成预览图像。
例如,目标输入控件可以包括文本框,检测到向图像生成页面中文本框输入目标提示信息,在文本框内展示目标提示信息。结合编辑区域中可见的图像内容以及目标提示信息进行图像生成,得到预览图像。在目标提示信息停止输入后的设定时间之后,将预览图像刷新至预览区域,以在预览区域展示预览图像。例如,可以在目标提示信息输入完成后的x毫秒时,基于预览图像更新预览区域中的原预览图像。
示例性地,图像生成页面包含图层参考程度设置控件,所述方法还包括:
响应于针对所述图层参考程度设置控件的设置操作,在所述图层参考程度设置控件的对应位置展示所述图层参考程度设置值,其中,所述图层参考程度设置值用于控制所述预览图像与所述目标图像的相似度。然后,结合编辑区域中可见的图像内容与图层参考程度设置值生成预览图像。或者,结合编辑区域中可见的图像内容、目标提示信息与图层参考程度设置值生成预览图像。
本公开实施例通过调整图层参考程度设置值,控制图像生成过程中对目标图像的参考程度,实现对预览图像的效果调整。
例如,若预览区域展示的预览图像不符合预期,则可以通过图层参考程度设置控件对预览图像进行调整。若检测到图像生成页面中图层参考程度设置控件的设置操作,获取对应的图层参考程度设置值。在图层参考程度设置控件的对应位置展示图层参考程度设置值。结合编辑区域中可见的图像内容和图层参考程度设置值重新生成预览图像,并基于新生成的预览图像更新预览区域中已展示的预览图像。若图层参考程度设置值越大,则预览图像与目标图像越相似。
示例性地,所述图像生成页面包含文字选项,所述方法还包括:响应于针对所述文字选项的触发操作,在所述图像生成页面中展示文字设置控件集,在所述编辑区域中展示文字图层;响应于针对所述编辑区域中文字图层的输入操作,在所述文字图层中展示所述文字内容。然后,结合编辑区域中可见的图像内容与文字内容生成预览图像。或者,结合编辑区域中可见的图像内容、目标提示信息与文字内容生成预览图像。或者,结合编辑区域中可见的图像内容、图层参考程度设置值与文字内容生成预览图像。或者,结合编辑区域中可见的图像内容、目标提示信息、图层参考程度设置值与文字内容生成预览图像。
需要说明的是,目标图像结合目标参数生成预览图像的方式有很多种,此处不再赘述。
图4为本公开实施例所提供的又一种图像生成页面的示意图,在图像生成页面400的工具栏展示文字选项410。若选中文字选项410,则在图像生成页面400内展示文字设置控件集420,以及,新建文字图层430,并在编辑区域中展示文字图层430。其中,文字设置控件集420包括多个文字编辑所需的候选控件。
例如,响应于针对文字设置控件集中字体控件的交互操作,可以设置输入文本的字体。或者,响应于针对文字设置控件集中字号控件的交互操作,可以设置输入文本的字号,通过。或者,响应于针对文字设置控件集中颜色控件的交互操作,可以设置输入文本的颜色。需要说明的是,文字设置控件集中的字体、字号或颜色等可以通过下拉菜单的形式供用户选择。文字设置控件集除包含上述控件之外,还可以包括字间距设置控件、对齐设置控件、字体加粗控件或字体倾斜控件等。
参照图4所示,在编辑区域中展示文字图层可以包括在编辑区域展示文本输入框,文本输入框输入文字图层430。若检测到在文本输入框中输入文字,则在文本图层430中的文本输入框中展示文字内容。
可选地,若不需要文字参与图像生成过程,也可以通过目标控件结束预览,以在编辑区域添加文字图层,并通过文字图层中的文本编辑框输入文字内容,从而,实现向图像中添加文案的效果。
由于可以通过文字图层展示文字内容,并通过文字设置控件集编辑文字内容的格式,然后,结合文字内容和编辑区域中可见的图像内容生成预览图像,展示预览图像,实现文案添加,并综合文字与图像生成更丰富的图像,能够形象地展示文字与图像的结合效果。
本公开实施例的技术方案,通过触发目标控件,在图像生成页面展示编辑区域和预览区域,根据图像生成页面中输入的编辑操作,在编辑区域展示目标图像,并对目标图像进行图像生成,得到预览图像,在预览区域展示预览图像,可以实现边编辑图像边查看效果,也可以拼接多种图像内容,并实时查看拼接后图像的生成效果。本公开实施例可以避免在图像生成页和结果页之间反复切换,解决因页面反复切换导致的问题。由于无需反复切换页面,可以提升设计效率和用户体验页面反复切换。
可选地,所述图层生成页面包含图层创建控件和图层展示区,所述方法还包括:
响应于针对所述图层创建控件的触发操作,基于所述预览图像生成新图层,在所述图层展示区展示新图层标识;
基于针对新图层标识的可见性设置操作,将所述编辑区域中当前展示的图层切换为所述新图层。
其中,图层创建控件用于触发将预览区域中的预览图像生成新图层。若检测到图层创建控件的点击操作,基于预览图像生成新图层。将新图层的图层标识添加至图层展示区域,并将编辑区域中当前展示的图层切换为新图层,以便于基于新图层内的图像继续生成新的生成图像。
可选地,所述图像生成页面中包括图像更换控件,所述方法还包括:
响应于针对所述图像更换控件的触发操作,基于所述目标图像重新进行图像生成得到新的预览图像。由于图像生成模型具有强大的生成能力,可以在当前预览图像不符合预期时,通过图像更换控件触发新的图像生成任务,图像生成任务用于指示图像生成模型基于目标图像重新进行图像生产得到新的预览图像,并展示在预览区域中。
图5为本公开实施例所提供的另一种图像处理方法的流程示意图,在上述各实施例的基础上,在预览区域展示预览图像之后,附加限定了画笔绘制步骤。
如图5所示,该方法包括:
S500、在图像生成页面中展示目标控件。
S510、响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域。
S520、响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像。
S530、响应于针对所述图像生成页面中画笔选项的触发操作,在所述图像生成页面中展示画笔设置控件集。
图6为本公开实施例所提供的又一种图像生成页面的示意图,在图像生成页面600的工具栏中展示画笔选项610。若选中画笔选项610,则在图像生成页面600中展示画笔设置控件集620。若选中画笔设置控件集620中的画笔控件630,则在编辑区域中展示画笔笔触640,其中,画笔笔触640显示为圆形,例如为黄色圆形。可以通过鼠标滑动调整画笔笔触640的位置,以实现在编辑区域执行绘制处理。
其中,画笔设置控件集可以包括画笔控件、橡皮擦控件、颜色控件、画笔粗细设置控件、画笔透明度设置控件、完成绘制控件和退出控件等。
S540、响应于针对所述画笔设置控件集的交互操作,在所述编辑区域展示画笔控件。
其中,针对画笔设置控件集的交互操作可以包括画笔选择操作,以及粗细调整操作、颜色调整操作、透明度调整操作中的至少一项。
例如,若选中画笔设置控件集中的画笔控件,则在编辑区域展示画笔笔触。可以通过颜色控件、画笔粗细设置控件或画笔透明度设置控件调整画笔笔触的颜色、粗细或透明度等。
S550、响应于基于所述画笔控件在编辑区域中输入的绘制操作,在所述编辑区域展示绘制内容。
例如,若选中画笔控件,并通过画笔控件在编辑区域输入绘制内容,则根据画笔控件的轨迹在编辑区域实时展示绘制内容。根据绘制内容确定目标图像。一些实施例中,若在绘制前向编辑区域已经输入图像,根据编辑区域中可见的图像内容以及绘制内容,确定目标图像。
可选地,在点击完成绘制控件后,根据编辑区域中输入的绘制内容生成画笔图层。或者,若点击编辑区域之外的任何区域,代表完成绘制,可以根据编辑区域中输入的绘制内容生成画笔图层。若检测到退出控件的点击操作,则放弃保存绘制内容。
可选地,可以通过颜色控件更换画笔的颜色。也可以通过画笔粗细设置控件调整画笔的粗细。或者,还可以通过画笔透明度设置控件调整绘制内容的透明度等。
S560、基于所述目标图像进行图像生成得到所述预览图像,在所述预览区域展示预览图像。
例如,将目标图像输入图像生成模型,通过图像生成模型基于目标图像生成预览图像,在预览区域内展示预览图像。
可选地,基于所述目标图像和目标参数进行图像生成得到预览图像,其中,目标参数包括目标提示信息、文字内容和图层参考程度设置值中的至少一种。
一些实施例中,若针对编辑区域输入擦除操作,响应于针对所述编辑区域中绘制内容的擦除操作,对所述编辑区域中可见的绘制内容进行擦除处理,在所述编辑区域展示剩余绘制内容。根据剩余绘制内容确定目标图像。一些实施例中,若在绘制前向编辑区域已经输入图像,根据编辑区域中可见的图像内容以及剩余绘制内容,确定目标图像。
需要说明的是,编辑区域中可见的绘制内容可以为同一图层中通过画笔绘制的内容,也可以为不同图层中通过画笔绘制的内容。
若对绘制内容执行擦除处理,则通过图像生成模型基于擦除后得到的目标图像生成新的预览图像,在预览区域展示新的预览图像。
例如,若选中画笔设置控件集中的橡皮擦控件,可以通过橡皮擦控件擦除编辑区域中可见的绘制内容。需要说明的是,采用橡皮擦控件可以擦除位于不同图层中的绘制内容,并不要求绘制内容属于同一图层,实现针对绘制内容的一键擦除。
S570、响应于所述图像生成页面中输入的图层保存操作,将所述绘制内容对应的画笔图层转换为不可编辑状态,在所述图像生成页面的图层展示区展示所述画笔图层的图层标识。
其中,图层保存操作用于触发基于绘制内容生成画笔图层,并在图层展示区内展示画笔图层的图层标识。例如,图层保存操作可以包括针对完成绘制控件的点击操作,或者,针对编辑区域之外的任意区域的点击操作等。
需要说明的是,若未保存画笔图层,则可以对画笔图层进行编辑,若保存画笔图层,则不可对画笔图层进行绘制。
例如,若检测到图像生成页面中输入的图层保存操作,则基于编辑区域中的绘制内容生成画笔图层,将画笔图层转换为不可编辑状态,并在图像生成页面的图层展示区内展示画笔图层的图层标识。
需要说明的是,将画笔图层转换为不可编辑状态可以包括:不在编辑区域中展示画笔笔触,从而,无法在画笔图层进行绘制。
S580、响应于针对所述画笔图层的交互操作,将所述编辑区域中的画笔图层转换为可编辑状态。
示例性地,在图像生成页面中输入针对画笔图层的选中操作。响应于针对画笔图层的选中操作,将画笔图层转换为选中状态。或者,在编辑区域中输入针对画笔图层的选中操作,将画笔图层转换为选中状态。然后,响应于针对处于选中状态的画笔图层的双击操作或单击操作等,将编辑区域中的画笔图层转换为可编辑状态,可以继续在画笔图层中执行绘制操作。
需要说明的是,将编辑区域中的画笔图层转换为可编辑状态可以包括:在编辑区域中展示画笔笔触,以继续在画笔图层中执行绘制操作。
S590、响应于针对所述画笔图层的绘制操作,在所述编辑区域中展示新的绘制内容,基于新的绘制内容确定新的目标图像,返回执行S560。
例如,若检测到画笔图层中的绘制操作,在编辑区域中展示新的绘制内容,并基于新的绘制内容确定新的目标图像。然后,将新的目标图像输入图像生成模型,通过图像生成模型基于新的目标图像生成预览图像,在预览区域展示预览图像。
本公开实施例的技术方案,通过在图像生成页面中展示画笔选项,并通过画笔选项触发展示画笔设置控件集,从而,通过画笔设置控件集执行绘制操作,在编辑区域中展示绘制内容,然后,结合绘制内容和编辑区域中可见的图像内容生成预览图像,展示预览图像,实现通过绘制内容控制生成图像的样式,从而,将模糊的构图形象化,可以辅助用户在设计初期将脑海中的灵感信息转换为图像。
图7为本公开实施例所提供的一种图像处理装置结构示意图,该装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、PC端或服务器等。
如图7所示,所述装置包括:控件展示模块710、预览区域展示模块720、图像展示模块730以及图像预览模块740。
控件展示模块710,用于在图像生成页面中展示目标控件;
预览区域展示模块720,用于响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域;
图像展示模块730,用于响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像;
图像预览模块740,用于在所述预览区域展示预览图像,其中,所述预览图像基于所述目标图像进行图像生成得到。
可选地,所述编辑操作包括图像展示触发操作、图层编辑操作和绘制操作中的至少一种。
可选地,图像展示模块730具体用于:
响应于针对所述图像生成页面输入的图像展示触发操作,在所述编辑区域展示所述图像展示触发操作对应的目标图像,其中,所述图像展示触发操作包括文生图操作、图生图操作和图像上传操作。
可选地,图像展示模块730具体用于:
响应于针对所述图像生成页面中编辑区域的图层编辑操作,在所述编辑区域中展示目标图层中可见的图像内容,其中,所述目标图层表征在所述编辑区域中未被其它图层完全遮挡的图层。
可选地,图像展示模块730具体用于:
响应于针对所述图像生成页面中画笔选项的触发操作,在所述图像生成页面中展示画笔设置控件集;
响应于针对所述画笔设置控件集的交互操作,在所述编辑区域展示画笔控件;
响应于基于所述画笔控件在编辑区域中输入的绘制操作,在所述编辑区域展示绘制内容。
可选地,图像展示模块730还包括擦除单元,用于:
响应于针对所述编辑区域中绘制内容的擦除操作,对所述编辑区域中可见的绘制内容进行擦除处理,在所述编辑区域展示剩余绘制内容。
可选地,图像展示模块730还包括画笔图层编辑单元,用于:
响应于所述图像生成页面中输入的图层保存操作,将所述绘制内容对应的画笔图层转换为不可编辑状态,在所述图像生成页面的图层展示区展示所述画笔图层的图层标识;
响应于针对所述画笔图层的交互操作,将所述编辑区域中的画笔图层转换为可编辑状态;
响应于针对所述编辑区域中的画笔图层的绘制操作,在所述编辑区域中展示新的绘制内容。
可选地,所述装置还包括图像生成模块,用于:
基于所述目标图像和目标参数进行图像生成得到所述预览图像,其中,所述目标参数包括目标提示信息、文字内容和图层参考程度设置值中的至少一种。
可选地,所述图像生成页面包含目标输入控件,图像生成模块还用于:
响应于针对所述目标输入控件的输入操作,在所述目标输入控件的对应位置展示所述目标提示信息。
可选地,所述图像生成页面包含图层参考程度设置控件,图像生成模块还用于:
响应于针对所述图层参考程度设置控件的设置操作,在所述图层参考程度设置控件的对应位置展示所述图层参考程度设置值,其中,所述图层参考程度设置值用于控制所述预览图像与所述目标图像的相似度。
可选地,所述图像生成页面包含文字选项,图像生成模块还用于:
响应于针对所述文字选项的触发操作,在所述图像生成页面中展示文字设置控件集,在所述编辑区域中展示文字图层;
响应于针对所述编辑区域中文字图层的输入操作,在所述文字图层中展示所述文字内容。
可选地,所述图层生成页面包含图层创建控件和图层展示区,所述装置还包括:
图层生成模块,用于响应于针对所述图层创建控件的触发操作,基于所述预览图像生成新图层,在所述图层展示区展示新图层标识;
图层切换模块,用于基于针对新图层标识的可见性设置操作,将所述编辑区域中当前展示的图层切换为所述新图层。
可选地,预览区域展示模块720具体用于:
响应于针对所述目标控件的触发操作,在所述图像生成页面中展示目标控件、编辑区域、预览区域和图层展示区;
其中,所述图层展示区包括按照层级关系排序的图层标识,所述编辑区域中展示的图层基于排序结果及图层可见设置确定。
可选地,所述图像生成页面中包括图像更换控件,图像生成模块还用于:
响应于针对所述图像更换控件的触发操作,基于所述目标图像重新进行图像生成得到新的预览图像。
本公开实施例所提供的图像处理装置可执行本公开任意实施例所提供的图像处理方法,具备执行方法相应的功能模块和有益效果。
值得注意的是,上述装置所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。
图8为本公开实施例所提供的一种电子设备的结构示意图。下面参考图8,其示出了适于用来实现本公开实施例的电子设备(例如图8中的终端设备或服务器)800的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图8示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图8所示,电子设备800可以包括处理装置(例如中央处理器、图形处理器等)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储装置808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有电子设备800操作所需的各种程序和数据。处理装置801、ROM 802以及RAM 803通过总线804彼此相连。编辑/输出(I/O)接口805也连接至总线804。
通常,以下装置可以连接至I/O接口805:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置806;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置807;包括例如磁带、硬盘等的存储装置808;以及通信装置809。通信装置809可以允许电子设备800与其他设备进行无线或有线通信以交换数据。虽然图8示出了具有各种装置的电子设备800,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置809从网络上被下载和安装,或者从存储装置808被安装,或者从ROM 802被安装。在该计算机程序被处理装置801执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
本公开实施例提供的电子设备与上述实施例提供的图像处理方法属于同一发明构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的有益效果。
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的图像处理方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(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 (18)

  1. 一种图像处理方法,包括:
    在图像生成页面中展示目标控件;
    响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域;
    响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像;
    在所述预览区域展示预览图像,其中,所述预览图像基于所述目标图像进行图像生成得到。
  2. 根据权利要求1所述的方法,其中,所述编辑操作包括图像展示触发操作、图层编辑操作和绘制操作中的至少一种。
  3. 根据权利要求2所述的方法,其中,所述响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像,包括:
    响应于针对所述图像生成页面输入的图像展示触发操作,在所述编辑区域展示所述图像展示触发操作对应的目标图像,其中,所述图像展示触发操作包括文生图操作、图生图操作和图像上传操作。
  4. 根据权利要求2所述的方法,其中,所述响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像,包括:
    响应于针对所述图像生成页面中编辑区域的图层编辑操作,在所述编辑区域中展示目标图层中可见的图像内容,其中,所述目标图层表征在所述编辑区域中未被其它图层完全遮挡的图层。
  5. 根据权利要求2所述的方法,其中,所述响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像,包括:
    响应于针对所述图像生成页面中画笔选项的触发操作,在所述图像生成页面中展示画笔设置控件集;
    响应于针对所述画笔设置控件集的交互操作,在所述编辑区域展示画笔控件;
    响应于基于所述画笔控件在编辑区域中输入的绘制操作,在所述编辑区域展示绘制内容。
  6. 根据权利要求5所述的方法,还包括:
    响应于针对所述编辑区域中绘制内容的擦除操作,对所述编辑区域中可见的绘制内容进行擦除处理,在所述编辑区域展示剩余绘制内容。
  7. 根据权利要求5或6所述的方法,还包括:
    响应于所述图像生成页面中输入的图层保存操作,将所述绘制内容对应的画笔图层转换为不可编辑状态,在所述图像生成页面的图层展示区展示所述画笔图层的图层标识;
    响应于针对所述画笔图层的交互操作,将所述编辑区域中的画笔图层转换为可编辑状态;
    响应于针对所述编辑区域中的画笔图层的绘制操作,在所述编辑区域中展示新的绘制内容。
  8. 根据权利要求1-7任一所述的方法,其中,基于所述目标图像进行图像生成得到所述预览图像,包括:
    基于所述目标图像和目标参数进行图像生成得到所述预览图像,其中,所述目标参数包括目标提示信息、文字内容和图层参考程度设置值中的至少一种。
  9. 根据权利要求8所述的方法,其中,所述图像生成页面包含目标输入控件,所述方法还包括:
    响应于针对所述目标输入控件的输入操作,在所述目标输入控件的对应位置展示所述目标提示信息。
  10. 根据权利要求8所述的方法,其中,所述图像生成页面包含图层参考程度设置控件,所述方法还包括:
    响应于针对所述图层参考程度设置控件的设置操作,在所述图层参考程度设置控件的对应位置展示所述图层参考程度设置值,其中,所述图层参考程度设置值用于控制所述预览图像与所述目标图像的相似度。
  11. 根据权利要求8所述的方法,其中,所述图像生成页面包含文字选项,所述方法还包括:
    响应于针对所述文字选项的触发操作,在所述图像生成页面中展示文字设置控件集,在所述编辑区域中展示文字图层;
    响应于针对所述编辑区域中文字图层的输入操作,在所述文字图层中展示所述文字内容。
  12. 根据权利要求1-6任一所述的方法,其中,所述图层生成页面包含图层创建控件和图层展示区,所述方法还包括:
    响应于针对所述图层创建控件的触发操作,基于所述预览图像生成新图层,在所述图层展示区展示新图层标识;
    基于针对新图层标识的可见性设置操作,将所述编辑区域中当前展示的图层切换为所述新图层。
  13. 根据权利要求1-6任一所述的方法,其中,所述响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域,包括:
    响应于针对所述目标控件的触发操作,在所述图像生成页面中展示目标控件、编辑区域、预览区域和图层展示区;
    其中,所述图层展示区包括按照层级关系排序的图层标识,所述编辑区域中展示的图层基于排序结果及图层可见设置确定。
  14. 根据权利要求1-13任一所述的方法,其中,所述图像生成页面中包括图像更换控件,所述方法还包括:
    响应于针对所述图像更换控件的触发操作,基于所述目标图像重新进行图像生成得到新的预览图像。
  15. 一种图像处理装置,包括:
    控件展示模块,被配置为在图像生成页面中展示目标控件;
    预览区域展示模块,被配置为响应于针对所述目标控件的触发操作,在所述图像生成页面中展示编辑区域和预览区域;
    图像展示模块,被配置为响应于针对所述图像生成页面输入的编辑操作,在所述编辑区域展示所述编辑操作对应的目标图像;
    图像预览模块,被配置为在所述预览区域展示预览图像,其中,所述预览图像基于所述目标图像进行图像生成得到。
  16. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,被配置为存储一个或多个程序,
    其中,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-14中任一所述的图像处理方法。
  17. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-14中任一所述的图像处理方法。
  18. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序在被处理器执行时实现如权利要求1-14中任一所述的图像处理方法。
PCT/CN2025/093714 2024-05-13 2025-05-09 一种图像处理方法、装置、设备、介质及程序产品 Pending WO2025237178A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410592701.2 2024-05-13
CN202410592701.2A CN120949980A (zh) 2024-05-13 2024-05-13 一种图像处理方法、装置、设备、介质及程序产品

Publications (1)

Publication Number Publication Date
WO2025237178A1 true WO2025237178A1 (zh) 2025-11-20

Family

ID=97611957

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2025/093714 Pending WO2025237178A1 (zh) 2024-05-13 2025-05-09 一种图像处理方法、装置、设备、介质及程序产品

Country Status (2)

Country Link
CN (1) CN120949980A (zh)
WO (1) WO2025237178A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522614A (zh) * 2020-04-20 2020-08-11 北京三快在线科技有限公司 图像编辑信息的展示方法、装置、计算机设备及存储介质
CN112312217A (zh) * 2019-07-31 2021-02-02 腾讯科技(深圳)有限公司 一种图像编辑方法、装置、计算机设备和存储介质
CN114968040A (zh) * 2022-05-19 2022-08-30 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备、存储介质
CN116977493A (zh) * 2023-08-31 2023-10-31 抖音视界有限公司 图像生成方法、装置、计算机可读介质及电子设备
WO2023231235A1 (zh) * 2022-05-30 2023-12-07 网易(杭州)网络有限公司 动态图像的编辑方法、装置和电子设备
CN117788304A (zh) * 2023-11-29 2024-03-29 杭州群核信息技术有限公司 展示图生成方法、装置、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112312217A (zh) * 2019-07-31 2021-02-02 腾讯科技(深圳)有限公司 一种图像编辑方法、装置、计算机设备和存储介质
CN111522614A (zh) * 2020-04-20 2020-08-11 北京三快在线科技有限公司 图像编辑信息的展示方法、装置、计算机设备及存储介质
CN114968040A (zh) * 2022-05-19 2022-08-30 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备、存储介质
WO2023231235A1 (zh) * 2022-05-30 2023-12-07 网易(杭州)网络有限公司 动态图像的编辑方法、装置和电子设备
CN116977493A (zh) * 2023-08-31 2023-10-31 抖音视界有限公司 图像生成方法、装置、计算机可读介质及电子设备
CN117788304A (zh) * 2023-11-29 2024-03-29 杭州群核信息技术有限公司 展示图生成方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN120949980A (zh) 2025-11-14

Similar Documents

Publication Publication Date Title
US12165245B2 (en) Method and apparatus for generating special effect configuration file, device, and medium
WO2023061280A1 (zh) 应用程序显示方法、装置及电子设备
EP4679293A1 (en) Content sharing method and apparatus, device, computer readable storage medium, and product
WO2024251228A1 (zh) 媒体内容展示方法、装置、电子设备及存储介质
CN116886989A (zh) 媒体内容的生成方法、装置、电子设备和存储介质
WO2024198947A1 (zh) 虚拟场景处理方法、装置、电子设备及存储介质
JP2024506497A (ja) 画像表示方法、装置、デバイス及び記憶媒体
CN117032512A (zh) 内容展示方法、装置、设备、计算机可读存储介质及产品
CN116459508A (zh) 特效道具的生成方法、画面的处理方法、装置和电子设备
CN117573013A (zh) 图像处理方法、装置、设备、计算机可读存储介质及产品
WO2024140166A1 (zh) 特效处理方法、装置、电子设备及存储介质
CN114911395B (zh) 页面交互方法、装置、设备及存储介质
CN115953493A (zh) 特效图层的编辑方法、装置、电子设备及存储介质
CN117435808A (zh) 素材展示方法、装置、设备及存储介质
WO2025031371A1 (zh) 特效的生成方法、装置、电子设备和存储介质
CN112162805A (zh) 截图方法、装置和电子设备
WO2025201234A1 (zh) 信息展示方法、装置、电子设备以及存储介质
WO2026051773A1 (zh) 表情内容处理方法、装置、设备、可读存储介质及产品
WO2024051639A1 (zh) 图像处理方法、装置、设备及存储介质和产品
WO2026037387A1 (zh) 图像编辑方法、装置、设备、计算机可读存储介质及产品
US20250199661A1 (en) Information display method, medium, and electronic device
WO2025176069A1 (zh) 媒体数据的编辑方法、装置、电子设备及存储介质
WO2025237178A1 (zh) 一种图像处理方法、装置、设备、介质及程序产品
WO2025036409A9 (zh) 媒体内容处理方法、设备、存储介质及程序产品
WO2025152530A1 (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: 25802827

Country of ref document: EP

Kind code of ref document: A1