WO2025242005A1 - 图像处理方法、装置、设备和介质 - Google Patents

图像处理方法、装置、设备和介质

Info

Publication number
WO2025242005A1
WO2025242005A1 PCT/CN2025/095470 CN2025095470W WO2025242005A1 WO 2025242005 A1 WO2025242005 A1 WO 2025242005A1 CN 2025095470 W CN2025095470 W CN 2025095470W WO 2025242005 A1 WO2025242005 A1 WO 2025242005A1
Authority
WO
WIPO (PCT)
Prior art keywords
material layer
deformation
layer
original
deformation processing
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/095470
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 WO2025242005A1 publication Critical patent/WO2025242005A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/24Indexing scheme for image data processing or generation, in general involving graphical user interfaces [GUIs]

Definitions

  • This disclosure relates to an image processing method, apparatus, device, and medium.
  • Image modification can include adding various special effects, filters, and deformations, enabling beautification adjustments or secondary creations of images, making them more vivid and interesting.
  • This disclosure provides an image processing method, apparatus, device, and medium.
  • an image processing method comprising:
  • the deformation processing interface is displayed;
  • the original layer or the material layer is deformed.
  • the material layer after the deformation process is merged with the original layer to obtain the target image.
  • an image processing apparatus comprising:
  • the initial module is used to import the original image, use the layer corresponding to the original image as the original layer, and add materials to the original image, using the layer corresponding to the materials as the material layer;
  • the display module is used to display the deformation processing interface in response to the trigger operation of deformation processing
  • the processing module is used to perform deformation processing on the original layer or material layer according to the operation on the deformation processing interface;
  • the merging module is used to merge the material layer after the deformation process and the original layer to obtain the target image.
  • a computer-readable storage medium the storage medium storing a computer program that, when executed by a processor, implements the method described in any one of the first aspects above.
  • an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of the first aspects.
  • Figure 1a is a schematic diagram of an image processing interface according to an exemplary embodiment of the present disclosure
  • Figure 1b is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure.
  • Figure 1c is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure.
  • Figure 1d is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure.
  • Figure 1e is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure.
  • Figure 2 is a flowchart illustrating an image processing method according to an exemplary embodiment of the present disclosure
  • Figure 3A is a schematic diagram illustrating an image processing scenario according to an exemplary embodiment of the present disclosure
  • Figure 3B is a schematic diagram illustrating another image processing scenario according to an exemplary embodiment of the present disclosure.
  • Figure 3C is a schematic diagram illustrating another image processing scenario according to an exemplary embodiment of the present disclosure.
  • Figure 4 is a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure.
  • Figure 5 is a schematic block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
  • first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another.
  • first information may also be referred to as second information, and similarly, second information may also be referred to as first information.
  • word “if” as used herein may be interpreted as "when,” “when,” or "in response to determination.”
  • Image modification can include adding various special effects, filters, and deformations, enabling beautification adjustments or secondary creations of images, making them more vivid and interesting.
  • This disclosure provides an image processing method involving an image to be processed, comprising an original layer and a source layer.
  • the method triggers an operation by the user's deformation processing of the source layer, displaying a deformation processing interface corresponding to that layer.
  • the user can perform deformation processing operations on the source layer within this interface to deform it, and then merge the deformed source layer with the original layer.
  • This allows for selective deformation processing of different layers.
  • the deformation operation involves the edges of different layers, it does not affect other adjacent layers, providing users with richer deformation processing methods, meeting more processing needs, improving image deformation effects, and enhancing the user experience.
  • FIGS 1a-1e are schematic diagrams of an image processing interface according to an exemplary embodiment. The present disclosure will now be described in conjunction with Figures 1a-1e through the following specific application scenarios.
  • a specific application scenario in this embodiment is that the user's terminal device has an application for image processing installed.
  • the user can open the application, allowing it to enter the image processing interface.
  • the user can then import the original image to be processed, which can serve as the original layer.
  • materials can be added to the original layer, such as textures, text, graffiti, masks, cutouts, and images.
  • One or multiple materials can be added, each serving as a material layer.
  • the user can then select any added material to perform a deformation operation. This deformation can be defined as "liquify deformation" or "liquify".
  • the user can import and display the original image through the main image editing interface 101, using the original image as the original layer 102. Textures can then be added to the original layer 102 as the material layer 103.
  • the user can select the material layer 103 by clicking.
  • multiple operation controls for the material layer 103 can be displayed, including a warp function selection control. The user can click this warp function selection control to trigger the warp processing interface corresponding to the material layer 103.
  • the deformation processing interface 105 corresponding to the material layer 103 includes a canvas area 106 and a toolbar 107.
  • the material layer 103 can be adapted to be displayed in the canvas area 106, and multiple deformation processing operation controls are displayed in the toolbar 107.
  • a certain range of blank canvas area can be left around the material layer 103, and each deformation processing operation control corresponds to a different deformation processing type.
  • the user can first trigger the operation control corresponding to any deformation processing type, and then perform deformation processing operations on the material layer 103 in the canvas area 106.
  • the area to be processed and its pixel information can be determined based on the user's selected deformation processing type and the user's operation trajectory in the canvas area 106.
  • the user can deform the material layer 103 inward, reducing the display area within the material layer 103.
  • the transparency of the pixels in the reduced display area 108 can be set to completely transparent.
  • the user can also deform the material layer 103 outward, increasing the display area within the material layer 103.
  • the size of the material layer 103 can be expanded based on the increased display area 109, so that the expanded material layer can include the increased display area.
  • a control 110 is displayed at the bottom of the canvas.
  • triggering control 110 in Figure 1d will enter the viewing interface 111 shown in Figure 1e.
  • the original layer 102 can be displayed on the canvas, and the deformed material layer 103 can be displayed on top of the original layer 102 according to its actual position and size. If the user needs to continue deforming the material layer 103, they can trigger control 110 again to return to the deformation processing interface and perform deformation processing on the material layer 103.
  • the user After the user completes the transformation of the material layer 103, they can trigger the completion control to exit the transformation interface 105 corresponding to material layer 103 and return to the main image editing interface.
  • the main image editing interface displays both the original layer and the transformed material layer.
  • the original layer and the transformed material layer can be merged to obtain the target image.
  • FIG. 2 is a flowchart illustrating an image processing method according to an exemplary embodiment. This method can be applied to a terminal device.
  • a terminal device capable of installing image processing applications.
  • the terminal device may include, but is not limited to, mobile terminal devices such as smartphones, smart wearable devices, laptops, and tablets. The method may include the following steps:
  • step 201 the original image is imported, the layer corresponding to the original image is used as the original layer, and materials are added to the original layer, with the layer corresponding to the materials being used as the material layer.
  • the user can open an image processing application to access the image processing interface.
  • the user can then import the original image to be processed, using it as the original layer.
  • materials can be added to the original layer. These materials can include, but are not limited to, textures, text, graffiti, masks, cutouts, and images. It should be noted that one or multiple materials can be added, each material can be a separate material layer, and different materials correspond to different material layers.
  • step 202 in response to the trigger operation of deformation processing, the deformation processing interface is displayed.
  • the user can select the original layer or any material layer and trigger a deformation processing operation on the original layer or the material layer to enter the deformation processing interface of the original layer or the material layer.
  • the deformation processing interface of the material layer is displayed.
  • the material layer can be deformed according to the user's operations on the deformation processing interface.
  • a material layer can be selected by clicking, and after selecting the material layer, various function selection controls for that material layer can be displayed in the toolbar. These controls can then be used to trigger the transformation function for that material layer, thus entering the transformation processing interface for that material layer.
  • various function selection controls are displayed in the toolbar. The transformation function selection controls can be triggered first, and then a material layer can be selected by clicking, entering the transformation processing interface for that material layer.
  • the deformation processing interface for the material layer displays a canvas and a toolbar.
  • the canvas and toolbar can be displayed in different areas of the deformation processing interface, or the toolbar can be displayed floating above the canvas; this embodiment is not limited in this respect.
  • the canvas can be used to constrain the range of the deformation operation.
  • the material layer can be adapted to be displayed on the canvas. For example, a size condition can be preset. If the original size of the material layer meets the preset size condition, the material layer can be displayed on the canvas at its original size. If the original size of the material layer does not meet the preset size condition, the material layer can be scaled according to preset rules, and the scaled material layer can be displayed on the canvas.
  • a pre-set reference length and reference width can be obtained, along with the original length and original width of the corresponding material layer.
  • the original length and reference length are compared, and the original width and reference width are also compared.
  • the material layer can be displayed on the canvas at an adapted size, ensuring that the center of the material layer is located at a preset position on the canvas.
  • the material layer will not be scaled. It can be displayed directly on the canvas according to its original size, with the center of the material layer coinciding with the center of the canvas.
  • the cases where the original size of the material layer meets the preset size conditions can include situations where the original length is less than or equal to the reference length, and the original width is less than or equal to the reference width.
  • the material layer can be reduced in size according to the aspect ratio of its original size, so that the reduced material layer meets the preset size condition.
  • the reduced material layer is then displayed on the canvas, with its center coinciding with the center of the canvas.
  • Situations where the original size of a material layer does not meet the preset size condition include: the original length being greater than the reference length and the original width being less than or equal to the reference width; or the original length being greater than the reference length and the original width being greater than the reference width; or the original length being less than or equal to the reference length and the original width being greater than the reference width.
  • the length and width dimensions corresponding to region 301 can be preset reference dimensions, while the length and width dimensions corresponding to regions 302a, 302b, 302c, and 302d can be the original dimensions of the material layer in different situations.
  • the original dimensions of the material layer meet the preset size conditions.
  • the original dimensions of the material layer do not meet the preset size conditions.
  • the toolbar may include various deformation processing operation controls, each corresponding to a different deformation processing type.
  • Deformation processing types may include, but are not limited to, pushing, stretching, shrinking, restoring, expanding, brush size adjustment, rotation, distortion, or deformation.
  • Different deformation processing types can produce different image processing effects. Users can select different deformation processing types from the toolbar to achieve different deformation processing effects.
  • step 203 the original layer or material layer is deformed according to the operation on the deformation processing interface.
  • the original layer or the material layer can be deformed based on operations performed on the deformation processing interface.
  • deformation processing can be performed based on operations performed on the deformation processing interface for that material layer.
  • parameter adjustment controls for the deformation option can be displayed.
  • the deformation option is located in a first area of the deformation processing interface, for example, the toolbar area.
  • the deformation smearing operation of the material layer is performed in the image display area of the deformation processing interface, which is located in a second area of the deformation processing interface, for example, the canvas area.
  • the brush size for the deformation smearing operation can be determined based on adjustments to the parameter adjustment controls, and the material layer can be deformed according to the user's deformation smearing operations.
  • the pixel information of the pixels in the source layer can be determined based on the user's deformation and smearing operations on the deformation processing interface, and the deformed source layer can be displayed based on this pixel information.
  • the area to be processed in the second region i.e., the canvas
  • This area to be processed in the second region can be the area within the second region that needs to update its pixel information due to the deformation processing operation.
  • the area to be processed can be entirely within the source layer area, or it can include parts outside the source layer area.
  • the pixel information of each pixel in the source layer can be directly obtained through the deformation operation. If the area to be processed includes an extension beyond the source layer area, the size of the source layer can be expanded based on this extension so that the expanded source layer completely covers the area to be processed. Finally, the pixel information of each pixel in the expanded source layer is obtained.
  • region 311 is the region corresponding to the material layer
  • region 312 is the region to be processed.
  • the region to be processed 312 includes an extended portion outside the material layer region. Based on this extended portion, region 311 can be expanded to obtain the expanded material layer region 313, which can completely cover the region to be processed 312.
  • the pixel information of a pixel may include its pixel value and transparency.
  • its transparency can be completely opaque, while for a pixel without a display object, its transparency can be completely transparent.
  • the display area in the material layer may decrease, as shown in Figure 3C, where region 321 is the display area in the material layer before deformation, and region 322 is the display area in the material layer after deformation.
  • the transparency of pixels in the material layer that do not have a display object can be set to completely transparent without reducing the size of the material layer.
  • the overall effect of the deformation processing can be viewed before exiting the deformation processing interface.
  • the user in response to the triggering of a first event, the user can enter the viewing interface from the deformation processing interface of the material layer.
  • the original layer and the material image are displayed in a second area, and the material layer is displayed on the original layer according to its positional relationship with the original layer.
  • the current material layer can be displayed on the original layer for the user to view the current effect.
  • the user can exit the viewing interface and return to the deformation processing interface of the material layer, allowing the user to continue deforming the material layer.
  • the first event can be a user clicking the preset control, a user pressing the preset control continuously, or a user activating the preset control, etc.
  • the second event can be a user clicking the preset control a second time, a user stopping pressing the preset control, or a user turning off the preset control, etc. It is understood that the first and second events can be any reasonable triggering events, and this embodiment does not limit the specific settings of the first and second events.
  • step 204 the deformed material layer and the original layer are merged to obtain the target image.
  • the user in response to the trigger operation indicating completion of the deformation processing, the user can exit the deformation processing interface and enter the main image editing interface.
  • the main image editing interface displays the original layer, and the deformed material layer is displayed on top of the original layer according to its positional relationship with the original layer.
  • This material layer is in a movable, scalable, and editable state.
  • the user can move, scale, and edit the material layer, including deformation processing and other editing operations.
  • the trigger operation indicating completion of the deformation processing can be a user clicking the completion control; this embodiment does not limit the specific method of this trigger operation.
  • the material layer after deformation and the original layer can be merged to obtain the target image.
  • This disclosure provides an image processing method that imports an original image as the original layer and adds source material as a source layer on top of the original layer.
  • a deformation processing interface is displayed. Based on the operations performed on the deformation processing interface, the original layer or the source material layer is deformed. The deformed source material layer and the original layer are then merged to obtain the target image.
  • This allows for selective deformation processing of different layers. When the deformation operation involves the edges of different layers, it does not affect other adjacent layers. This provides users with richer deformation processing methods, meets more processing needs, improves image deformation effects, and enhances the user experience.
  • this disclosure also provides embodiments of the image processing apparatus.
  • FIG4 is a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure.
  • the apparatus may include: an initialization module 401, a display module 402, a processing module 403, and a merging module 404.
  • the initial module 401 is used to import the original image, use the layer corresponding to the original image as the original layer, add material to the original image, and use the layer corresponding to the material as the material layer.
  • Display module 402 is used to display the deformation processing interface in response to the trigger operation of deformation processing.
  • Processing module 403 is used to perform deformation processing on the original layer or material layer according to the operation on the deformation processing interface.
  • the merge module 404 is used to merge the deformed material layer and the original layer to obtain the target image.
  • the display module 402 is configured to: display the deformation processing interface of the material layer in response to the operation of selecting the material layer and triggering the deformation function.
  • the processing module 403 is configured to: perform deformation processing on the material layer based on the operations performed on the deformation processing interface of the material layer.
  • the processing module 403 is configured to: display parameter adjustment controls for the deformation option based on a triggering of the deformation option, wherein the deformation option is located in a first area of the deformation processing interface; and perform a deformation smearing operation on the material layer in the image display area of the deformation processing interface, wherein the image display area is located in a second area of the deformation processing interface, and the brush size of the deformation smearing operation is determined based on the adjustment of the parameter adjustment controls, thereby deforming the material layer based on the deformation smearing operation.
  • the processing module 403 performs deformation processing on the material layer based on the deformation smear operation as follows: Based on the deformation smear operation, it determines the pixel information of the pixels in the material layer, which may include pixel values and transparency. Specifically, for any pixel, if it does not have a display object after deformation processing, its transparency is set to full transparency. The deformed material layer is then displayed based on the pixel information of the pixels in the material layer.
  • the processing module 403 determines the pixel information of pixels in the material layer based on the deformation smearing operation as follows: Based on the deformation operation performed by the user on the deformation processing interface, the region to be processed in the second region is determined. If the region to be processed is within the material layer region, the pixel information of pixels in the material layer is obtained based on the deformation operation. If the region to be processed includes an extended portion outside the material layer region, the material layer is extended based on this extended portion, and the pixel information of pixels in the extended material layer is obtained.
  • the device may further include a viewing module and a first return module (not shown in the figure).
  • the viewing module is used to respond to the triggering of the first event and enter the viewing interface, which displays the original layer and the material layer.
  • the material layer is displayed on the original layer according to its positional relationship with the original layer.
  • the first return module is used to respond to the triggering of the second event, exit the viewing interface, and return to the deformation processing interface.
  • the device may further include an exit module and a second return module (not shown in the figure).
  • the exit module is used to exit the deformation processing interface and enter the main image editing interface in response to the trigger operation when the deformation processing is completed.
  • the second return module is used to display the original layer in the main image editing interface, and to display the material layer on the original layer according to its positional relationship with the original layer, and the material layer is in a movable, scalable and editable state.
  • the material includes any one or more of the following: textures, text, graffiti, masks, cutouts, and images.
  • the relevant parts can be referred to in the description of the method embodiments.
  • the device embodiments described above are merely illustrative.
  • the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units.
  • Some or all of the modules can be selected to achieve the purpose of the embodiments of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
  • the electronic device includes a processor and a memory, and can be used to implement a client or server.
  • the memory stores computer-executable instructions (e.g., one or more computer program modules) non-transitoryly.
  • the processor executes the computer-executable instructions, which, when executed by the processor, can perform one or more steps of the image processing method described above, thereby implementing the image processing method described above.
  • the memory and processor can be interconnected via a bus system and/or other forms of connection mechanisms (not shown).
  • a processor can be a central processing unit (CPU), a graphics processing unit (GPU), or other form of processing unit with data processing and/or program execution capabilities.
  • a CPU can be based on x86 or ARM architectures.
  • a processor can be a general-purpose processor or a special-purpose processor, capable of controlling other components in an electronic device to perform desired functions.
  • the memory may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • Volatile memory may include, for example, random access memory (RAM) and/or cache memory.
  • Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB storage, flash memory, etc.
  • One or more computer program modules may be stored on the computer-readable storage medium, and the processor may run one or more computer program modules to implement various functions of the electronic device.
  • Various application programs and various data, as well as various data used and/or generated by the application programs may also be stored in the computer-readable storage medium.
  • FIG. 5 is a schematic block diagram of an electronic device provided in some embodiments of this disclosure.
  • This electronic device 920 is, for example, suitable for implementing the image processing method provided in the embodiments of this disclosure.
  • the electronic device 920 can be a terminal device, etc., and can be used to implement a client or server.
  • the electronic device 920 can 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), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc.
  • the electronic device 920 shown in Figure 5 is merely an example and does not impose any limitations on the functionality and scope of use of the embodiments of this disclosure.
  • the electronic device 920 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923.
  • the RAM 923 also stores various programs and data required for the operation of the electronic device 920.
  • the processing unit 921, ROM 922, and RAM 923 are interconnected via a bus 924.
  • An input/output (I/O) interface 925 is also connected to the bus 924.
  • I/O interface 925 input devices 926 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 927 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 928 including, for example, magnetic tapes, hard disks, etc.; and communication devices 929.
  • Communication device 929 allows electronic device 920 to communicate wirelessly or wiredly with other electronic devices to exchange data.
  • Figure 5 shows electronic device 920 with various devices, it should be understood that it is not required to implement or have all the devices shown, and electronic device 920 may alternatively implement or have more or fewer devices.
  • the image processing method described above can be implemented as a computer software program.
  • embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program including program code for performing the image processing method described above.
  • the computer program can be downloaded and installed from a network via a communication device 929, or installed from a storage device 928, or installed from a ROM 922.
  • the processing device 921 the functions defined in the image processing method provided by embodiments of this disclosure can be implemented.
  • the storage medium may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions.
  • the image processing method described in the embodiments of this disclosure can be implemented.
  • the non-transitory computer-executable instructions are executed by a processor, one or more steps in the image processing method described above can be performed.
  • the storage medium can be used in the aforementioned electronic device; for instance, the storage medium may include the memory in the electronic device.
  • the storage medium may include a memory card for a smartphone, a storage component for a tablet computer, a hard disk for a personal computer, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), flash memory, or any combination of the above storage media, or other suitable storage media.
  • RAM random access memory
  • ROM read-only memory
  • EPROM erasable programmable read-only memory
  • CD-ROM portable compact disc read-only memory
  • flash memory or any combination of the above storage media, or other suitable storage media.
  • the description of the storage medium can be found in the description of the memory in the embodiments of the electronic device, and will not be repeated here.
  • the specific functions and technical effects of the storage medium can be found in the description of the image processing method above, and will not be repeated here.
  • a computer-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 computer-readable medium 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.
  • 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 that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code.
  • Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, capable of transmitting, propagating, or transmitting 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 may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

