Image processing method and apparatus, and device and medium
By importing the original layer and source layer into the image processing and operating on the deformation processing interface, the problem of insufficient flexibility in layer deformation in existing technologies is solved, selective deformation processing is realized, and the user experience is improved.
Patent Information
- Application Number
- PCT/CN2025/095470
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-20
- Filing Date
- 2025-05-16
- Publication Date
- 2025-11-27
AI Technical Summary
Existing image processing techniques struggle to selectively deform different layers during deformation operations, and can easily affect adjacent layers, resulting in a poor user experience.
By importing the original image as the original layer and adding a material layer on top of it, the system responds to the user's deformation processing operation and displays the deformation processing interface. Users can perform deformation processing on this interface and merge the deformed material layer with the original layer to achieve selective deformation processing.
It enables selective deformation processing of different layers, avoids affecting adjacent layers, provides richer deformation processing methods, and improves the user experience.
Smart Images

Figure CN2025095470_27112025_PF_FP_ABST
Abstract
Description
Image processing method, device, apparatus and medium
[0001] This application claims priority to Chinese Patent Application No. 202410627831.5, filed on May 20, 2024, the disclosure of which is incorporated herein in its entirety as part of the present application. TECHNICAL FIELD
[0002] The present disclosure relates to an image processing method, device, apparatus and medium. BACKGROUND
[0003] With the increasingly wide application of digital images, the types of digital image processing technology have become increasingly rich and diverse, providing more convenience for people to modify and process images. The modification of images can include adding various special effects, filters to images, and deforming images, etc., which can realize the beautification adjustment or secondary creation of images, making the images more lively and interesting. SUMMARY
[0004] The present disclosure provides an image processing method, device, apparatus and medium.
[0005] According to a first aspect, an image processing method is provided, the method comprising:
[0006] importing an original image, taking a layer corresponding to the original image as an original layer, and adding a material on the original image, taking a layer corresponding to the material as a material layer;
[0007] adding a material on the original image, taking a layer corresponding to the material as a material layer;
[0008] in response to a triggering operation of a deformation processing, displaying a deformation processing interface;
[0009] deforming the original layer or the material layer according to an operation on the deformation processing interface;
[0010] merging the material layer and the original layer after the deformation processing to obtain a target image.
[0011] According to a second aspect, an image processing device is provided, the device comprising:
[0012] an initial module for importing an original image, taking a layer corresponding to the original image as an original layer, and adding a material on the original image, taking a layer corresponding to the material as a material layer;
[0013] a display module for displaying a deformation processing interface in response to a triggering operation of a deformation processing;
[0014] a processing module configured to perform a deformation processing on the original layer or the material layer according to an operation on the deformation processing interface;
[0015] a merging module configured to merge the material layer and the original layer after the deformation processing to obtain a target image.
[0016] According to a third aspect, a computer readable storage medium is provided, the storage medium storing a computer program, the computer program being executed by a processor to implement the method of any one of the first aspect.
[0017] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the method of any one of the first aspect when executing the program.
[0018] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present specification, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments described in the present specification, and other drawings can also be obtained according to these drawings without creative labor for those skilled in the art.
[0020] FIG. 1a is a schematic diagram of an image processing interface according to an exemplary embodiment of the present disclosure;
[0021] FIG. 1b is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure;
[0022] FIG. 1c is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure;
[0023] FIG. 1d is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure;
[0024] FIG. 1e is a schematic diagram of another image processing interface according to an exemplary embodiment of the present disclosure;
[0025] FIG. 2 is a flowchart of an image processing method according to an exemplary embodiment of the present disclosure;
[0026] FIG. 3A is a schematic diagram of an image processing scenario according to an exemplary embodiment of the present disclosure;
[0027] FIG. 3B is a schematic diagram of another image processing scenario according to an exemplary embodiment of the present disclosure;
[0028] FIG. 3C is a schematic diagram of another image processing scenario, according to an example embodiment of the present disclosure;
[0029] FIG. 4 is a block diagram of an image processing apparatus, according to an example embodiment of the present disclosure; and
[0030] FIG. 5 is a schematic block diagram of an electronic device, according to an example embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to make persons skilled in the art better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in conjunction with the drawings in the specification. Obviously, the described embodiments are only some of the embodiments of the specification, not all the embodiments. Based on the embodiments in the specification, all other embodiments obtained by persons of ordinary skill in the art without creative labor should be within the protection scope of the specification.
[0032] The following description refers to the accompanying drawings. Unless otherwise indicated, same or similar elements in different drawings are denoted by same or similar reference numerals. The implementations described in the following example embodiments are not meant to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0033] The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used in the present disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0034] It will be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used only to distinguish different sets of information from one another. For example, a first information can be termed a second information, and similarly, a second information can also be termed a first information, without departing from the scope of the present disclosure. As used herein, the word "if' can be interpreted to mean "when" or "upon" or "in response to determining" depending on the context.
[0035] With the increasingly wide application of digital images, the types of digital image processing technologies become more and more rich and diverse, which provides more convenience for people to modify and process images. The modification of images can include adding various special effects, filters and deforming images, etc., which can realize the beautification adjustment or secondary creation of images, and make the images more lively and interesting.
[0036] The image processing method provided by the present disclosure involves a to-be-processed image including an original layer and a material layer. A deformation processing interface corresponding to the material layer is displayed by triggering an operation of a user's deformation processing of the material layer. The user can perform a deformation processing operation on the deformation processing interface for the material layer to perform deformation processing on the material layer, and combine the material layer after deformation processing with the original layer. Thus, selective deformation processing of different layers can be realized. When the edge of a different layer is involved in the deformation operation area, no influence is generated on other adjacent layers. The present disclosure provides a more rich deformation processing approach for users, meets more processing requirements, improves the deformation effect of images, and improves the user experience.
[0037] FIGS. 1a-1e are schematic diagrams of image processing interfaces according to an exemplary embodiment. The present disclosure is described below in combination with FIGS. 1a-1e through the following specific application scenarios.
[0038] The specific application scenario of the present embodiment can be that a terminal device held by a user is installed with an application program for processing images. First, the user can open the application program to make the application program enter an image processing interface, and import a to-be-processed original image through the image processing interface. The imported original image can be used as an original layer. Then, a material can be added on the original layer, for example, a material such as a sticker, text, graffiti, mask, cutout, picture, etc. One material can be added, or multiple materials can be added. Each added material can be used as a material layer. The user can select any added material for deformation processing operation. The deformation can also be defined as “liquefaction deformation” or “liquefaction”.
[0039] For example, as shown in FIG. 1a, the user can import and display an original image through an image editing main interface 101, and use the original image as an original layer 102. A sticker can be added on the original layer 102 as a material layer 103. Then, the user can select the material layer 103 by clicking operation. In a toolbar 104 below the image editing main interface 101, multiple operation controls for the material layer 103 can be displayed, including a deformation function selection control. The user can trigger the deformation processing interface corresponding to the material layer 103 by clicking the deformation function selection control.
[0040] As shown in FIG. 1b, the material layer 103 corresponds to a deformation processing interface 105, which includes a canvas area 106 and a toolbar 107. The material layer 103 can be adaptively displayed in the canvas area 106, and a plurality of deformation processing operation controls can be displayed in the toolbar 107. The material layer 103 can be surrounded by a certain range of blank canvas area, and each of the plurality of deformation processing operation controls corresponds to a different deformation processing type. The user can first trigger an operation control corresponding to any deformation processing type, and then perform a deformation processing operation on the material layer 103 in the canvas area 106. The to-be-processed region in the canvas and the pixel information of the to-be-processed region can be determined according to the deformation processing type selected by the user and the operation track of the user in the canvas area 106.
[0041] As shown in FIG. 1c, the user can perform inward deformation on the material layer 103 to reduce the display area in the material layer 103, and the transparency of the pixel points in the reduced display area 108 can be set to be completely transparent. As shown in FIG. 1d, the user can also perform outward deformation on the material layer 103 to increase the display area in the material layer 103. The size of the material layer 103 can be expanded according to the increased display area 109, so that the expanded material layer can include the increased display area.
[0042] During the deformation processing of the material layer 103, other layers can also be displayed in the canvas according to the actual positional relationship and size relationship with the material layer, so that the user can view the processing effect. As shown in FIG. 1c and FIG. 1d, a control 110 is displayed below the canvas. For example, the control 110 in FIG. 1d can be triggered to enter a viewing interface 111 as shown in FIG. 1e. In the viewing interface 111, the original layer 102 can be displayed in the canvas, and the material layer 103 after deformation processing can be displayed on the original layer 102 according to the actual position and size. If the user needs to continue to perform deformation processing on the material layer 103, the control 110 can be triggered again to return to the deformation processing interface to perform deformation processing on the material layer 103.
[0043] After the user completes the deformation processing of the material layer 103, a completion control can be triggered to exit the deformation processing interface 105 corresponding to the material layer 103 and return to the image editing main interface. In the image editing main interface, the original layer and the material layer after deformation processing are displayed. The original layer and the material layer after deformation processing can be subjected to layer merging processing to obtain a target image.
[0044] The present disclosure will be described in detail below with reference to specific embodiments.
[0045] FIG. 2 is a flowchart illustrating an image processing method according to an example embodiment. The method can be applied in a terminal device. In this embodiment, for the convenience of understanding, the terminal device capable of installing an image processing application is taken as an example. Those skilled in the art can understand that the terminal device can include, but is not limited to, a mobile terminal device such as a smart phone, a smart wearable device, a notebook computer, a tablet computer, and the like. The method can include the following steps:
[0046] As shown in FIG. 2, in step 201, an original image is imported, a layer corresponding to the original image is taken as an original layer, and a material is added on the original layer, a layer corresponding to the material is taken as a material layer.
[0047] In this embodiment, a user can open an image processing application, make the application enter an image processing interface, import an original image to be processed through the image processing interface, and take the imported original image as an original layer. Then, a material can be added on the original layer. The material can include, but is not limited to, a sticker, a text, a doodle, a mask, a cutout, a picture, and the like. It should be noted that one material or multiple materials can be added, and each material can be taken as a material layer individually, and different materials correspond to different material layers.
[0048] In step 202, in response to a trigger operation of a deformation processing, a deformation processing interface is displayed.
[0049] In this embodiment, a user can select the original layer or any material layer, and perform a deformation processing trigger operation on the original layer or the material layer, to enter a deformation processing interface of the original layer or the material layer. In response to an operation of selecting a material layer and triggering a deformation function, a deformation processing interface of the material layer is displayed. The deformation processing of the material layer can be performed according to the operation of the user on the deformation processing interface of the material layer.
[0050] For example, in one implementation, a material layer can be selected by, for example, clicking, after the material layer is selected, various function selection controls for the material layer can be displayed in a toolbar, a deformation function selection control for the material layer can be triggered to trigger the deformation function of the material layer, so as to enter the deformation processing interface of the material layer. In another implementation, various function selection controls can be displayed in the toolbar, the deformation function selection control can be triggered first, then a material layer can be selected by clicking, and the deformation processing interface of the material layer is entered.
[0051] In the embodiment, the deformation processing interface of the material layer displays a canvas and a toolbar. The canvas and the toolbar can be displayed in different areas of the deformation processing interface, or the toolbar can be displayed on the upper layer of the canvas. It can be understood that the embodiment is not limited in this respect. The canvas can be used to constrain the range of deformation operation. The material layer can be adaptively displayed in the canvas. For example, a preset size condition can be set. If the original size of the material layer meets the preset size condition, the material layer can be displayed in the canvas according to the 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 a preset rule, and the scaled material layer can be displayed in the canvas.
[0052] Specifically, in an implementation manner, a preset reference length and a preset reference width can be acquired, and an original length and an original width corresponding to the material layer can be acquired. The original length and the reference length are compared, and the original width and the reference width are compared. Based on the comparison result, the material layer can be displayed in the canvas with an adaptive size, and the center of the material layer can be located at a preset position in the canvas.
[0053] For example, in a case where the original size of the material layer meets the preset size condition, the material layer can not be scaled, and the material layer can be directly displayed in the canvas according to the original size of the material layer, and the center of the material layer coincides with the center of the canvas. The case where the original size of the material layer meets the preset size condition can include a case 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.
[0054] In a case where the original size of the material layer does not meet the preset size condition, the material layer can be scaled according to the length-width ratio of the original size of the material layer, so that the scaled material layer can meet the preset size condition, and the scaled material layer can be displayed in the canvas, so that the center of the material layer coincides with the center of the canvas. The case where the original size of the material layer does not meet the preset size condition can include a case where the original length is greater than the reference length, and the original width is less than or equal to the reference width; or a case where the original length is greater than the reference length, and the original width is greater than the reference width; or a case where the original length is less than or equal to the reference length, and the original width is greater than the reference width.
[0055] As shown in FIG. 3A, the long and wide dimensions corresponding to the region 301 can be a preset reference size, and the long and wide dimensions corresponding to the region 302a, the region 302b, the region 302c, and the region 302d can be the original size of the material layer corresponding to different cases. As shown in the figure, in the first case, the original size of the material layer meets the preset size condition. In the second case, the third case, and the fourth case, the original size of the material layer does not meet the preset size condition.
[0056] In this embodiment, a plurality of deformation processing operation controls can be included in the toolbar, each of which corresponds to a different deformation processing type. The deformation processing type may, for example, include but is not limited to pushing, stretching, shrinking, restoring, swelling, brush size, rotating, twisting, or deformation, etc. Different deformation processing types can produce different image processing effects, and users can select different deformation processing types from the toolbar to achieve different deformation processing effects.
[0057] In step 203, the original layer or the material layer is deformed according to the operation on the deformation processing interface.
[0058] In this embodiment, the original layer or the material layer can be deformed according to the operation on the deformation processing interface. For any material layer, the material layer can be deformed according to the operation on the deformation processing interface of the material layer. Specifically, based on the triggering of the deformation option, the parameter adjustment control of the deformation option can be displayed, wherein the deformation option is in a first region of the deformation processing interface, for example, the first region can be a toolbar region. In the image display region of the deformation processing interface, the deformation smearing operation of the material layer is performed, wherein the image display region is in a second region of the deformation processing interface, for example, the second region can be a canvas region. The brush size of the deformation smearing operation can be determined based on the adjustment of the parameter adjustment control, and the material layer can be deformed according to the user's deformation smearing operation.
[0059] Specifically, the pixel information of the pixel points in the material layer can be determined according to the user's deformation smearing operation on the deformation processing interface, and the material layer after deformation processing can be displayed based on the pixel information of the pixel points in the material layer. Specifically, the to-be-processed region in the second region (i.e., the canvas) can be determined according to the user's deformation processing operation on the deformation processing interface. The to-be-processed region in the second region can be a region in the second region that is affected by the deformation processing operation and needs to update the pixel information. The to-be-processed region can be completely within the material layer region range, or can include a part outside the material layer region range.
[0060] If the region to be processed is completely within the region of the material layer, the pixel information of each pixel in the material layer can be directly obtained according to the deformation processing operation. If the region to be processed includes an extended part outside the region of the material layer, the size of the material layer can be extended according to the extended part, so that the extended material layer can completely cover the region to be processed. Finally, the pixel information of each pixel in the extended material layer is obtained.
[0061] For example, as shown in FIG. 3B, the region 311 is the region corresponding to the material layer, and the region 312 is the region to be processed. As shown in the figure, the region to be processed 312 includes an extended part outside the region of the material layer. The region 311 can be extended according to the extended part to obtain the extended material layer region 313, and the extended material layer region 313 can completely cover the region to be processed 312.
[0062] In this embodiment, the pixel information of a pixel can include the pixel value and the transparency of the pixel. For a pixel with a display object, the transparency of the pixel can be completely opaque, and for a pixel without a display object, the transparency of the pixel can be completely transparent. Specifically, after the deformation processing of the material layer, the display region in the material layer can be reduced. As shown in FIG. 3C, the region 321 is the display region in the material layer before the deformation processing, and the region 322 is the display region in the material layer after the deformation processing. In this case, the transparency of the pixel without a display object in the material layer can be set to be completely transparent, without the need to reduce the size of the material layer.
[0063] In some embodiments, after displaying the deformation processing interface of the material layer, the overall effect of the deformation processing can be viewed before exiting the deformation processing interface. Specifically, in response to the triggering of a first event, the viewing interface can be entered from the deformation processing interface of the material layer. In the viewing interface, the original layer and the material layer are displayed on the second region, and the material layer is displayed on the original layer according to the positional relationship with the original layer. Specifically, the current material layer can be displayed on the original layer according to the current size of the material layer and the positional relationship between the material layer and the original layer, so that the user can view the current effect. In response to the triggering of a second event, the viewing interface can be exited, and the deformation processing interface of the material layer is returned, so that the user can continue to perform the deformation processing on the material layer.
[0064] The first event can be an event that a user clicks the preset control, an event that the user continuously presses the preset control, or an event that the user lights the preset control. The second event can be an event that a user double-clicks the preset control, an event that the user stops pressing the preset control, or an event that the user extinguishes the preset control. It can be understood that the first event and the second event can be any reasonable triggering event, and the embodiment is not limited in terms of specific settings of the first event and the second event.
[0065] In step 204, the material layer after the deformation processing and the original layer are merged to obtain a target image.
[0066] In this embodiment, in response to a triggering operation of completing the deformation processing, the deformation processing interface can be exited and the image editing main interface can be entered. The original layer is displayed in the image editing main interface, and the material layer after the deformation processing is displayed on the original layer according to the positional relationship with the original layer, and the material layer is in a movable state, a scalable state, and an editable state. The user can perform a moving operation on the material layer, a scaling operation on the material layer, or an editing operation on the material layer, and the editing operation includes a deformation processing operation and other various editing operations. The triggering operation of completing the deformation processing can be an operation of clicking a complete control, and the embodiment is not limited in terms of the specific manner of the triggering operation.
[0067] In this embodiment, when the user clicks the control of merging the layers or exits the editing state after completing the editing of the original image, the material layer after the deformation processing and the original layer can be merged to obtain a target image.
[0068] The image processing method provided by the disclosure can import an original image as an original layer, add a material as a material layer on the original layer, display a deformation processing interface in response to a triggering operation of deformation processing, perform deformation processing on the original layer or the material layer according to the operation on the deformation processing interface, and merge the material layer after the deformation processing and the original layer to obtain a target image. Thus, selective deformation processing of different layers can be realized, and when the deformation operation involves the edges of different layers, no influence is generated on other adjacent layers, more deformation processing approaches are provided for the user, more processing requirements are met, the deformation effect of the image is improved, and the user experience is improved.
[0069] It should be noted that, although in the above embodiments, the operations of the method of the embodiments of the present disclosure are described in a specific order, this does not require or imply that the operations must be performed in this specific order, or that all of the shown operations must be performed to achieve the desired result. Instead, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step execution, and / or one step can be broken down into multiple steps.
[0070] Corresponding to the foregoing image processing method embodiments, the present disclosure also provides embodiments of image processing devices.
[0071] As shown in FIG. 4, FIG. 4 is a block diagram of an image processing device according to an exemplary embodiment of the present disclosure, which can include an initial module 401, a display module 402, a processing module 403, and a merging module 404.
[0072] The initial module 401 is configured to import an original image, take a layer corresponding to the original image as an original layer, and add a material to the original image, take a layer corresponding to the material as a material layer.
[0073] The display module 402 is configured to display a morphing processing interface in response to a triggering operation of morphing processing.
[0074] The processing module 403 is configured to perform morphing processing on the original layer or the material layer according to an operation on the morphing processing interface.
[0075] The merging module 404 is configured to merge the material layer and the original layer after morphing processing to obtain a target image.
[0076] In some embodiments, the display module 402 is configured to display a morphing processing interface of the material layer in response to an operation of selecting the material layer and triggering a morphing function.
[0077] The processing module 403 is configured to perform morphing processing on the material layer according to an operation on the morphing processing interface of the material layer.
[0078] In other embodiments, the processing module 403 is configured to display a parameter adjustment control of a morphing option based on triggering of the morphing option, wherein the morphing option is in a first region of the morphing processing interface. Perform a morphing smearing operation on the material layer in an image display region of the morphing processing interface, wherein the image display region is in a second region of the morphing processing interface, the brush size of the morphing smearing operation is determined based on adjustment of the parameter adjustment control, and the material layer is morphed based on the morphing smearing operation.
[0079] In some embodiments, the processing module 403 performs the deformation processing on the material layer based on the deformation smearing operation in the following manner: determining pixel information of the pixel points in the material layer according to the deformation smearing operation, the pixel information can include pixel value and transparency. For any pixel point, if the pixel point does not have a display object after the deformation processing, the transparency of the pixel point is full transparency. The material layer after the deformation processing is displayed based on the pixel information of the pixel points in the material layer.
[0080] In some embodiments, the processing module 403 determines the pixel information of the pixel points in the material layer according to the deformation smearing operation in the following manner: determining the to-be-processed region in the second region according to the deformation processing operation of the user on the deformation processing interface. If the to-be-processed region is within the region of the material layer, the pixel information of the pixel points in the material layer is obtained according to the deformation processing operation. If the to-be-processed region includes an extended part outside the region of the material layer, the material layer is extended according to the extended part, and the pixel information of the pixel points in the material layer after the extension is obtained.
[0081] In some embodiments, the apparatus can further include a viewing module and a first return module (not shown in the figure).
[0082] The viewing module is configured to enter the viewing interface in response to triggering of a first event, and display the original layer and the material layer in the viewing interface, wherein the material layer is displayed on the original layer according to the positional relationship with the original layer.
[0083] The first return module is configured to exit the viewing interface and return to the deformation processing interface in response to triggering of a second event.
[0084] In some embodiments, the apparatus can further include an exit module and a second return module (not shown in the figure).
[0085] The exit module is configured to exit the deformation processing interface and enter the image editing main interface in response to triggering of a deformation processing completion operation.
[0086] The second return module is configured to display the original layer in the image editing main interface, display the material layer on the original layer according to the positional relationship with the original layer, and the material layer is in a movable state, a scalable state and an editable state.
[0087] In some embodiments, the material includes any one or more of the following: a sticker, a text, a scribble, a mask, a cutout, and a picture.
[0088] For the apparatus embodiment, since it basically corresponds to the method embodiment, the relevant part can be seen from the part of the method embodiment. The apparatus embodiment described above is only illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment of the present disclosure according to actual needs. Those skilled in the art can understand and implement it without creative labor.
[0089] Some embodiments of the present disclosure provide an electronic device. The electronic device includes a processor and a memory, which can be used to implement a client or a server. The memory is used to non-transiently store computer executable instructions (for example, one or more computer program modules). The processor is used to run the computer executable instructions, which can perform one or more steps of the image processing method described above when run by the processor, thereby implementing the image processing method described above. The memory and the processor can be interconnected through a bus system and / or other forms of connection mechanism (not shown).
[0090] For example, the processor can be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capability and / or program execution capability. For example, the central processing unit (CPU) can be X86 or ARM architecture, etc. The processor can be a general-purpose processor or a special-purpose processor, which can control other components in the electronic device to perform the desired functions.
[0091] For example, the memory can include any combination of one or more computer program products, which can include various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. For example, the volatile memory can include random access memory (RAM), cache memory, etc. The non-volatile memory can include read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules can be stored on the computer readable storage medium, and the processor can run the one or more computer program modules to implement various functions of the electronic device. Various application programs and various data used and / or generated by the application programs can also be stored in the computer readable storage medium.
[0092] It should be noted that in the embodiments of the present disclosure, the specific functions and technical effects of the electronic device can refer to the description of the image processing method above, which will not be described here.
[0093] FIG. 5 is a schematic block diagram of an electronic device according to some embodiments of the present disclosure. The electronic device 920 is suitable for implementing the image processing method according to some embodiments of the present disclosure, for example. The electronic device 920 can be a terminal device or the like, and can be used to implement a client or a server. The electronic device 920 can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a car terminal (e.g., a car navigation terminal), a wearable electronic device, and the like, and a stationary terminal such as a digital TV, a desktop computer, a smart home device, and the like. It should be noted that the electronic device 920 shown in FIG. 5 is merely an example, and does not impose any limitation on the functions and the use range of the embodiments of the present disclosure.
[0094] As shown in FIG. 5, the electronic device 920 can include a processing device (e.g., a central processing unit, a graphics processing unit, or the like) 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. Various programs and data required for the operation of the electronic device 920 are also stored in the RAM 923. The processing device 921, the ROM 922, and the RAM 923 are connected to each other through a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.
[0095] Generally, the following devices can be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; a storage device 928 including, for example, a magnetic tape, a hard disk, and the like; and a communication device 929. The communication device 929 can allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although FIG. 5 shows the electronic device 920 with various devices, it should be understood that it is not required to implement or have all the shown devices, and the electronic device 920 can instead implement or have more or fewer devices.
[0096] For example, according to an embodiment of the disclosure, the image processing method described above can be implemented as a computer software program. For example, an embodiment of the disclosure includes a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program comprising program code for executing the image processing method described above. In such an embodiment, the computer program can be downloaded and installed from a network through the communication apparatus 929, or installed from the storage apparatus 928, or installed from the ROM 922. When the computer program is executed by the processing apparatus 921, the functions defined in the image processing method provided by an embodiment of the disclosure can be implemented.
[0097] Some embodiments of the disclosure provide a storage medium. For example, the storage medium can be a non-transitory computer-readable storage medium, for storing non-transitory computer-executable instructions. When the non-transitory computer-executable instructions are executed by a processor, the image processing method described in an embodiment of the disclosure can be implemented, for example, when the non-transitory computer-executable instructions are executed by a processor, one or more steps of the image processing method described above can be performed.
[0098] For example, the storage medium can be applied in the electronic device described above, for example, the storage medium can include a memory in the electronic device.
[0099] For example, the storage medium can include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a compact disc read-only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media.
[0100] For example, the description of the storage medium can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts will not be described herein. The specific functions and technical effects of the storage medium can refer to the description of the image processing method above, and will not be described herein.
[0101] Note that in the context of the present disclosure, a computer- readable medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable medium can be a computer- readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a computer-readable program code transmitted in baseband or as part of a carrier wave over a transmission medium, in which the computer-readable program code is embodied. Such a transmitted program code can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a computer-readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium can be transmitted using any suitable medium, including but not limited to wire, cable, fiber optic, RF, etc., or any suitable combination of the foregoing.
[0102] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known
[0103] It is understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims.
Claims
1. An image processing method comprising: importing an original image, and taking a layer corresponding to the original image as an original layer; adding a material to the original image, and taking a layer corresponding to the material as a material layer; in response to a trigger operation of a deformation process, displaying a deformation process interface; performing a deformation process on the original layer or the material layer according to an operation on the deformation process interface; merging the material layer and the original layer after the deformation process to obtain a target image.
2. The method of claim 1, wherein, The displaying of the deformation process interface in response to the trigger operation of the deformation process comprises: in response to an operation of selecting the material layer and triggering a deformation function, displaying a deformation process interface of the material layer; wherein the performing of the deformation process on the original layer or the material layer according to the operation on the deformation process interface comprises performing the deformation process on the material layer according to an operation on the deformation process interface of the material layer.
3. The method of claim 2, wherein, The performing of the deformation process on the material layer according to the operation on the deformation process interface of the material layer comprises: based on a trigger of a deformation option, displaying a parameter adjustment control of the deformation option, wherein the deformation option is in a first region of the deformation process interface; performing a deformation smearing operation of the material layer in an image display region of the deformation process interface, wherein the image display region is in a second region of the deformation process interface, and a brush size of the deformation smearing operation is determined based on an adjustment of the parameter adjustment control; performing the deformation process on the material layer based on the deformation smearing operation.
4. The method of claim 3, wherein, The performing of the deformation process on the material layer based on the deformation smearing operation comprises: determining pixel information of a pixel point in the material layer according to the deformation smearing operation; the pixel information comprises a pixel value and a transparency; for any pixel point, if the pixel point has no display object after the deformation process, the transparency of the pixel point is full transparency; displaying the material layer after the deformation process based on the pixel information of the pixel point in the material layer.
5. The method of claim 4, wherein, The determining of the pixel information of the pixel point in the material layer according to the deformation smearing operation comprises: determining a to-be-processed region in the second region according to a deformation process operation on the deformation process interface; if the to-be-processed region is within a region of the material layer, obtaining the pixel information of the pixel point in the material layer according to the deformation process operation; if the to-be-processed region includes an extended part outside the region of the material layer, extending the material layer according to the extended part, and obtaining the pixel information of the pixel point in the material layer after the extension.
6. The method according to any one of claims 1 to 5, wherein, After the displaying of the deformation process interface, the method further comprises: in response to a trigger of a first event, entering a viewing interface, and displaying the original layer and the material layer in the viewing interface, wherein the material layer is displayed on the original layer according to a positional relationship with the original layer; in response to a trigger of a second event, exiting the viewing interface, and returning to the deformation process interface.
7. The method according to any one of claims 1-6, wherein, Before the material layer and the original layer are combined, the method further comprises: in response to a trigger operation of completing the deformation processing, exiting the deformation processing interface and entering an image editing main interface; in the image editing main interface, displaying the original layer and displaying the material layer on the original layer according to the positional relationship between the original layer and the material layer; and the material layer is in a movable state, a scalable state and an editable state.
8. The method of any one of claims 1-7, wherein, The material comprises any one or more of the following: a map, a text, a scribble, a mask, a cutout and a picture.
9. An image processing apparatus, comprising: an initial module configured to import an original image, take a layer corresponding to the original image as an original layer, add a material on the original image, and take a layer corresponding to the material as a material layer; a display module configured to display a deformation processing interface in response to a trigger operation of deformation processing; a processing module configured to perform deformation processing on the original layer or the material layer according to an operation on the deformation processing interface; a combination module configured to combine the material layer and the original layer after the deformation processing to obtain a target image.
10. A computer readable storage medium storing a computer program, wherein, When the computer program is executed in the computer, the computer executes the image processing method in any one of claims 1-8.
11. An electronic device comprising a memory and a processor, wherein, The memory stores executable code, and the processor executes the executable code to implement the image processing method in any one of claims 1-8. The memory stores executable code, and the processor executes the executable code to implement the image processing method in any one of claims 1-8.
Citation Information
Patent Citations
Image processing method and device, equipment and medium
CN112906553A
Image processing method and device, electronic equipment and storage medium
CN116740252A
Image processing method and device, equipment and medium
CN118446884A
Program, information processing device, image editing method, and image display method
JP7045121B1