WO2025045189A1 - 特效模板生成方法、装置、电子设备及存储介质 - Google Patents

特效模板生成方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2025045189A1
WO2025045189A1 PCT/CN2024/115776 CN2024115776W WO2025045189A1 WO 2025045189 A1 WO2025045189 A1 WO 2025045189A1 CN 2024115776 W CN2024115776 W CN 2024115776W WO 2025045189 A1 WO2025045189 A1 WO 2025045189A1
Authority
WO
WIPO (PCT)
Prior art keywords
deformation
special effect
template
liquefaction
image
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/CN2024/115776
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 WO2025045189A1 publication Critical patent/WO2025045189A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image

Definitions

  • the embodiments of the present disclosure relate to a method, device, electronic device and storage medium for generating a special effect template.
  • the deformation effect for the user's appearance is the most commonly used special effect function in video and image special effect tools. It achieves visual effects such as image beautification and funny effects by deforming the user's torso, face and other areas.
  • the special effects templates of the above-mentioned deformation special effects are usually designed by software developers and fixedly configured in image processing tools for users to use. Users cannot generate personalized templates according to their own interests and needs. Therefore, there are problems such as single style of special effects templates and inability to be personalized.
  • the embodiments of the present disclosure provide a special effect template generation method, device, electronic device and storage medium to overcome the problems of the special effect template having a single style and being unable to be personalized.
  • an embodiment of the present disclosure provides a method for generating a special effect template, comprising:
  • Run a first editing interface in which a template image and a liquefaction marker located in the template image are displayed; in response to a first operation on the liquefaction marker, a marker outline of the liquefaction marker undergoes a first deformation; in response to the first deformation of the marker outline, a first liquefaction special effect is generated in a target area of the template image; wherein the target area is an image area in the template image that is covered by the marker outline of the liquefaction marker.
  • an embodiment of the present disclosure provides a template generation device, including:
  • a display module used for running a first editing interface, wherein a template image and a liquefaction mark located in the template image are displayed in the first editing interface;
  • An interaction module configured to cause a first deformation of a logo outline of the liquefied logo in response to a first operation on the liquefied logo
  • a processing module configured to generate a first liquefaction effect in a target area of the template image in response to a first deformation of the logo outline; wherein the target area is an image area in the template image covered by the logo outline of the liquefied logo;
  • a generation module is used to generate a target special effect template based on the first liquefaction special effect.
  • an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
  • the memory stores computer-executable instructions
  • the processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the template generation method described in the first aspect and various possible designs of the first aspect.
  • an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored.
  • a processor executes the computer execution instructions, the template generation method described in the first aspect and various possible designs of the first aspect is implemented.
  • an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the template generation method described in the first aspect and various possible designs of the first aspect.
  • FIG1 is a diagram of an application scenario of a special effect template generation method provided by an embodiment of the present disclosure
  • FIG2 is a flowchart of a method for generating a special effect template provided by an embodiment of the present disclosure
  • FIG3 is a schematic diagram of a first editing interface provided by an embodiment of the present disclosure.
  • FIG4 is a flow chart of a specific implementation of step S102 in the embodiment shown in FIG2 ;
  • FIG5 is a schematic diagram of adjusting a logo outline provided by an embodiment of the present disclosure.
  • FIG6 is a schematic diagram of a mirror liquefied mark provided in an embodiment of the present disclosure.
  • FIG7 is a flowchart of a specific implementation method of step S103 in the embodiment shown in FIG2 ;
  • FIG8 is a schematic diagram of a process for generating a first liquefaction special effect provided by an embodiment of the present disclosure
  • FIG9 is a schematic diagram of a process for setting adjustment parameters provided by an embodiment of the present disclosure.
  • FIG10 is a second flow chart of a method for generating a special effect template provided in an embodiment of the present disclosure
  • FIG11 is a schematic diagram of a superimposed special effect provided by an embodiment of the present disclosure.
  • FIG12 is a structural block diagram of a device for generating special effect templates provided in an embodiment of the present disclosure.
  • FIG13 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 14 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure.
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • FIG1 is an application scenario diagram of the special effect template generation method provided in the embodiment of the present disclosure.
  • the special effect template generation method provided in the embodiment of the present disclosure can be applied to an application with an image special effect template generation function (hereinafter referred to as a special effect editing application). More specifically, it can be applied to the application scenario of designing and making special effect templates.
  • the execution subject of this embodiment can be a terminal device that runs the above-mentioned application with the special effect template generation function, or a server that runs the service end corresponding to the above-mentioned application, or other electronic devices that perform similar functions. Referring to FIG1 , taking a terminal device as an example, the terminal device is, for example, a smart phone.
  • the user operates the terminal device to run the special effect editing application, and designs and generates personalized special effect templates (such as the special effect template #1 shown in the figure) through the special effect editing application.
  • the personalized special effect template generated by the special effect editing application can be further uploaded to the special effect platform server and published on the special effect platform.
  • other image processing applications are used in
  • the special effects template of the special effects platform needs to be called
  • the published personalized special effects template can be used to add image special effects to the image.
  • the personalized special effects template generated by the special effects editing application can also be saved locally on the terminal device.
  • the personalized special effects template is loaded by running the image processing application on the terminal to achieve the purpose of adding personalized image special effects to the image to be processed.
  • the special effects templates used to achieve image deformation special effects are usually designed by software developers and fixedly configured in image processing tools for users to use. Therefore, the special effects style and shape of the special effects templates are fixed, resulting in the same visual effects of deformation special effects in all special effects images generated using the special effects templates, which cannot show differences and personalization. Since users cannot generate personalized templates according to their own interests and needs, there are problems such as single special effects template style and inability to personalize and adjust.
  • the disclosed embodiment provides a special effect template generation method to solve the above-mentioned problem.
  • FIG. 2 is a flow chart of a special effect template generation method provided in an embodiment of the present disclosure.
  • the method of this embodiment can be applied in a terminal device, and the special effect template generation method includes:
  • Step S101 running a first editing interface, in which a template image and a liquefaction mark located in the template image are displayed.
  • Step S102 in response to a first operation on the liquefied mark, causing a mark outline of the liquefied mark to generate a first deformation.
  • the first editing interface is an interactive interface for generating personalized special effects templates in the special effects editing application.
  • the sample image can be understood as a standard image used to express a deformation effect, more specifically, for example, a preset face image, and the effect of the first liquefaction special effect generated subsequently is displayed by deforming (liquefying) the sample image, so that the user can preview the visual effect of the special effects template in real time and make corresponding adjustments.
  • the liquefaction mark is a graphic mark used to receive user operations for interaction, more specifically, for example, it can be a circle, a square, etc.
  • the location of the liquefaction mark is the location where the deformation special effect is generated in the image.
  • the terminal device receives a first operation input by the user for the liquefied logo, adjusts the logo outline of the liquefied logo, and causes the logo outline to undergo a first deformation, wherein the first deformation may refer to a change in the length and width ratio of the liquefied logo, or the logo outline of the liquefied logo may be expanded or reduced as a whole.
  • FIG3 is a schematic diagram of a first editing interface provided by an embodiment of the present disclosure, with reference to FIG3, in the first editing interface, there is a template image and a liquefied logo.
  • the length of the liquefied mark changes from x1 in the initial state to x2, that is, a horizontal deformation of x2-x1 is generated; similarly, when the first operation is vertical drag (not shown in the figure), the width of the liquefied mark changes from y1 in the initial state to y2, that is, a vertical deformation of y2-y1 is generated.
  • the first deformation can be a vector representing the above deformation, more specifically, for example, a vector including the difference between x2 and x1, and the difference between y2 and y1; or a set including lengths x1, x2 and widths y1, y2; or a set of contour points describing the contour of the logo before and after deformation.
  • the specific implementation form of the first deformation is not limited here.
  • the liquefaction marker includes at least one first control point and at least one second control point, the first control point is used to adjust the lateral deformation of the liquefaction marker; the second control point is used to adjust the longitudinal deformation of the liquefaction marker, and further, optionally, the liquefaction marker includes at least one third control point, and the third control point is used to adjust the overall scaling ratio of the liquefaction marker.
  • the first operation includes a first sub-operation, a second sub-operation and a third sub-operation.
  • a specific implementation of step S102 includes:
  • Step S1021 in response to the first sub-operation on the first control point, causing the outline of the liquefied mark to be deformed laterally.
  • Step S1022 in response to the second sub-operation on the second control point, the outline of the liquefied mark is deformed longitudinally.
  • Step S1023 In response to the third sub-operation on the third control point, the outline of the liquefied mark is expanded or reduced as a whole.
  • FIG5 is a schematic diagram of adjusting the outline of a logo provided by an embodiment of the present disclosure.
  • the liquefied logo is an elliptical interactive logo, and the liquefied logo has two first control points P1 and P2, two second control points P3 and P4, and four third control points P5 to P8.
  • the terminal device receives the first sub-operation for the first control points P1 and P2
  • the logo outline of the liquefied logo undergoes lateral deformation, that is, the major axis of the ellipse of the liquefied logo changes from x1 to x2, where x1 and x2 are the distances of the first control points P1 and P2 before and after responding to the first sub-operation, respectively.
  • the terminal device receives the first sub-operation for the first control points P1 and P2
  • the logo outline of the liquefied logo undergoes lateral deformation, that is, the major axis of the ellipse of the liquefied logo changes from x1 to x2, where x1 and x2 are the distances of the first control points P1 and P2 before and after responding to the first sub-operation, respectively.
  • the logo contour of the liquefied logo undergoes longitudinal deformation, that is, the minor axis of the ellipse of the liquefied logo changes from y1 to y2, where y1 and y2 are the distances of the second control points P3 and P4 before and after responding to the first sub-operation, respectively.
  • the logo contour of the liquefied logo expands or shrinks as a whole, that is, the major axis and minor axis of the ellipse of the liquefied logo are expanded or shrunk synchronously under the premise that the ratio of the major axis and minor axis of the ellipse of the liquefied logo remains unchanged, for example, as shown in the figure, the major axis of the ellipse of the liquefied logo is changed from x1 to 2 times x1, and the minor axis of the ellipse is changed from y1 to 2 times y1.
  • the above-mentioned first operation on the first control point, the second control point and the third control point can be separately for any one or more of the first control point, the second control point and the third control point, and there is no restriction on the order of operating the first control point, the second control point and the third control point, nor is there any restriction on the number of times the first control point, the second control point and the third control point are operated. That is, the first operation input by the user can adjust any point of the first control point, the second control point and the third control point multiple times and without order restriction, so as to achieve the purpose of producing a specific first deformation of the logo outline of the liquefied logo, thereby achieving the purpose of personalized editing by the user.
  • the first function parameter component in the first editing interface can be set to an on state, that is, another liquefaction mark, that is, a mirror liquefaction mark, is symmetrically displayed in the first editing interface.
  • the mirror liquefaction mark is used to generate a second liquefaction effect symmetrical to the first liquefaction effect.
  • Figure 6 is a schematic diagram of a mirror liquefaction mark provided by an embodiment of the present disclosure.
  • a first function parameter component is provided in the first editing interface, and the first function parameter component is in the "Off" state by default; after the terminal device receives the setting operation for the first function parameter component input by the user, the first function parameter component is set to the "On” state, and then the mirror liquefaction mark is displayed in the first editing interface.
  • the mirror liquefaction mark and the liquefaction mark are symmetrical based on the central axis of the template image.
  • the mirror liquefaction mark After the above-mentioned first operation on the liquefaction mark causes the liquefaction mark to produce a first deformation, the mirror liquefaction mark will synchronously produce the same first deformation, and in the subsequent steps, a second liquefaction special effect with the same liquefaction special effect and symmetrical position is generated.
  • the specific implementation method is the same as the implementation method of the liquefaction mark producing the first liquefaction special effect, which will not be repeated here.
  • the purpose of simultaneously and conveniently adding a second liquefaction effect symmetrical to the first liquefaction effect can be achieved without the need to configure a separate
  • the second liquefaction special effect ensures the consistency and symmetry of the second liquefaction special effect which is symmetrical to the first liquefaction special effect, thereby improving the display effect of the generated target special effect template.
  • Step S103 In response to the first deformation of the marker outline, a first liquefaction effect is generated in a target area of the template image; wherein the target area is an image area in the template image covered by the marker outline of the liquefied marker.
  • the template image is a face image
  • the first liquefaction special effect is used to enlarge the "eyes" covered by the liquefied logo in the face image, that is, to produce a second deformation.
  • the second deformation is determined by the direct proportion of the first deformation, that is, the larger the deformation amount of the first deformation, the larger the deformation amount of the second deformation, and vice versa, the smaller the deformation amount of the first deformation, the smaller the deformation amount of the second deformation.
  • step S103 includes:
  • Step S1031 Obtain the target deformation type.
  • Step S1032 Obtain a corresponding deformation function according to the target deformation type.
  • Step S1033 Based on the deformation variable parameter representing the deformation variable of the first deformation, the deformation function is called to obtain a corresponding pixel transformation matrix, where the pixel transformation matrix is used to cause the image elements in the corresponding image area to generate a second deformation.
  • Step S1034 generating a first liquefaction effect in a target area of the template image according to the pixel transformation matrix.
  • the target deformation type is the deformation type of the second deformation, such as scaling, expansion, wrinkles, waves, clockwise distortion, counterclockwise distortion, etc.
  • the target deformation type can be determined by the operation instruction input by the user, and the specific implementation method of obtaining the target deformation type is not repeated here.
  • the corresponding deformation function is obtained, wherein the deformation function is used to characterize the law of changes in pixel points in the image, and the pixel values of the pixel points in the image are adjusted to achieve the visual effect of image deformation.
  • the deformation function uses at least the deformation variable parameters corresponding to the first deformation as input parameters, so that the deformation variable corresponding to the pixel transformation matrix output by the deformation function is related to the first deformation.
  • the deformation variable parameters are a set of parameters with a specific data format generated based on the first deformation, and are adapted to the deformation function.
  • the deformation variable parameters include at least one of the following: horizontal deformation variable, vertical deformation variable, and overall scaling ratio.
  • the deformation variable parameters are input into the deformation function, so that the deformation function generates a pixel change matrix related to the deformation variable of the first deformation, and the pixel change matrix represents the mapping relationship between the initial image of the target area of the template image and the image that generates the second deformation, that is, through the pixel change matrix, the image in the target area can be caused to produce the second deformation, thereby forming the first liquefaction effect.
  • Figure 8 is a schematic diagram of a process for generating a first liquefaction special effect provided by an embodiment of the present disclosure. The above process is explained in conjunction with Figure 8 below.
  • the deformation function Func_1 shown as Func_1() in the figure
  • the deformation variable parameter para_1 shown as para_1 in the figure
  • At least the deformation variable parameter para_1 is used as the input parameter of the Func_1 function, and the Func_1 function is called to obtain the corresponding pixel change matrix Mat_1.
  • the pixel change matrix Mat_1 is used to characterize the style of the second deformation generated in the target area. Afterwards, the pixel points in the target area of the template image are processed based on the pixel change matrix Mat_1 to generate image elements with the second deformation, thereby generating the first liquefaction special effect.
  • the input parameter of the deformation function further includes an adjustment parameter
  • the adjustment parameter is used to characterize the intensity of the second deformation generated by the deformation function. That is, based on the deformation variable parameter characterizing the deformation variable of the first deformation, the deformation function is called to obtain a corresponding pixel transformation matrix, and the pixel transformation matrix is used to cause the image elements in the corresponding image area to generate the second deformation, including: obtaining the pixel transformation matrix based on the deformation variable parameter and the adjustment parameter.
  • the adjustment parameter when the deformation function is different, the meaning represented by the adjustment parameter is different.
  • the deformation function when the deformation function is a "wrinkle" type corresponding to the deformation function fun_1(), its corresponding adjustment parameter represents the number of "wrinkles”; for another example, when the deformation function is a "clockwise selection” type corresponding to the deformation function fun_2(), its corresponding adjustment parameter represents the angle of "rotation".
  • the adjustment parameter can be an integer value with a fixed value range, for example, the value range of the adjustment parameter is [0,100], where 0 indicates that the intensity of the second deformation is the smallest, and 100 indicates that the intensity of the second deformation is the largest.
  • Figure 9 is an embodiment of the present disclosure.
  • a schematic diagram of the process of setting adjustment parameters is provided, as shown in FIG9 , in the first editing interface, a slider for setting adjustment parameters is provided, and when the sliding range of the slider on the slider is 0 to 100, the target deformation type corresponding to the deformation function is "wave deformation".
  • the corresponding second deformation intensity is the first intensity (deformation Deform_1 in the figure); when the slider is at 60, the corresponding second deformation intensity is the second intensity (deformation Deform_2 in the figure).
  • the intensity of the second deformation generated in the image will be greater, that is, the generated first liquefaction effect will cause the image to deform to a higher degree.
  • the adjustment parameter in the adjustment parameter component in the first editing interface, can be obtained by the user triggering the adjustment parameter component.
  • the corresponding pixel change matrix is jointly determined by the deformation variable parameter and the adjustment parameter, so that a more refined adjustment of the style of the second deformation can be achieved, thereby improving the design flexibility and personalization of the target special effect template.
  • Step S104 Generate a target special effect template based on the first liquefaction special effect.
  • the first liquefaction special effect can be represented based on the above-mentioned pixel change matrix and the set of coordinates of the corresponding target area. After obtaining the above-mentioned first liquefaction special effect, it is equivalent to obtaining a special effect style generated based on the user's personalized needs. Then, the pixel change matrix and the coordinates of the corresponding target area are encapsulated using the template generation component to generate the corresponding target special effect template.
  • the relevant template information of the target area and the pixel change matrix described in the target special effect template is used to process the pixel points in the image area corresponding to the target area in the image to be processed based on the pixel change matrix, so that the image special effect identical to the first liquefaction effect appears in the image to be processed.
  • the use process of the special effect template will not be repeated here.
  • a sample image and a liquefaction mark located in the sample image are displayed in the first editing interface; in response to a first operation on the liquefaction mark, the mark outline of the liquefaction mark is deformed in the first way; in response to the first deformation of the mark outline, a first liquefaction special effect is generated in the target area of the sample image; wherein the target area is the image area covered by the mark outline of the liquefaction mark in the sample image, and the first liquefaction special effect is used to cause the image elements in the target area to deform in the second way, and the deformation amount of the second deformation corresponds to the deformation amount of the first deformation; based on the first liquefaction special effect, a target special effect template is generated.
  • a first deformation is generated on the sample image, thereby mapping it to the first liquefaction special effect, and generating a target special effect template corresponding to the first liquefaction special effect, a personalized special effect template generation based on user operation is realized, and the problems of a single style of special effect template and inability to be personalized are solved.
  • FIG. 10 is a flow chart of the special effect template generation method provided by the embodiment of the present disclosure. Based on the embodiment shown in FIG. 2 , this embodiment further refines step S101 and adds steps such as generating a superimposed special effect template.
  • the special effect template generation method includes:
  • Step S201 displaying a special effect editing panel, wherein the special effect editing panel is provided with at least one template component and an editing component, wherein the template component is used to display a template library including at least one pre-generated special effect template.
  • Step S202 In response to a trigger operation on the editing component, running the first editing interface.
  • the special effect editing panel can be displayed first, and the special effect editing panel is the upper interface of the first editing interface in the embodiment shown in FIG2.
  • the special effect editing panel at least one template component and an editing component are provided, wherein, on the one hand, the template component is used to display a template library including at least one pre-generated special effect template, and in a possible implementation, after the template component is triggered based on a user operation, a third editing page will pop up, and a plurality of different special effect templates will be displayed in the third editing page, and in another possible implementation, the template component can directly display the pre-generated special effect panel in a specified area in the special effect editing panel, so that the user can directly select the special effect template in the template library from the special effect editing panel.
  • the pre-generated special effect template is stored by the template component, so that the user can load different special effect templates for secondary editing or superposition combination by triggering the template component.
  • the first editing interface is run, so that the subsequent steps of generating personalized templates are performed based on the first editing interface.
  • Step S203 in response to a first operation on the liquefied mark, causing a mark outline of the liquefied mark to generate a first deformation.
  • Step S204 In response to the first deformation of the logo outline, a first liquefaction special effect is generated in the target area of the template image; wherein the target area is the image area covered by the logo outline of the liquefied logo in the template image, and the first liquefaction special effect is used to cause the image elements in the target area to produce a second deformation, and the deformation amount of the second deformation corresponds to the deformation amount of the first deformation.
  • Step S205 Generate a target special effect template based on the first liquefaction special effect.
  • Step S205A in response to the fourth operation, setting the first function parameter and/or the second function parameter of the target special effect template
  • the first function parameter is used to enable the symmetrical deformation function of the target special effect template, and the symmetrical deformation function is used to generate a second liquefaction special effect symmetrical to the first liquefaction special effect based on the image to be processed; the second function parameter is used to enable the symmetrical deformation function of the target special effect template.
  • the function parameter is used to enable the special effect tracking function of the target special effect template.
  • the special effect tracking function is used to dynamically set the position of the target area so that the target area tracks the target image element in the image to be processed.
  • the template function of the target special effect template can be further set.
  • the first function parameter and/or the second function parameter of the target special effect template are set.
  • a function control for setting the first function parameter and the second function parameter is provided in the special effect editing panel.
  • the function control is set to the on (On) state or the off (Off) state to implement the first function parameter and/or the second function parameter.
  • the first function parameter is set to a parameter value representing the on state, the symmetrical deformation function of the target special effect template is turned on.
  • a second liquefaction special effect symmetrical to the first liquefaction special effect will be generated in the image to be processed, that is, the liquefaction special effect corresponding to the mirror liquefaction mark in the above embodiment steps.
  • the specific implementation method can refer to the relevant introduction of the second liquefaction special effect in the embodiment shown in Figure 6, which will not be repeated here.
  • the special effect tracking function of the target special effect template is turned on.
  • the first liquefaction special effect, or the first liquefaction special effect and the second liquefaction special effect in the target special effect template will automatically track the target image elements, such as the eyes and cheeks of a person's face. That is, the target area corresponding to the first liquefaction special effect will dynamically change according to the image content of the image to be processed, so that the first liquefaction special effect produces a dynamic following visual effect.
  • the specific implementation method of performing image recognition according to the image content of the image to be processed and tracking the identified target image elements will not be repeated here.
  • Step S206 configure the target special effect template into the template library corresponding to the template component.
  • the target special effects template can be stored in the template library corresponding to the template component in the special effects editing panel by manual or automatic triggering, so that when the user operates the template component, the target special effects template created based on the above steps can be obtained from the template library corresponding to the target component.
  • Step S207 Run the second editing interface.
  • Step S208 In response to the second operation, at least two superimposed special effect templates are added in the second editing interface, wherein the at least two superimposed special effect templates include a target special effect template, and each special effect template is located in a different layer.
  • an editing control for triggering the second editing interface is provided. After the editing control is triggered in response to the user operation, the second editing interface is run. Similar to the first editing interface, a sample image for previewing the special effect visual effect is also displayed in the second editing interface, such as a facial image.
  • a loading control for loading special effect templates is provided in the second editing interface. After the loading control is triggered, at least two special effect templates can be loaded in sequence, including the above-mentioned target special effect template.
  • Each special effect template is located in a different layer and superimposed on each other.
  • the sample image displays the first liquefaction special effect (or also includes the second liquefaction special effect) corresponding to the above-mentioned target special effect template, and the special effects corresponding to other special effect templates.
  • the special effect formed by superimposing the first liquefaction special effect and the special effects corresponding to the other special effect templates is the superimposed special effect.
  • FIG11 is a schematic diagram of a superimposed special effect provided by an embodiment of the present disclosure.
  • the special effect #1 corresponding to the special effect template template_1 and the special effect #2 corresponding to the special effect template template_2 are respectively displayed on the sample image.
  • special effect #1 is the first liquefaction special effect generated based on the steps of the above embodiment, that is, a custom special effect, which is used to enlarge the "mouth”
  • special effect #2 is an in-application preset special effect for changing the facial shape (such as "face-thinning special effect”); after superimposing special effect #1 and special effect #2, the visual effect of the superimposed special effect as shown in the figure may be generated.
  • step S208 the method further includes:
  • Step S209 In response to the third operation on the second editing interface, the layer sequence and/or transparency of each special effect template is set.
  • each special effect template can be further set so that the generated superimposed special effect presents different visual effects.
  • the terminal device responds to the third operation on the second editing interface, such as the third operation on the slider control in the second editing interface, to set the transparency of each special effect template; for the editable text box corresponding to each special effect template in the second editing interface, the image sequence of each special effect template is set.
  • the layer sequence and transparency of each special effect template are further set, so that the superimposed special effect has a richer and more diverse visual effect, and the visual expressiveness of the superimposed special effect template is improved.
  • Step S210 generating a superimposed special effect template based on at least two superimposed special effect templates.
  • an overlay special effects template can be generated based on multiple superimposed special effects templates.
  • the overlay special effects template is used in the same way as the target special effects template generated in the previous step, that is, by calling the overlay special effects template, the corresponding overlay special effect synthesized by superimposing multiple special effects can be added to the image to be processed.
  • the overlay special effect template can be stored in the template library corresponding to the template component in the special effect editing panel by manual or automatic triggering, so that other special effect templates can be further superimposed on the overlay special effect template to achieve an overlay special effect template with richer styles.
  • steps S203 to S205 is the same as the implementation of steps S102 to S104 in the embodiment shown in FIG. 2 of the present disclosure, and will not be described in detail here.
  • FIG12 is a structural block diagram of a special effect template generation device provided by an embodiment of the present disclosure.
  • the special effect template generation device 3 includes:
  • a display module 31 is used to run a first editing interface, in which a sample image and a liquefaction mark located in the sample image are displayed;
  • the interaction module 32 is used for causing a first deformation of a logo outline of the liquefied logo in response to a first operation on the liquefied logo;
  • the processing module 33 is used to generate a first liquefaction effect in a target area of the template image in response to the first deformation of the marker outline; wherein the target area is an image area covered by the marker outline of the liquefied marker in the template image, and the first liquefaction effect is used to cause the image elements in the target area to generate a second deformation, and the deformation amount of the second deformation corresponds to the deformation amount of the first deformation;
  • the generating module 34 is used to generate a target special effect template based on the first liquefaction special effect.
  • the liquefaction mark includes at least one first control point and at least one second control point, the first control point is used to adjust the lateral deformation of the liquefaction mark; the second control point is used to adjust the longitudinal deformation of the liquefaction mark; the interaction module 32 is specifically used to: respond to a first operation on the first control point and/or the second control point, so that the mark contour of the liquefaction mark produces a lateral deformation and/or a longitudinal deformation.
  • the liquefied mark includes at least one third control point, and the third control point is used to adjust the overall scaling ratio of the liquefied mark; the interactive module 32 is specifically used to: in response to a first operation on the third control point, expand or reduce the mark outline of the liquefied mark as a whole.
  • the display module 31 is specifically used to: display a special effect editing panel, the special effect editing panel is provided with at least one template component and an editing component, wherein the template component is used to display a template library including at least one pre-generated special effect template; in response to a trigger operation on the editing component, run a first editing interface.
  • the generating module 34 is further used to: after generating the target special effect template, configure the target special effect template into the template library corresponding to the template component.
  • the display module 31 is further used to: run a second editing interface, in which a template image is displayed; the generation module 34 is further used to: in response to a second operation, add at least two superimposed special effects templates in the second editing interface, wherein the at least two superimposed special effects templates include a target special effects template, and each special effects template is located in a different layer; and generate a superimposed special effects template based on the at least two superimposed special effects templates.
  • the generating module 34 is further used to: in response to a third operation on the second editing interface, set the layer sequence and/or transparency of each special effect template.
  • the generation module 34 is further used to: in response to the fourth operation, set the first function parameter and/or the second function parameter of the target special effect template; wherein the first function parameter is used to turn on the symmetrical deformation function of the target special effect template, and the symmetrical deformation function is used to generate a second liquefaction special effect symmetrical to the first liquefaction special effect based on the image to be processed; the second function parameter is used to turn on the special effect tracking function of the target special effect template, and the special effect tracking function is used to dynamically set the position of the target area so that the target area tracks the target image element in the image to be processed.
  • the processing module 33 is specifically used to: obtain a target deformation type; obtain a corresponding deformation function according to the target deformation type; call the deformation function based on a deformation variable parameter characterizing the deformation variable of the first deformation to obtain a corresponding pixel transformation matrix, the pixel transformation matrix being used to cause the image elements in the corresponding image area to produce a second deformation; and generate a first liquefaction effect in the target area of the template image according to the pixel transformation matrix.
  • the processing module 33 is further used to: obtain adjustment parameters corresponding to the deformation function, the adjustment parameters are used to characterize the intensity of the second deformation generated by the deformation function; the processing module 33 calls the deformation function based on the deformation variable parameters that characterize the deformation variable of the first deformation to obtain the corresponding pixel transformation matrix, and the pixel transformation matrix is used to cause the image elements in the corresponding image area to produce the second deformation, and is specifically used to: obtain the pixel transformation matrix based on the deformation variable parameters and the adjustment parameters.
  • the deformation parameter includes at least one of the following: lateral deformation, Vertical deformation, overall scaling.
  • the display module 31, the interaction module 32, the processing module 33 and the generation module 34 are connected in sequence.
  • the special effect template generation device 3 provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.
  • FIG13 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. As shown in FIG12 , the electronic device 4 includes:
  • the memory 42 stores computer executable instructions
  • the processor 41 executes the computer-executable instructions stored in the memory 42 to implement the special effect template generation method in the embodiments shown in Figures 2 to 11.
  • processor 41 and the memory 42 are connected via a bus 43 .
  • An embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored.
  • the computer execution instructions are executed by a processor, they are used to implement the special effect template generation method provided in any of the embodiments corresponding to Figures 2 to 11 of the present disclosure.
  • the embodiment of the present disclosure also provides an electronic device.
  • FIG. 14 it shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure
  • the electronic device 900 may be a terminal device or a server.
  • the terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
  • PDAs personal digital assistants
  • PADs Portable Android Devices
  • PMPs portable multimedia players
  • vehicle terminals such as vehicle navigation terminals
  • fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 14 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903.
  • a processing device e.g., a central processing unit, a graphics processing unit, etc.
  • RAM random access memory
  • Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 903.
  • the device 901, the ROM 902, and the RAM 903 are connected to one another via a bus 904.
  • an input/output (I/O) interface 905 is also connected to the bus 904.
  • the following devices may be connected to the I/O interface 905: input devices 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909.
  • the communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data.
  • FIG. 14 shows an electronic device 900 with various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program can be downloaded and installed from the network through the communication device 909, or installed from the storage device 908, or installed from the ROM 902.
  • the processing device 901 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above.
  • Computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried.
  • This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above.
  • the computer readable signal medium may also be any computer readable medium other than a computer readable storage medium.
  • the medium can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device.
  • the program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
  • the computer-readable medium carries one or more programs.
  • the electronic device executes the method shown in the above embodiment.
  • Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages.
  • the program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
  • the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
  • LAN Local Area Network
  • WAN Wide Area Network
  • each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function.
  • the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
  • each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented by software or hardware.
  • the name of the unit does not constitute a limitation on the unit in some cases.
  • the definition of the element itself, for example, the first acquisition unit can also be described as a "unit for acquiring at least two Internet Protocol addresses".
  • exemplary types of hardware logic components include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOCs systems on chip
  • CPLDs complex programmable logic devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing.
  • a more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM portable compact disk read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device or any suitable combination of the foregoing.
  • a method for generating a special effect template comprising:
  • Run a first editing interface in which a template image and a liquefaction marker located in the template image are displayed; in response to a first operation on the liquefaction marker, a marker outline of the liquefaction marker is subjected to a first deformation; in response to the first deformation of the marker outline, a first liquefaction special effect is generated in a target area of the template image; wherein the target area is an image area in the template image that is covered by the marker outline of the liquefaction marker, and the first liquefaction special effect is used to cause a second deformation of image elements in the target area, and the deformation amount of the second deformation corresponds to the deformation amount of the first deformation; based on the first liquefaction special effect, a target special effect template is generated.
  • the liquefaction mark includes at least one first control point and at least one second control point, the first control point is used to adjust the lateral deformation of the liquefaction mark; the second control point is used to adjust the longitudinal deformation of the liquefaction mark; the responding to a first operation on the liquefaction mark so that the mark contour of the liquefaction mark produces a first deformation includes: responding to a first operation on the first control point and/or the second control point so that the mark contour of the liquefaction mark produces a lateral deformation and/or a longitudinal deformation.
  • the liquefied logo includes at least one third control point, and the third control point is used to adjust the overall scaling ratio of the liquefied logo; in response to a first operation on the liquefied logo, causing the logo outline of the liquefied logo to produce a first deformation, including: in response to the first operation on the third control point, causing the logo outline of the liquefied logo to expand or shrink as a whole.
  • running the first editing interface includes: displaying a special effect editing panel, the special effect editing panel being provided with at least one template component and an editing component, wherein the template component is used to display a template library including at least one pre-generated special effect template; and running the first editing interface in response to a trigger operation on the editing component.
  • the method further includes: after generating the target special effect template, configuring the target special effect template into a template library corresponding to the template component.
  • the method also includes: running a second editing interface; in response to a second operation, adding at least two superimposed special effects templates in the second editing interface, wherein the at least two superimposed special effects templates include the target special effects template, and each of the special effects templates is located in a different layer; and generating a superimposed special effects template based on the at least two superimposed special effects templates.
  • the method further includes: in response to a third operation on the second editing interface, setting a layer sequence and/or transparency of each of the special effect templates.
  • the method further includes: in response to a fourth operation, setting a first functional parameter and/or a second functional parameter of the target special effects template; wherein the first functional parameter is used to enable the symmetrical deformation function of the target special effects template, and the symmetrical deformation function is used to generate a second liquefaction special effect symmetrical to the first liquefaction special effect based on the image to be processed; the second functional parameter is used to enable the special effects tracking function of the target special effects template, and the special effects tracking function is used to dynamically set the position of the target area so that the target area tracks the target image element in the image to be processed.
  • generating a first liquefaction effect in the target area of the template image includes: obtaining a target deformation type; obtaining a corresponding deformation function according to the target deformation type; calling the deformation function based on a deformation variable parameter representing the deformation variable of the first deformation to obtain a corresponding pixel transformation matrix, wherein the pixel transformation matrix is used to cause the image elements in the corresponding image area to generate the second deformation; and obtaining a corresponding pixel transformation matrix based on the deformation variable parameter representing the deformation variable of the first deformation.
  • a pixel transformation matrix is used to generate a first liquefaction effect in a target area of the template image.
  • the method also includes: obtaining adjustment parameters corresponding to the deformation function, the adjustment parameters are used to characterize the intensity of the second deformation generated by the deformation function; based on the deformation variable parameters of the deformation variable characterizing the first deformation, calling the deformation function to obtain a corresponding pixel transformation matrix, the pixel transformation matrix is used to cause the image elements in the corresponding image area to produce the second deformation, including: obtaining a pixel transformation matrix based on the deformation variable parameters and the adjustment parameters.
  • a special effect template generation device comprising:
  • a display module used for running a first editing interface, wherein a template image and a liquefaction mark located in the template image are displayed in the first editing interface;
  • An interaction module configured to cause a first deformation of a logo outline of the liquefied logo in response to a first operation on the liquefied logo
  • a processing module configured to generate a first liquefaction special effect in a target area of the template image in response to a first deformation of the logo outline; wherein the target area is an image area in the template image covered by the logo outline of the liquefied logo, and the first liquefaction special effect is used to cause an image element in the target area to generate a second deformation, and the deformation amount of the second deformation corresponds to the deformation amount of the first deformation;
  • a generation module is used to generate a target special effect template based on the first liquefaction special effect.
  • the liquefaction mark includes at least one first control point and at least one second control point, the first control point is used to adjust the lateral deformation of the liquefaction mark; the second control point is used to adjust the longitudinal deformation of the liquefaction mark; the interaction module is specifically used to: in response to a first operation on the first control point and/or the second control point, cause the mark contour of the liquefaction mark to produce lateral deformation and/or longitudinal deformation.
  • the liquefied logo includes at least one third control point, and the third control point is used to adjust the overall scaling ratio of the liquefied logo; the interactive module is specifically used to: in response to a first operation on the third control point, expand or reduce the logo outline of the liquefied logo as a whole.
  • the display module is specifically used to: display a special effect editing panel, wherein the special effect editing panel is provided with at least one template component and an editing component, wherein:
  • the template component is used to display a template library including at least one pre-generated special effect template; in response to a trigger operation on the editing component, a first editing interface is run.
  • the generation module is further used to: after generating the target special effect template, configure the target special effect template into a template library corresponding to the template component.
  • the display module is further used to: run a second editing interface, in which a template image is displayed; the generation module is further used to: in response to a second operation, add at least two superimposed special effects templates in the second editing interface, wherein the at least two superimposed special effects templates include the target special effects template, and each of the special effects templates is located in a different layer; and generate a superimposed special effects template based on the at least two superimposed special effects templates.
  • the processing module is specifically used to: obtain a target deformation type; obtain a corresponding deformation function according to the target deformation type; call the deformation function based on a deformation variable parameter that characterizes the deformation variable of the first deformation to obtain a corresponding pixel transformation matrix, wherein the pixel transformation matrix is used to cause image elements in a corresponding image area to produce the second deformation; and generate a first liquefaction effect in a target area of the template image according to the pixel transformation matrix.
  • the processing module is further used to: obtain an adjustment parameter corresponding to the deformation function, the adjustment parameter being used to characterize the intensity of the second deformation generated by the deformation function; the processing module calls the deformation function based on the deformation variable parameter characterizing the deformation variable of the first deformation to obtain a corresponding pixel transformation matrix, and the pixel transformation matrix is used to cause the image elements in the corresponding image area to generate the second deformation, specifically for: based on the deformation variable Parameters and the adjustment parameters to obtain a pixel transformation matrix.
  • the deformation parameter includes at least one of the following: a lateral deformation, a longitudinal deformation, and an overall scaling ratio.
  • an electronic device comprising: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the special effect template generation method described in the first aspect and various possible designs of the first aspect.
  • a computer-readable storage medium stores computer execution instructions.
  • the special effects template generation method described in the first aspect and various possible designs of the first aspect is implemented.
  • a computer program product including a computer program, which, when executed by a processor, implements the special effect template generation method described in the first aspect and various possible designs of the first aspect.

Landscapes

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

Abstract

本公开实施例提供一种特效模板生成方法、装置、电子设备及存储介质,通过运行第一编辑界面,第一编辑界面内显示有样版图像和位于样版图像内的液化标识;响应于针对液化标识的第一操作,使液化标识的标识轮廓产生第一形变;响应于标识轮廓的第一形变,在样版图像的目标区域生成第一液化特效;其中,目标区域为样版图像内被液化标识的标识轮廓所覆盖的图像区域;基于第一液化特效,生成目标特效模板。

Description

特效模板生成方法、装置、电子设备及存储介质
本申请要求于2023年8月31日递交的中国专利申请第202311119193.8号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开实施例涉及一种特效模板生成方法、装置、电子设备及存储介质。
背景技术
针对用户外观的变形特效,是视频和图像特效功能工具中最常用的一种特效功能,通过对用户躯干、面部等区域进变形,来实现图像美化、搞怪等视觉效果。
上述变形特效的特效模板,通常是由的软件开发者设计并固定配置在图像处理工具内,供用户使用,而用户无法根据自身兴趣和需要来生成个性化模板,因此存在特效模板样式单一,无法个性化调整等问题。
发明内容
本公开实施例提供一种特效模板生成方法、装置、电子设备及存储介质,以克服特效模板样式单一,无法个性化调整等问题。
第一方面,本公开实施例提供一种特效模板生成方法,包括:
运行第一编辑界面,所述第一编辑界面内显示有样版图像和位于所述样版图像内的液化标识;响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变;响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效;其中,所述目标区域为所述样版图像内被所述液化标识的标识轮廓所覆盖的图像区域。
第二方面,本公开实施例提供一种模板生成装置,包括:
显示模块,用于运行第一编辑界面,所述第一编辑界面内显示有样版图像和位于所述样版图像内的液化标识;
交互模块,用于响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变;
处理模块,用于响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效;其中,所述目标区域为所述样版图像内被所述液化标识的标识轮廓所覆盖的图像区域;
生成模块,用于基于所述第一液化特效,生成目标特效模板。
第三方面,本公开实施例提供一种电子设备,包括:处理器和存储器;
所述存储器存储计算机执行指令;
所述处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一方面以及第一方面各种可能的设计所述的模板生成方法。
第四方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的模板生成方法。
第五方面,本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上第一方面以及第一方面各种可能的设计所述的模板生成方法。
附图说明
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的特效模板生成方法的一种应用场景图;
图2为本公开实施例提供的特效模板生成方法的流程示意图一;
图3为本公开实施例提供的一种第一编辑界面的示意图;
图4为图2所示实施例中步骤S102的具体实现方式的流程图;
图5为本公开实施例提供的一种调整标识轮廓的示意图;
图6为本公开实施例提供的一种镜像液化标识的示意图;
图7为图2所示实施例中步骤S103的具体实现方式的流程图;
图8为本公开实施例提供的一种生成第一液化特效的过程示意图;
图9为本公开实施例提供的一种设置调整参数的过程示意图;
图10为本公开实施例提供的特效模板生成方法的流程示意图二;
图11为本公开实施例提供的一种叠加特效的示意图;
图12为本公开实施例提供的特效模板生成装置的结构框图;
图13为本公开实施例提供的一种电子设备的结构示意图;以及
图14为本公开实施例提供的电子设备的硬件结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
需要说明的是,本公开所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。
下面对本公开实施例的应用场景进行解释:
图1为本公开实施例提供的特效模板生成方法的一种应用场景图,本公开实施例提供的特效模板生成方法,可以应用于具有图像特效模板生成功能的应用程序(以下称为特效编辑应用)中,更具体地,可以应用于设计、制作特效模板的应用场景中。本实施例的执行主体,可以为运行上述具有特效模板生成功能的应用程序的终端设备,也可以为运行上述应用程序所对应的服务端的服务器,或者其他起到类似功能的电子设备。参考图1中所示,以终端设备为例,终端设备例如为智能手机,用户通过操作终端设备运行特效编辑应用,通过特效编辑应用来设计、生成个性化特效模板(例如图中所示的特效模板#1),之后,可以进一步将通过特效编辑应用生成的个性化特效模板上传至特效平台服务器,并在特效平台发布。之后,其他图像处理应用在 需要调用特效平台的特效模板时,可以使用该已发布的个性化特效模板,来为图像添加图像特效。在另一种可能的应用场景中,通过特效编辑应用生成的个性化特效模板,也可以保存在终端设备本地,之后,通过终端运行图像处理应用,来加载该实现个性化特效模板,实现为待处理图像添加个性化图像特效的目的。
用于实现图像变形特效的特效模板,通常是由的软件开发者设计并固定配置在图像处理工具内,供用户使用,因此,上述特效模板的特效样式、形状是固定的,造成所有使用该特效模板生成的特效图像中,变形特效的视觉效果均相同,无法表现出差异性和个性化。由于用户无法根据自身兴趣和需要来生成个性化模板,导致存在特效模板样式单一,无法个性化调整等问题。
本公开实施例提供一种特效模板生成方法以解决上述问题。
参考图2,图2为本公开实施例提供的特效模板生成方法的流程示意图一。本实施例的方法可以应用在终端设备中,该特效模板生成方法包括:
步骤S101:运行第一编辑界面,第一编辑界面内显示有样版图像和位于样版图像内的液化标识。
步骤S102:响应于针对液化标识的第一操作,使液化标识的标识轮廓产生第一形变。
示例性地,参考图1所示的应用场景示意图,第一编辑界面是特效编辑应用中用于生成个性化的特效模板的交互界面。在第一编辑界面内至少显示有样版图像和位于样版图像内的液化标识,其中,样版图像可以理解为用于表现变形效果的标准图像,更具体地,例如为一张预设的人脸图像,通过对该样本图像进行变形(液化),来展示后续生成的第一液化特效的效果,从而使用户可以实时预览特效模板的视觉效果,并进行相应调整。液化标识是一种用于接收用户操作进行交互的图形标识,更具体地,例如可以为一个圆环、正方形等,该液化标识所在的位置,即图像中产生形变特效的位置。
进一步地,在第一编辑界面内显示样版图像和液化标识后,终端设备接收用户输入针对液化标识的第一操作,调整液化标识的标识轮廓,使标识轮廓产生第一形变,其中,第一形变可以是指液化标识的长、款比例发生变化,也可以液化标识的标识轮廓整体扩大或缩小。图3为本公开实施例提供的一种第一编辑界面的示意图,参考图3所示,在第一编辑界面内包括有样版图 像,样本图像为一张人脸图片;以及位于样版图像之上的液化标识,液化标识的轮廓形状为椭圆形。一种可能的实现方式中,液化标识的初始位置位于样版图像的中心,之后,响应于用户针对液化标识的移动操作,可以将液化标识移动至其他位置,例如图中所示的P1点位置。进一步地,响应于针对液化标识的第一操作,例如针对液化标识的控制点的拖拽操作,使液化标识的标识轮廓产生形变,例如图中所示,当第一操作为横向拖拽时,液化标识的长度由初始状态下的x1变为x2,即产生x2-x1的横向形变;类似的,当第一操作为纵向拖拽时(图中未示出),液化标识的宽度由初始状态下的y1变为y2,即产生y2-y1的纵向形变。其中,第一形变可以是表征上述形变的向量,更具体地,例如包括x2与x1的差值、y2与y1的差值的向量;或者,包括长度x1、x2和宽度y1、y2的集合;再或者,描述形变前和形变后的标识轮廓的轮廓点的集合。此处不对第一形变的具体实现形式进行限定。
在一种可能的实现方式中,液化标识包括至少一个第一控制点和至少一个第二控制点,第一控制点用于调节液化标识的横向形变量;第二控制点用于调节液化标识的纵向形变量,进一步地,可选地,液化标识包括至少一个第三控制点,第三控制点用于调节液化标识的整体缩放比例。
示例性地,第一操作包括第一子操作、第二子操作和第三子操作,如图4所示,步骤S102的具体实现方式包括:
步骤S1021:响应于针对第一控制点的第一子操作,使液化标识的标识轮廓产生横向形变。
步骤S1022:响应于针对第二控制点的第二子操作,使液化标识的标识轮廓产生纵向形变。
步骤S1023:响应于针对第三控制点的第三子操作,使液化标识的标识轮廓整体扩大或整体缩小。
图5为本公开实施例提供的一种调整标识轮廓的示意图,如图5所示,液化标识为椭圆形的交互标识,液化标识具有两个第一控制点P1、P2,两个第二控制点P3、P4,以及四个第三控制点P5至P8。当终端设备接收到针对第一控制点P1、P2的第一子操作后,液化标识的标识轮廓产生横向形变,即液化标识的椭圆形长轴由x1变为x2,其中,x1和x2分别为第一控制点P1、P2响应第一子操作前的距离和响应第一子操作后的距离。类似的,当终 端设备接收到针对第二控制点P3、P4的第二子操作后,液化标识的标识轮廓产生纵向形变,即液化标识的椭圆形短轴由y1变为y2,其中,y1和y2分别为第二控制点P3、P4响应第一子操作前的距离和响应第一子操作后的距离。进一步地,当终端设备接收到针对第三控制点P5、P6、P7、P8中任一点的第三子操作后,液化标识的标识轮廓整体扩大或缩小,即液化标识的椭圆形长轴和短轴比例不变的前提下,同步扩大或缩小椭圆形长轴和短轴,例如图中所示,将液化标识的椭圆形长轴由x1变为2倍x1、椭圆形短轴由y1变为2倍y1。
需要说明的是,上述针对第一控制点、第二控制点和第三控制点的第一操作,可以是单独针对第一控制点、第二控制点和第三控制点中的任一个或多个,且不对操作第一控制点、第二控制点和第三控制点的次序进行限制,也不对操作第一控制点、第二控制点和第三控制点的次数进行限制,即由用户输入的第一操作,可以多次、无次序限制的调整第一控制点、第二控制点和第三控制点中的任一点,以实现使液化标识的标识轮廓产生特定的第一形变的目的,从而实现用户的个性化编辑的目的。
进一步地,在一种可能的实现方式中,第一编辑界面内第一功能参数组件,在终端设备接收到用户输入的设置操作后,可以将第一功能参数组件设置为开启状态,即从而在第一编辑界面内对称显示另一个液化标识,即镜像液化标识。其中,该镜像液化标识用于生成与第一液化特效对称的第二液化特效。图6为本公开实施例提供的一种镜像液化标识的示意图,如图6所示,在第一编辑界面内设置有第一功能参数组件,第一功能参数组件默认为“Off”状态;在终端设备接收到用户输入的针对该第一功能参数组件的设置操作后,将该第一功能参数组件设置为“On”状态,之后,在第一编辑界面内显示镜像液化标识,镜像液化标识与液化标识基于样版图像的中心轴线对称,在经过上述对液化标识的第一操作,使液化标识产生第一形变后,该镜像液化标识会同步产生相同的第一形变,并在之后步骤中,产生液化特效相同、位置对称的第二液化特效,具体实现方式与液化标识产生第一液化特效的实现方式相同,此处不再赘述。
本实施例中,通过在第一编辑界面内对称显示镜像液化标识,可以实现同步便捷添加与第一液化特效对称的第二液化特效的目的,而无需单独配置 第二液化特效,保证第一液化特效对称的第二液化特效的一致性和对称性,从而提高所生成的目标特效模板的显示效果。
步骤S103:响应于标识轮廓的第一形变,在样版图像的目标区域生成第一液化特效;其中,目标区域为样版图像内被液化标识的标识轮廓所覆盖的图像区域。
示例性地,第一液化特效用于使目标区域内的图像元素产生第二形变,第二形变的形变量与第一形变的形变量对应。在液化标识的标识轮廓产生第一形变后,终端设备根据该第一形变的形变量,在样版图像上生成对应的液化特效,即第一液化特效,述第一液化特效用于使目标区域内的图像元素产生与第一形变的形变量对应第二形变。具体地,例如,样版图像例如为人脸图像,第一液化特效用于将人脸图像中被液化标识所覆盖的“眼睛”放大,即产生第二形变。其中,该第二形变是由第一形变正比例确定的,即第一形变的形变量越大,第二形变的形变量越大,反之,第一形变的形变量越小,第二形变的形变量越小。
进一步地,第一形变与第二形变之间的映射关系,可以基于预设的形变函数确定。在一种可能的实现方式中,如图7所示,步骤S103的具体实现方式包括:
步骤S1031:获取目标形变类型。
步骤S1032:根据目标形变类型,得到对应的形变函数。
步骤S1033:基于表征第一形变的形变量的形变量参数,调用形变函数,得到对应的像素变换矩阵,像素变换矩阵用于使对应图像区域内的图像元素产生第二形变。
步骤S1034:根据像素变换矩阵,在样版图像的目标区域生成第一液化特效。
示例性地,目标形变类型为第二形变的形变类型,例如包括缩放、膨胀、褶皱、波浪、顺时针扭曲、逆时针扭曲等。目标形变类型可以通过用户输入的操作指令确定,此处不对获取目标形变类型的具体实现方式赘述。之后,根据目标形变类型,得到对应的形变函数,其中,形变函数用于表征图像中的像素点发生变化的规律,通过对图像中的像素点的像素值进行调整,从而实现图像形变的视觉效果。其中,不同的目标形变类型对应不同的形变函数, 例如,“褶皱”类型对应形变函数fun_1(),“顺时针扭曲”类型对应形变函数fun_2()。进一步地,形变函数至少以第一形变对应的形变量参数作为输入参数,从而使形变函数输出的像素变换矩阵对应的形变量与第一形变相关。其中,形变量参数是基于第一形变生成的具有特定数据格式的参数集合,与形变函数相适配。示例性地,形变量参数包括以下至少一项:横向形变量,纵向形变量,整体缩放比例。进一步地,在将第一形变转换为形变量参数后,将形变量参数输入形变函数,使形变函数生成与第一形变的形变量相关的像素变化矩阵,该像素变化矩阵表征样版图像的目标区域的初始图像和产生第二形变的图像之间的映射关系,即通过该像素变化矩阵,可以使目标区域内的图像产生第二形变,从而形成第一液化特效。
图8为本公开实施例提供的一种生成第一液化特效的过程示意图,下面结合图8对上述过程进行说明,参考图8所示,在基于用户指令,获取目标形变类型后,获取该目标形变类型对应的形变函数Func_1(图中示为Func_1()),之后,获取第一形变对应的形变量参数para_1(图中示为para_1),至少以该形变量参数para_1作为Func_1函数的输入参数,调用该Func_1函数,得到对应的像素变化矩阵Mat_1,该像素变化矩阵Mat_1用于表征在目标区域产生的第二形变的样式,之后,基于像素变化矩阵Mat_1对样版图像的目标区域内的像素点进行处理,生成具有第二形变的图像元素,从而生成第一液化特效。
进一步地,可选地,上述形变函数的输入参数还包括调整参数,调整参数用于表征形变函数所产生的第二形变的强度。即基于表征第一形变的形变量的形变量参数,调用形变函数,得到对应的像素变换矩阵,像素变换矩阵用于使对应图像区域内的图像元素产生第二形变,包括:基于形变量参数和调整参数,得到像素变换矩阵。
其中,当形变函数不同时,该调整参数所表征的含义不同,例如,当形变函数为“褶皱”类型对应形变函数fun_1()时,其对应的调整参数表征“褶皱”的数量;再例如,当形变函数为“顺时针选择”类型对应形变函数fun_2()时,其对应的调整参数表征“旋转”的角度。更具体地,调整参数可以是具有固定取值区间的整型值,例如调整参数的取值区间为[0,100],其中0表示第二形变的强度最小,100表示第二形变的强度最大。图9为本公开实施例 提供的一种设置调整参数的过程示意图,如图9所示,在第一编辑界面内设置有用于设置调整参数的滑杆,当滑杆上的滑块的可滑动区间为0至100,形变函数所对应的目标形变类型为“波浪形变”。当滑块位于15时,对应的第二形变的强度为第一强度(图中示为形变Deform_1);当滑块位于60时,对应的第二形变的强度为第二强度(图中示为形变Deform_2)。如图中所示,当滑块位于60时,会使图像中产生的第二形变的强度更大,也即所生成的第一液化特效使图像产生变形的程度更高。
示例性地,在第一编辑界面内的调整参数组件,调整参数可以用户触发该调整参数组件而获得。本实施例步骤中,通过形变量参数和调整参数,共同确定对应的像素变化矩阵,可以实现对第二形变的样式的更加精细的调整,提高目标特效模板的设计灵活性和个性化程度。
步骤S104:基于第一液化特效,生成目标特效模板。
示例性地,第一液化特效可以基于上述像素变化矩阵和对应的目标区域的坐标的集合来表示,在得到上述第一液化特效后,相当于得到了基于用户个性化需求生成的特效样式,之后利用模板生成组件对该像素变化矩阵和对应的目标区域的坐标进行封装,即可生成对应的目标特效模板。在后续使用该目标特效模板时,通过目标特效模板中描述上述目标区域和像素变化矩阵的相关模板信息,基于像素变化矩阵对待处理图像中与目标区域对应的图像区域内的像素点进行处理,从而使待处理图像中出现与第一液化效果相同的图像特效。关于特效模板的使用过程,此处不再赘述。
本实施例中,通过运行第一编辑界面,第一编辑界面内显示有样版图像和位于样版图像内的液化标识;响应于针对液化标识的第一操作,使液化标识的标识轮廓产生第一形变;响应于标识轮廓的第一形变,在样版图像的目标区域生成第一液化特效;其中,目标区域为样版图像内被液化标识的标识轮廓所覆盖的图像区域,第一液化特效用于使目标区域内的图像元素产生第二形变,第二形变的形变量与第一形变的形变量对应;基于第一液化特效,生成目标特效模板。通过对第一编辑界面内的液化标识进行控制,在样本图像上产生第一形变,从而映射为第一液化特效,生成该第一液化特效对应的目标特效模板,实现了基于用户操作的个性化的特效模板生成,解决了特效模板样式单一,无法个性化调整等问题。
参考图10,图10为本公开实施例提供的特效模板生成方法的流程示意图二。本实施例在图2所示实施例的基础上,进一步对步骤S101进行细化,并增加了生成叠加特效模板等步骤,该特效模板生成方法包括:
步骤S201:显示特效编辑面板,特效编辑面板设置有至少一个模板组件和编辑组件,其中,模板组件用于显示包括至少一个预生成的特效模板的模板库。
步骤S202:响应于针对编辑组件的触发操作,运行第一编辑界面。
示例性地,参考图1所示应用场景示意图,在运行特效编辑应用后,可以首先显示特效编辑面板,特效编辑面板是图2所示实施例中第一编辑界面的上级界面。在特效编辑面板中,至少设置有至少一个模板组件和编辑组件,其中,一方面,模板组件用于显示包括至少一个预生成的特效模板的模板库,一种可能的实现方式中,基于用户操作触发模板组件后,会弹出第三编辑页面,并在第三编辑页面内显示多个不同的特效模板,在另一种可能的实现方式中,模板组件可以直接在特效编辑面板内的指定区域,直接显示预生成的特效面板,从而使用户可以直接从特效编辑面板内选择模板库中的特效模板。通过模板组件存储预生成的特效模板,使用户可以通过触发模板组件,加载不同的特效模板进行二次编辑或者叠加组合。另一方面,响应于针对编辑组件的触发操作,运行第一编辑界面,从而基于第一编辑界面执行后续的个性化模板生成的步骤。
步骤S203:响应于针对液化标识的第一操作,使液化标识的标识轮廓产生第一形变。
步骤S204:响应于标识轮廓的第一形变,在样版图像的目标区域生成第一液化特效;其中,目标区域为样版图像内被液化标识的标识轮廓所覆盖的图像区域,第一液化特效用于使目标区域内的图像元素产生第二形变,第二形变的形变量与第一形变的形变量对应。
步骤S205:基于第一液化特效,生成目标特效模板。
步骤S205A:响应于第四操作,设置目标特效模板的第一功能参数和/或第二功能参数;
其中,第一功能参数用于开启目标特效模板的对称形变功能,对称形变功能用于基于待处理图像生成与第一液化特效对称的第二液化特效;第二功 能参数用于开启目标特效模板的特效追踪功能,特效追踪功能用于动态设置目标区域的位置,以使目标区域追踪待处理图像中的目标图像元素。
示例性地,在生成目标特效模板后,可以进一步地对目标特效模板的模板功能进行设置,具体地,响应于第四操作,设置目标特效模板的第一功能参数和/或第二功能参数,示例性地,在特效编辑面板内设置有用于设置第一功能参数、第二功能参数的功能控件,通过响应第四操作将功能控件设置为开启(On)状态或关闭(Off)状态,来实现对第一功能参数和/或第二功能参数。其中,示例性地,当将第一功能参数设置为表征开启状态的参数值时,开启目标特效模板的对称形变功能,对称形变功能开启后,在使用该目标特效模板时,会在待处理图像中生成与第一液化特效对称的第二液化特效,也即上述实施例步骤中镜像液化标识所对应的液化特效。具体实现方式可参见图6所示实施例中对第二液化特效的相关介绍,此处不再赘述。
进一步地,当将第二功能参数设置为表征开启状态的参数值时,开启目标特效模板的特效追踪功能,特效追踪功能开启后,在使用相机进行拍摄预览,并使用该目标特效模板时,目标特效模板中第一液化特效,或者第一液化特效和第二液化特效会自动追踪到目标图像元素,例如人脸的双眼、脸颊等。即第一液化特效所对应的目标区域,会根据待处理图像的图像内容进行动态变化,从而使第一液化特效产生动态跟随的视觉效果。其中,根据待处理图像的图像内容,进行图像识别,并对识别到的目标图像元素进行追踪的具体实现方式,此处不再赘述。
步骤S206:将目标特效模板配置到模板组件对应的模板库中。
进一步地,在生成目标特效模板后,可以以手动触发或自动触发方式,将该目标特效模板存储到特效编辑面板内的模板组件对应的模板库,从而在用户操作模板组件时,可以从目标组件对应的模板库中,获得基于上述步骤创建的目标特效模板。
步骤S207:运行第二编辑界面。
步骤S208:响应于第二操作,在第二编辑界面内以添加至少两个相互叠加的特效模板,其中,至少两个相互叠加的特效模板中包括目标特效模板,各特效模板位于不同的图层。
进一步地,生成目标特效模板之后,可以基于上述生成的目标特效模板, 进一步叠加其他特效模板,从而生成叠加特效模板,从而实现多种特效混合的叠加特效。具体地,例如,在特效编辑面板内,设置有用于触发第二编辑界面的编辑控件,在响应于用户操作,触发该编辑控件后,运行第二编辑界面,与第一编辑界面类似,第二编辑界面内也显示有用于预览特效视觉效果的样本图像,例如为一张面部图像。一种可能的实现方式中,第二编辑界面内设置有用于加载特效模板的加载控件,触发该加载控件后,可以依次加载至少两个特效模板,其中包括上述目标特效模板,各特效模板位于不同的图层,并相互叠加,在上述至少两个特效模板加载完成后,样本图像上显示有上述目标特效模板对应的第一液化特效(或者,还包括第二液化特效),以及其他特效模板所对应的特效,第一液化特效和其他特效模板所对应的特效相叠加后形成的特效为叠加特效。
图11为本公开实施例提供的一种叠加特效的示意图,如图11所示,在第二编辑界面内,分别加载特效模板template_1和特效模板template_2之后,在样本图像上分别显示特效模板template_1对应的特效#1和特效模板template_2对应的特效#2。其中,示例性地,特效#1是基于上述实施例步骤生成的第一液化特效,即自定义特效,用于放大“嘴部”;特效#2是用于改变面部形状(例如“瘦脸特效”)的应用内预置特效;将特效#1和特效#2进行叠加后,可能产生如图中所示的叠加特效的视觉效果。
可选地,在步骤S208之后,还包括:
步骤S209:响应于针对第二编辑界面的第三操作,设置各特效模板的图层序列和/或透明度。
示例性地,在添加特效模板之后,可以进一步对各特效模板进行设置,以使生成的叠加特效呈现出不同的视觉效果,具体地,终端设备响应于针对第二编辑界面的第三操作,例如针对第二编辑界面内的滑杆(slider)控件的第三操作,来设置各特效模板的透明度;针对第二编辑界面内的各特效模板对应的可编辑文本框,设置各特效模板的图像序列。本实施例步骤中,通过响应于针对第二编辑界面的第三操作,进一步对各特效模板的图层序列和透明度进行设置,从而使叠加特效具有更加丰富和多样的视觉效果,叠加特效模板的视觉表现力。
步骤S210:基于至少两个相互叠加的特效模板,生成叠加特效模板。
进一步地,在特效模板加载、调整完成后,可以基于多个相互叠加的特效模板,来生成一个叠加特效模板,该叠加特效模板和之前步骤中生成的目标特效模板的使用方式相同,即通过调用该叠加特效模板,可以在待处理图像中添加对应的由多个特效叠加合成的叠加特效,具体实现方式步骤赘述。
进一步地,与目标特效模板类似,在生成叠加特效模板后,可以以手动触发或自动触发方式,将该叠加特效模板存储到特效编辑面板内的模板组件对应的模板库中,从而实现在该叠加特效模板的基础上,进一步叠加其他的特效模板,实现更加样式更加丰富的叠加特效模板。
本实施例中,步骤S203-步骤S205的实现方式与本公开图2所示实施例中的步骤S102-步骤S104的实现方式相同,在此不再一一赘述。
对应于上文实施例的特效模板生成方法,图12为本公开实施例提供的特效模板生成装置的结构框图。为了便于说明,仅示出了与本公开实施例相关的部分。参照图12,特效模板生成装置3包括:
显示模块31,用于运行第一编辑界面,第一编辑界面内显示有样版图像和位于样版图像内的液化标识;
交互模块32,用于响应于针对液化标识的第一操作,使液化标识的标识轮廓产生第一形变;
处理模块33,用于响应于标识轮廓的第一形变,在样版图像的目标区域生成第一液化特效;其中,目标区域为样版图像内被液化标识的标识轮廓所覆盖的图像区域,第一液化特效用于使目标区域内的图像元素产生第二形变,第二形变的形变量与第一形变的形变量对应;
生成模块34,用于基于第一液化特效,生成目标特效模板。
在本公开的一个实施例中,液化标识包括至少一个第一控制点和至少一个第二控制点,第一控制点用于调节液化标识的横向形变量;第二控制点用于调节液化标识的纵向形变量;交互模块32,具体用于:响应于针对第一控制点和/或第二控制点的第一操作,使液化标识的标识轮廓产生横向形变和/或纵向形变。
在本公开的一个实施例中,液化标识包括至少一个第三控制点,第三控制点用于调节液化标识的整体缩放比例;交互模块32,具体用于:响应于针对第三控制点的第一操作,使液化标识的标识轮廓整体扩大或整体缩小。
在本公开的一个实施例中,显示模块31,具体用于:显示特效编辑面板,特效编辑面板设置有至少一个模板组件和编辑组件,其中,模板组件用于显示包括至少一个预生成的特效模板的模板库;响应于针对编辑组件的触发操作,运行第一编辑界面。
在本公开的一个实施例中,生成模块34,还用于:在生成目标特效模板之后,将目标特效模板配置到模板组件对应的模板库中。
在本公开的一个实施例中,显示模块31,还用于:运行第二编辑界面,第二编辑界面内显示有样版图像;生成模块34,还用于:响应于第二操作,在第二编辑界面内以添加至少两个相互叠加的特效模板,其中,至少两个相互叠加的特效模板中包括目标特效模板,各特效模板位于不同的图层;基于至少两个相互叠加的特效模板,生成叠加特效模板。
在本公开的一个实施例中,生成模块34,还用于:响应于针对第二编辑界面的第三操作,设置各特效模板的图层序列和/或透明度。
在本公开的一个实施例中,生成模块34,还用于:响应于第四操作,设置目标特效模板的第一功能参数和/或第二功能参数;其中,第一功能参数用于开启目标特效模板的对称形变功能,对称形变功能用于基于待处理图像生成与第一液化特效对称的第二液化特效;第二功能参数用于开启目标特效模板的特效追踪功能,特效追踪功能用于动态设置目标区域的位置,以使目标区域追踪待处理图像中的目标图像元素。
在本公开的一个实施例中,处理模块33,具体用于:获取目标形变类型;根据目标形变类型,得到对应的形变函数;基于表征第一形变的形变量的形变量参数,调用形变函数,得到对应的像素变换矩阵,像素变换矩阵用于使对应图像区域内的图像元素产生第二形变;根据像素变换矩阵,在样版图像的目标区域生成第一液化特效。
在本公开的一个实施例中,处理模块33,还用于:获取形变函数对应的调整参数,调整参数用于表征形变函数所产生的第二形变的强度;处理模块33在基于表征第一形变的形变量的形变量参数,调用形变函数,得到对应的像素变换矩阵,像素变换矩阵用于使对应图像区域内的图像元素产生第二形变时,具体用于:基于形变量参数和调整参数,得到像素变换矩阵。
在本公开的一个实施例中,形变量参数包括以下至少一项:横向形变量, 纵向形变量,整体缩放比例。
其中,显示模块31、交互模块32、处理模块33和生成模块34依次连接。本实施例提供的特效模板生成装置3可以执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
图13为本公开实施例提供的一种电子设备的结构示意图,如图12所示,该电子设备4包括:
处理器41,以及与处理器41通信连接的存储器42;
存储器42存储计算机执行指令;
处理器41执行存储器42存储的计算机执行指令,以实现如图2-图11所示实施例中的特效模板生成方法。
其中,可选地,处理器41和存储器42通过总线43连接。
相关说明可以对应参见图2-图11所对应的实施例中的步骤所对应的相关描述和效果进行理解,此处不做过多赘述。
本公开实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,计算机执行指令被处理器执行时用于实现本公开图2-图11所对应的实施例中任一实施例提供的特效模板生成方法。
为了实现上述实施例,本公开实施例还提供了一种电子设备。
参考图14,其示出了适于用来实现本公开实施例的电子设备900的结构示意图,该电子设备900可以为终端设备或服务器。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑(Portable Android Device,简称PAD)、便携式多媒体播放器(Portable Media Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图14示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图14所示,电子设备900可以包括处理装置(例如中央处理器、图形处理器等)901,其可以根据存储在只读存储器(Read Only Memory,简称ROM)902中的程序或者从存储装置908加载到随机访问存储器(Random Access Memory,简称RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有电子设备900操作所需的各种程序和数据。处理 装置901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(Liquid Crystal Display,简称LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许电子设备900与其他设备进行无线或有线通信以交换数据。虽然图14示出了具有各种装置的电子设备900,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM 902被安装。在该计算机程序被处理装置901执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号 介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单 元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
第一方面,根据本公开的一个或多个实施例,提供了一种特效模板生成方法,包括:
运行第一编辑界面,所述第一编辑界面内显示有样版图像和位于所述样版图像内的液化标识;响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变;响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效;其中,所述目标区域为所述样版图像内被所述液化标识的标识轮廓所覆盖的图像区域,所述第一液化特效用于使所述目标区域内的图像元素产生第二形变,所述第二形变的形变量与所述第一形变的形变量对应;基于所述第一液化特效,生成目标特效模板。
根据本公开的一个或多个实施例,所述液化标识包括至少一个第一控制点和至少一个第二控制点,所述第一控制点用于调节所述液化标识的横向形变量;所述第二控制点用于调节所述液化标识的纵向形变量;所述响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变,包括:响应于针对所述第一控制点和/或所述第二控制点的第一操作,使所述液化标识的标识轮廓产生横向形变和/或纵向形变。
根据本公开的一个或多个实施例,所述液化标识包括至少一个第三控制点,所述第三控制点用于调节所述液化标识的整体缩放比例;所述响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变,包括:响应于针对所述第三控制点的第一操作,使所述液化标识的标识轮廓整体扩大或整体缩小。
根据本公开的一个或多个实施例,所述运行第一编辑界面,包括:显示特效编辑面板,所述特效编辑面板设置有至少一个模板组件和编辑组件,其中,所述模板组件用于显示包括至少一个预生成的特效模板的模板库;响应于针对所述编辑组件的触发操作,运行第一编辑界面。
根据本公开的一个或多个实施例,所述方法还包括:在生成所述目标特效模板之后,将所述目标特效模板配置到所述模板组件对应的模板库中。
根据本公开的一个或多个实施例,所述方法还包括:运行第二编辑界面;响应于第二操作,在所述第二编辑界面内以添加至少两个相互叠加的特效模板,其中,所述至少两个相互叠加的特效模板中包括所述目标特效模板,各所述特效模板位于不同的图层;基于所述至少两个相互叠加的特效模板,生成叠加特效模板。
根据本公开的一个或多个实施例,所述方法还包括:响应于针对所述第二编辑界面的第三操作,设置各所述特效模板的图层序列和/或透明度。
根据本公开的一个或多个实施例,所述方法还包括:响应于第四操作,设置所述目标特效模板的第一功能参数和/或第二功能参数;其中,所述第一功能参数用于开启所述目标特效模板的对称形变功能,所述对称形变功能用于基于待处理图像生成与所述第一液化特效对称的第二液化特效;所述第二功能参数用于开启所述目标特效模板的特效追踪功能,所述特效追踪功能用于动态设置所述目标区域的位置,以使所述目标区域追踪待处理图像中的目标图像元素。
根据本公开的一个或多个实施例,所述响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效,包括:获取目标形变类型;根据所述目标形变类型,得到对应的形变函数;基于表征所述第一形变的形变量的形变量参数,调用所述形变函数,得到对应的像素变换矩阵,所述像素变换矩阵用于使对应图像区域内的图像元素产生所述第二形变;根据所述 像素变换矩阵,在所述样版图像的目标区域生成第一液化特效。
根据本公开的一个或多个实施例,所述方法还包括:获取所述形变函数对应的调整参数,所述调整参数用于表征所述形变函数所产生的第二形变的强度;所述基于表征所述第一形变的形变量的形变量参数,调用所述形变函数,得到对应的像素变换矩阵,所述像素变换矩阵用于使对应图像区域内的图像元素产生所述第二形变,包括:基于所述形变量参数和所述调整参数,得到像素变换矩阵。
第二方面,根据本公开的一个或多个实施例,提供了一种特效模板生成装置,包括:
显示模块,用于运行第一编辑界面,所述第一编辑界面内显示有样版图像和位于所述样版图像内的液化标识;
交互模块,用于响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变;
处理模块,用于响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效;其中,所述目标区域为所述样版图像内被所述液化标识的标识轮廓所覆盖的图像区域,所述第一液化特效用于使所述目标区域内的图像元素产生第二形变,所述第二形变的形变量与所述第一形变的形变量对应;
生成模块,用于基于所述第一液化特效,生成目标特效模板。
根据本公开的一个或多个实施例,所述液化标识包括至少一个第一控制点和至少一个第二控制点,所述第一控制点用于调节所述液化标识的横向形变量;所述第二控制点用于调节所述液化标识的纵向形变量;所述交互模块,具体用于:响应于针对所述第一控制点和/或所述第二控制点的第一操作,使所述液化标识的标识轮廓产生横向形变和/或纵向形变。
根据本公开的一个或多个实施例,所述液化标识包括至少一个第三控制点,所述第三控制点用于调节所述液化标识的整体缩放比例;所述交互模块,具体用于:响应于针对所述第三控制点的第一操作,使所述液化标识的标识轮廓整体扩大或整体缩小。
根据本公开的一个或多个实施例,所述显示模块,具体用于:显示特效编辑面板,所述特效编辑面板设置有至少一个模板组件和编辑组件,其中, 所述模板组件用于显示包括至少一个预生成的特效模板的模板库;响应于针对所述编辑组件的触发操作,运行第一编辑界面。
根据本公开的一个或多个实施例,所述生成模块,还用于:在生成所述目标特效模板之后,将所述目标特效模板配置到所述模板组件对应的模板库中。
根据本公开的一个或多个实施例,所述显示模块,还用于:运行第二编辑界面,所述第二编辑界面内显示有样版图像;所述生成模块,还用于:响应于第二操作,在所述第二编辑界面内以添加至少两个相互叠加的特效模板,其中,所述至少两个相互叠加的特效模板中包括所述目标特效模板,各所述特效模板位于不同的图层;基于所述至少两个相互叠加的特效模板,生成叠加特效模板。
根据本公开的一个或多个实施例,所述生成模块,还用于:响应于针对所述第二编辑界面的第三操作,设置各所述特效模板的图层序列和/或透明度。
根据本公开的一个或多个实施例,所述生成模块,还用于:响应于第四操作,设置所述目标特效模板的第一功能参数和/或第二功能参数;其中,所述第一功能参数用于开启所述目标特效模板的对称形变功能,所述对称形变功能用于基于待处理图像生成与所述第一液化特效对称的第二液化特效;所述第二功能参数用于开启所述目标特效模板的特效追踪功能,所述特效追踪功能用于动态设置所述目标区域的位置,以使所述目标区域追踪待处理图像中的目标图像元素。
根据本公开的一个或多个实施例,所述处理模块,具体用于:获取目标形变类型;根据所述目标形变类型,得到对应的形变函数;基于表征所述第一形变的形变量的形变量参数,调用所述形变函数,得到对应的像素变换矩阵,所述像素变换矩阵用于使对应图像区域内的图像元素产生所述第二形变;根据所述像素变换矩阵,在所述样版图像的目标区域生成第一液化特效。
根据本公开的一个或多个实施例,所述处理模块,还用于:获取所述形变函数对应的调整参数,所述调整参数用于表征所述形变函数所产生的第二形变的强度;所述处理模块在基于表征所述第一形变的形变量的形变量参数,调用所述形变函数,得到对应的像素变换矩阵,所述像素变换矩阵用于使对应图像区域内的图像元素产生所述第二形变时,具体用于:基于所述形变量 参数和所述调整参数,得到像素变换矩阵。
根据本公开的一个或多个实施例,所述形变量参数包括以下至少一项:横向形变量,纵向形变量,整体缩放比例。
第三方面,根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一方面以及第一方面各种可能的设计所述的特效模板生成方法。
第四方面,根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的特效模板生成方法。
第五方面,根据本公开的一个或多个实施例,提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上第一方面以及第一方面各种可能的设计所述的特效模板生成方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题, 但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (15)

  1. 一种特效模板生成方法,包括:
    运行第一编辑界面,其中,所述第一编辑界面内显示有样版图像和位于所述样版图像内的液化标识;
    响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变;
    响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效,其中,所述目标区域为所述样版图像内被所述液化标识的标识轮廓所覆盖的图像区域;
    基于所述第一液化特效,生成目标特效模板。
  2. 根据权利要求1所述的方法,其中,所述液化标识包括至少一个第一控制点和至少一个第二控制点,所述第一控制点用于调节所述液化标识的横向形变量;所述第二控制点用于调节所述液化标识的纵向形变量;
    所述响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变,包括:
    响应于针对所述第一控制点和/或所述第二控制点的第一操作,使所述液化标识的标识轮廓产生横向形变和/或纵向形变。
  3. 根据权利要求1所述的方法,其中,所述液化标识包括至少一个第三控制点,所述第三控制点用于调节所述液化标识的整体缩放比例;
    所述响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变,包括:
    响应于针对所述第三控制点的第一操作,使所述液化标识的标识轮廓整体扩大或整体缩小。
  4. 根据权利要求1-3任一项所述的方法,其中,所述运行第一编辑界面,包括:
    显示特效编辑面板,所述特效编辑面板设置有至少一个模板组件和编辑组件,其中,所述模板组件用于显示包括至少一个预生成的特效模板的模板库;
    响应于针对所述编辑组件的触发操作,运行第一编辑界面。
  5. 根据权利要求4所述的方法,还包括:
    在生成所述目标特效模板之后,将所述目标特效模板配置到所述模板组件对应的模板库中。
  6. 根据权利要求1-5任一项所述的方法,还包括:
    运行第二编辑界面;
    响应于第二操作,在所述第二编辑界面内以添加至少两个相互叠加的特效模板,其中,所述至少两个相互叠加的特效模板中包括所述目标特效模板,各所述特效模板位于不同的图层;
    基于所述至少两个相互叠加的特效模板,生成叠加特效模板。
  7. 根据权利要求6所述的方法,还包括:
    响应于针对所述第二编辑界面的第三操作,设置各所述特效模板的图层序列和/或透明度。
  8. 根据权利要求1-7任一项所述的方法,还包括:
    响应于第四操作,设置所述目标特效模板的第一功能参数和/或第二功能参数;
    其中,所述第一功能参数用于开启所述目标特效模板的对称形变功能,所述对称形变功能用于基于待处理图像生成与所述第一液化特效对称的第二液化特效;
    所述第二功能参数用于开启所述目标特效模板的特效追踪功能,所述特效追踪功能用于动态设置所述目标区域的位置,以使所述目标区域追踪待处理图像中的目标图像元素。
  9. 根据权利要求1-8任一项所述的方法,其中,所述第一液化特效用于使所述目标区域内的图像元素产生第二形变,所述第二形变的形变量与所述第一形变的形变量对应;所述响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效,包括:
    获取目标形变类型;
    根据所述目标形变类型,得到对应的形变函数;
    基于表征所述第一形变的形变量的形变量参数,调用所述形变函数,得到对应的像素变换矩阵,所述像素变换矩阵用于使对应图像区域内的图像元素产生所述第二形变;
    根据所述像素变换矩阵,在所述样版图像的目标区域生成第一液化特效。
  10. 根据权利要求9所述的方法,还包括:
    获取所述形变函数对应的调整参数,所述调整参数用于表征所述形变函数所产生的第二形变的强度;
    所述基于表征所述第一形变的形变量的形变量参数,调用所述形变函数,得到对应的像素变换矩阵,所述像素变换矩阵用于使对应图像区域内的图像元素产生所述第二形变,包括:
    基于所述形变量参数和所述调整参数,得到像素变换矩阵。
  11. 根据权利要求9所述的方法,其中,所述形变量参数包括以下至少一项:
    横向形变量,纵向形变量,整体缩放比例。
  12. 一种特效模板生成装置,包括:
    显示模块,被配置为运行第一编辑界面,其中,所述第一编辑界面内显示有样版图像和位于所述样版图像内的液化标识;
    交互模块,被配置为响应于针对所述液化标识的第一操作,使所述液化标识的标识轮廓产生第一形变;
    处理模块,被配置为响应于所述标识轮廓的第一形变,在所述样版图像的目标区域生成第一液化特效,其中,所述目标区域为所述样版图像内被所述液化标识的标识轮廓所覆盖的图像区域;
    生成模块,被配置为基于所述第一液化特效,生成目标特效模板。
  13. 一种电子设备,包括处理器和存储器,其中,
    所述存储器存储计算机执行指令;
    所述处理器执行所述存储器存储的所述计算机执行指令时,使得所述处理器执行如权利要求1至11任一项所述的特效模板生成方法。
  14. 一种计算机可读存储介质,存储有计算机执行指令,其中,当处理器执行所述计算机执行指令时,实现如权利要求1至11任一项所述的特效模板生成方法。
  15. 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1至11任一项所述的特效模板生成方法。
PCT/CN2024/115776 2023-08-31 2024-08-30 特效模板生成方法、装置、电子设备及存储介质 Pending WO2025045189A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311119193.8 2023-08-31
CN202311119193.8A CN117151973A (zh) 2023-08-31 2023-08-31 特效模板生成方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2025045189A1 true WO2025045189A1 (zh) 2025-03-06

Family

ID=88905631

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/115776 Pending WO2025045189A1 (zh) 2023-08-31 2024-08-30 特效模板生成方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN117151973A (zh)
WO (1) WO2025045189A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117151973A (zh) * 2023-08-31 2023-12-01 北京字跳网络技术有限公司 特效模板生成方法、装置、电子设备及存储介质
CN117371387B (zh) * 2023-12-08 2024-02-13 浙江集迈科微电子有限公司 集成电路器件版图参数化构建方法装置、存储介质和终端

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111652023A (zh) * 2019-07-05 2020-09-11 广州虎牙科技有限公司 嘴型的调整、直播方法、装置、电子设备和存储介质
CN113709549A (zh) * 2021-08-24 2021-11-26 北京市商汤科技开发有限公司 特效数据包生成、图像处理方法、装置、设备及存储介质
CN115379136A (zh) * 2022-08-19 2022-11-22 北京字跳网络技术有限公司 特效道具处理方法、装置、电子设备及存储介质
WO2023030550A1 (zh) * 2021-08-31 2023-03-09 上海商汤智能科技有限公司 数据生成方法、图像处理方法、装置、设备及存储介质
CN117151973A (zh) * 2023-08-31 2023-12-01 北京字跳网络技术有限公司 特效模板生成方法、装置、电子设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111652023A (zh) * 2019-07-05 2020-09-11 广州虎牙科技有限公司 嘴型的调整、直播方法、装置、电子设备和存储介质
CN113709549A (zh) * 2021-08-24 2021-11-26 北京市商汤科技开发有限公司 特效数据包生成、图像处理方法、装置、设备及存储介质
WO2023030550A1 (zh) * 2021-08-31 2023-03-09 上海商汤智能科技有限公司 数据生成方法、图像处理方法、装置、设备及存储介质
CN115379136A (zh) * 2022-08-19 2022-11-22 北京字跳网络技术有限公司 特效道具处理方法、装置、电子设备及存储介质
CN117151973A (zh) * 2023-08-31 2023-12-01 北京字跳网络技术有限公司 特效模板生成方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN117151973A (zh) 2023-12-01

Similar Documents

Publication Publication Date Title
CN110766777B (zh) 虚拟形象的生成方法、装置、电子设备及存储介质
WO2025045189A1 (zh) 特效模板生成方法、装置、电子设备及存储介质
CN109460233B (zh) 页面的原生界面显示更新方法、装置、终端设备及介质
KR102248799B1 (ko) 타겟 대상 디스플레이 방법, 장치 및 전자 기기
CN110568982B (zh) 在线演示文稿中的图片裁剪方法、装置、存储介质及设备
US12541895B2 (en) Method and apparatus for processing portrait image
CN110298851B (zh) 人体分割神经网络的训练方法及设备
US12019669B2 (en) Method, apparatus, device, readable storage medium and product for media content processing
US12400406B2 (en) Method and system for creating augmented reality filters on mobile devices
CN110070585A (zh) 图像生成方法、装置和计算机可读存储介质
EP4718227A1 (en) Image processing method and apparatus, device, computer readable storage medium, and product
CN110069191A (zh) 基于终端的图像拖拽变形实现方法和装置
WO2024222356A1 (zh) 特效生成方法、装置、计算机设备及存储介质
WO2024245110A1 (zh) 图像尺寸调整方法、装置、设备、可读存储介质及产品
CN110119722A (zh) 用于生成信息的方法和装置
JP7673319B2 (ja) 動画マスクレイヤ表示方法、装置、機器及び媒体
CN115328429A (zh) 显示方法、装置、电子设备以及存储介质
CN115619904A (zh) 图像处理方法、装置及设备
US20240377939A1 (en) Split-screen effect generating method and apparatus, device, and medium
CN118446884A (zh) 图像处理方法、装置、设备和介质
WO2025036409A1 (zh) 媒体内容处理方法、设备、存储介质及程序产品
WO2025067334A1 (zh) 特效添加方法、装置、电子设备以及存储介质
WO2024131652A1 (zh) 特效处理方法、装置、电子设备及存储介质
US20240273688A1 (en) Method, apparatus, device and storage medium for image processing
CN119444881A (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: 24858720

Country of ref document: EP

Kind code of ref document: A1