Landscapes

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

Abstract

本公开提供一种图像处理方法、装置、设备和介质,该图像处理方法的一具体实施方式包括:导入原始图像,将原始图像对应的图层作为原始图层;在原始图像上添加素材,将素材对应的图层作为素材图层;响应于对变形处理的触发操作,展示变形处理界面;根据在变形处理界面上的操作,对原始图层或素材图层进行变形处理;将经过变形处理之后的素材图层和原始图层进行合并,得到目标图像。该实施方式能够实现有选择的对不同图层进行变形处理,在变形操作的区域涉及不同图层的边缘时,不会对其它临近的图层产生影响,为用户提供了更丰富的变形处理途径,满足了更多的处理需求,提高了图像的变形效果,提升了用户体验。

Description

图像处理方法、装置、设备和介质
本申请要求于2024年5月20日递交的中国专利申请第202410627831.5号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开涉及一种图像处理方法、装置、设备和介质。
背景技术
随着数字图像的应用越来越广泛,数字图像处理技术的种类也变得越来越丰富和多样,为人们对图像的修改处理提供了更多便利。对图像的修改可以包括对图像添加各种特效、滤镜和对图像进行变形等,能够实现对图像的美化调整或对图像的二次创作,使图像更加生动有趣。
发明内容
本公开提供一种图像处理方法、装置、设备和介质。
根据第一方面,提供一种图像处理方法,所述方法包括:
导入原始图像,将所述原始图像对应的图层作为原始图层;
在所述原始图像上添加素材,将所述素材对应的图层作为素材图层;
响应于对变形处理的触发操作,展示变形处理界面;
根据在所述变形处理界面上的操作,对所述原始图层或素材图层进行变形处理;
将经过所述变形处理之后的素材图层和原始图层进行合并,得到目标图像。
根据第二方面,提供一种图像处理装置,所述装置包括:
初始模块,用于导入原始图像,将所述原始图像对应的图层作为原始图层,并在所述原始图像上添加素材,将所述素材对应的图层作为素材图层;
展示模块,用于响应于对变形处理的触发操作,展示变形处理界面;
处理模块,用于根据在所述变形处理界面上的操作,对所述原始图层或素材图层进行变形处理;
合并模块,用于将经过所述变形处理之后的素材图层和原始图层进行合并得到目标图像。
根据第三方面,提供一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述第一方面中任一项所述的方法。
根据第四方面,提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现第一方面中任一项所述的方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
为了更清楚地说明本说明书实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1a是本公开根据一示例性实施例示出的一种图像处理界面示意图;
图1b是本公开根据一示例性实施例示出的另一种图像处理界面示意图;
图1c是本公开根据一示例性实施例示出的另一种图像处理界面示意图;
图1d是本公开根据一示例性实施例示出的另一种图像处理界面示意图;
图1e是本公开根据一示例性实施例示出的另一种图像处理界面示意图;
图2是本公开根据一示例性实施例示出的一种图像处理方法的流程图;
图3A是本公开根据一示例性实施例示出的一种图像处理场景的示意图;
图3B是本公开根据一示例性实施例示出的另一种图像处理场景的示意图;
图3C是本公开根据一示例性实施例示出的另一种图像处理场景的示意图;
图4是本公开根据一示例性实施例示出的一种图像处理装置框图;以及
图5是本公开根据一示例性实施例示出的一种电子设备的示意框图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书保护的范围。
下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
随着数字图像的应用越来越广泛,数字图像处理技术的种类也变得越来越丰富和多样,为人们对图像的修改处理提供了更多便利。对图像的修改可以包括对图像添加各种特效、滤镜和对图像进行变形等,能够实现对图像的美化调整或对图像的二次创作,使图像更加生动有趣。
本公开提供的一种图像处理方法,涉及的待处理图像包括原始图层和素材图层,通过用户对素材图层的变形处理触发操作,展示该素材图层对应的变形处理界面,用户可以在该变形处理界面上进行针对该素材图层的变形处理操作,以对该素材图层进行变形处理,并将经过变形处理之后的素材图层与原始图层合并。从而能够实现有选择的对不同图层进行变形处理,在变形操作的区域涉及不同图层的边缘时,不会对其它临近的图层产生影响,为用户提供了更丰富的变形处理途径,满足了更多的处理需求,提高了图像的变形效果,提升了用户体验。
图1a-图1e为根据一示例性实施例示出的图像处理界面示意图。下面结合图1a-图1e,通过以下具体的应用场景对本公开进行描述。
本实施例的具体的应用场景可以为,用户持有的终端设备中安装有用于处理图像的应用程序。首先,用户可以打开应用程序,使该应用程序进入图像处理界面,通过图像处理界面导入待处理的原始图像,该导入的原始图像可以作为原始图层。接着,可以在原始图层上添加素材,例如,可以添加贴图、文字、涂鸦、蒙版、抠图、图片等素材。可以添加一个素材,也可以添加多个素材,被添加的每个素材可以作为一个素材图层。用户可以选择任意一个被添加的素材进行变形处理操作。其中,该变形还可以被定义为“液化变形”或“液化”。
例如,如图1a所示,用户可以通过图像编辑主界面101导入并显示原始图像,将原始图像作为原始图层102,可以在原始图层102上添加贴图作为素材图层103。接着,用户可以通过点击操作选中素材图层103,在图像编辑主界面101下方的工具栏104中,可以显示多个针对素材图层103的操作控件,其中,包括变形功能选择控件。用户可以通过点击该变形功能选择控件,触发进入素材图层103对应的变形处理界面。
如图1b所示,素材图层103对应的变形处理界面105中包括画布区域106和工具栏107。可以将素材图层103适配地显示在画布区域106中,并将多个变形处理操作控件显示于工具栏107中。其中,素材图层103周围可以留出一定范围的空白画布区域,而多个变形处理操作控件中的每个变形处理操作控件对应于不同的变形处理类型。用户可以先触发任一变形处理类型对应的操作控件,然后,在画布区域106中,对素材图层103进行变形处理操作。可以根据用户选择的变形处理类型,以及用户在画布区域106中的操作轨迹,确定画布中的待处理区域以及待处理区域的像素信息。
如图1c所示,用户可以对素材图层103进行向内变形,使素材图层103中的显示区域减小,减小的显示区域108中像素点的透明程度可以设置为完全透明。如图1d所示,用户也可以对素材图层103进行向外变形,使素材图层103中的显示区域增大。可以根据增大的显示区域109,对素材图层103的尺寸进行扩展,使得经过扩展后的素材图层能够包括增大的显示区域。
在对素材图层103进行变形处理的过程中,还可以将其它图层与该素材图层按照实际的位置关系和大小关系,一起显示在画布中,使用户能够查看处理效果。如图1c和图1d中,在画布下方显示有一个控件110,例如可以触发图1d中的控件110,进入如图1e所示的查看界面111。在查看界面111中,可以将原始图层102显示于画布中,并按照实际的位置和大小,将经过变形处理的素材图层103显示于原始图层102上。如果用户需要继续对素材图层103进行变形处理,可以再次触发控件110,从而返回变形处理界面,以对素材图层103进行变形处理。
用户完成对素材图层103的变形处理之后,可以触发完成控件,从而退出素材图层103对应的变形处理界面105,返回图像编辑主界面。并且,图像编辑主界面中显示有原始图层以及经过变形处理之后的素材图层。可以将原始图层和经过变形处理之后的素材图层进行图层合并处理,从而得到目标图像。
下面将结合具体的实施例对本公开进行详细描述。
图2为根据一示例性实施例示出的一种图像处理方法的流程图。该方法可以应用于终端设备中。在本实施例中,为了便于理解,结合能够安装图像处理应用程序的终端设备来举例说明。本领域技术人员可以理解,该终端设备可以包括但不限于诸如智能手机的移动终端设备、智能穿戴式设备、笔记本电脑以及平板电脑等等。该方法可以包括以下步骤:
如图2所示,在步骤201中,导入原始图像,将原始图像对应的图层作为原始图层,并在原始图层上添加素材,将素材对应的图层作为素材图层。
在本实施例中,用户可以打开图像处理应用程序,使该应用程序进入图像处理界面,可以通过图像处理界面导入待处理的原始图像,将该导入的原始图像作为原始图层。接着,可以在原始图层上添加素材。该素材可以包括但不限于贴图、文字、涂鸦、蒙版、抠图、图片等素材。需要说明的是,可以添加一个素材,也可以添加多个素材,每个素材可以单独作为一个素材图层,不同的素材对应于不同的素材图层。
在步骤202中,响应于对变形处理的触发操作,展示变形处理界面。
在本实施例中,用户可以选择原始图层或者任一素材图层,并进行针对原始图层或者该素材图层的变形处理触发操作,以进入原始图层或者素材图层的变形处理界面。其中,响应于选中素材图层并触发变形功能的操作,展示素材图层的变形处理界面。可以根据用户在素材图层的变形处理界面上的操作,对该素材图层进行变形处理。
例如,在一种实现方式中,可以通过例如点击的方式选中一个素材图层,在选中该素材图层之后,可以在工具栏中展示针对该素材图层的各种功能选择控件,可以触发针对该素材图层的变形功能选择控件,以触发对该素材图层的变形功能,从而进入该素材图层的变形理界面。在另一种实现方式中,在工具栏中展示各种功能选择控件,可以先触发变形功能选择控件,然后,再通过点击的方式选中一个素材图层,并进入该素材图层的变形处理界面。
在本实施例中,素材图层的变形处理界面中展示有画布以及工具栏。其中,画布和工具栏可以展示于变形处理界面中的不同区域,也可以将工具栏悬浮展示于画布上层,可以理解,本实施例对此方面不限定。其中,画布可以用于约束变形操作的范围。可以将该素材图层适配地显示于画布中,例如,可以预先在设定一个尺寸条件,若素材图层对应的原始尺寸满足该预设的尺寸条件,则可以将素材图层按照原始尺寸显示于画布中。若素材图层对应的原始不满足该预设的尺寸条件,则可以将素材图层按照预设的规则进行缩放,并将经过缩放的素材图层显示于画布中。
具体来说,在一种实现方式中,可以获取预先设置的参考长度和参考宽度,并获取素材图层对应的原始长度和原始宽度。将原始长度和参考长度进行比较,并将原始宽度和参考宽度进行比较。可以基于上述比较的结果,将素材图层以适配的大小显示于画布中,使素材图层的中心位于画布中的预设位置。
例如,在素材图层对应的原始尺寸满足预设尺寸条件的情况下,不对该素材图层进行缩放,可以直接按照该素材图层的原始尺寸,将素材图层显示于画布中,并且该素材图层的中心与画布的中心重合。其中,素材图层对应的原始尺寸满足预设尺寸条件的情况可以包括:原始长度小于等于参考长度,且原始宽度小于等于参考宽度的情况。
在素材图层对应的原始尺寸未满足预设尺寸条件的情况下,可以按照该素材图层的原始尺寸的长宽比例缩小该素材图层,使缩小后的该素材图层能够满足预设尺寸条件,并将缩小的该素材图层显示于画布中,使该素材图层的中心与画布的中心重合。其中,素材图层对应的原始尺寸未满足预设尺寸条件的情况可以包括:原始长度大于参考长度、原始宽度小于等于参考宽度的情况;或者原始长度大于参考长度、原始宽度大于参考宽度的情况;或者原始长度小于等于参考长度、原始宽度大于参考宽度的情况。
如图3A所示,区域301对应的长宽尺寸可以是预先设置的参考尺寸,区域302a、区域302b、区域302c和区域302d对应的长宽尺寸可以是不同情况中该素材图层对应的原始尺寸。由图可知,在第一种情况中,素材图层对应的原始尺寸满足预设尺寸条件。在第二种情况、第三种情况和第四种情况中,素材图层对应的原始尺寸未满足预设尺寸条件。
在本实施例中,工具栏中可以包括多种变形处理操作控件,每个变形处理操作控件对应于不同的变形处理类型。变形处理类型例如可以包括但不限于推动、拉伸、收缩、复原、膨胀、笔刷大小、旋转、扭曲或变形等,不同变形处理类型能够产生不同的图像处理效果,用户可以从工具栏中选择不同的变形处理类型,从而实现不同的变形处理效果。
在步骤203中,根据在变形处理界面上的操作,对原始图层或素材图层进行变形处理。
在本实施例中,可以根据在变形处理界面上的操作,对原始图层或素材图层进行变形处理。其中,针对任一素材图层,可以根据在该素材图层的变形处理界面上的操作,对该素材图层进行变形处理。具体来说,可以基于对变形选项的触发,展示变形选项的参数调整控件,其中,变形选项在变形处理界面上的第一区域,例如,该第一区域可以是工具栏区域。在变形处理界面的图像显示区域,进行素材图层的变形涂抹操作,其中,图像显示区域在变形处理界面上的第二区域,例如,该第二区域可以是画布区域。变形涂抹操作的笔刷尺寸可以基于对参数调整控件的调整确定的,可以根据用户的变形涂抹操作,对素材图层进行变形处理。
具体地,可以根据用户在变形处理界面上的变形涂抹操作,确定素材图层中像素点的像素信息,并基于该素材图层中像素点的像素信息,显示变形处理后的素材图层。具体来说,可以根据用户在变形处理界面上的变形处理操作,确定第二区域(即画布)中的待处理区域。其中,第二区域中的待处理区域可以是第二区域中受变形处理操作的影响,而需要更新像素信息的区域。待处理区域可以完全在该素材图层区域范围内,也可以包括该素材图层区域范围以外的部分。
若待处理区域完全在素材图层区域范围内,则可以根据变形处理操作,直接获取素材图层中每个像素点的像素信息。若待处理区域中包括素材图层区域以外的扩展部分,则可以根据该扩展部分,对素材图层的尺寸进行扩展,使扩展后的素材图层能够完全覆盖待处理区域。最后,获取经过扩展之后的素材图层中每个像素点的像素信息。
例如,如图3B所示,区域311为素材图层对应的区域,区域312为待处理区域。由图可知,待处理区域312中包括素材图层区域以外的扩展部分,可以根据该扩展部分,对区域311进行扩展,得到扩展后的素材图层区域313,扩展后的素材图层区域313能够完全覆盖待处理区域312。
在本实施例中,像素点的像素信息可以包括像素点的像素值和透明程度。对于具有显示对象的像素点来说,该像素点的透明程度可以是完全不透明,而对于不具有显示对象的像素点来说,该像素点的透明程度可以是完全透明。具体来说,在对素材图层进行变形处理后,素材图层中的显示区域可能减小,如图3C所示,区域321为变形处理之前,素材图层中的显示区域,区域322为变形处理之后,素材图层中的显示区域。在此情况下,可以将素材图层中不具有显示对象的像素点的透明程度设为全透明,而无需缩小素材图层的尺寸。
在一些实施例中,在展示素材图层的变形处理界面之后,在退出该变形处理界面之前,可以对变形处理的整体效果进行查看。具体来说,响应于第一事件的触发,可以从素材图层的变形处理界面进入查看界面,在查看界面中,将原始图层和素材图显示在第二区域上,并将该素材图层按照与原始图层的位置关系显示于原始图层上。具体来说,可以按照该素材图层与原始图层的位置关系,根据该素材图层当前的尺寸,将当前的素材图层显示在原始图层上,以供用户查看当前的效果。响应于第二事件的触发,可以退出查看界面,返回素材图层的变形处理界面,使用户可以继续对素材图层进行变形处理。
其中,第一事件可以是用户单击预设控件的事件,也可以是用户一直按压预设控件的事件,还可以是用户点亮预设控件的事件等。第二事件可以是用户二次单击预设控件的事件,也可以是用户停止按压预设控件的事件,还可以是用户熄灭预设控件的事件等。可以理解,第一事件和第二事件可以是任意合理的触发事件,本实施例对第一事件和第二事件的具体设定方面不限定。
在步骤204中,将经过变形处理之后的素材图层和原始图层进行合并处理,得到目标图像。
在本实施例中,响应于变形处理完成的触发操作,可以退出变形处理界面,并进入图像编辑主界面。在图像编辑主界面中显示有原始图层,并将该经过变形处理之后的素材图层按照与原始图层的位置关系显示于原始图层上,且该素材图层处于可移动状态、可缩放状态和可编辑状态。用户可以对该素材图层进行移动操作,也可以对该素材图层进行缩放操作,还可以对该素材图层进行编辑操作,该编辑操作包括变形处理操作以及其它各种编辑操作。其中,变形处理完成的触发操作可以是用户点击完成控件的操作,本实施例对该触发操作的具体方式方面不限定。
在本实施例中,当用户点击合并图层的控件,或者完成对原始图像的编辑,并退出编辑状态时,可以将经过变形处理之后的素材图层和原始图层进行合并处理,得到目标图像。
本公开提供的一种图像处理方法,通过导入原始图像作为原始图层,并在原始图层上添加素材作为素材图层,响应于对变形处理的触发操作,展示变形处理界面,根据在变形处理界面上的操作,对原始图层或素材图层进行变形处理,并将经过变形处理之后的素材图层和原始图层进行合并处理,得到目标图像。从而能够实现有选择的对不同图层进行变形处理,在变形操作的区域涉及不同图层的边缘时,不会对其它临近的图层产生影响,为用户提供了更丰富的变形处理途径,满足了更多的处理需求,提高了图像的变形效果,提升了用户体验。
应当注意,尽管在上述实施例中,以特定顺序描述了本公开实施例的方法的操作,但是,这并非要求或者暗示必须按照该特定顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。相反,流程图中描绘的步骤可以改变执行顺序。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。
与前述图像处理方法实施例相对应,本公开还提供了图像处理装置的实施例。
如图4所示,图4是本公开根据一示例性实施例示出的一种图像处理装置的框图,该装置可以包括:初始模块401,展示模块402,处理模块403和合并模块404。
其中,初始模块401,用于导入原始图像,将原始图像对应的图层作为原始图层,并在原始图像上添加素材,将素材对应的图层作为素材图层。
展示模块402,用于响应于对变形处理的触发操作,展示变形处理界面。
处理模块403,用于根据在变形处理界面上的操作,对原始图层或素材图层进行变形处理。
合并模块404,用于将经过变形处理之后的素材图层和原始图层进行合并,得到目标图像。
在一些实施方式中,展示模块402被配置用于:响应于选中素材图层并触发变形功能的操作,展示素材图层的变形处理界面。
处理模块403被配置用于:根据在素材图层的变形处理界面上的操作,对素材图层进行变形处理。
在另一些实施方式中,处理模块403被配置用于:基于对变形选项的触发,展示变形选项的参数调整控件,其中,变形选项在变形处理界面上的第一区域。在变形处理界面的图像显示区域,进行素材图层的变形涂抹操作,其中,图像显示区域在变形处理界面上的第二区域,变形涂抹操作的笔刷尺寸基于对参数调整控件的调整确定的,基于变形涂抹操作,对素材图层进行变形处理。
在另一些实施方式中,处理模块403通过如下方式基于变形涂抹操作,对素材图层进行变形处理:根据变形涂抹操作,确定素材图层中像素点的像素信息,像素信息可以包括像素值和透明程度。其中,针对任一像素点,若该像素点在变形处理后不具有显示对象,则该像素点的透明程度为全透明。基于素材图层中像素点的像素信息显示经过变形处理后的素材图层。
在另一些实施方式中,处理模块403通过如下方式根据变形涂抹操作,确定素材图层中像素点的像素信息:根据用户在变形处理界面上的变形处理操作,确定第二区域中的待处理区域。若待处理区域在素材图层区域范围内,则根据变形处理操作,获取素材图层中像素点的像素信息。若待处理区域中包括素材图层区域以外的扩展部分,根据该扩展部分对素材图层进行扩展,并获取经过扩展之后的素材图层中像素点的像素信息。
在另一些实施方式中,该装置还可以包括:查看模块和第一返回模块(图中未示出)。
其中,查看模块,用于响应于第一事件的触发,进入查看界面,在查看界面中显示原始图层和素材图层,其中,将素材图层按照与原始图层的位置关系显示于原始图层上。
第一返回模块,用于响应于第二事件的触发,退出查看界面,返回变形处理界面。
在另一些实施方式中,该装置还可以包括:退出模块和第二返回模块(图中未示出)。
其中,退出模块,用于响应于变形处理完成的触发操作,退出变形处理界面,并进入图像编辑主界面。
第二返回模块,用于在图像编辑主界面中显示原始图层,将素材图层按照与原始图层的位置关系显示于原始图层上,且素材图层处于可移动状态、可缩放状态和可编辑状态。
在另一些实施方式中,素材包括以下任意一项或多项:贴图,文字,涂鸦,蒙版,抠图,图片。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本公开实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
本公开一些实施例提供的一种电子设备。该电子设备包括处理器和存储器,可以用于实现客户端或服务器。存储器用于非瞬时性地存储有计算机可执行指令(例如一个或多个计算机程序模块)。处理器用于运行该计算机可执行指令,该计算机可执行指令被处理器运行时可以执行上文所述的图像处理方法中的一个或多个步骤,进而实现上文所述的图像处理方法。存储器和处理器可以通过总线系统和/或其它形式的连接机构(未示出)互连。
例如,处理器可以是中央处理单元(CPU)、图形处理单元(GPU)或者具有数据处理能力和/或程序执行能力的其它形式的处理单元。例如,中央处理单元(CPU)可以为X86或ARM架构等。处理器可以为通用处理器或专用处理器,可以控制电子设备中的其它组件以执行期望的功能。
例如,存储器可以包括一个或多个计算机程序产品的任意组合,计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。非易失性存储器例如可以包括只读存储器(ROM)、硬盘、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器、闪存等。在计算机可读存储介质上可以存储一个或多个计算机程序模块,处理器可以运行一个或多个计算机程序模块,以实现电子设备的各种功能。在计算机可读存储介质中还可以存储各种应用程序和各种数据以及应用程序使用和/或产生的各种数据等。
需要说明的是,本公开的实施例中,电子设备的具体功能和技术效果可以参考上文中关于图像处理方法的描述,此处不再赘述。
图5为本公开一些实施例提供的一种电子设备的示意框图。该电子设备920例如适于用来实施本公开实施例提供的图像处理方法。电子设备920可以是终端设备等,可以用于实现客户端或服务器。电子设备920可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)、可穿戴电子设备等等的移动终端以及诸如数字TV、台式计算机、智能家居设备等等的固定终端。需要注意的是,图5示出的电子设备920仅仅是一个示例,其不会对本公开实施例的功能和使用范围带来任何限制。
如图5所示,电子设备920可以包括处理装置(例如中央处理器、图形处理器等)921,其可以根据存储在只读存储器(ROM)922中的程序或者从存储装置928加载到随机访问存储器(RAM)923中的程序而执行各种适当的动作和处理。在RAM 923中,还存储有电子设备920操作所需的各种程序和数据。处理装置921、ROM 922以及RAM 923通过总线924彼此相连。输入/输出(I/O)接口925也连接至总线924。
通常,以下装置可以连接至I/O接口925:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置926;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置927;包括例如磁带、硬盘等的存储装置928;以及通信装置929。通信装置929可以允许电子设备920与其他电子设备进行无线或有线通信以交换数据。虽然图5示出了具有各种装置的电子设备920,但应理解的是,并不要求实施或具备所有示出的装置,电子设备920可以替代地实施或具备更多或更少的装置。
例如,根据本公开的实施例,上述图像处理方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包括用于执行上述图像处理方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置929从网络上被下载和安装,或者从存储装置928安装,或者从ROM922安装。在该计算机程序被处理装置921执行时,可以实现本公开实施例提供的图像处理方法中限定的功能。
本公开一些实施例提供的一种存储介质。例如,存储介质可以为非暂时性计算机可读存储介质,用于存储非暂时性计算机可执行指令。当非暂时性计算机可执行指令由处理器执行时可以实现本公开实施例所述的图像处理方法,例如,当非暂时性计算机可执行指令由处理器执行时,可以执行根据上文所述的图像处理方法中的一个或多个步骤。
例如,该存储介质可以应用于上述电子设备中,例如,该存储介质可以包括电子设备中的存储器。
例如,存储介质可以包括智能电话的存储卡、平板电脑的存储部件、个人计算机的硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、闪存、或者上述存储介质的任意组合,也可以为其他适用的存储介质。
例如,关于存储介质的说明可以参考电子设备的实施例中对于存储器的描述,重复之处不再赘述。存储介质的具体功能和技术效果可以参考上文中关于图像处理方法的描述,此处不再赘述。
需要说明的是,在本公开的上下文中,计算机可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是,但不限于:电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (11)

  1. 一种图像处理方法,包括:
    导入原始图像,将所述原始图像对应的图层作为原始图层;
    在所述原始图像上添加素材,将所述素材对应的图层作为素材图层;
    响应于对变形处理的触发操作,展示变形处理界面;
    根据在所述变形处理界面上的操作,对所述原始图层或素材图层进行变形处理;
    将经过所述变形处理之后的素材图层和原始图层进行合并,得到目标图像。
  2. 根据权利要求1所述的方法,其中,所述响应于对变形处理的触发操作,展示变形处理界面,包括:
    响应于选中所述素材图层并触发变形功能的操作,展示所述素材图层的变形处理界面;
    其中,所述根据在所述变形处理界面上的操作,对所述原始图层或素材图层进行变形处理包括,根据在所述素材图层的变形处理界面上的操作,对所述素材图层进行变形处理。
  3. 根据权利要求2所述的方法,其中,所述根据在所述素材图层的变形处理界面上的操作,对所述素材图层进行变形处理,包括:
    基于对变形选项的触发,展示变形选项的参数调整控件,其中,所述变形选项在所述变形处理界面上的第一区域;
    在所述变形处理界面的图像显示区域,进行所述素材图层的变形涂抹操作,其中,所述图像显示区域在所述变形处理界面上的第二区域,所述变形涂抹操作的笔刷尺寸基于对所述参数调整控件的调整确定的;
    基于所述变形涂抹操作,对所述素材图层进行变形处理。
  4. 根据权利要求3所述的方法,其中,所述基于所述变形涂抹操作,对所述素材图层进行变形处理,包括:
    根据所述变形涂抹操作,确定所述素材图层中像素点的像素信息;所述像素信息包括像素值和透明程度;其中,针对任一像素点,若该像素点在变形处理后不具有显示对象,则该像素点的透明程度为全透明;
    基于所述素材图层中像素点的像素信息,显示经过变形处理后的素材图层。
  5. 根据权利要求4所述的方法,其中,所述根据所述变形涂抹操作,确定所述素材图层中像素点的像素信息,包括:
    根据在所述变形处理界面上的变形处理操作,确定所述第二区域中的待处理区域;
    若所述待处理区域在所述素材图层区域范围内,则根据所述变形处理操作,获取所述素材图层中像素点的像素信息;
    若所述待处理区域中包括所述素材图层区域以外的扩展部分,根据所述扩展部分,对所述素材图层进行扩展,并获取经过扩展之后的所述素材图层中像素点的像素信息。
  6. 根据权利要求1-5任一项所述的方法,其中,在所述展示变形处理界面之后,所述方法还包括:
    响应于第一事件的触发,进入查看界面,在所述查看界面中显示所述原始图层和所述素材图层,其中,将所述素材图层按照与所述原始图层的位置关系显示于所述原始图层上;
    响应于第二事件的触发,退出所述查看界面,返回所述变形处理界面。
  7. 根据权利要求1-6任一项所述的方法,其中,在将所述素材图层和所述原始图层进行合并处理之前,所述方法还包括:
    响应于变形处理完成的触发操作,退出所述变形处理界面,并进入图像编辑主界面;
    在所述图像编辑主界面中显示原始图层,将所述素材图层按照与所述原始图层的位置关系显示于所述原始图层上;且所述素材图层处于可移动状态、可缩放状态和可编辑状态。
  8. 根据权利要求1-7任一项所述的方法,其中,所述素材包括以下任意一项或多项:贴图,文字,涂鸦,蒙版,抠图,图片。
  9. 一种图像处理装置,包括:
    初始模块,被配置为导入原始图像,将所述原始图像对应的图层作为原始图层,并在所述原始图像上添加素材,将所述素材对应的图层作为素材图层;
    展示模块,被配置为响应于对变形处理的触发操作,展示变形处理界面;
    处理模块,被配置为根据在所述变形处理界面上的操作,对所述原始图层或素材图层进行变形处理;
    合并模块,被配置为将经过所述变形处理之后的素材图层和原始图层进行合并得到目标图像。
  10. 一种计算机可读存储介质,存储有计算机程序,其中,当所述计算机程序在计算机中执行时,令所述计算机执行权利要求1-8中任一项所述的图像处理方法。
  11. 一种电子设备,包括存储器和处理器,其中,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求1-8中任一项所述的图像处理方法。
PCT/CN2025/095470 2024-05-20 2025-05-16 图像处理方法、装置、设备和介质 Pending WO2025242005A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410627831.5 2024-05-20
CN202410627831.5A CN118446884A (zh) 2024-05-20 2024-05-20 图像处理方法、装置、设备和介质

Publications (1)

Publication Number Publication Date
WO2025242005A1 true WO2025242005A1 (zh) 2025-11-27

Family

ID=92312150

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2025/095470 Pending WO2025242005A1 (zh) 2024-05-20 2025-05-16 图像处理方法、装置、设备和介质

Country Status (2)

Country Link
CN (1) CN118446884A (zh)
WO (1) WO2025242005A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118446884A (zh) * 2024-05-20 2024-08-06 北京字跳网络技术有限公司 图像处理方法、装置、设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906553A (zh) * 2021-02-09 2021-06-04 北京字跳网络技术有限公司 图像处理方法、装置、设备及介质
JP7045121B1 (ja) * 2021-12-27 2022-03-31 株式会社エクスレイウェブアーツ プログラム、情報処理装置、画像編集方法、及び画像表示方法
CN116740252A (zh) * 2023-06-14 2023-09-12 网易(杭州)网络有限公司 一种图像处理的方法、装置、电子设备及存储介质
CN118446884A (zh) * 2024-05-20 2024-08-06 北京字跳网络技术有限公司 图像处理方法、装置、设备和介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906553A (zh) * 2021-02-09 2021-06-04 北京字跳网络技术有限公司 图像处理方法、装置、设备及介质
JP7045121B1 (ja) * 2021-12-27 2022-03-31 株式会社エクスレイウェブアーツ プログラム、情報処理装置、画像編集方法、及び画像表示方法
CN116740252A (zh) * 2023-06-14 2023-09-12 网易(杭州)网络有限公司 一种图像处理的方法、装置、电子设备及存储介质
CN118446884A (zh) * 2024-05-20 2024-08-06 北京字跳网络技术有限公司 图像处理方法、装置、设备和介质

Also Published As

Publication number Publication date
CN118446884A (zh) 2024-08-06

Similar Documents

Publication Publication Date Title
US11956528B2 (en) Shooting method using target control, electronic device, and storage medium
EP3091426B1 (en) User terminal device providing user interaction and method therefor
JP7553582B2 (ja) 画像特殊効果の処理方法及び装置
US11853543B2 (en) Method and apparatus for controlling display of video call interface, storage medium and device
WO2023061280A1 (zh) 应用程序显示方法、装置及电子设备
EP4210320A1 (en) Video processing method, terminal device and storage medium
WO2022052774A1 (zh) 控制电子设备的方法、装置、终端及存储介质
CN109725970B (zh) 应用客户端窗口展示的方法、装置及电子设备
WO2023185671A1 (zh) 风格图像生成方法、装置、设备及介质
WO2023125425A1 (zh) 一种显示方法、装置和电子设备
WO2021243788A1 (zh) 屏幕截图方法及装置
US11935176B2 (en) Face image displaying method and apparatus, electronic device, and storage medium
WO2025242005A1 (zh) 图像处理方法、装置、设备和介质
CN111190677A (zh) 信息显示方法、信息显示装置及终端设备
CN112181252A (zh) 截屏方法、装置及电子设备
CN104020935A (zh) 用于控制显示屏上的显示对象的方法和装置
CN112995401A (zh) 控件显示方法、装置、设备及介质
WO2024027648A1 (zh) 信息的显示方法、装置、电子设备和存储介质
WO2023232092A1 (zh) 页面展示方法、装置及电子设备
CN111782113A (zh) 显示方法、装置和计算机可读存储介质
CN112055156B (zh) 预览图像更新方法、装置、移动终端及存储介质
CN114518822A (zh) 应用图标管理方法、装置和电子设备
CN117575882B (zh) 顶点缓冲区的更新方法、装置及存储介质
WO2025061189A1 (zh) 界面显示方法、装置、电子设备和可读存储介质
CN111857465A (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: 25807106

Country of ref document: EP

Kind code of ref document: A1