WO2019154337A1 - 变形特效程序文件包的生成及变形特效生成方法与装置 - Google Patents

变形特效程序文件包的生成及变形特效生成方法与装置 Download PDF

Info

Publication number
WO2019154337A1
WO2019154337A1 PCT/CN2019/074498 CN2019074498W WO2019154337A1 WO 2019154337 A1 WO2019154337 A1 WO 2019154337A1 CN 2019074498 W CN2019074498 W CN 2019074498W WO 2019154337 A1 WO2019154337 A1 WO 2019154337A1
Authority
WO
WIPO (PCT)
Prior art keywords
deformation
parameter
key point
effect
region
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.)
Ceased
Application number
PCT/CN2019/074498
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 Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development 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 Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to JP2020536147A priority Critical patent/JP7066855B2/ja
Priority to KR1020207018884A priority patent/KR102386640B1/ko
Priority to SG11202006343RA priority patent/SG11202006343RA/en
Publication of WO2019154337A1 publication Critical patent/WO2019154337A1/zh
Priority to US16/914,654 priority patent/US11270408B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/18Image warping, e.g. rearranging pixels individually
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating three-dimensional [3D] models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/012Head tracking input arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/013Eye tracking input arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/0304Detection arrangements using opto-electronic means
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/24Indexing scheme for image data processing or generation, in general involving graphical user interfaces [GUIs]

Definitions

  • the present application relates to computer vision technology, and in particular to a method and apparatus for generating a deformation special effects file package and transforming special effects.
  • Augmented Reality is a new technology that integrates real world information and virtual world information "seamlessly". It simulates the entity information in a certain time and space within the real world. Superimposing virtual information, applying virtual information to the real world, superimposing real-world characters, environments and virtual objects in real time on the same picture or space, so as to achieve a sensory experience beyond reality.
  • the embodiment of the present application provides a technical solution for generating a modified special effect program file package and a technical solution for generating a special effect.
  • a method for generating a modified special effect program file package includes:
  • a variant special effect generating method is provided, further comprising:
  • a special effect of the deformation effect is generated on the image to be processed based on a key point in the image to be processed and a parameter value of the deformation effect parameter of the deformation region.
  • a device for generating a modified special effect program package includes:
  • a first acquiring module configured to acquire a parameter value of a deformation effect parameter of the at least one deformation region
  • Establishing a module configured to establish a correspondence between at least one of the deformation regions and a predetermined at least one key point
  • a first generating module configured to generate a deformation effect program file package according to the at least one deformation region and the corresponding relationship obtained by acquiring the parameter value.
  • a variant special effect generating apparatus includes:
  • a second acquiring module configured to acquire a parameter value of a deformation effect parameter of the deformation region
  • a second generating module configured to generate a special effect of the deformation effect on the image to be processed based on a key point in the image to be processed and a parameter value of a deformation effect parameter of the deformation region.
  • an electronic device including:
  • a memory for storing a computer program
  • a processor configured to execute a computer program stored in the memory, and when the computer program is executed, implements the method described in any one of the embodiments of the present application.
  • a computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the method of any of the embodiments of the present application.
  • a computer program comprising computer instructions that, when executed in a processor of a device, implement the method of any of the embodiments of the present application.
  • the method and device for generating a modified special effect program file package, the electronic device, the program, and the medium provided by the foregoing embodiment of the present application acquire parameter values of deformation effect parameters of at least one deformation region, and establish at least one deformation region and at least a predetermined Corresponding relationship between a key point, and generating a deformation effect program file package according to the at least one deformation region and the corresponding relationship obtained by the parameter value, so as to add a deformation effect to the image based on the deformation special effect file package
  • the deformation effect of the image is implemented.
  • the embodiment of the present application can generate the deformation special effect program file executable by the rendering engine without manually writing the program file, and the operation is simple and the required time is short, thereby improving the overall efficiency of the deformation special effect and effectively protecting.
  • the accuracy of the deformation effects can generate the deformation special effect program file executable by the rendering engine without manually writing the program file, and the operation is simple and the required time is short, thereby improving the overall efficiency of the deformation special effect and effectively protecting. The accuracy of the deformation effects.
  • the parameter values of the deformation effect parameters of the deformation region are obtained, based on the key points in the image to be processed and the deformation effect parameters of the deformation region.
  • the parameter value which produces a special effect of the deformation effect on the image to be processed.
  • the parameter value of the deformation effect parameter of the deformation region in the deformation special effect program file package is generated, the key point detection is performed on the image, the deformation special effect is generated on the image, the deformation effect of the image is realized, and the image playback is improved. effect.
  • FIG. 1 is a flowchart of an embodiment of a method for generating a variant effect file package of the present application.
  • FIG. 2 is a diagram showing an example of an operation interface of a device for generating a modified special effect program file package according to an embodiment of the present application.
  • FIG. 3 is an exemplary schematic diagram of a deformation effect parameter setting interface of a deformation region in the embodiment of the present application.
  • FIG. 4 is an exemplary schematic diagram of a key point of a face in an embodiment of the present application.
  • FIG. 5 is an exemplary schematic diagram of a deformation curve adjustment window in the embodiment of the present application.
  • FIG. 6 is a schematic view showing a deformation effect of the deformation effect in the embodiment of the present application.
  • FIG. 7 is a schematic view showing a deformation effect of the inward stretching of the embodiment of the present application.
  • FIG. 8 is a schematic diagram of a deformation effect of a mode switching parameter in a simple stretching mode of a center point according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram showing a deformation effect of the mode switching parameter in the radial offset stretching mode in the embodiment of the present application.
  • FIG. 10 is an exemplary schematic diagram of a hand motion in an embodiment of the present application.
  • FIG. 11 is a flowchart of still another embodiment of a method for generating a modified special effect program file package according to the present application.
  • FIG. 12 is a flowchart of an embodiment of a method for generating a special effect of the present application.
  • FIG. 13 is a flowchart of another embodiment of a method for generating a special effect of the present application.
  • FIG. 14 is a schematic structural diagram of an embodiment of a device for generating a variant effect file package according to the present application.
  • FIG. 15 is a schematic structural diagram of another embodiment of a device for generating a variant effect file package according to the present application.
  • FIG. 16 is a schematic structural diagram of an embodiment of a deformation special effect generating apparatus of the present application.
  • FIG. 17 is a schematic structural diagram of another embodiment of a variant special effect generating apparatus of the present application.
  • FIG. 18 is a schematic structural diagram of an application embodiment of an electronic device according to the present application.
  • a plurality may mean two or more, and “at least one” may mean one, two or more.
  • the term "and/or" in the disclosure is merely an association relationship describing an associated object, indicating that there may be three relationships, for example, A and/or B, which may indicate that A exists separately, and A and B exist simultaneously. There are three cases of B alone.
  • the character "/" in the present application generally indicates that the context of the context is an "or" relationship.
  • Embodiments of the present application can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with numerous other general purpose or special purpose computing system environments or configurations.
  • Examples of well-known terminal devices, computing systems, environments, and/or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, and the like include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients Machines, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, small computer systems, mainframe computer systems, and distributed cloud computing technology environments including any of the above, and the like.
  • Electronic devices such as terminal devices, computer systems, servers, etc., can be described in the general context of computer system executable instructions (such as program modules) being executed by a computer system.
  • program modules may include routines, programs, target programs, components, logic, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the computer system/server can be implemented in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communication network.
  • program modules may be located on a local or remote computing system storage medium including storage devices.
  • FIG. 1 is a flowchart of an embodiment of a method for generating a variant effect file package of the present application.
  • the method for generating a variant effect file package of each embodiment of the present application can be implemented by, for example, but not limited to, a variant device (the device of the present application is called a device for generating a variant effect file package).
  • the method for generating a variant effect file package of the embodiment includes:
  • the operation 102 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a first acquisition module executed by the processor.
  • the operation 104 may be performed by a processor invoking a corresponding instruction stored in a memory or by an establishing module executed by the processor.
  • Generate a deformation effect program file package according to acquiring at least one deformation region having a parameter value and a correspondence between the at least one deformation region and the predetermined at least one key point.
  • the operation 106 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a first generation module executed by the processor.
  • the shape of the deformed region is not limited, and may be, for example, a circle, an ellipse, a rectangle, a square, a triangle, or any other shape.
  • the deformation area may be one or plural.
  • operations 102-104 may be respectively performed for each deformation region, that is, respectively acquiring parameter values of deformation effect parameters of each deformation region, and establishing correspondence between each deformation region and a predetermined at least one key point. The relationship then performs an operation 106 for the plurality of deformed regions, and generates a deformed special effects package from the parameter values of the deformation effect parameters of the plurality of deformed regions and their corresponding relationships.
  • the deformation effect program file package can be used to process the deformation effect of the image, and generate a deformation effect (also referred to as a deformation effect) of the deformation region on the image, for example, perform rendering processing of the AR effect on the video image.
  • a deformation effect also referred to as a deformation effect
  • the method for generating a deformation effect program file package obtained by the above embodiment of the present application obtains a parameter value of a deformation effect parameter of at least one deformation region, and establishes a correspondence relationship between at least one deformation region and a predetermined at least one key point.
  • the present application can generate the deformation special effect program file executable by the rendering engine without manually writing the program file, and the operation is simple and the required time is short, the overall efficiency of the deformation special effect is improved, and the accuracy of the deformation special effect is effectively guaranteed.
  • the method before the obtaining, by the operation 102, the parameter value of the deformation effect parameter of the at least one deformation region, the method further includes: adding the at least one deformation region.
  • the operation 102 may include: acquiring parameter values of the deformation effect parameters of the plurality of deformation regions in batches; and/or Obtaining, respectively, a parameter value of a deformation effect parameter of at least a part of the deformation regions; and/or obtaining a parameter value of the deformation effect parameter of the other deformation region and the another deformation region by copying a deformation region .
  • the device for generating a modified special program package may include a preset effect file, which may be, for example, a JavaScript-based lightweight data exchange format (JavaScript Object Notiation, Json) file, or any other executable program file.
  • the parameter value of the deformation effect parameter in the special effect program file may be vacant or preset as a default value, and when the parameter value set for the deformation effect parameter of the deformation area is received, the corresponding parameter value in the special effect program file is automatically updated to receive. The value of the parameter to.
  • the generating device of the modified special effect program file package may include an operation interface, where the operation interface includes an operation bar, and the operation bar is provided with at least one interaction interface for receiving a parameter value set for the deformation effect of the deformation region;
  • the operation interface of the generating device of the deformation effect program package may further include a program file display field for displaying a program file of a deformation effect of the deformation region.
  • FIG. 2 is a diagram showing an example of an operation interface of a device for generating a special effect program package in the embodiment of the present application. The "deformation" in it represents the deformation effect or deformation effect.
  • the program file display column displays the special effect program when the deformation effect parameter of the deformation area is vacant or is preset to the default value.
  • the file when receiving the parameter value set by the deformation effect parameter of a deformation area through the interaction interface of the operation bar, updating the parameter value of the deformation effect parameter of the deformation area to the recently received parameter value, and displaying the program file display column in real time The effect file after the parameter value is updated.
  • the embodiment of the present application does not need to generate a rendering engine executable file by manually writing a program file, and the generation of the deformation special effect package can be realized based on the setting operation of the parameter value of the deformation effect parameter of the deformation region in the operation column of the user, and the operation is simple.
  • the required time is short, which improves the overall efficiency of the deformation effect and effectively guarantees the accuracy of the deformation effect.
  • the operation bar may include a deformation effect parameter setting interface including at least one interactive interface; and may further include other regions, such as a deformation region.
  • the name display area, the deformation effect parameter setting interface at this time may be the deformation effect parameter setting interface of each deformation area.
  • FIG. 3 it is an exemplary schematic diagram of a deformation effect parameter setting interface of a deformation region named "round0" in the embodiment of the present application.
  • the method before the obtaining, by the operation 102, the parameter value of the deformation effect parameter of the at least one deformation region, the method further includes: receiving the deformation region input through the interaction interface of the operation bar Adding an instruction, adding at least one of the deformation regions, generating a deformation effect parameter setting interface of the deformation region, and displaying a deformation effect parameter setting interface of the deformation region under the operation column.
  • one or more deformation regions can be added by clicking a control button such as a deformation effect "deformation" in the action bar.
  • acquiring the parameter value of the deformation effect parameter of the deformation region may include: acquiring the parameter value of the deformation effect parameter of the deformation region through the deformation effect parameter setting interface.
  • obtaining the parameter value of the deformation effect parameter of the deformation region in operation 102 may include: acquiring the deformation region by moving the deformation region on the reference image a positional parameter of the deformation region; and/or, obtaining a range of the deformation region by adjusting a size of the deformation region; and/or obtaining a parameter value of a deformation effect parameter of the deformation region by adjusting a deformation curve for controlling the deformation effect And/or, obtaining the parameter value of the deformation effect parameter of the deformation region by receiving the parameter value of the deformation effect control parameter.
  • obtaining the parameter value of the deformation effect parameter of the deformation region may be implemented by: receiving a parameter value of the deformation effect parameter sent by the interaction interface in the deformation effect parameter setting interface of the deformation region. And setting a parameter value as a parameter value of a deformation effect parameter of the deformation region; and/or, in response to not receiving a parameter value of the deformation effect parameter sent through the interaction interface in the deformation effect parameter setting interface of the deformation region, to pre Set the parameter value as the parameter value of the deformation effect parameter of the deformation area.
  • the method further includes: receiving a deformation area deletion instruction input through the interaction interface of the operation bar, and deleting the deformation area and the deformation target for the deformation area deletion instruction.
  • the parameter value of the deformation effect parameter of the area is not limited to: a deformation area deletion instruction input through the interaction interface of the operation bar, and deleting the deformation area and the deformation target for the deformation area deletion instruction.
  • the key points may include, but are not limited to, any one or more of the following: a head key point, a face key point, a shoulder key point, an arm key point, and a gesture key. Points, key points of the waist, key points of the legs, key points of the feet, key points of the human skeleton, and so on.
  • the head key points may include, but are not limited to, any one or more of the following: an overhead key point, a nose tip key point, and a chin key point, and the like.
  • the facial key points may include, but are not limited to, any one or more of the following: facial contour key points, eye key points, eyebrow key points, nose key points, mouth key points, etc. Wait.
  • the eye key points may include, but are not limited to, any one or more of the following: a left eyelid key point, a left eye pupil center key point, a left eye center key point, a right eye key point, and a right eye pupil center key point. , and the key points in the center of the right eye, and so on.
  • the eyebrow key points may include, but are not limited to, any one or more of the following: a left eyebrow key point and a right eyebrow key point, and the like.
  • the key points of the nose may include, but are not limited to, any one or more of the following: a key point of the nose bridge, a key point under the nose, and a key point on the outside of the nose, and the like.
  • the key points of the mouth may include, for example but are not limited to, any one or more of the following: an upper lip key point, a lower lip key point, and the like.
  • the shoulder key points may include, but are not limited to, any one or more of the following: a shoulder intersection key point at the intersection of the shoulder and the head, and a key point and shoulder at the arm root contour The midpoint of the shoulder contour at the midpoint between the key points, and so on.
  • the arm key points may include, but are not limited to, any one or more of the following: wrist contour key points, elbow contour key points, arm root contour key points, and wrist contour points and elbows The midpoint point of the arm contour at the midpoint position between the contour key points, and the midpoint of the boom midpoint at the midpoint between the key point of the elbow contour and the key point of the arm root contour, and so on.
  • the gesture key points may include, but are not limited to, any one or more of the following: four vertex keys of the gesture frame (ie, the gesture detection frame), and the center key point of the gesture frame, etc. Wait.
  • the leg key points may include, but are not limited to, any one or more of the following: ankle key point, a knee contour key point, an ankle contour key point, a thigh root outer contour key point, located at the knee The key point of the calf contour at the midpoint between the contour key point and the ankle contour key point, the midpoint of the inner contour of the thigh at the midpoint between the key point of the knee inner contour and the key point of the ankle, And the midpoint of the outer contour of the thigh at the midpoint between the key point of the outer contour of the knee and the key point of the outer contour of the root of the thigh, and so on.
  • the waist key points may include, but are not limited to, any one or more of the following: N-divide N between the outer contour points of the thigh root and the key points of the arm root contour, and generate N, etc. A point where N is greater than one.
  • the foot key points can include, for example, but are not limited to, any one or more of the following: toe key points and heel key points, and the like.
  • the human bone key points may include, but are not limited to, any one or more of the following: a right shoulder bone key point, a right elbow bone key point, a right wrist bone key point, a left shoulder bone key point, and a left elbow Bone key points, left wrist bone key points, right hip bone key points, right knee bone key points, right skeletal key points, left hip bone key points, left knee bone key points, left skeletal key points, head skeletal key points, And the key points of the neck bones, and so on.
  • the positions of the plurality of key points may be preset in order to establish a correspondence relationship between the deformed area and the at least one key point, thereby correspondingly aligning the two.
  • at least one key point may be directly selected from a preset set of key points to establish a correspondence relationship between the deformation region and at least one key point.
  • multiple key points may be defined for the face and the gesture (hand) based on face detection and gesture detection, respectively, to implement the deformation effect generation, and to establish the deformation area and the face key point or The correspondence between the key points of the gesture.
  • FIG. 4 is an exemplary schematic diagram of a key point of a face in the embodiment of the present application.
  • a face key point may be defined as follows:
  • the key points of the opponent can be defined as follows:
  • the key points of the numbers 110-113 are the four vertices of the gesture detection frame (ie, the outer frame of the hand), and the key point of the number 114 is the center of the gesture detection frame.
  • establishing a correspondence between the deformation region and the predetermined at least one key point may include: establishing a position reference point between the deformation region and at least one key point Corresponding relationship; and/or establishing a correspondence between a position reference point of the deformation area and a center key point of the detection frame.
  • the key points in the correspondence established in the above embodiments of the present application are a head key point, a face key point, a shoulder key point, an arm key point, a waist key point, a leg key point, a foot key point, and a human body.
  • the position reference point of the deformation region for example, the center point of the deformation region, the two points on the circular boundary of the circular deformation region, the four points of the square deformation region, the four vertices of the square deformation region, etc.
  • the above key points can be established.
  • the deformation area can be established.
  • the correspondence between the position reference point and the center key point of the corresponding detection frame for example, the head detection frame, the face detection frame, the gesture detection frame, and the human body detection frame.
  • the deformation effect parameter of the deformation region may include, but is not limited to, any one or more of the following:
  • display parameter used to control whether to display the deformation effect of the deformation area.
  • the parameter values include “Yes” and “No”. When the parameter value is "Yes”, the deformation effect in the above-mentioned display deformation region of the image is indicated, and the parameter value is selected as "No". ” indicates that the deformation effect of the deformed area is not displayed on the image;
  • trigger action parameter used to indicate the trigger action that triggers the deformation effect of the display deformation region, which refers to the action of triggering the deformation of the display deformation region
  • the parameter value may include each trigger action
  • the user can preset from At least one action is selected as a trigger action in the action set. That is, when the corresponding triggering action is detected in the video or image, the deformation effect of displaying the corresponding deformation region may be triggered. For example, when the triggering action “opening mouth” specified in the triggering action parameter is detected in the video image, the display is started in the mouth.
  • the deformation effect of the deformation region, the start display time, the end display time, and the display duration of the deformation effect of the deformation region may be determined according to parameter values of other parameters, for example, may be determined according to the delay trigger parameter and the trigger end parameter, respectively;
  • loop parameter used to indicate the number of loops of the deformation effect. The number of times the user can cycle, and the number of times of selection can be exemplarily set to 0, indicating that the deformation effect is always displayed;
  • late trigger parameter used to indicate the time to delay the deformation effect of the display deformation region, that is, when a trigger action in the trigger action parameter is detected from a certain frame in the video image, how many frames are delayed to start displaying the deformation
  • the deformation effect of the region may be set or selected as the parameter value for delaying the display of the deformation effect of the deformation region;
  • trigger end parameter used to indicate the end of the display deformation deformation of the effect of the action, refers to what action to end the deformation of the display deformation area, the parameter value includes each trigger action, the user can from the preset action set At least one of the actions is selected as an action to end the deformation effect of the display deformation region. That is, when the trigger action specified by the trigger end parameter is detected in the video or image, the deformation effect of the display deformation region may be ended, for example, when the trigger action “opening mouth” specified in the trigger action parameter is detected in the video image, the mouth is started.
  • the deformation effect of the deformation region is displayed, and the parameter value in the trigger end parameter can be set to “shutdown”, and when the “shutdown” action occurs in the video image, the deformation effect of the deformation region disappears;
  • deformation effect control parameters used to control the deformation effect of the deformation area.
  • the deformation effect of the deformation region can be controlled by a deformation curve
  • the deformation curve adjustment window can be opened by clicking a change button in the interaction interface, and the parameters of the deformation curve can be adjusted to change the deformation effect.
  • FIG. 5 it is an exemplary schematic diagram of a deformation curve adjustment window in the embodiment of the present application.
  • the parameters of the deformation curve include any one or more of the following: stretching for controlling the deformation effect.
  • the stretching direction of the deformation effect may include: stretching outward from a center point of the deformation region, and/or stretching inward from a center point of the deformation region.
  • the deformation curve is controlled by control points corresponding to three control point parameters, wherein the first control point is used to control the stretching direction and the stretching radius of the deformation effect, thereby affecting the degree of deformation and deformation.
  • the deformation region is stretched outward from the deformation center point, and the first control point is located at the upper left corner portion of the region into which the oblique line 1 is divided.
  • the deformation region is stretched from the boundary of the circle toward the center of the deformation point (ie, inwardly stretched), as shown in FIG. 6 and FIG. 7, respectively, and the deformation effect is outwardly stretched and inward in the embodiment of the present application.
  • a deformation effect diagram of the stretching the length of the straight line segment between the first control point and the lower left vertex controls the size of the area that is linearly deformed from the deformation center outward, and the longer the straight line segment, the larger the linear deformation area.
  • the second control point is used to control the transition smoothness of the intermediate region of the deformed region. The closer the second control point is to the first control point, the more obvious the deformation effect of the middle region, and vice versa, the better the transition smoothness of the intermediate region; the third control point is used for the transition smoothness of the boundary region of the deformed region (ie : Boundary smoothing effect).
  • the user can change the deformation display by adjusting the position of the three control points. Since the first control point is used to control the slope of the line, the second control point and the third control point are used to control the curve based on the slope of the line. The amplitude, the movable position of the three control points will be subject to certain constraints according to the parameter relationship;
  • display size parameter used to indicate the change of the size of the deformation of the reference basis, used to achieve a large and small deformation effect of the deformation area.
  • the parameter value of the display size parameter ie, the reference basis for the change of the size of the deformation area
  • the parameter value of the display size parameter may be two or more key points in the preset key point (which may be expressed as: PointA and PointB), and the size of the deformation area at this time Will vary according to the proportion of the size formed by two or more key points in the image as a reference;
  • Position parameter used to indicate the position binding relationship between the deformation area and the preset key point. It refers to the positional relationship between the deformation area and the preset key point in the image. The deformation area and the preset key can be selected. The key points in the point are bound by the location.
  • the preset key point in the position parameter may include: two key points in the preset key points, the two key points are on the boundary of the deformation area, and the connection passes through the deformation area Central point
  • RotateCenter parameter used to indicate the center point of the deformation region rotation, in an optional example, the center point of the deformation region rotation is the center point of the image;
  • deformation center parameter used to indicate the center point of the deformation area
  • mode switching parameter used to switch the center point offset mode of the deformation area.
  • the center point offset pattern of the deformed region includes a center point simple stretch mode and a radial offset stretch mode. You can switch the center point offset of the deformed area by the following two parameter values: (1) Yes: indicates the center point simple stretch mode, and you can stretch the deformed area by moving the position of the deformed center point in the circle with the mouse. (2) No: Radial offset stretching mode, based on the deformation curve edited by the deformation effect control parameter, the deformation region is stretched in the deformation circle.
  • FIG. 8 it is a schematic diagram of a deformation effect of the mode switching parameter in the simple stretching mode of the center point in the embodiment of the present application.
  • FIG. 9 a schematic diagram of a deformation effect of the mode switching parameter in the radial offset stretching mode in the embodiment of the present application;
  • beauty / beauty (beauty and / or beauty) effect parameters used to indicate the beauty / beauty effects displayed in the preset parts when displaying the deformation effect, such as red lips, beautiful eyes, blue eyes and so on. For example, when the deformation effect is displayed, a red lip is displayed at the mouth.
  • the preset key points in the position parameter include: two key points of the predetermined key points located on the boundary of the deformation area and passing through the center point of the deformation area.
  • the operation 104 of this embodiment may include establishing a correspondence between the deformed region and the above-mentioned two key points on the boundary of the deformed region and connecting the center point of the deformed region.
  • the trigger action corresponding to the trigger action parameter includes any one or more of the following:
  • NULL No action trigger (NULL), that is: the child material can be displayed without any action;
  • Eye movements for example, blinking, closing eyes, blinking, etc.
  • Head movements for example, shaking his head, nodding his head, hoeing his head, turning his head, etc.
  • Eyebrow movements for example, eyebrows, etc.
  • Hand movements for example, loving hands, holding hands, palms, thumbing, congratulations, one-handedness, OK hands, scissors hands, pistols, index fingers, etc.;
  • Mouth movements for example, opening a mouth, closing a mouth, etc.
  • FIG. 10 it is an exemplary schematic diagram of the hand motion in the embodiment of the present application.
  • the operation interface of the device for generating a modified special program package of the embodiment of the present application may further include a content display column.
  • the method further includes: displaying the reference image through the content display column.
  • the reference image may be, for example, at least a part of an image of a reference character, such as any one or more of the following: a complete image, a head image, a face image, a shoulder image, an arm image, a gesture image , waist image, leg image, foot image, and more.
  • the method may further include: receiving a reference point display instruction input through an interaction interface of the operation bar, displaying a key point on the reference image; and/or, The reference point close command input through the interactive interface of the operation bar is received, and the key points on the reference image are not displayed.
  • the method further includes: displaying a deformation effect of the deformed region in the content display column according to the parameter value of the deformation effect parameter of the deformed region.
  • the deformation area may be displayed in the content display column in accordance with the position and size of the deformed area set in advance.
  • the method further includes: updating the display position of the deformed area in the content display column according to the position moving operation on the deformed area received through the content display column, and deforming the deformed area The corresponding parameter values in the effect parameters are updated. And/or, the method may further include: updating the display size of the deformation area in the content display column according to the size adjustment operation of the deformation area received through the content display column, and updating the corresponding parameter value in the deformation effect parameter of the deformation area .
  • the user can select a deformation area displayed in the content display column by the mouse, move the mouse to the small frame at the lower right corner of the deformation area, and adjust the size of the deformation area by moving the small frame to zoom the deformation area; the user can Use the mouse to select a deformed area displayed in the content display bar and move its position directly to move the deformed area to the correct or desired position.
  • the position and display ratio of the deformation area on the playback terminal will be consistent with the position and display ratio in the content display column.
  • the method further includes: adjusting between two or more deformation regions according to the layer parameter adjustment instruction for the two or more deformation regions received through the interaction interface of the operation bar The occlusion relationship, and the deformation effect corresponding to the two or more deformation regions is displayed according to the adjusted occlusion relationship and the parameter values of the deformation parameters corresponding to the two or more deformation regions.
  • the parameter value of the deformation effect parameter and the deformation effect parameter of the deformation region may be further included according to the preset deformation effect program file.
  • the special effect program file of the deformation area is generated, and the special effect program file of the deformation area is displayed through the program file column.
  • the variant effect program file may include, for example, a special effect program file generated by a json program or any other program.
  • the method further includes: generating, by the generating device, the generating device according to the received startup command, and displaying an operation interface, where the operation interface includes: an operation bar , content display bar and program file bar.
  • the above operation interface includes three areas of the left side, the middle side, and the right side.
  • the displaying the operation interface may include: displaying an operation column on a left side of the operation interface, displaying a content display column in a middle portion of the operation interface, and displaying the program file column on a right side of the operation interface.
  • the parameter of the deformation effect parameter of each deformation area can be set by the interaction interface 21 in the left operation column; the content display column uses the average face as the reference face, and all the deformation areas are directly displayed, and can be displayed by moving the mouse.
  • the position of the deformed area; the program file display column on the right side is used to display the content of the special effect program file of the currently set parameter value through the display area 22 therein, and the deformation effect program file can be exported through the save instruction interface 23 in the program file display column.
  • Package ie: Generate and save the morph effect package.
  • FIG. 11 is a flowchart of still another embodiment of a method for generating a special effect program file package of the present application. As shown in FIG. 11, the method for generating the special effect program file package of this embodiment includes:
  • the generating device of the deformation special effect program file package is started according to the received startup instruction, and displays an operation interface.
  • the operation interface includes: an operation bar, a content display bar and a program file bar.
  • the above reference image may be, for example, at least a portion of an image of a reference character.
  • the operation 304 may be performed by a processor invoking a corresponding instruction stored in the memory, or may be performed by an operation interface executed by the processor or a content display field in the operation interface. .
  • the operation 306 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by an add module and an operation interface or an operation bar in an operation interface operated by the processor.
  • the operation 308 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by an operation interface or an operation bar in an operation interface operated by the processor, and an establishment module.
  • the special effect program file may include, for example, but not limited to, a special effect program file generated by a json program or other executable program.
  • operations 306-310 are performed for each of the deformed regions, respectively. Thereafter, operation 312 is performed for all of the deformed regions.
  • the operation 310 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a first generation module and an operation interface or a program file column in an operation interface executed by the processor.
  • the operation 312 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a first generation module executed by the processor.
  • the method may further include: saving the modified special effect program file package at a location pointed by the save instruction according to the received save instruction.
  • saving the variant effect file package at the location pointed by the save instruction according to the received save instruction may include:
  • the special effect program file package can be compressed and saved, so as to be imported into the mobile phone terminal for deformation special effect generation.
  • the modified special effect program file package can be imported into the terminal, and the video or image played by the terminal is subjected to deformation special effect generation.
  • FIG. 12 is a flowchart of an embodiment of a method for generating a special effect of the present application.
  • the variant effect generating method of each embodiment of the present application can be implemented, for example, by, but not limited to, one device (the embodiment of the present application is called a deformation special effect generating device).
  • the deformation effect generating device therein may be, for example, an AR engine or an electronic device having an AR drawing function (such as an electronic device provided with an AR engine).
  • the variant special effect generating method of this embodiment includes:
  • the operation 402 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a second acquisition module executed by the processor.
  • the operation 404 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a second generation module block executed by the processor.
  • the parameter value of the deformation effect parameter of the deformation region is obtained, and the parameter value of the deformation effect parameter in the image to be processed and the deformation effect parameter of the deformation region is on the image to be processed.
  • Generate special effects for deformation effects are generated on the image to be processed, thereby realizing the deformation effect of the image, improving or Enriches the display/playback effect and/or fun of the image.
  • the method before the operation 402 acquires the parameter value of the deformation effect parameter of the deformation region, the method further includes: importing the deformation effect program file package.
  • the parameter value of the deformation effect parameter of the deformation region in the deformation effect program file package is acquired.
  • the above-described variant effect file package may be, but is not limited to, generated by the generation method of the variant effect file package of any of the embodiments of the present application.
  • FIG. 13 is a flowchart of another embodiment of a method for generating a special effect of the present application. As shown in FIG. 13, the variant special effect generating method of this embodiment includes:
  • the operation 502 may be performed by a processor invoking a corresponding instruction stored in a memory or by an import module executed by the processor.
  • the parameter value of the deformation effect parameter of the deformation region may include, for example but is not limited to, a correspondence relationship between the deformation region and the predetermined at least one key point.
  • the operation 504 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a second acquisition module executed by the processor.
  • the operation 506 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a first detection module executed by the processor.
  • the image to be processed may include, but is not limited to, any one or more of the following: a still image, an image in a video, and the like.
  • the key points involved in the correspondence may be detected by the neural network, and the key point detection result is output.
  • the key point detection result may include, but is not limited to, any one or more of the following: the position of the key point involved in the correspondence relationship in the image to be processed; the preset number of the key point involved in the corresponding relationship in the special effect program file package .
  • the operation 508 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a second generation module executed by the processor.
  • the morph effect file package can be imported by: reading the morphing effect file package into the memory by calling the first interface function for reading the morphing region; parsing the morphing effect program file package to obtain The deformation effect program file, the deformation effect program file includes the parameter value of the deformation effect parameter.
  • the morphing effect program file may include, for example, a json program or any other morphing effect program file that can execute the program.
  • the parameter value of the deformation effect parameter of the deformation region may be obtained by: creating a sticker handle by using a second interface function for creating a sticker handle; and reading a deformation effect parameter of the deformation region in the deformation effect program file The parameter value is stored in the sticker handle.
  • the method further includes: obtaining, according to the parameter value of the deformation effect parameter of the deformation region in the deformation effect program file in the sticker handle, the position of the deformation region displayed in the image to be processed.
  • the variant special effect generating method of each embodiment may further include: acquiring the number of video frames displayed in the image to be processed in the deformed region, and pre-following the video of the image to be processed. The image corresponding to the number of video frames is read.
  • the operation 508 generates a special effect of the deformation effect on the image to be processed based on the parameter values of the key point and the deformation effect parameter of the deformation region in the image to be processed, which may include: by calling the rendering deformation region
  • the third interface function reads the deformation region that needs to be displayed on the image to be processed from the sticker handle; and determines the deformation region to be processed according to the key point in the image to be processed and the parameter value of the deformation effect parameter of the deformation region to be displayed.
  • the display position on the image; the deformed area is displayed on the display position on the image to be processed according to the display position of the deformed area on the image to be processed.
  • the method may further include:
  • the sticker handle is destroyed by a fourth interface function for calling the destroy sticker handle.
  • the deformation effect parameter may include: a trigger action parameter, where the trigger action parameter is used to indicate a trigger action that triggers the display deformation effect.
  • the variant effect generating method of the embodiment may further include: detecting whether a triggering action corresponding to the parameter value of the triggering action parameter occurs in the image to be processed.
  • the operation 508 generates a special effect of the deformation effect on the image to be processed based on the parameter value of the key effect point and the deformation effect parameter of the deformation region in the image to be processed, and may include: responding to detecting the parameter value of the trigger action parameter in the image to be processed.
  • the corresponding triggering action generates a special effect of the deformation effect on the image to be processed based on the key points in the image to be processed and the parameter values of the deformation effect parameters of the deformation region.
  • the deformation effect parameter may include: a beauty/beauty (beauty and/or beauty) effect parameter, and the beauty/beauty effect parameter is used for Indicates the beauty/beauty effect displayed on the preset portion when the deformation effect is displayed.
  • the deformation effect generation method of the embodiment may further include: generating a special effect of the deformation effect on the image to be processed based on the parameter values of the deformation effect parameter of the key point and the deformation area in the image to be processed to be processed, according to the beauty
  • the beauty/beauty effect parameter displays the beauty/beauty effect in the image to be processed.
  • the embodiment of the variant effect generating method of the present application can be used for various image display scenes or video play scenes to be processed, for example, for a live video scene containing a character, and a deformation special effect is generated for the live video, for example, a live character's ear and hand.
  • a deformation effect of a deformed area on the face, the hair, the neck, the shoulder, etc. for example, for the image to be processed containing the character, and generating a deformation effect for the image to be processed, for example, a certain part of the face of the image to be processed Generate deformation effects on it; and so on.
  • the method for generating a variant special effect file package and the variant special effect generating method provided by the embodiments of the present application may be executed by any suitable device having data processing capability, including but not limited to: a terminal device, a server, and the like.
  • the method for generating a variant special effect file package and the variant special effect generating method provided by the embodiment of the present application may be executed by a processor, such as the processor executing any one of the embodiments mentioned in the present application by calling a corresponding instruction stored in the memory.
  • the generation method of the deformation effect program file package and the deformation effect generation method This will not be repeated below.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • FIG. 14 is a schematic structural diagram of an embodiment of a device for generating a variant effect file package according to the present application.
  • the apparatus for generating a modified special effect program package of each embodiment of the present application can be used to implement the method for generating the above-mentioned various modified special effect program file packages.
  • the apparatus for generating a variant effect file package of the embodiment includes: a first acquisition module, an establishment module, and a first generation module. among them:
  • the first obtaining module is configured to acquire a parameter value of a deformation effect parameter of the at least one deformation region.
  • a module is configured to establish a correspondence between the at least one deformation region and the predetermined at least one key point.
  • the first generating module is configured to generate a deformation effect program file package according to the at least one deformation region and the corresponding relationship obtained by acquiring the parameter value.
  • the device for generating a deformation effect file package acquires a parameter value of a deformation effect parameter of at least one deformation region, and establishes a correspondence relationship between at least one deformation region and a predetermined at least one key point.
  • the present application can generate the deformation special effect program file executable by the rendering engine without manually writing the program file, and the operation is simple and the required time is short, the overall efficiency of the deformation special effect is improved, and the accuracy of the deformation special effect is effectively guaranteed.
  • FIG. 15 is a schematic structural diagram of another embodiment of a device for generating a variant effect file package according to the present application. As shown in FIG. 15, the generating apparatus of this embodiment further includes: an adding module for adding at least one deformed area, as compared with the embodiment shown in FIG. 14.
  • the first acquisition module is configured to: acquire parameter values of the deformation effect parameters of the plurality of deformation regions in batches; and/or acquire at least some of the plurality of deformation regions respectively.
  • a parameter value of the deformation effect parameter of the deformation region; and/or a parameter value of the deformation effect parameter of the other deformation region and the other deformation region is obtained by copying a deformation region.
  • the method further includes: an operation bar, including an interaction interface, configured to receive a deformation region addition instruction input through the interaction interface, and add At least one deformation region generates a deformation effect parameter setting interface of the deformation region, and displays a deformation effect parameter setting interface of the deformation region under the operation column.
  • the first obtaining module is configured to: obtain a parameter value of a deformation effect parameter of the deformation region through the deformation effect parameter setting interface.
  • the first obtaining module is configured to: acquire a position parameter of the deformed region by moving the deformed region on the reference image; and/or obtain a range of the deformed region by adjusting a size of the deformed region; and / or, by adjusting the deformation curve for controlling the deformation effect, obtaining the parameter value of the deformation effect parameter of the deformation region; and/or obtaining the deformation effect parameter of the deformation region by receiving the parameter value of the deformation effect control parameter The parameter value.
  • the first obtaining module is configured to: in response to receiving the parameter value of the deformation effect parameter sent by the interaction interface in the deformation effect parameter setting interface of the deformation region, using the set parameter value as the deformation region a parameter value of the deformation effect parameter; and/or, in response to not receiving the parameter value of the deformation effect parameter sent by the interaction interface in the deformation effect parameter setting interface of the deformation region, using the preset parameter value as the deformation effect parameter of the deformation region The parameter value.
  • the method further includes: a deleting module, configured to receive a deformation area deletion instruction input through an interaction interface of the operation bar, and delete the deformation The parameter value of the deformation effect parameter of the area and the deformation area.
  • the positions of the plurality of key points may be preset in order to establish a correspondence relationship between the deformed area and the at least one key point, thereby correspondingly aligning the two.
  • at least one key point may be directly selected from a preset set of key points to establish a correspondence relationship between the deformation region and at least one key point.
  • multiple key points may be defined for the face and the gesture (hand) based on face detection and gesture detection, respectively, to implement the deformation effect generation, and to establish the deformation area and the face key point or The correspondence between the key points of the gesture.
  • the establishing module is configured to: establish a correspondence between a position reference point of the deformed area and at least one key point; and/or establish a position reference point between the deformed area and a central key point of the detection frame Correspondence.
  • the preset key points in the position parameter include: two key points of the predetermined key points located on the boundary of the deformation area and passing through the center point of the deformation area.
  • the establishing module is configured to establish a correspondence between the deformed region and the above-mentioned two key points on the boundary of the deformed region and connected to the center point of the deformed region.
  • a content display field for displaying a reference image may be further included.
  • the reference image may be, for example, at least a part of an image of a reference character, such as any one or more of the following: a complete image, a head image, a face image, a shoulder image, an arm image, a gesture image , waist image, leg image, foot image, and more.
  • the operation bar is further configured to: receive an input point reference display instruction through an interactive interface, such as the interaction interface 24 in FIG. 2, display a key point on the reference image; and/or receive The reference point close command input through the interactive interface does not display the key points on the reference image.
  • the content display bar is further configured to display a deformation effect of the deformation region in the content display column according to the parameter value of the deformation effect parameter of the deformation region.
  • the content display bar is further configured to receive a position moving operation on the deformed area.
  • the apparatus of the embodiment may further include: a first updating module, configured to update a display position of the deformed area in the content display column according to the position moving operation of the deformed area received by the content display column, The corresponding parameter values in the deformation effect parameter of the deformation region are updated.
  • the content display bar is further configured to receive a resizing operation on the deformed area.
  • the apparatus of the embodiment may further include: a second update module, configured to update a display size of the deformed area in the content display column according to the size adjustment operation of the deformed area received by the content display column, The corresponding parameter values in the deformation effect parameter of the deformation region are updated.
  • the operation bar is further configured to receive a layer parameter adjustment instruction for two or more deformation regions through an interaction interface, such as the interaction interface 25 in FIG. 2 .
  • the apparatus of this embodiment may further include: an adjustment module, configured to adjust two or more layer parameter adjustment instructions for two or more deformation regions according to the interaction interface of the operation bar.
  • the first generating module is further configured to generate a special effect program file of the deformed area according to the preset parameter values of the deformation effect program file and the deformation effect parameter of the deformation area, and pass the program file.
  • the bar displays the effect file for the deformed area.
  • the apparatus of this embodiment may further include: a program file bar for displaying an effect program file of the deformed area.
  • the variant effect program file may include, for example, a special effect program file generated by the json program.
  • the apparatus for generating a modified special program package of the foregoing embodiments of the present application may further include: an operation interface, where the operation interface includes: the operation column, the content display column, and/or the program file column. .
  • the operator interface includes three regions of the left, middle, and right sides.
  • the left side of the operation interface is an operation bar
  • the middle of the operation interface is a content display column
  • the right side of the operation interface is a program file column.
  • the apparatus for generating a modified special program package of the above embodiments of the present application may further include: a saving module, configured to save the modified special effect program file package at a location pointed by the save instruction according to the received save instruction. .
  • the saving module is configured to: in response to receiving the save instruction, display the save path selection interface and the compression interface; receive the save location sent by the save path selection interface; and receive the compression mode sent by the compression interface, and
  • the deformation effect file package is compressed according to the compression method to generate a compressed file package; and the compressed file package is stored in a folder pointed to by the save location.
  • FIG. 16 is a schematic structural diagram of an embodiment of a deformation special effect generating apparatus of the present application.
  • the variant special effect generating apparatus of each embodiment of the present application can be used to implement the above-described variant special effect generating method of the present application.
  • the variant special effect generating device of each embodiment of the present application may be, for example, an AR engine or an electronic device having an AR drawing function (such as an electronic device provided with an AR engine).
  • the variant special effect generating apparatus of this embodiment includes: a second acquiring module and a second generating module. among them:
  • the second obtaining module is configured to acquire a parameter value of a deformation effect parameter of the deformation region.
  • the second generating module is configured to generate a special effect of the deformation effect on the image to be processed based on the parameter values of the key points of the image to be processed and the deformation effect parameter of the deformation region.
  • the deformation special effect generating device acquires a parameter value of a deformation effect parameter of the deformation region, based on the key point in the image to be processed and the parameter value of the deformation effect parameter of the deformation region, on the image to be processed Generate special effects for deformation effects.
  • the parameter value of the deformation effect parameter of the deformation region in the deformation special effect program file package is generated, the key point detection is performed on the image, the deformation special effect is generated on the image, the deformation effect of the image is realized, and the image playback is improved. effect.
  • FIG. 17 is a schematic structural diagram of another embodiment of a variant special effect generating apparatus of the present application.
  • the variant special effect generating apparatus of the embodiment further includes: an importing module for importing the deformed special effect program file package.
  • the second generation module is configured to acquire a parameter value of a deformation effect parameter of the deformation region in the deformation effect program file package.
  • the modified special effect program file package is a modified special effect program file package generated by the method or device for generating a modified special effect program file package according to any of the above embodiments of the present application.
  • the method further includes: a first detecting module, configured to detect a key point in the image to be processed.
  • the first detecting module may include: a neural network, configured to perform key point detection related to the corresponding relationship of the image to be processed, and output a key point detection result.
  • the key point detection result includes, for example, but not limited to, any one or more of the following: a position of a key point involved in the correspondence relationship in the image to be processed; and a preset number of the key point involved in the correspondence relationship.
  • the parameter value of the deformation effect parameter of the deformation region may include a correspondence between the deformation region and the predetermined at least one key point.
  • the import module is configured to: read the deformed special effect program file package into the memory by calling the first interface function for reading the deformed area; and parse the deformation special effect program file package to obtain the deformation special effect program file,
  • the deformation effect program file includes parameter values of the deformation effect parameter.
  • the variant effect program file may include, for example, a special effect program file generated by a json program or any other program.
  • the second obtaining module is configured to: create a sticker handle by using a second interface function for creating a sticker handle; and read a parameter value of a deformation effect parameter of the deformation region in the deformation effect program file, and store the parameter value Sticker handles.
  • the second generating module is configured to: read, by using a third interface function for calling the rendering deformation region, the deformation region that needs to be displayed on the image to be processed from the sticker handle; according to the image to be processed The key point and the parameter value of the deformation effect parameter of the deformation area to be displayed, determine the display position of the deformation area on the image to be processed; and display the deformation area on the image to be processed according to the display position of the deformation area on the image to be processed On the display position.
  • the second generation module may be further configured to acquire the number of video frames displayed in the video of the image to be processed in the deformed region, and read the video from the video in advance. The image corresponding to the number of frames.
  • the second obtaining module is further configured to: in response to the deformation of the special effect program file package being played, destroying the sticker handle by using a fourth interface function for calling the destruction of the sticker handle.
  • the deformation effect parameter may include a trigger action parameter
  • the trigger action parameter is used to indicate a trigger action that triggers the display deformation effect.
  • the method further includes: a second detecting module, configured to detect whether a triggering action corresponding to the parameter value of the triggering action parameter occurs in the image to be processed.
  • the second generating module is configured to: in response to detecting a triggering action corresponding to the parameter value of the triggering action parameter in the image to be processed, based on the deformation effect parameter of the key point and the deformation region in the image to be processed The parameter value, the special effect of the deformation effect generated on the image to be processed.
  • the deformation effect parameter may include: a beauty/beauty (beauty and/or beauty) effect parameter, and the beauty/beauty effect parameter is used to indicate that the deformation effect is at a preset position.
  • the beauty/beauty effect of the display may be further configured to generate a special effect of the deformation effect on the image to be processed based on the parameter values of the deformation effect parameter of the key point and the deformation area in the image to be processed to be processed, according to Beauty/Beauty effect parameters, showing beauty/beauty effects in the image to be processed.
  • another electronic device provided by the embodiment of the present application includes:
  • a memory for storing a computer program
  • the processor is configured to execute a computer program stored in the memory, and when the computer program is executed, implement a method for generating a modified special effect file package or a deformation special effect generating method according to any one of the embodiments of the present application.
  • FIG. 18 is a schematic structural diagram of an application embodiment of an electronic device according to the present application.
  • the electronic device includes one or more processors, a communication unit, etc., such as one or more central processing units (CPUs), and/or one or more images.
  • processors such as one or more central processing units (CPUs), and/or one or more images.
  • a processor GPU or the like, the processor can perform various appropriate actions and processes according to executable instructions stored in a read only memory (ROM) or executable instructions loaded from a storage portion into a random access memory (RAM) .
  • ROM read only memory
  • RAM random access memory
  • the communication portion may include, but is not limited to, a network card, which may include, but is not limited to, an IB (Infiniband) network card, and the processor may communicate with the read only memory and/or the random access memory to execute executable instructions, and connect to the communication portion through the bus. And communicating with the other target device by the communication unit, so as to complete the operation corresponding to any method provided by the embodiment of the present application, for example, acquiring a parameter value of the deformation effect parameter of the at least one deformation region; establishing at least one of the deformation region and the predetermined Corresponding relationship between at least one key point; generating a deformation effect program file package according to at least one of the deformation regions and the corresponding relationship obtained by acquiring the parameter value. For another example, the parameter value of the deformation effect parameter of the deformation region is acquired; and the special effect of the deformation effect is generated on the image based on the key point in the image to be processed and the parameter value of the deformation effect parameter of the deformation region.
  • a network card
  • the CPU, ROM, and RAM are connected to each other through a bus.
  • the ROM is an optional module.
  • the RAM stores executable instructions or, at runtime, writes executable instructions to the ROM, the executable instructions causing the processor to perform operations corresponding to any of the methods described herein.
  • An input/output (I/O) interface is also connected to the bus.
  • the communication unit can be integrated or set up with multiple sub-modules (eg multiple IB network cards) and on the bus link.
  • the following components are connected to the I/O interface: an input portion including a keyboard, a mouse, and the like; an output portion including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker; a storage portion including a hard disk or the like; The communication part of the network interface card of the LAN card, modem, etc.
  • the communication section performs communication processing via a network such as the Internet.
  • the drive is also connected to the I/O interface as needed.
  • a removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like is mounted on the drive as needed so that a computer program read therefrom is installed into the storage portion as needed.
  • FIG. 18 is only an optional implementation manner. In practice, the number and types of components in FIG. 18 may be selected, deleted, added, or replaced according to actual needs; Functional components can also be implemented in separate settings or integrated settings, such as GPU and CPU detachable settings or GPU can be integrated on the CPU, the communication can be separated, or integrated on the CPU or GPU, etc. Wait. These alternative embodiments are all within the scope of protection disclosed herein.
  • an embodiment of the present application includes a computer program product comprising a computer program tangibly embodied on a machine readable medium, the computer program comprising program code for executing the method illustrated in the flowchart, the program code comprising The instructions corresponding to the steps of the face anti-counterfeiting detection method provided by the embodiment of the present application are executed.
  • the computer program can be downloaded and installed from the network via a communication portion, and/or installed from a removable medium.
  • the embodiment of the present application further provides a computer program, including a computer instruction, when the computer instruction is run in a processor of the device, to implement a method for generating a deformation special effect file package according to any embodiment of the present application, or Deformation effect generation method.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer program is stored, and when the computer program is executed by the processor, the generation of the variant special effect file package described in any embodiment of the present application is implemented. Method, or deformation effect generation method.
  • the methods and apparatus of the present application may be implemented in a number of ways.
  • the methods and apparatus of the present application can be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware.
  • the above-described sequence of steps for the method is for illustrative purposes only, and the steps of the method of the present application are not limited to the order described above unless otherwise specifically stated.
  • the present application can also be implemented as a program recorded in a recording medium, the programs including machine readable instructions for implementing the method according to the present application.
  • the present application also covers a recording medium storing a program for executing the method according to the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请实施例公开了一种变形特效程序文件包的生成及变形特效生成方法与装置,其中,变形特效程序文件包的生成方法包括:获取至少一变形区域的变形效果参数的参数值;建立至少一所述变形区域和预定的至少一关键点之间的对应关系;根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包。本申请实施例无需通过手动书写程序文件,便可生成渲染引擎可执行的变形特效程序文件,操作简单、所需时间短,提升了变形特效实现的整体效率,有效保障了变形特效的准确性。

Description

变形特效程序文件包的生成及变形特效生成方法与装置
本申请要求在2018年02月07日提交中国专利局、申请号为CN201810123074.2、发明名称为“变形特效程序文件包的生成及变形特效生成方法与装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机视觉技术,尤其是一种变形特效程序文件包的生成及变形特效生成方法与装置。
背景技术
增强现实技术(Augmented Reality,AR),是一种将真实世界信息和虚拟世界信息“无缝”集成的新技术,是把原本在现实世界的一定时间空间范围内的实体信息,模拟仿真后再叠加虚拟信息,将虚拟信息应用到真实世界,将真实世界的人物、环境和虚拟的物体实时地叠加到了同一个画面或空间同时存在,从而达到超越现实的感官体验。
发明内容
本申请实施例提供一种变形特效程序文件包生成的技术方案和一种变形特效生成的技术方案。
根据本申请实施例的一个方面,提供的一种变形特效程序文件包的生成方法,包括:
获取至少一变形区域的变形效果参数的参数值;
建立至少一所述变形区域和预定的至少一关键点之间的对应关系;
根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包。
根据本申请实施例的另一个方面,提供的一种变形特效生成方法,还包括:
获取变形区域的变形效果参数的参数值;
基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效。
根据本申请实施例的又一个方面,提供的一种变形特效程序文件包的生成装置,包括:
第一获取模块,用于获取至少一变形区域的变形效果参数的参数值;
建立模块,用于建立至少一所述变形区域和预定的至少一关键点之间的对应关系;
第一生成模块,用于根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包。
根据本申请实施例的又一个方面,提供的一种变形特效生成装置,包括:
第二获取模块,用于获取变形区域的变形效果参数的参数值;
第二生成模块,用于基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效。
根据本申请实施例的再一个方面,提供的一种电子设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行所述存储器中存储的计算机程序,且所述计算机程序被执行时,实现本申请任一实施例所述的方法。
根据本申请实施例的再一个方面,提供的一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时,实现本申请任一实施例所述的方法。
根据本申请实施例的再一个方面,提供的一种计算机程序,包括计算机指令,当所述计算机指令在设备的处理器中运行时,实现本申请任一实施例所述的方法。
基于本申请上述实施例提供的变形特效程序文件包的生成方法与装置、电子设备、程序和介质,获取至少一变形区域的变形效果参数的参数值,建立至少一所述变形区域和预定的至少一关键点之间的对应关系,并根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包,以便基于该变形特效程序文件包对图像添加变形效果、实现图像的变形特效,本申请实施例无需通过手动书写程序文件,便可生成渲染引擎可执行的变形特效程序文件,操作简单、所需时间短,提升了变形特效实现的整体效率,有效保障了变形特效的准确性。
基于本申请上述实施例提供的变形特效生成方法与装置、电子设备、程序和介质,获取变形区域的变形效果参数的参数值,基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效。本申请实施例通过预先生成的变形特效程序文件包中变形区域的变形效果参数的参数值、对图像进行关键点检测,在图像上生成变形特效,实现了图像的变形特效,提升了图像的播放效果。
下面通过附图和实施例,对本申请的技术方案做进一步的详细描述。
附图说明
构成说明书的一部分的附图描述了本申请的实施例,并且连同描述一起用于解释本申请的原理。
参照附图,根据下面的详细描述,可以更加清楚地理解本申请,其中:
图1为本申请变形特效程序文件包的生成方法一个实施例的流程图。
图2为本申请实施例中变形特效程序文件包的生成装置的一个操作界面示例图。
图3为本申请实施例中变形区域的变形效果参数设置界面的一个示例性示意图。
图4为本申请实施例中脸部关键点的一个示例性示意图。
图5为本申请实施例中变形曲线调整窗口的一个示例性示意图。
图6为本申请实施例中变形效果为向外拉伸的一个变形效果示意图。
图7分别为本申请实施例中变形效果为向内拉伸的一个变形效果示意图。
图8为本申请实施例中模式切换参数在中心点简单拉伸模式下的一个变形效果示意图。
图9为本申请实施例中模式切换参数在径向偏移拉伸模式下的一个变形效果示意图。
图10为本申请实施例中手部动作的一个示例性示意图。
图11为本申请变形特效程序文件包的生成方法再一实施例的流程图。
图12为本申请变形特效生成方法一个实施例的流程图。
图13为本申请变形特效生成方法另一个实施例的流程图。
图14为本申请变形特效程序文件包的生成装置一个实施例的结构示意图。
图15为本申请变形特效程序文件包的生成装置另一个实施例的结构示意图。
图16为本申请变形特效生成装置一个实施例的结构示意图。
图17为本申请变形特效生成装置另一个实施例的结构示意图。
图18为本申请电子设备一个应用实施例的结构示意图。
具体实施方式
现在将参照附图来详细描述本申请的各种示例性实施例。应注意到:除非另外说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本申请的范围。
还应理解,在本申请实施例中,“多个”可以指两个或两个以上,“至少一个”可以指一个、两个或两个以上。
本领域技术人员可以理解,本申请实施例中的“第一”、“第二”等术语仅用于区别不同步骤、设备或模块等,既不代表任何特定技术含义,也不表示它们之间的必然逻辑顺序。
还应理解,对于本申请实施例中提及的任一部件、数据或结构,在没有明确限定或者在前后文给出相反启示的情况下,一般可以理解为一个或多个。
还应理解,本申请对各个实施例的描述着重强调各个实施例之间的不同之处,其相同或相似之处可以相互参考,为了简洁,不再一一赘述。
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本申请及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
另外,公开中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中字符“/”,一般表示前后关联对象是一种“或”的关系。
本申请实施例可以应用于终端设备、计算机系统、服务器等电子设备,其可与众多其它通用或专用计算系统环境或配置一起操作。适于与终端设备、计算机系统、服务器等电子设备一起使用的众所周知的终端设备、计算系统、环境和/或配置的例子包括但不限于:个人计算机系统、服务器计算机系统、瘦客户机、厚客户机、手持或膝上设备、基于微处理器的系统、机顶盒、可编程消费电子产品、网络个人电脑、小型计算机系统﹑大型计算机系统和包括上述任何系统的分布式云计算技术环境,等等。
终端设备、计算机系统、服务器等电子设备可以在由计算机系统执行的计算机系统可执行指令(诸如程序模块)的一般语境下描述。通常,程序模块可以包括例程、程序、目标程序、组件、逻辑、数据结构等等,它们执行特定的任务或者实现特定的抽象数据类型。计算机系统/服务器可以在分布式云计算环境中实施,分布式云计算环境中,任务是由通过通信网络链接的远程处理设备执行的。在分布式云计算环境中,程序模块可以位于包括存储设备的本地或远程计算系统存储介质上。
图1为本申请变形特效程序文件包的生成方法一个实施例的流程图。本申请各实施例变形特效程序文件包的生成方法,例如可以通过但不限于一个变形装置(本申请实施例称为变形特效程序文件包的生成装置)实现。如图1所示,该实施例变形特效程序文件包的生成方法包括:
102,获取至少一变形区域的变形效果参数的参数值。
在一个可选示例中,该操作102可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第一获取模块执行。
104,建立至少一变形区域和预定的至少一关键点之间的对应关系。
在一个可选示例中,该操作104可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的建立模块执行。
106,根据获取有参数值的至少一变形区域以及该至少一变形区域和预定的至少一关键点之间的对应关系,生成变形特效程序文件包。
在一个可选示例中,该操作106可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第一生成模块执行。
在本申请各实施例中,变形区域的形状不受限制,例如可以是圆形、椭圆形、长方形、正方形、三角形、或者其他任意形状等。
在本申请各实施例中,变形区域可以是一个,也可以是多个。变形区域为多个时,可以分别针对各变形区域执行操作102-104,即:分别获取各变形区域的变形效果参数的参数值、并建立各变形区域和预定的至少一关键点之间的对应关系,然后针对该多个变形区域执行操作106,由多个变形区域的变形效果参数的参数值及其对应关系生成一个变形特效程序文件包。
本申请实施例中,变形特效程序文件包可用于对图像的变形特效处理,在图像上生成变形区域的变形效果(也称为: 变形特效),例如,对视频图像进行AR效果的渲染处理。
基于本申请上述实施例提供的变形特效程序文件包的生成方法,获取至少一变形区域的变形效果参数的参数值,建立至少一所述变形区域和预定的至少一关键点之间的对应关系,并根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包,以便基于该变形特效程序文件包对图像添加变形效果、实现图像的变形特效,本申请实施例无需通过手动书写程序文件,便可生成渲染引擎可执行的变形特效程序文件,操作简单、所需时间短,提升了变形特效实现的整体效率,有效保障了变形特效的准确性。
在本申请变形特效程序文件包的生成方法的另一个实施例中,在操作102获取至少一变形区域的变形效果参数的参数值之前,还可以包括:添加上述至少一变形区域。
在本申请各变形特效程序文件包的生成方法实施例的其中一个实施方式中,变形区域为多个时,操作102可以包括:批量获取多个变形区域的变形效果参数的参数值;和/或,分别获取多个变形区域中至少部分变形区域的变形效果参数的参数值;和/或,通过复制一变形区域的方式来获得另一变形区域及该另一变形区域的变形效果参数的参数值。
在本申请各实施例的一个实施方式中,变形特效程序文件包的生成装置中可以包括预先设置的特效程序文件,其例如可以是基于JavaScript语言的轻量级的数据交换格式(JavaScript Object Notiation,json)文件、或者其他任意可执行程序文件。该特效程序文件中变形效果参数的参数值可以空缺或者被预设为默认值,接收到针对变形区域的变形效果参数设置的参数值时,该特效程序文件中的相应参数值被自动更新为接收到的参数值。可选地,上述变形特效程序文件包的生成装置可以包括操作界面,操作界面上包括操作栏,该操作栏中设置有至少一个交互接口,用于接收针对变形区域的变形效果设置的参数值;另外,该变形特效程序文件包的生成装置的操作界面还可以包括程序文件显示栏,用于显示变形区域的变形效果的程序文件。如图2所示,为本申请实施例中特效程序文件包的生成装置的一个操作界面示例图。其中的“deformation”表示变形特效或者变形效果。该特效程序文件包的生成装置启动后,对应于操作栏中一个变形区域的变形效果参数设置界面,程序文件显示栏显示该变形区域的变形效果参数空缺或者被预设为默认值时的特效程序文件,通过操作栏的交互接口接收到针对一个变形区域的变形效果参数设置的参数值时,将该变形区域的变形效果参数的参数值更新为最近接收到的参数值,程序文件显示栏实时显示参数值更新后的特效程序文件。
本申请实施例无需通过手动书写程序文件生成渲染引擎可执行文件,基于用户的在操作栏中对变形区域的变形效果参数的参数值的设置操作便可以实现变形特效程序包的生成,操作简单、所需时间短,提升了变形特效实现的整体效率,有效保障了变形效果的准确性。
如图2所示,作为本申请各实施例的一个可选示例而非限制,操作栏中可以包括变形效果参数设置界面,其包括至少一个交互接口;另外还可以包括其他的区域,例如变形区域的名称显示区域,此时的变形效果参数设置界面可以是各变形区域的变形效果参数设置界面。如图3所示,为本申请实施例中,名称为“round0”的变形区域的变形效果参数设置界面的一个示例性示意图。
在本申请变形特效程序文件包的生成方法的又一个实施例中,在操作102获取至少一变形区域的变形效果参数的参数值之前,还可以包括:接收通过操作栏的交互接口输入的变形区域添加指令,添加上述至少一个变形区域,生成变形区域的变形效果参数设置界面,并在操作栏下显示变形区域的变形效果参数设置界面。例如,可以通过点击操作栏中的变形特效“deformation”等控制按钮,添加一个或多个变形区域。相应地,该实施例中,操作102中,获取变形区域的变形效果参数的参数值,可以包括:经变形效果参数设置界面获取变形区域的变形效果参数的参数值。
另外,在本申请变形特效程序文件包的生成方法的再一个实施例中,操作102中,获取变形区域的变形效果参数的参数值,可以包括:通过在参考图像上移动变形区域的方式,获取变形区域的位置参数;和/或,通过调整变形区域的大小,获取变形区域的范围;和/或,通过调整用于控制变形效果的变形曲线的方式,获取变形区域的变形效果参数的参数值;和/或,通过接收变形效果控制参数的参数值的方式,获取变形区域的变形效果参数的参数值。
在其中一个可选示例中,获取变形区域的变形效果参数的参数值,可以通过如下方式实现:响应于接收到通过变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以设置的参数值作为变形区域的变形效果参数的参数值;和/或,响应于未接收到通过变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以预设参数值作为变形区域的变形效果参数的参数值。
另外,在本申请变形特效程序文件包的生成方法的再一个实施例中,还可以包括:接收通过操作栏的交互接口输入的变形区域删除指令,删除该变形区域删除指令针对的变形区域和变形区域的变形效果参数的参数值。
在本申请各实施例的一个实施方式中,上述关键点例如可以包括但不限于以下任意一种或多种:头部关键点,脸部关键点,肩部关键点,手臂关键点,手势关键点,腰部关键点,腿部关键点,脚部关键点,人体骨骼关键点,等等。
在其中一个可选示例中,头部关键点例如可以包括但不限于以下任意一项或多项:头顶关键点,鼻尖关键点,以及下巴关键点,等等。
在其中一个可选示例中,脸部关键点例如可以包括但不限于以下任意一项或多项:脸部轮廓关键点,眼睛关键点,眉毛关键点,鼻子关键点,嘴部关键点,等等。
示例性地,眼睛关键点例如可以包括但不限于以下任意一项或多项:左眼眶关键点,左眼瞳孔中心关键点,左眼中心关键点,右眼眶关键点,右眼瞳孔中心关键点,以及右眼中心关键点,等等。眉毛关键点例如可以包括但不限于以下任意一项或多项:左眉毛关键点以及右眉毛关键点,等等。鼻子关键点例如可以包括但不限于以下任意一项或多项:鼻梁关键点,鼻子下沿关键点,以及鼻子外侧轮廓关键点,等等。嘴部关键点例如可以包括但不限于以下任意一项或多项:上嘴唇关键点,以及下嘴唇关键点,等等。
在其中一个可选示例中,肩部关键点例如可以包括但不限于以下任意一项或多项:位于肩部与头部交汇位置处的肩头交汇关键点,以及位于臂根轮廓关键点与肩头交汇关键点之间的中点位置处的肩轮廓中点关键点,等等。
在其中一个可选示例中,手臂关键点例如可以包括但不限于以下任意一项或多项:手腕轮廓关键点,胳膊肘轮廓关键点,臂根轮廓关键点,位于手腕轮廓关键点与胳膊肘轮廓关键点之间的中点位置处的小臂轮廓中点关键点,以及位于胳膊肘轮廓关键点与臂根轮廓关键点之间的中点位置处的大臂中点关键点,等等。
在其中一个可选示例中,手势关键点例如可以包括但不限于以下任意一项或多项:手势框(即:手势检测框)的四 个顶点关键点,以及手势框的中心关键点,等等。
在其中一个可选示例中,腿部关键点例如可以包括但不限于以下任意一项或多项:裆部关键点,膝盖轮廓关键点,脚踝轮廓关键点,大腿根部外侧轮廓关键点,位于膝盖轮廓关键点与脚踝轮廓关键点之间的中点位置处的小腿轮廓中点关键点,位于膝盖内轮廓关键点与裆部关键点之间的中点位置处的大腿内轮廓中点关键点,以及位于膝盖外轮廓关键点与大腿根部外侧轮廓关键点之间的中点位置处的大腿外轮廓中点关键点,等等。
在其中一个可选示例中,腰部关键点例如可以包括但不限于以下任意一项或多项:将大腿根部外侧轮廓关键点与臂根轮廓关键点之间N等分,所产生的N个等分点;其中,N大于1。
在其中一个可选示例中,脚部关键点例如可以包括但不限于以下任意一项或多项:脚尖关键点以及足跟关键点,等等。
在其中一个可选示例中,人体骨骼关键点例如可以包括但不限于以下任意一项或多项:右肩骨骼关键点,右肘骨骼关键点,右腕骨骼关键点,左肩骨骼关键点,左肘骨骼关键点,左腕骨骼关键点,右髋骨骼关键点,右膝骨骼关键点,右踝骨骼关键点,左髋骨骼关键点,左膝骨骼关键点,左踝骨骼关键点,头顶骨骼关键点,以及脖子骨骼关键点,等等。
在本申请各实施例中,可以预先设置多个关键点的位置,以便建立变形区域和至少一关键点之间的对应关系,从而将二者进行位置关系对应。设置一个变形区域的变形效果参数的参数值时,可以直接从预先设置的关键点集合中选取至少一关键点从而建立该变形区域和至少一关键点之间的对应关系
例如,在其中一个实施方式中,可以基于人脸检测和手势检测,分别针对脸部和手势(手部)定义多个关键点,以实现变形特效生成中,建立变形区域与人脸关键点或者手势关键点之间的对应关系。
例如,图4为本申请实施例中脸部关键点的一个示例性示意图,结合图4,在一个可选示例中,可以对脸部关键点进行如下定义:
关键点项目 关键点编号 关键点项目 关键点编号
脸框(脸部轮廓关键点) 0-32 鼻梁 43-46
左眉毛 33-37,64-67 右眉毛 38-42,68-71
左眼眶 52-57,72-73 右眼眶 58-63,75-76
左眼瞳孔 74,104, 右眼瞳孔 77,105
鼻子下沿 47-51 鼻子外侧轮廓 78-83
上嘴唇 84-90,96-100 下嘴唇 91-95,101-103
在一个可选示例中,可以对手部关键点进行如下定义:
关键点项目 关键点编号 关键点项目 关键点编号
手势框 110-113 中心 114
其中,编号110-113的关键点分别为手势检测框(即手部的外接框)的四个顶点,编号114的关键点为手势检测框的中心。
在本申请各实施例的一个实施方式中,操作104中,建立变形区域和预定的至少一关键点之间的对应关系,可以包括:建立变形区域的位置参考点和至少一关键点之间的对应关系;和/或,建立变形区域的位置参考点和检测框的中心关键点之间的对应关系。
例如,在本申请上述实施例建立的对应关系中关键点为头部关键点、脸部关键点、肩部关键点、手臂关键点、腰部关键点、腿部关键点、脚部关键点、人体骨骼关键点时,可以建立变形区域的位置参考点(例如变形区域的中心点、圆形变形区域的圆形边界上过圆心的两个点、方形变形区域的四个顶点等)和上述关键点中至少一关键点之间的对应关系;在本申请上述实施例建立的对应关系中关键点为头部关键点、脸部关键点、手势关键点、人体骨骼关键点时,可以建立变形区域的位置参考点和对应的检测框(例如,头部检测框、人脸检测框、手势检测框、人体检测框)的中心关键点之间的对应关系。
在本申请各实施例的一个实施方式中,上述变形区域的变形效果参数例如可以包括但不限于以下任意一项或多项:
1,显示参数(Display):用于控制是否显示变形区域的变形效果。其参数值包括“是(Yes)”和“否(No)”两个选项,参数值选择“是(Yes)”时表示在图像上述显示变形区域的变形效果,参数值选择“否(No)”时表示不在图像上显示变形区域的变形效果;
2,触发动作参数(TriggerType):用于表示触发显示变形区域的变形效果的触发动作,是指通过什么动作触发显示变形区域的变形效果,其参数值可以包括各触发动作,用户可以从预设动作集合中选择至少一个动作作为触发动作。即:在视频或图像中检测到相应的触发动作时可触发显示相应变形区域的变形效果,例如,检测到视频图像中出现该触发动作参数中规定的触发动作“张嘴”时开始在嘴部显示变形区域的变形效果,该变形区域的变形效果的开始显示时间、结束显示时间、显示多久等,可以根据其他参数的参数值确定,例如可以分别根据延迟触发参数、触发结束参数确定;
3,循环参数(TriggerLoop):用于表示变形效果的循环播放次数。可以由用户循环次数,可以示例性地设置选择的次数为0时,表示一直显示变形特效;
4,迟触发参数(TriggerDelay):用于表示延迟显示变形区域的变形效果的时间,即:从视频图像中的某一帧检测到触发动作参数中的触发动作时,延迟多少帧开始显示该变形区域的变形效果,可以设置或选择延迟显示变形区域的变形效果的时间作为其参数值;
5,触发结束参数(TriggerStop):用于表示结束显示变形区域的变形效果的动作,是指通过什么动作结束显示变形区域的变形效果,其参数值包括各触发动作,用户可以从预设动作集合中选择至少一个动作作为结束显示变形区域的变形效果的动作。即:在视频或图像中检测到该触发结束参数规定的触发动作时可结束显示变形区域的变形效果,例如针对检测到视频图像中出现触发动作参数中规定的触发动作“张嘴”时开始在嘴部显示变形区域的变形效果,可以设置触发 结束参数中的参数值为“闭嘴”,则检测到视频图像中出现该“闭嘴”动作时,该变形区域的变形效果消失;
6,变形效果控制参数(Transform):用于控制变形区域的变形效果。在其中一个示例中,可以通过一个变形曲线控制变形区域的变形效果,可以通过点击交互接口中的改变(change)按钮,打开变形曲线调整窗口,调整变形曲线的参数从而改变变形效果。如图5所示,为本申请实施例中变形曲线调整窗口的一个示例性示意图,在其中一个实施方式中,变形曲线的参数包括以下任意一项或多项:用于控制变形效果的拉伸方向和拉伸半径的第一控制点参数;用于控制变形区域的中间区域的过渡平滑性的第二控制点参数;用于控制变形区域的边界区域过渡平滑性的第三控制点参数。其中,变形效果的拉伸方向可以包括:从变形区域的中心点向外拉伸,和/或,从变形区域的中心点向内拉伸。在其中一个可选示例中,该变形曲线由三个控制点参数对应的控制点控制,其中,第一个控制点用于控制变形效果的拉伸方向和拉伸半径、从而影响变形程度和变形区域的大小,第一控制点位于斜线1分割成的区域的右下角时,变形区域将从变形中心点向外拉伸,第一控制点位于斜线1分割成的区域的左上角部分时,变形区域将从圆的边界向变形中心点方向拉伸(即:向内拉伸),如图6和图7所示,分别为本申请实施例中变形效果为向外拉伸和向内拉伸的一个变形效果示意图;第一控制点与左下顶点之间直线段的长度控制从变形中心向外直线变形的区域大小,直线段越长,直线变形区域越大。第二控制点用于控制变形区域的中间区域的过渡平滑性。第二个控制点离第一个控制点越近,中间区域的变形效果越明显,反之,中间区域的过渡平滑性越好;第三个控制点用于变形区域的边界区域过渡平滑性(即:边界平滑效果)。第三个控制点离右上角越近,边界的变形效果越明显;否则,边界与圆外区域的过渡更平滑。用户可以通过调整三个控制点的位置改变变形显示效果,由于第一个控制点用于控制直线的斜率,第二个控制点和第三个控制点用于在直线斜率的基础上控制曲线的幅度,三个控制点的可移动位置将按参数关系受到一定约束;
7,显示尺寸参数(Scale):用于表示变形区域的大小变化的参考依据,用来实现变形区域近大远小的显示效果。该显示尺寸参数的参数值(即:变形区域的大小变化的参考依据)可以是预设关键点中的两个或以上关键点(可以表示为:PointA和PointB),此时,变形区域的大小将依据图像中作为参考依据的两个或以上关键点形成的大小的比例变化而变化;
8,位置参数(Position):用于表示变形区域与预设关键点之间的位置绑定关系,指在图像中变形区域和预设关键点的位置关系,可以选定变形区域和预设关键点中的哪些关键点的位置进行绑定。在其中一个可选示例中,该位置参数中的预设关键点可以包括:预设的关键点中的两个关键点,该两个关键点在变形区域的边界上、且连线经过变形区域的中心点;
9,旋转中心参数(RotateCenter):用于表示变形区域旋转依据的中心点,在其中一个可选示例中,该变形区域旋转依据的中心点为图像的中心点;
10,变形中心参数(TransformCenter):用于表示变形区域的中心点;
11,模式切换参数(Transfer):用于切换变形区域的中心点偏移模式。在其中一个可选示例中,变形区域的中心点偏移模式包括:中心点简单拉伸模式和径向偏移拉伸模式。可以通过如下两个参数值切换变形区域的中心点偏移两种模式:(1)Yes:表示中心点简单拉伸模式,可通过使用鼠标移动圆内变形中心点的位置来对变形区域拉伸;(2)No:径向偏移拉伸模式,在变形效果控制参数编辑的变形曲线基础上,对变形区域在变形圆内拉伸。如图8所示,为本申请实施例中模式切换参数在中心点简单拉伸模式下的一个变形效果示意图。如图9所示,为本申请实施例中模式切换参数在径向偏移拉伸模式下的一个变形效果示意图;
12,美颜/美妆(美颜和/或美妆)效果参数:用于表示显示变形效果时在预设部位显示的美颜/美妆效果,例如红唇、美瞳、蓝眼睛等。例如,显示变形效果时,在嘴部显示红唇。
在其中一个实施例中,上述位置参数中的预设关键点包括:预定的关键点中,位于变形区域的边界上、且连线经过变形区域的中心点的两个关键点。相应地,该实施例的操作104可以包括:建立变形区域和上述位于变形区域的边界上、且连线经过变形区域的中心点的两个关键点之间的对应关系。
在其中一个可选示例中,上述触发动作参数对应的触发动作包括以下任意一项或多项:
无动作触发(NULL),即:不需任何动作即可显示该子素材;
眼部动作,例如,眨眼、闭眼、睁眼等;
头部动作,例如,摇头、点头、歪头、转头等;
眉部动作,例如,挑眉等;
手部动作,例如,爱心手、托手、手掌、大拇哥、抱拳恭喜、单手比心、OK手、剪刀手、手枪手、食指等;
嘴部动作,例如,张嘴、闭嘴等;
肩部动作,例如,耸肩等;
其他动作。
如图10所示,为本申请实施例中手部动作的一个示例性示意图。
另外,再参见图2,本申请实施例的变形特效程序文件包的生成装置的操作界面还可以包括内容显示栏。相应地,在本申请变形特效程序文件包的生成方法又一个实施例中,还可以包括:通过内容显示栏显示参考图像。
示例性地,上述参考图像例如可以是:参考人物的至少一部分图像,例如参考人物的以下任意一项或多项:完整图像,头部图像,脸部图像,肩部图像,手臂图像,手势图像,腰部图像,腿部图像,脚部图像,等等。
另外,在本申请变形特效程序文件包的生成方法的又一个实施例中,还可以包括:接收通过操作栏的交互接口输入的参考点显示指令,显示参考图像上的关键点;和/或,接收通过操作栏的交互接口输入的参考点关闭指令,不显示参考图像上的关键点。
另外,在本申请变形特效程序文件包的生成方法的又一个实施例中,还可以包括:根据变形区域的变形效果参数的参数值,在内容显示栏显示变形区域的变形效果。例如,可以按照预先设置的变形区域的位置和大小,在内容显示栏显示该变形区域。
在内容显示栏显示变形区域的变形效果后,可以更改该变形区域在内容显示栏中的位置或者调整其大小。由此,在本申请进一步可选实施例中,还可以包括:根据通过内容显示栏接收到的对变形区域的位置移动操作,更新变形区域在 内容显示栏的显示位置,并对变形区域的变形效果参数中的相应参数值进行更新。和/或,还可以包括:根据通过内容显示栏接收到的对变形区域的大小调整操作,更新变形区域在内容显示栏的显示大小,并对变形区域的变形效果参数中的相应参数值进行更新。
例如,用户可以通过鼠标选中内容显示栏中显示的一个变形区域,将鼠标移动至该变形区域右下角的小框处,通过移动该小框缩放变形区域,从而调整该变形区域的大小;用户可以通过鼠标选中内容显示栏中显示的一个变形区域并直接移动其位置,将变形区域移动至正确或者想要的位置。在后续变形区域的变形特效程序文件包的播放中,该变形区域在播放终端上的位置、显示比例将会与在该内容显示栏中的位置、显示比例一致。
另外,在本申请变形特效程序文件包的生成方法的又一个实施例中,包括两个或以上变形区域时,可以调整该两个或以上变形区域之间的遮挡关系。由此,在本申请进一步可选实施例中,还可以包括:根据通过操作栏的交互接口接收到的针对两个或以上变形区域的图层参数调整指令,调整两个或以上变形区域之间的遮挡关系,并根据调整后的遮挡关系和两个或以上变形区域对应的变形参数的参数值显示两个或以上变形区域对应的变形效果。
另外,在本申请上述各变形特效程序文件包的生成方法实施例中,在生成变形特效程序文件包之前,还可以包括:根据预先设置的变形特效程序文件和变形区域的变形效果参数的参数值,生成变形区域的特效程序文件,并通过程序文件栏显示变形区域的特效程序文件。
其中的变形特效程序文件例如可以包括:以json程序或者其他任意程序生成的特效程序文件。
在本申请变形特效程序文件包的生成方法的再一个实施例中,还可以包括:变形特效程序文件包的生成装置根据接收到的启动指令启动,并显示操作界面,该操作界面包括:操作栏,内容显示栏和程序文件栏。
如图2所示,在其中一个可选示例中,上述操作界面包括左侧、中部和右侧三个区域。相应地,上述显示操作界面可以包括:在操作界面的左侧显示操作栏,在操作界面的中部显示内容显示栏,在操作界面的右侧显示所述程序文件栏。
其中,可通过左侧操作栏中的交互接口21对每个变形区域的变形效果参数设置参数值;内容显示栏以平均人脸为参考人脸,所有变形区域均直接显示,可通过鼠标移动显示的变形区域的位置;右侧的程序文件显示栏用于通过其中的显示区域22显示当前设置参数值的特效程序文件的内容,通过程序文件显示栏中的保存指令接口23可以导出变形特效程序文件包,即:生成并保存该变形特效程序文件包。
图11为本申请特效程序文件包的生成方法再一实施例的流程图。如图11所示,该实施例特效程序文件包的生成方法包括:
302,变形特效程序文件包的生成装置根据接收到的启动指令启动,并显示操作界面。
该操作界面包括:操作栏,内容显示栏和程序文件栏。
304,通过内容显示栏显示参考图像,并显示该参考图像上的关键点。
示例性地,上述参考图像例如可以是:参考人物的至少一部分图像。
在一个可选示例中,该操作304可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的操作界面或者操作界面中的内容显示栏执行。。
306,接收通过操作栏的交互接口输入的变形区域添加指令,添加变形区域,生成该变形区域的变形效果参数设置界面,并在操作栏下显示变形区域的变形效果参数设置界面。
在一个可选示例中,该操作306可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的添加模块和操作界面或者操作界面中的操作栏执行。
308,接收通过变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,并建立该变形区域和预定的至少一关键点之间的对应关系。
在一个可选示例中,该操作308可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的操作界面或者操作界面中的操作栏、和建立模块执行。
310,根据预先设置的特效程序文件和变形区域的变形效果参数的参数值,生成变形区域的特效程序文件,并通过程序文件栏显示变形区域的特效程序文件。
在本申请各实施例的一个实施方式中,特效程序文件例如可以包括但不限于:以json程序或其他可执行程序生成的特效程序文件。
需要添加多个变形区域时,分别针对各变形区域执行操作306-310。之后,针对所有变形区域执行操作312。
在一个可选示例中,该操作310可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第一生成模块和操作界面或者操作界面中的程序文件栏执行。
312,根据获取有参数值的至少一变形区域以及该至少一变形区域和预定的至少一关键点之间的对应关系,生成变形特效程序文件包。
在一个可选示例中,该操作312可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第一生成模块执行。
另外,基于本申请上述任一实施例生成变形特效程序文件包之后,还可以包括:根据接收到的保存指令,在该保存指令指向的位置保存该变形特效程序文件包。
在其中一个实施方式中,根据接收到的保存指令,在该保存指令指向的位置保存该变形特效程序文件包,可以包括:
响应于接收到保存指令,显示保存路径选择接口和压缩接口;
接收通过上述保存路径选择接口发送的保存位置;以及接收上述基于压缩接口发送的压缩方式,并根据该压缩方式对上述变形特效程序文件包进行压缩,生成压缩文件包;
将上述压缩文件包存储至上述保存位置指向的文件夹中。
在变形特效程序文件包的大小较大时,不适合在手机终端中运行,本申请实施例可以对特效程序文件包进行压缩后保存,以便于导入手机终端中进行变形特效生成。
基于本申请上述各实施例生成变形特效程序文件包后,便可以将该变形特效程序文件包导入终端中,对该终端播放的视频或图像进行变形特效生成。
图12为本申请变形特效生成方法一个实施例的流程图。本申请各实施例变形特效生成方法,例如可以通过但不限于一个装置(本申请实施例称为变形特效生成装置)实现。其中的变形特效生成装置例如可以是AR引擎或者具有AR绘制功能的电子设备(如设有AR引擎的电子设备)等。如图12所示,该实施例的变形特效生成方法包括:
402,获取变形区域的变形效果参数的参数值。
在一个可选示例中,该操作402可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第二获取模块执行。
404,基于待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效。
在一个可选示例中,该操作404可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第二生成模块块执行。
基于本申请上述实施例提供的变形特效生成方法,获取变形区域的变形效果参数的参数值,基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效。本申请实施例通过预先生成的变形特效程序文件包中变形区域的变形效果参数的参数值、对待处理图像进行关键点检测,在待处理图像上生成变形特效,实现了图像的变形特效,提升或丰富了图像的显示/播放效果和/或趣味性。
在本申请变形特效生成方法的另一个实施例中,在操作402获取变形区域的变形效果参数的参数值之前,还可以包括:导入变形特效程序文件包。相应地,该实施例的操作402中,获取变形特效程序文件包中变形区域的变形效果参数的参数值。示例性地,上述变形特效程序文件包可以但不限于采用本申请任一实施例的变形特效程序文件包的生成方法生成。
图13为本申请变形特效生成方法另一个实施例的流程图。如图13所示,该实施例的变形特效生成方法包括:
502,导入变形特效程序文件包。
在一个可选示例中,该操作502可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的导入模块执行。
504,获取变形区域的变形效果参数的参数值。
其中,变形区域的变形效果参数的参数值例如可以包括但不限于:变形区域和预定的至少一关键点之间的对应关系。
在一个可选示例中,该操作504可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第二获取模块执行。
506,检测待处理图像中的关键点。
在一个可选示例中,该操作506可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第一检测模块执行。
在本申请上述各变形特效生成方法实施例中,上述待处理图像例如可以包括但不限于以下任意一项或多项:静态图像,视频中的图像,等。
在其中一个实施方式中,可以通过神经网络,对待处理图像进行对应关系涉及的关键点检测,并输出关键点检测结果。其中的关键点检测结果,例如可以包括但不限于以下任意一项或多项:对应关系涉及的关键点在待处理图像中的位置;特效程序文件包中对应关系涉及的关键点的预设编号。
508,基于待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效。
在一个可选示例中,该操作508可以由处理器调用存储器存储的相应指令执行,也可以由被处理器运行的第二生成模块执行。
在其中一个实施方式中,可以通过如下方式导入变形特效程序文件包:通过调用用于读取变形区域的第一接口函数,将变形特效程序文件包读入内存;解析变形特效程序文件包,获得变形特效程序文件,变形特效程序文件包括变形效果参数的参数值。
示例性地,该变形特效程序文件例如可以包括:json程序或其他任意可以执行程序的变形特效程序文件。
在另一个实施方式中,可以通过如下方式获取变形区域的变形效果参数的参数值:通过用于创建贴纸句柄的第二接口函数创建贴纸句柄;读取变形特效程序文件中变形区域的变形效果参数的参数值、并存储至贴纸句柄中。
在又一个实施方式中,还可以包括:根据贴纸句柄中变形特效程序文件中变形区域的变形效果参数的参数值,获取变形区域在待处理图像中显示的位置。
可选地,在上述待处理图像为视频中图像时,上述各实施例的变形特效生成方法还可以包括:获取变形区域在待处理图像中显示的视频帧数,并预先从待处理图像所在视频中读取视频帧数对应的图像。
在又一个实施方式中,操作508基于待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效,可以包括:通过用于调用渲染变形区域的第三接口函数,从贴纸句柄中读取需要显示在待处理图像上的变形区域;根据待处理图像中的关键点和需要显示的变形区域的变形效果参数的参数值,确定变形区域在待处理图像上的显示位置;根据变形区域在待处理图像上的显示位置,将变形区域显示在待处理图像上的显示位置上。
另外,在进一步实施方式中,还可以包括:
响应于变形特效程序文件包播放完毕,通过用于调用销毁贴纸句柄的第四接口函数销毁贴纸句柄。
可选地,在本申请上述各变形特效生成方法实施例中,变形效果参数可以包括:触发动作参数,该触发动作参数用于表示触发显示变形效果的触发动作。相应地,该实施例的变形特效生成方法还可以包括:检测待处理图像中是否出现触发动作参数的参数值对应的触发动作。操作508基于待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效,可以包括:响应于检测到待处理图像中出现触发动作参数的参数值对应的触发动作,基于待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效。
可选地,在本申请上述各变形特效生成方法实施例中,变形效果参数可以包括:美颜/美妆(美颜和/或美妆)效果参数,该美颜/美妆效果参数用于表示显示变形效果时在预设部位显示的美颜/美妆效果。相应地,该实施例的变形特效生成方法还可以包括:基于待处理待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效时,根据美颜/美妆效果参数,在待处理图像显示美颜/美妆效果。
本申请各变形特效生成方法实施例可以用于各种待处理图像显示场景或视频播放场景,例如用于包含人物的视频直播场景,为该直播视频生成变形特效,例如在直播人物的耳朵、手、脸、头发、脖子、肩膀等部位上生成一个变形区域的变形效果;又例如用于包含人物的待处理图像,为该待处理图像生成变形特效,例如在待处理图像人脸的某局部部位上生成变形特效;等等。
本申请实施例提供的任一变形特效程序文件包的生成方法和变形特效生成方法可以由任意适当的具有数据处理能力的设备执行,包括但不限于:终端设备和服务器等。或者,本申请实施例提供的任一变形特效程序文件包的生成方法和变形特效生成方法可以由处理器执行,如处理器通过调用存储器存储的相应指令来执行本申请实施例提及的任一变形特效程序文件包的生成方法和变形特效生成方法。下文不再赘述。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
图14为本申请变形特效程序文件包的生成装置一个实施例的结构示意图。本申请各实施例的变形特效程序文件包的生成装置可用于实现本申请上述各变形特效程序文件包的生成方法。如图14所示,该实施例的变形特效程序文件包的生成装置包括:第一获取模块,建立模块和第一生成模块。其中:
第一获取模块,用于获取至少一变形区域的变形效果参数的参数值。
建立模块,用于建立至少一变形区域和预定的至少一关键点之间的对应关系。
第一生成模块,用于根据获取有参数值的至少一变形区域和对应关系,生成变形特效程序文件包。
基于本申请上述实施例提供的变形特效程序文件包的生成装置,获取至少一变形区域的变形效果参数的参数值,建立至少一所述变形区域和预定的至少一关键点之间的对应关系,并根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包,以便基于该变形特效程序文件包对图像添加变形效果、实现图像的变形特效,本申请实施例无需通过手动书写程序文件,便可生成渲染引擎可执行的变形特效程序文件,操作简单、所需时间短,提升了变形特效实现的整体效率,有效保障了变形特效的准确性。
图15为本申请变形特效程序文件包的生成装置另一个实施例的结构示意图。如图15所示,与图14所示的实施例相比,该实施例的生成装置还包括:添加模块,用于添加至少一变形区域。
在其中一个实施方式中,变形区域为多个时,第一获取模块用于:批量获取多个变形区域的变形效果参数的参数值;和/或,分别获取多个变形区域中至少部分所述变形区域的变形效果参数的参数值;和/或,通过复制一变形区域的方式来获得另一变形区域及该另一变形区域的变形效果参数的参数值。
另外,再参见图15,在本申请变形特效程序文件包的生成装置的另一个实施例中,还可以包括:操作栏,包括交互接口,用于接收通过交互接口输入的变形区域添加指令,添加至少一个变形区域,生成变形区域的变形效果参数设置界面,并在操作栏下显示变形区域的变形效果参数设置界面。相应地,该实施例中,第一获取模块用于:经变形效果参数设置界面获取变形区域的变形效果参数的参数值。
在其中一个实施方式中,第一获取模块用于:通过在参考图像上移动变形区域的方式,获取变形区域的位置参数;和/或,通过调整变形区域的大小,获取变形区域的范围;和/或,通过调整用于控制变形效果的变形曲线的方式,获取变形区域的变形效果参数的参数值;和/或,通过接收变形效果控制参数的参数值的方式,获取变形区域的变形效果参数的参数值。
在其中一个可选示例中,第一获取模块用于:响应于接收到通过变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以设置的参数值作为变形区域的变形效果参数的参数值;和/或,响应于未接收到通过变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以预设参数值作为变形区域的变形效果参数的参数值。
另外,再参见图15,在本申请变形特效程序文件包的生成装置的又一个实施例中,还可以包括:删除模块,用于接收通过操作栏的交互接口输入的变形区域删除指令,删除变形区域和变形区域的变形效果参数的参数值。
在本申请各实施例中,可以预先设置多个关键点的位置,以便建立变形区域和至少一关键点之间的对应关系,从而将二者进行位置关系对应。设置一个变形区域的变形效果参数的参数值时,可以直接从预先设置的关键点集合中选取至少一关键点从而建立该变形区域和至少一关键点之间的对应关系
例如,在其中一个实施方式中,可以基于人脸检测和手势检测,分别针对脸部和手势(手部)定义多个关键点,以实现变形特效生成中,建立变形区域与人脸关键点或者手势关键点之间的对应关系。
在其中一个实施方式中,建立模块用于:建立变形区域的位置参考点和至少一关键点之间的对应关系;和/或,建立变形区域的位置参考点和检测框的中心关键点之间的对应关系。
在其中一个实施例中,上述位置参数中的预设关键点包括:预定的关键点中,位于变形区域的边界上、且连线经过变形区域的中心点的两个关键点。相应地,该实施例中,建立模块用于建立变形区域和上述位于变形区域的边界上、且连线经过变形区域的中心点的两个关键点之间的对应关系。
另外,再参见图15,在本申请变形特效程序文件包的生成装置的另一个实施例中,还可以包括:内容显示栏,用于显示参考图像。
示例性地,上述参考图像例如可以是:参考人物的至少一部分图像,例如参考人物的以下任意一项或多项:完整图像,头部图像,脸部图像,肩部图像,手臂图像,手势图像,腰部图像,腿部图像,脚部图像,等等。
可选地,在上述实施例中,操作栏还可用于:接收通过交互接口,例如图2中的交互接口24,输入的参考点显示指令,显示参考图像上的关键点;和/或,接收通过交互接口输入的参考点关闭指令,不显示参考图像上的关键点。
可选地,在又一实施例中,内容显示栏,还可用于根据变形区域的变形效果参数的参数值,在内容显示栏显示变形区域的变形效果。
可选地,在又一实施例中,内容显示栏,还可用于接收对变形区域的位置移动操作。相应地,再参见图15,该实施例的装置还可以包括:第一更新模块,用于根据内容显示栏接收到的对变形区域的位置移动操作,更新变形区域在内容 显示栏的显示位置,并对变形区域的变形效果参数中的相应参数值进行更新。
可选地,在又一实施例中,内容显示栏,还可用于接收对变形区域的大小调整操作。相应地,再参见图15,该实施例的装置还可以包括:第二更新模块,用于根据内容显示栏接收到的对变形区域的大小调整操作,更新变形区域在内容显示栏的显示大小,并对变形区域的变形效果参数中的相应参数值进行更新。
可选地,在又一实施例中,操作栏,还可用于通过交互接口,例如图2中的交互接口25,接收针对两个或以上变形区域的图层参数调整指令。相应地,再参见图15,该实施例的装置还可以包括:调整模块,用于根据操作栏的交互接口接收到的针对两个或以上变形区域的图层参数调整指令,调整两个或以上变形区域之间的遮挡关系,并指示内容显示栏根据调整后的遮挡关系和两个或以上变形区域对应的变形参数的参数值显示两个或以上变形区域对应的变形效果。
可选地,在又一实施例中,第一生成模块,还用于根据预先设置的变形特效程序文件和变形区域的变形效果参数的参数值,生成变形区域的特效程序文件,并通过程序文件栏显示变形区域的特效程序文件。相应地,再参见图15,该实施例的装置还可以包括:程序文件栏,用于显示变形区域的特效程序文件。其中的变形特效程序文件例如可以包括:以json程序生成的特效程序文件。
进一步地,再参见图15,本申请上述各实施例的变形特效程序文件包的生成装置还可以包括:操作界面,该操作界面包括:上述操作栏,上述内容显示栏和/或上述程序文件栏。
在其中一个实施方式中,操作界面包括左侧、中部和右侧三个区域。其中,操作界面的左侧为操作栏,操作界面的中部为内容显示栏,操作界面的右侧为程序文件栏。
进一步地,再参见图15,本申请上述各实施例的变形特效程序文件包的生成装置还可以包括:保存模块,用于根据接收到的保存指令在保存指令指向的位置保存变形特效程序文件包。
在其中一个实施方式中,保存模块用于:响应于接收到保存指令,显示保存路径选择接口和压缩接口;接收通过保存路径选择接口发送的保存位置;以及接收基于压缩接口发送的压缩方式,并根据压缩方式对变形特效程序文件包进行压缩,生成压缩文件包;以及将压缩文件包存储至保存位置指向的文件夹中。
图16为本申请变形特效生成装置一个实施例的结构示意图。本申请各实施例的变形特效生成装置可用于实现本申请上述变形特效生成方法。本申请各实施例的变形特效生成装置例如可以是AR引擎或者具有AR绘制功能的电子设备(如设有AR引擎的电子设备)等。如图16所示,该实施例的变形特效生成装置包括:第二获取模块和第二生成模块。其中:
第二获取模块,用于获取变形区域的变形效果参数的参数值。
第二生成模块,用于基于待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效。
基于本申请上述实施例提供的变形特效生成装置,获取变形区域的变形效果参数的参数值,基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效。本申请实施例通过预先生成的变形特效程序文件包中变形区域的变形效果参数的参数值、对图像进行关键点检测,在图像上生成变形特效,实现了图像的变形特效,提升了图像的播放效果。
图17为本申请变形特效生成装置另一个实施例的结构示意图。如图17所示,与图16所示的实施例相比,该实施例的变形特效生成装置还包括:导入模块,用于导入变形特效程序文件包。相应地,该实施例中,第二生成模块用于获取变形特效程序文件包中变形区域的变形效果参数的参数值。
示例性地,该变形特效程序文件包为采用本申请上述任一实施例的变形特效程序文件包的生成方法或者装置生成的变形特效程序文件包。
另外,再参见图17,在变形特效生成装置的又一个实施例中,还包括:第一检测模块,用于检测待处理图像中的关键点。
在其中一个实施方式中,第一检测模块可以包括:神经网络,用于对待处理图像进行对应关系涉及的关键点检测,并输出关键点检测结果。其中的关键点检测结果例如包括但不限于以下任意一项或多项:对应关系涉及的关键点在待处理图像中的位置;对应关系涉及的关键点的预设编号。
在其中一个实施方式中,上述变形区域的变形效果参数的参数值可以包括:变形区域和预定的至少一关键点之间的对应关系。
在其中一个实施方式中,导入模块用于:通过调用用于读取变形区域的第一接口函数,将变形特效程序文件包读入内存;以及解析变形特效程序文件包,获得变形特效程序文件,变形特效程序文件包括变形效果参数的参数值。
其中的变形特效程序文件例如可以包括:以json程序或者其他任意程序生成的特效程序文件。
在其中一个实施方式中,第二获取模块用于:通过用于创建贴纸句柄的第二接口函数创建贴纸句柄;以及读取变形特效程序文件中变形区域的变形效果参数的参数值、并存储至贴纸句柄中。
在其中一个可选示例中,第二生成模块用于:通过用于调用渲染变形区域的第三接口函数,从贴纸句柄中读取需要显示在待处理图像上的变形区域;根据待处理图像中的关键点和需要显示的变形区域的变形效果参数的参数值,确定变形区域在待处理图像上的显示位置;以及根据变形区域在待处理图像上的显示位置,将变形区域显示在待处理图像上的显示位置上。
在进一步可选示例中,上述待处理图像为视频中待处理图像时,第二生成模块还可用于获取变形区域在待处理图像所在视频中显示的视频帧数,并预先从视频中读取视频帧数对应的图像。
另外,在变形特效生成装置的又一个实施例中,第二获取模块,还可用于响应于变形特效程序文件包播放完毕,通过用于调用销毁贴纸句柄的第四接口函数销毁贴纸句柄。
在其中一个实施方式中,上述变形效果参数可以包括:触发动作参数,该触发动作参数用于表示触发显示变形效果的触发动作。相应地,再参见图17,在变形特效生成装置的再一个实施例中,还包括:第二检测模块,用于检测待处理图像中是否出现触发动作参数的参数值对应的触发动作。相应地,该实施例中,第二生成模块用于:响应于检测到待处理图像中出现触发动作参数的参数值对应的触发动作,基于待处理图像中的关键点和变形区域的变形效果参数的参数值, 在待处理图像上生成变形效果的特效。
在其中一个实施方式中,上述变形效果参数可以包括:美颜/美妆(美颜和/或美妆)效果参数,该美颜/美妆效果参数用于表示显示变形效果时在预设部位显示的美颜/美妆效果。相应地,该实施例中,第二生成模块,还可用于基于待处理待处理图像中的关键点和变形区域的变形效果参数的参数值,在待处理图像上生成变形效果的特效时,根据美颜/美妆效果参数,在待处理图像显示美颜/美妆效果。
另外,本申请实施例提供的另一种电子设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行存储器中存储的计算机程序,且计算机程序被执行时,实现本申请任一实施例所述的变形特效程序文件包的生成方法、或者变形特效生成方法。
图18为本申请电子设备一个应用实施例的结构示意图。下面参考图18,其示出了适于用来实现本申请实施例的终端设备或服务器的电子设备的结构示意图。如图18所示,该电子设备包括一个或多个处理器、通信部等,所述一个或多个处理器例如:一个或多个中央处理单元(CPU),和/或一个或多个图像处理器(GPU)等,处理器可以根据存储在只读存储器(ROM)中的可执行指令或者从存储部分加载到随机访问存储器(RAM)中的可执行指令而执行各种适当的动作和处理。通信部可包括但不限于网卡,所述网卡可包括但不限于IB(Infiniband)网卡,处理器可与只读存储器和/或随机访问存储器中通信以执行可执行指令,通过总线与通信部相连、并经通信部与其他目标设备通信,从而完成本申请实施例提供的任一方法对应的操作,例如,获取至少一变形区域的变形效果参数的参数值;建立至少一所述变形区域和预定的至少一关键点之间的对应关系;根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包。再如,获取变形区域的变形效果参数的参数值;基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述图像上生成变形效果的特效。
此外,在RAM中,还可存储有装置操作所需的各种程序和数据。CPU、ROM以及RAM通过总线彼此相连。在有RAM的情况下,ROM为可选模块。RAM存储可执行指令,或在运行时向ROM中写入可执行指令,可执行指令使处理器执行本申请任一所述方法对应的操作。输入/输出(I/O)接口也连接至总线。通信部可以集成设置,也可以设置为具有多个子模块(例如多个IB网卡),并在总线链接上。
以下部件连接至I/O接口:包括键盘、鼠标等的输入部分;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分;包括硬盘等的存储部分;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分。通信部分经由诸如因特网的网络执行通信处理。驱动器也根据需要连接至I/O接口。可拆卸介质,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器上,以便于从其上读出的计算机程序根据需要被安装入存储部分。
需要说明的,如图18所示的架构仅为一种可选实现方式,在实践过程中,可根据实际需要对上述图18的部件数量和类型进行选择、删减、增加或替换;在不同功能部件设置上,也可采用分离设置或集成设置等实现方式,例如GPU和CPU可分离设置或者可将GPU集成在CPU上,通信部可分离设置,也可集成设置在CPU或GPU上,等等。这些可替换的实施方式均落入本申请公开的保护范围。
特别地,根据本申请的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,计算机程序包含用于执行流程图所示的方法的程序代码,程序代码可包括对应执行本申请实施例提供的人脸防伪检测方法步骤对应的指令。在这样的实施例中,该计算机程序可以通过通信部分从网络上被下载和安装,和/或从可拆卸介质被安装。在该计算机程序被CPU执行时,执行本申请的方法中限定的上述功能。
另外,本申请实施例还提供了一种计算机程序,包括计算机指令,当计算机指令在设备的处理器中运行时,实现本申请任一实施例所述的变形特效程序文件包的生成方法、或者变形特效生成方法。
另外,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时,实现本申请任一实施例所述的变形特效程序文件包的生成方法、或者变形特效生成方法。
本说明书中各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似的部分相互参见即可。对于系统实施例而言,由于其与方法实施例基本对应,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
可能以许多方式来实现本申请的方法和装置。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本申请的方法和装置。用于所述方法的步骤的上述顺序仅是为了进行说明,本申请的方法的步骤不限于以上描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本申请实施为记录在记录介质中的程序,这些程序包括用于实现根据本申请的方法的机器可读指令。因而,本申请还覆盖存储用于执行根据本申请的方法的程序的记录介质。
本申请的描述是为了示例和描述起见而给出的,而并不是无遗漏的或者将本申请限于所公开的形式。很多修改和变化对于本领域的普通技术人员而言是显然的。选择和描述实施例是为了更好说明本申请的原理和实际应用,并且使本领域的普通技术人员能够理解本申请从而设计适于特定用途的带有各种修改的各种实施例。

Claims (97)

  1. 一种变形特效程序文件包的生成方法,其特征在于,包括:
    获取至少一变形区域的变形效果参数的参数值;
    建立至少一所述变形区域和预定的至少一关键点之间的对应关系;
    根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包。
  2. 根据权利要求1所述的方法,其特征在于,所述获取至少一变形区域的变形效果参数的参数值之前,还包括:添加所述至少一变形区域。
  3. 根据权利要求1或2所述的方法,其特征在于,所述变形区域为多个时,所述获取至少一变形区域的变形效果参数的参数值,包括:批量获取多个变形区域的变形效果参数的参数值;和/或,分别获取多个变形区域中至少部分所述变形区域的变形效果参数的参数值;和/或,通过复制一变形区域的方式来获得另一变形区域及所述另一变形区域的变形效果参数的参数值。
  4. 根据权利要求1-3任一所述的方法,其特征在于,还包括:接收通过操作栏的交互接口输入的变形区域添加指令,添加至少一个所述变形区域,生成所述变形区域的变形效果参数设置界面,并在所述操作栏下显示所述变形区域的变形效果参数设置界面;
    所述获取变形区域的变形效果参数的参数值,包括:经所述变形效果参数设置界面获取所述变形区域的变形效果参数的参数值。
  5. 根据权利要求1-4任一所述的方法,其特征在于,所述获取变形区域的变形效果参数的参数值,包括:通过在参考图像上移动变形区域的方式,获取所述变形区域的位置参数;和/或,通过调整所述变形区域的大小,获取所述变形区域的范围;和/或,通过调整用于控制变形效果的变形曲线的方式,获取所述变形区域的变形效果参数的参数值;和/或,通过接收变形效果控制参数的参数值的方式,获取所述变形区域的变形效果参数的参数值。
  6. 根据权利要求4或5所述的方法,其特征在于,所述获取变形区域的变形效果参数的参数值,包括:响应于接收到通过所述变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以所述设置的参数值作为所述变形区域的变形效果参数的参数值;和/或,响应于未接收到通过所述变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以预设参数值作为所述变形区域的变形效果参数的参数值。
  7. 根据权利要求4-6任一所述的方法,其特征在于,还包括:接收通过操作栏的交互接口输入的变形区域删除指令,删除所述变形区域和所述变形区域的变形效果参数的参数值。
  8. 根据权利要求1-7任一所述的方法,其特征在于,所述关键点包括以下任意一种或多种:头部关键点,脸部关键点,肩部关键点,手臂关键点,手势关键点,腰部关键点,腿部关键点,脚部关键点,人体骨骼关键点。
  9. 根据权利要求8所述的方法,其特征在于,所述头部关键点包括以下任意一项或多项:头顶关键点,鼻尖关键点,以及下巴关键点;和/或,
    所述面部脸部关键点包括以下任意一项或多项:脸部轮廓关键点,眼睛关键点,眉毛关键点,鼻子关键点,嘴部关键点;和/或,
    所述肩部关键点包括以下任意一项或多项:位于肩部与头部交汇位置处的肩头交汇关键点,以及位于臂根轮廓关键点与肩头交汇关键点之间的中点位置处的肩轮廓中点关键点;和/或,
    所述手臂关键点包括以下任意一项或多项:手腕轮廓关键点,胳膊肘轮廓关键点,臂根轮廓关键点,位于手腕轮廓关键点与胳膊肘轮廓关键点之间的中点位置处的小臂轮廓中点关键点,以及位于胳膊肘轮廓关键点与臂根轮廓关键点之间的中点位置处的大臂中点关键点;和/或,
    所述手势关键点包括以下任意一项或多项:手势框的四个顶点关键点,以及手势框的中心关键点;和/或,
    所述腿部关键点包括以下任意一项或多项:裆部关键点,膝盖轮廓关键点,脚踝轮廓关键点,大腿根部外侧轮廓关键点,位于膝盖轮廓关键点与脚踝轮廓关键点之间的中点位置处的小腿轮廓中点关键点,位于膝盖内轮廓关键点与裆部关键点之间的中点位置处的大腿内轮廓中点关键点,以及位于膝盖外轮廓关键点与大腿根部外侧轮廓关键点之间的中点位置处的大腿外轮廓中点关键点;和/或,
    所述腰部关键点包括以下任意一项或多项:将大腿根部外侧轮廓关键点与臂根轮廓关键点之间N等分,所产生的N个等分点;其中,所述N大于1;和/或,
    所述脚部关键点包括以下任意一项或多项:脚尖关键点以及足跟关键点;和/或,
    所述人体骨骼关键点把包括以下任意一项或多项:右肩骨骼关键点,右肘骨骼关键点,右腕骨骼关键点,左肩骨骼关键点,左肘骨骼关键点,左腕骨骼关键点,右髋骨骼关键点,右膝骨骼关键点,右踝骨骼关键点,左髋骨骼关键点,左膝骨骼关键点,左踝骨骼关键点,头顶骨骼关键点,以及脖子骨骼关键点。
  10. 根据权利要求9所述的方法,其特征在于,所述眼睛关键点包括以下任意一项或多项:左眼眶关键点,左眼瞳孔中心关键点,左眼中心关键点,右眼眶关键点,右眼瞳孔中心关键点,以及右眼中心关键点;和/或,
    所述眉毛关键点包括以下任意一项或多项:左眉毛关键点以及右眉毛关键点;和/或,
    所述鼻子关键点包括以下任意一项或多项:鼻梁关键点,鼻子下沿关键点,以及鼻子外侧轮廓关键点;和/或,
    所述嘴部关键点包括以下任意一项或多项:上嘴唇关键点,以及下嘴唇关键点。
  11. 根据权利要求1-10任一所述的方法,其特征在于,所述建立所述变形区域和预定的至少一关键点之间的对应关系,包括:建立所述变形区域的位置参考点和所述至少一关键点之间的对应关系;和/或,建立所述变形区域的位置参考点和检测框的中心关键点之间的对应关系。
  12. 根据权利要求1-11任一所述的方法,其特征在于,所述变形效果参数包括以下任意一项或多项:
    显示参数:用于控制是否显示变形区域的变形效果;
    触发动作参数:用于表示触发显示变形区域的变形效果的触发动作;
    循环参数:用于表示变形效果的循环播放次数;
    延迟触发参数:用于表示延迟显示变形区域的变形效果的时间;
    触发结束参数:用于表示结束显示变形区域的变形效果的动作;
    变形效果控制参数:用于控制变形区域的变形效果;
    显示尺寸参数:用于表示变形区域的大小变化的参考依据;
    位置参数:用于表示变形区域与预设关键点之间的位置绑定关系;
    旋转中心参数:用于表示变形区域旋转依据的中心点;
    变形中心参数:用于表示变形区域的中心点;
    模式切换参数:用于切换变形区域的中心点偏移模式;
    美颜/美妆效果参数:用于表示显示变形效果时在预设部位显示的美颜/美妆效果。
  13. 根据权利要求12所述的方法,其特征在于,所述旋转中心参数的参数值为图像的中心点。
  14. 根据权利要求12或13所述的方法,其特征在于,所述触发动作参数的参数值对应的触发动作包括以下任意一项或多项:无动作触发,眼部动作,头部动作,眉部动作,手部动作,嘴部动作,肩部动作。
  15. 根据权利要求12-14任一所述的方法,其特征在于,通过变形曲线控制所述变形区域的变形效果;所述变形效果控制参数包括所述变形曲线的参数;
    所述变形曲线的参数包括以下任意一项或多项:用于控制变形效果的拉伸方向和拉伸半径的第一控制点参数;用于控制变形区域的中间区域的过渡平滑性的第二控制点参数;用于控制变形区域的边界区域过渡平滑性的第三控制点参数。
  16. 根据权利要求15所述的方法,其特征在于,所述变形效果的拉伸方向包括:从所述变形区域的中心点向外拉伸,和/或,从所述变形区域的中心点向内拉伸。
  17. 根据权利要求12-16任一所述的方法,其特征在于,所述位置参数中的预设关键点包括:预定的关键点中,位于所述变形区域的边界上、且连线经过所述变形区域的中心点的两个关键点;
    建立所述变形区域和预定的至少一关键点之间的对应关系,包括:建立所述变形区域和位于所述变形区域的边界上、且连线经过所述变形区域的中心点的所述两个关键点之间的对应关系。
  18. 根据权利要求12-17任一所述的方法,其特征在于,所述变形区域的中心点偏移模式包括:中心点简单拉伸模式和/或径向偏移拉伸模式。
  19. 根据权利要求1-18任一所述的方法,其特征在于,还包括:通过内容显示栏显示参考图像;所述参考图像包括至少一个参考部位。
  20. 根据权利要求19述的方法,其特征在于,还包括:接收通过操作栏的交互接口输入的参考点显示指令,显示所述参考图像上的关键点;和/或,接收通过操作栏的交互接口输入的参考点关闭指令,不显示所述参考图像上的关键点。
  21. 根据权利要求19或20所述的方法,其特征在于,所述参考图像包括:参考人物的至少一部分图像。
  22. 根据权利要求21所述的方法,其特征在于,所述参考人物的至少一部分图像包括所述参考人物的以下任意一项或多项:完整图像,头部图像,脸部图像,肩部图像,手臂图像,手势图像,腰部图像,腿部图像,脚部图像。
  23. 根据权利要求19-22任一所述的方法,其特征在于,还包括:根据所述变形区域的变形效果参数的参数值,在所述内容显示栏显示所述变形区域的变形效果。
  24. 根据权利要求23所述的方法,其特征在于,还包括:根据通过所述内容显示栏接收到的对所述变形区域的位置移动操作,更新所述变形区域在所述内容显示栏的显示位置,并对所述变形区域的变形效果参数中的相应参数值进行更新。
  25. 根据权利要求22-24任一所述的方法,其特征在于,还包括:根据通过所述内容显示栏接收到的对所述变形区域的大小调整操作,更新所述变形区域在所述内容显示栏的显示大小,并对所述变形区域的变形效果参数中的相应参数值进行更新。
  26. 根据权利要求19-25任一所述的方法,其特征在于,还包括:根据通过所述操作栏的交互接口接收到的针对两个或以上变形区域的图层参数调整指令,调整所述两个或以上变形区域之间的遮挡关系,并根据调整后的遮挡关系和所述两个或以上变形区域对应的变形参数的参数值显示所述两个或以上变形区域对应的变形效果。
  27. 根据权利要求1-26任一所述的方法,其特征在于,所述生成变形特效程序文件包之前,还包括:根据预先设置的变形特效程序文件和所述变形区域的变形效果参数的参数值,生成所述变形区域的特效程序文件,并通过程序文件栏显示所述变形区域的特效程序文件。
  28. 根据权利要求27所述的方法,其特征在于,所述变形特效程序文件包括:以json程序生成的特效程序文件。
  29. 根据权利要求1-28任一所述的方法,其特征在于,还包括:根据接收到的启动指令启动,并显示操作界面,所述操作界面包括:操作栏,内容显示栏和/或程序文件栏。
  30. 根据权利要求29所述的方法,其特征在于,所述操作界面包括左侧、中部和右侧三个区域;
    所述显示操作界面,包括:在所述操作界面的左侧显示所述操作栏,在所述操作界面的中部显示所述内容显示栏,在所述操作界面的右侧显示所述程序文件栏。
  31. 根据权利要求1-30任一所述的方法,其特征在于,所述生成变形特效程序文件包之后,还包括:根据接收到的保存指令在所述保存指令指向的位置保存所述变形特效程序文件包。
  32. 根据权利要求31所述的方法,其特征在于,所述根据接收到的保存指令在所述保存指令指向的位置保存所述变形特效程序文件包,包括:
    响应于接收到保存指令,显示保存路径选择接口和压缩接口;
    接收通过所述保存路径选择接口发送的保存位置;以及接收基于所述压缩接口发送的压缩方式,并根据所述压缩方式对所述变形特效程序文件包进行压缩,生成压缩文件包;
    将所述压缩文件包存储至所述保存位置指向的文件夹中。
  33. 一种变形特效生成方法,其特征在于,包括:
    获取变形区域的变形效果参数的参数值;
    基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效。
  34. 根据权利要求33所述的方法,其特征在于,所述获取变形区域的变形效果参数的参数值之前,还包括:导入变形特效程序文件包;
    所述获取变形区域的变形效果参数的参数值,包括:获取所述变形特效程序文件包中变形区域的变形效果参数的参数值。
  35. 根据权利要求33或34所述的方法,其特征在于,所述变形特效程序文件包为采用如权利要求1-32任一所述的方法生成的变形特效程序文件包。
  36. 根据权利要求33-35任一所述的方法,其特征在于,还包括:检测所述待处理图像中的关键点。
  37. 根据权利要求33-36任一所述的方法,其特征在于,所述变形区域的变形效果参数的参数值包括:所述变形区域和预定的至少一关键点之间的对应关系。
  38. 根据权利要求34-37任一所述的方法,其特征在于,所述导入变形特效程序文件包,包括:通过调用用于读取变形区域的第一接口函数,将所述变形特效程序文件包读入内存;解析所述变形特效程序文件包,获得变形特效程序文件,所述变形特效程序文件包括所述变形效果参数的参数值。
  39. 根据权利要求38所述的方法,其特征在于,所述变形特效程序文件包括:json程序的变形特效程序文件。
  40. 根据权利要求38或39所述的方法,其特征在于,所述获取变形区域的变形效果参数的参数值,包括:通过用于创建贴纸句柄的第二接口函数创建贴纸句柄;读取所述变形特效程序文件中变形区域的变形效果参数的参数值、并存储至所述贴纸句柄中。
  41. 根据权利要求40所述的方法,其特征在于,还包括:根据所述贴纸句柄中所述变形特效程序文件中变形区域的变形效果参数的参数值,获取所述变形区域在所述待处理图像中显示的位置。
  42. 根据权利要求41所述的方法,其特征在于,所述待处理图像为视频中图像时,所述方法还包括:获取所述变形区域在所述图像所在视频中显示的视频帧数,并预先从所述视频中读取所述视频帧数对应的图像。
  43. 根据权利要求40-42任一所述的方法,其特征在于,所述基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效,包括:
    通过用于调用渲染变形区域的第三接口函数,从所述贴纸句柄中读取需要显示在所述待处理图像上的变形区域;
    根据所述待处理图像中的关键点和所述需要显示的变形区域的变形效果参数的参数值,确定所述变形区域在所述待处理图像上的显示位置;
    根据所述变形区域在所述待处理图像上的显示位置,将所述变形区域显示在所述待处理图像上的所述显示位置上。
  44. 根据权利要求40-43任一所述的方法,其特征在于,还包括:响应于所述变形特效程序文件包播放完毕,通过用于调用销毁贴纸句柄的第四接口函数销毁所述贴纸句柄。
  45. 根据权利要求36-44任一所述的方法,其特征在于,所述检测所述待处理图像中的关键点,包括:通过神经网络,对所述待处理图像进行所述对应关系涉及的关键点检测,并输出关键点检测结果。
  46. 根据权利要求45所述的方法,其特征在于,所述关键点检测结果包括以下任意一项或多项:所述对应关系涉及的关键点在所述待处理图像中的位置;所述对应关系涉及的关键点的预设编号。
  47. 根据权利要求45或46所述的方法,其特征在于,所述变形效果参数包括:触发动作参数,所述触发动作参数用于表示触发显示变形效果的触发动作;
    所述方法还包括:检测所述待处理图像中是否出现所述触发动作参数的参数值对应的触发动作;
    所述基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效,包括:响应于检测到所述待处理图像中出现所述触发动作参数的参数值对应的触发动作,基于所述待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效。
  48. 根据权利要求33-47任一所述的方法,其特征在于,所述变形效果参数包括:美颜/美妆效果参数,所述美颜/美妆效果参数用于表示显示变形效果时在预设部位显示的美颜/美妆效果;
    所述方法还包括:基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效时,根据所述美颜/美妆效果参数,在所述待处理图像显示美颜/美妆效果。
  49. 一种变形特效程序文件包的生成装置,其特征在于,包括:
    第一获取模块,用于获取至少一变形区域的变形效果参数的参数值;
    建立模块,用于建立至少一所述变形区域和预定的至少一关键点之间的对应关系;
    第一生成模块,用于根据获取有所述参数值的至少一所述变形区域和所述对应关系,生成变形特效程序文件包。
  50. 根据权利要求49所述的装置,其特征在于,还包括:添加模块,用于添加所述至少一变形区域。
  51. 根据权利要求49或50所述的装置,其特征在于,所述变形区域为多个时,所述第一获取模块用于:批量获取多个变形区域的变形效果参数的参数值;和/或,分别获取多个变形区域中至少部分所述变形区域的变形效果参数的参数值;和/或,通过复制一变形区域的方式来获得另一变形区域及所述另一变形区域的变形效果参数的参数值。
  52. 根据权利要求49-51任一所述的装置,其特征在于,还包括:操作栏,包括交互接口,用于接收通过所述交互接口输入的变形区域添加指令,添加至少一个所述变形区域,生成所述变形区域的变形效果参数设置界面,并在所述操作栏下显示所述变形区域的变形效果参数设置界面;
    所述第一获取模块用于:经所述变形效果参数设置界面获取所述变形区域的变形效果参数的参数值。
  53. 根据权利要求49-52任一所述的装置,其特征在于,所述第一获取模块用于:通过在参考图像上移动变形区域的方式,获取所述变形区域的位置参数;和/或,通过调整所述变形区域的大小,获取所述变形区域的范围;和/或,通过调整用于控制变形效果的变形曲线的方式,获取所述变形区域的变形效果参数的参数值;和/或,通过接收变形效果控制参数的参数值的方式,获取所述变形区域的变形效果参数的参数值。
  54. 根据权利要求52或53所述的装置,其特征在于,所述第一获取模块用于:响应于接收到通过所述变形区域的 变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以所述设置的参数值作为所述变形区域的变形效果参数的参数值;和/或,响应于未接收到通过所述变形区域的变形效果参数设置界面中的交互接口发送的变形效果参数的参数值,以预设参数值作为所述变形区域的变形效果参数的参数值。
  55. 根据权利要求52-54任一所述的装置,其特征在于,还包括:删除模块,用于接收通过操作栏的交互接口输入的变形区域删除指令,删除所述变形区域和所述变形区域的变形效果参数的参数值。
  56. 根据权利要求49-55任一所述的装置,其特征在于,所述关键点包括以下任意一种或多种:头部关键点,脸部关键点,肩部关键点,手臂关键点,手势关键点,腰部关键点,腿部关键点,脚部关键点,人体骨骼关键点。
  57. 根据权利要求56所述的装置,其特征在于,所述头部关键点包括以下任意一项或多项:头顶关键点,鼻尖关键点,以及下巴关键点;和/或,
    所述面部脸部关键点包括以下任意一项或多项:脸部轮廓关键点,眼睛关键点,眉毛关键点,鼻子关键点,嘴部关键点;和/或,
    所述肩部关键点包括以下任意一项或多项:位于肩部与头部交汇位置处的肩头交汇关键点,以及位于臂根轮廓关键点与肩头交汇关键点之间的中点位置处的肩轮廓中点关键点;和/或,
    所述手臂关键点包括以下任意一项或多项:手腕轮廓关键点,胳膊肘轮廓关键点,臂根轮廓关键点,位于手腕轮廓关键点与胳膊肘轮廓关键点之间的中点位置处的小臂轮廓中点关键点,以及位于胳膊肘轮廓关键点与臂根轮廓关键点之间的中点位置处的大臂中点关键点;和/或,
    所述手势关键点包括以下任意一项或多项:手势框的四个顶点关键点,以及手势框的中心关键点;和/或,
    所述腿部关键点包括以下任意一项或多项:裆部关键点,膝盖轮廓关键点,脚踝轮廓关键点,大腿根部外侧轮廓关键点,位于膝盖轮廓关键点与脚踝轮廓关键点之间的中点位置处的小腿轮廓中点关键点,位于膝盖内轮廓关键点与裆部关键点之间的中点位置处的大腿内轮廓中点关键点,以及位于膝盖外轮廓关键点与大腿根部外侧轮廓关键点之间的中点位置处的大腿外轮廓中点关键点;和/或,
    所述腰部关键点包括以下任意一项或多项:将大腿根部外侧轮廓关键点与臂根轮廓关键点之间N等分,所产生的N个等分点;其中,所述N大于1;和/或,
    所述脚部关键点包括以下任意一项或多项:脚尖关键点以及足跟关键点;和/或,
    所述人体骨骼关键点把包括以下任意一项或多项:右肩骨骼关键点,右肘骨骼关键点,右腕骨骼关键点,左肩骨骼关键点,左肘骨骼关键点,左腕骨骼关键点,右髋骨骼关键点,右膝骨骼关键点,右踝骨骼关键点,左髋骨骼关键点,左膝骨骼关键点,左踝骨骼关键点,头顶骨骼关键点,以及脖子骨骼关键点。
  58. 根据权利要求57所述的装置,其特征在于,所述眼睛关键点包括以下任意一项或多项:左眼眶关键点,左眼瞳孔中心关键点,左眼中心关键点,右眼眶关键点,右眼瞳孔中心关键点,以及右眼中心关键点;和/或,
    所述眉毛关键点包括以下任意一项或多项:左眉毛关键点以及右眉毛关键点;和/或,
    所述鼻子关键点包括以下任意一项或多项:鼻梁关键点,鼻子下沿关键点,以及鼻子外侧轮廓关键点;和/或,
    所述嘴部关键点包括以下任意一项或多项:上嘴唇关键点,以及下嘴唇关键点。
  59. 根据权利要求49-58任一所述的装置,其特征在于,所述建立模块用于:建立所述变形区域的位置参考点和所述至少一关键点之间的对应关系;和/或,建立所述变形区域的位置参考点和检测框的中心关键点之间的对应关系。
  60. 根据权利要求49-59任一所述的装置,其特征在于,所述变形效果参数包括以下任意一项或多项:
    显示参数:用于控制是否显示变形区域的变形效果;
    触发动作参数:用于表示触发显示变形区域的变形效果的触发动作;
    循环参数:用于表示变形效果的循环播放次数;
    延迟触发参数:用于表示延迟显示变形区域的变形效果的时间;
    触发结束参数:用于表示结束显示变形区域的变形效果的动作;
    变形效果控制参数:用于控制变形区域的变形效果;
    显示尺寸参数:用于表示变形区域的大小变化的参考依据;
    位置参数:用于表示变形区域与预设关键点之间的位置绑定关系;
    旋转中心参数:用于表示变形区域旋转依据的中心点;
    变形中心参数:用于表示变形区域的中心点;
    模式切换参数:用于切换变形区域的中心点偏移模式;
    美颜/美妆效果参数:用于表示显示变形效果时在预设部位显示的美颜/美妆效果。
  61. 根据权利要求60所述的装置,其特征在于,所述旋转中心参数的参数值为图像的中心点。
  62. 根据权利要求60或61所述的装置,其特征在于,所述触发动作参数的参数值对应的触发动作包括以下任意一项或多项:无动作触发,眼部动作,头部动作,眉部动作,手部动作,嘴部动作,肩部动作。
  63. 根据权利要求60-62任一所述的装置,其特征在于,通过变形曲线控制所述变形区域的变形效果;所述变形效果控制参数包括所述变形曲线的参数;
    所述变形曲线的参数包括以下任意一项或多项:用于控制变形效果的拉伸方向和拉伸半径的第一控制点参数;用于控制变形区域的中间区域的过渡平滑性的第二控制点参数;用于控制变形区域的边界区域过渡平滑性的第三控制点参数。
  64. 根据权利要求63所述的装置,其特征在于,所述变形效果的拉伸方向包括:从所述变形区域的中心点向外拉伸,和/或,从所述变形区域的中心点向内拉伸。
  65. 根据权利要求60-64任一所述的装置,其特征在于,所述位置参数中的预设关键点包括:预定的关键点中,位于所述变形区域的边界上、且连线经过所述变形区域的中心点的两个关键点;
    建立所述变形区域的变形区域和预定的至少一关键点之间的对应关系,包括:建立所述变形区域和位于所述变形区域的边界上、且连线经过所述变形区域的中心点的所述两个关键点之间的对应关系。
  66. 根据权利要求60-65任一所述的装置,其特征在于,所述变形区域的中心点偏移模式包括:中心点简单拉伸模 式和/或径向偏移拉伸模式。
  67. 根据权利要求49-66任一所述的装置,其特征在于,还包括:内容显示栏,用于显示参考图像;所述参考图像包括至少一个参考部位。
  68. 根据权利要求67述的装置,其特征在于,所述操作栏,还用于:接收通过交互接口输入的参考点显示指令,显示所述参考图像上的关键点;和/或,接收通过交互接口输入的参考点关闭指令,不显示所述参考图像上的关键点。
  69. 根据权利要求67或68所述的装置,其特征在于,所述参考图像包括:参考人物的至少一部分图像。
  70. 根据权利要求69所述的装置,其特征在于,所述参考人物的至少一部分图像包括所述参考人物的以下任意一项或多项:完整图像,头部图像,脸部图像,肩部图像,手臂图像,手势图像,腰部图像,腿部图像,脚部图像。
  71. 根据权利要求67-70任一所述的装置,其特征在于,所述内容显示栏,还用于根据所述变形区域的变形效果参数的参数值,在所述内容显示栏显示所述变形区域的变形效果。
  72. 根据权利要求71所述的装置,其特征在于,所述内容显示栏,还用于接收对所述变形区域的位置移动操作;所述装置还包括:第一更新模块,用于根据所述内容显示栏接收到的对所述变形区域的位置移动操作,更新所述变形区域在所述内容显示栏的显示位置,并对所述变形区域的变形效果参数中的相应参数值进行更新。
  73. 根据权利要求70-72任一所述的装置,其特征在于,所述内容显示栏,还用于接收对所述变形区域的大小调整操作;
    所述装置还包括:第二更新模块,用于根据所述内容显示栏接收到的对所述变形区域的大小调整操作,更新所述变形区域在所述内容显示栏的显示大小,并对所述变形区域的变形效果参数中的相应参数值进行更新。
  74. 根据权利要求67-73任一所述的装置,其特征在于,所述操作栏,还用于通过交互接口接收到的针对两个或以上变形区域的图层参数调整指令;
    调整模块,用于根据所述操作栏的交互接口接收到的针对两个或以上变形区域的图层参数调整指令,调整所述两个或以上变形区域之间的遮挡关系,并根据调整后的遮挡关系和所述两个或以上变形区域对应的变形参数的参数值显示所述两个或以上变形区域对应的变形效果。
  75. 根据权利要求49-74任一所述的装置,其特征在于,所述第一生成模块,还用于根据预先设置的变形特效程序文件和所述变形区域的变形效果参数的参数值,生成所述变形区域的特效程序文件,并通过程序文件栏显示所述变形区域的特效程序文件;
    所述装置还包括:所述程序文件栏,用于显示所述变形区域的特效程序文件。
  76. 根据权利要求75所述的装置,其特征在于,所述变形特效程序文件包括:以json程序生成的特效程序文件。
  77. 根据权利要求49-76任一所述的装置,其特征在于,还包括:操作界面,所述操作界面包括:所述操作栏,所述内容显示栏和/或所述程序文件栏。
  78. 根据权利要求77所述的装置,其特征在于,所述操作界面包括左侧、中部和右侧三个区域;
    所述操作界面的左侧为所述操作栏,所述操作界面的中部为所述内容显示栏,所述操作界面的右侧为所述程序文件栏。
  79. 根据权利要求49-78任一所述的装置,其特征在于,还包括:保存模块,用于根据接收到的保存指令在所述保存指令指向的位置保存所述变形特效程序文件包。
  80. 根据权利要求79所述的装置,其特征在于,所述保存模块用于:
    响应于接收到保存指令,显示保存路径选择接口和压缩接口;
    接收通过所述保存路径选择接口发送的保存位置;以及接收基于所述压缩接口发送的压缩方式,并根据所述压缩方式对所述变形特效程序文件包进行压缩,生成压缩文件包;
    将所述压缩文件包存储至所述保存位置指向的文件夹中。
  81. 一种变形特效生成装置,其特征在于,包括:
    第二获取模块,用于获取变形区域的变形效果参数的参数值;
    第二生成模块,用于基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效。
  82. 根据权利要求81所述的装置,其特征在于,还包括:导入模块,用于导入变形特效程序文件包;
    所述第二生成模块用于获取所述变形特效程序文件包中变形区域的变形效果参数的参数值。
  83. 根据权利要求81或82所述的装置,其特征在于,所述变形特效程序文件包为采用如权利要求1-32任一所述的方法或者权利要求49-80任一所述的装置生成的变形特效程序文件包。
  84. 根据权利要求81-83任一所述的装置,其特征在于,还包括:第一检测模块,用于检测所述待处理图像中的关键点。
  85. 根据权利要求81-84任一所述的装置,其特征在于,所述变形区域的变形效果参数的参数值包括:所述变形区域和预定的至少一关键点之间的对应关系。
  86. 根据权利要求82-85任一所述的装置,其特征在于,所述导入模块用于:通过调用用于读取变形区域的第一接口函数,将所述变形特效程序文件包读入内存;解析所述变形特效程序文件包,获得变形特效程序文件,所述变形特效程序文件包括所述变形效果参数的参数值。
  87. 根据权利要求86所述的装置,其特征在于,所述变形特效程序文件包括:json程序的变形特效程序文件。
  88. 根据权利要求86或87所述的装置,其特征在于,所述第二获取模块用于:通过用于创建贴纸句柄的第二接口函数创建贴纸句柄;读取所述变形特效程序文件中变形区域的变形效果参数的参数值、并存储至所述贴纸句柄中。
  89. 根据权利要求88所述的装置,其特征在于,所述第二生成模块用于:通过用于调用渲染变形区域的第三接口函数,从所述贴纸句柄中读取需要显示在所述待处理图像上的变形区域;根据所述待处理图像中的关键点和所述需要显示的变形区域的变形效果参数的参数值,确定所述变形区域在所述待处理图像上的显示位置;根据所述变形区域在所述待处理图像上的显示位置,将所述变形区域显示在所述待处理图像上的所述显示位置上。
  90. 根据权利要求89所述的装置,其特征在于,所述待处理图像为视频中图像时,所述第二生成模块还用于获取所述变形区域在所述图像所在视频中显示的视频帧数,并预先从所述视频中读取所述视频帧数对应的图像。
  91. 根据权利要求88-90任一所述的装置,其特征在于,所述第二获取模块,还用于响应于所述变形特效程序文件包播放完毕,通过用于调用销毁贴纸句柄的第四接口函数销毁所述贴纸句柄。
  92. 根据权利要求84-91任一所述的装置,其特征在于,所述第一检测模块包括:神经网络,用于对所述待处理图像进行所述对应关系涉及的关键点检测,并输出关键点检测结果。
  93. 根据权利要求92所述的装置,其特征在于,所述关键点检测结果包括以下任意一项或多项:所述对应关系涉及的关键点在所述待处理图像中的位置;所述对应关系涉及的关键点的预设编号。
  94. 根据权利要求92或93所述的装置,其特征在于,所述变形效果参数包括:触发动作参数,所述触发动作参数用于表示触发显示变形效果的触发动作;
    所述装置还包括:第二检测模块,用于检测所述待处理图像中是否出现所述触发动作参数的参数值对应的触发动作;
    所述第二生成模块用于:响应于检测到所述待处理图像中出现所述触发动作参数的参数值对应的触发动作,基于所述待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效。
  95. 根据权利要求81-94任一所述的装置,其特征在于,所述变形效果参数包括:美颜/美妆效果参数,所述美颜/美妆效果参数用于表示显示变形效果时在预设部位显示的美颜/美妆效果;
    所述第二生成模块,还用于基于待处理图像中的关键点和所述变形区域的变形效果参数的参数值,在所述待处理图像上生成变形效果的特效时,根据所述美颜/美妆效果参数,在所述待处理图像显示美颜/美妆效果。
  96. 一种电子设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述存储器中存储的计算机程序,且所述计算机程序被执行时,实现上述权利要求1-49中任一项所述的方法。
  97. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时,实现上述权利要求1-49中任一项所述的方法。
PCT/CN2019/074498 2018-02-07 2019-02-01 变形特效程序文件包的生成及变形特效生成方法与装置 Ceased WO2019154337A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2020536147A JP7066855B2 (ja) 2018-02-07 2019-02-01 変形特殊効果プログラムファイルパッケージの生成及び変形特殊効果生成方法並びに装置
KR1020207018884A KR102386640B1 (ko) 2018-02-07 2019-02-01 변형 특수 효과 프로그램 파일 패키지의 생성 및 변형 특수 효과 생성 방법과 장치
SG11202006343RA SG11202006343RA (en) 2018-02-07 2019-02-01 Method and apparatus for generating special deformation effect program file packet, and method and apparatus for generating special deformation effects
US16/914,654 US11270408B2 (en) 2018-02-07 2020-06-29 Method and apparatus for generating special deformation effect program file package, and method and apparatus for generating special deformation effects

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810123074.2A CN108280883B (zh) 2018-02-07 2018-02-07 变形特效程序文件包的生成及变形特效生成方法与装置
CN201810123074.2 2018-02-07

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/914,654 Continuation US11270408B2 (en) 2018-02-07 2020-06-29 Method and apparatus for generating special deformation effect program file package, and method and apparatus for generating special deformation effects

Publications (1)

Publication Number Publication Date
WO2019154337A1 true WO2019154337A1 (zh) 2019-08-15

Family

ID=62807901

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/074498 Ceased WO2019154337A1 (zh) 2018-02-07 2019-02-01 变形特效程序文件包的生成及变形特效生成方法与装置

Country Status (6)

Country Link
US (1) US11270408B2 (zh)
JP (1) JP7066855B2 (zh)
KR (1) KR102386640B1 (zh)
CN (1) CN108280883B (zh)
SG (1) SG11202006343RA (zh)
WO (1) WO2019154337A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220137781A (ko) * 2020-03-23 2022-10-12 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 특수효과 처리 방법 및 장치

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108280883B (zh) 2018-02-07 2021-05-04 北京市商汤科技开发有限公司 变形特效程序文件包的生成及变形特效生成方法与装置
CN109087239B (zh) * 2018-07-25 2023-03-21 腾讯科技(深圳)有限公司 一种人脸图像处理方法、装置及存储介质
CN109064387A (zh) * 2018-07-27 2018-12-21 北京微播视界科技有限公司 图像特效生成方法、装置和电子设备
CN109146770B (zh) * 2018-07-27 2024-12-13 北京抖音科技有限公司 一种形变图像生成方法、装置、电子设备及计算机可读存储介质
CN109003224B (zh) * 2018-07-27 2024-10-15 北京微播视界科技有限公司 基于人脸的形变图像生成方法和装置
CN109064388A (zh) * 2018-07-27 2018-12-21 北京微播视界科技有限公司 人脸图像效果生成方法、装置和电子设备
CN110880156A (zh) * 2018-09-05 2020-03-13 武汉斗鱼网络科技有限公司 一种长腿特效实现方法、存储介质、设备及系统
CN111105345B (zh) * 2018-10-26 2021-11-09 北京微播视界科技有限公司 图像处理方法、装置、电子设备及计算机可读存储介质
CN109688324A (zh) * 2018-12-04 2019-04-26 深圳市子瑜杰恩科技有限公司 短视频道具切换方法及相关产品
CN110070496B (zh) * 2019-02-28 2020-07-31 北京字节跳动网络技术有限公司 图像特效的生成方法、装置和硬件装置
CN110035271B (zh) * 2019-03-21 2020-06-02 北京字节跳动网络技术有限公司 保真图像生成方法、装置及电子设备
CN111882567A (zh) * 2020-08-03 2020-11-03 深圳传音控股股份有限公司 Ar效果的处理方法、电子设备及可读存储介质
CN113709549A (zh) * 2021-08-24 2021-11-26 北京市商汤科技开发有限公司 特效数据包生成、图像处理方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055912A (zh) * 2009-10-29 2011-05-11 北京中星微电子有限公司 一种视频应用系统、视频特效处理系统和方法
CN103810739A (zh) * 2014-02-20 2014-05-21 南京师范大学 一种图像文字变形动画的生成方法
CN105868769A (zh) * 2015-01-23 2016-08-17 阿里巴巴集团控股有限公司 图像中的人脸关键点定位方法及装置
CN107343211A (zh) * 2016-08-19 2017-11-10 北京市商汤科技开发有限公司 视频图像处理方法、装置和终端设备
CN108280883A (zh) * 2018-02-07 2018-07-13 北京市商汤科技开发有限公司 变形特效程序文件包的生成及变形特效生成方法与装置

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3377307B2 (ja) * 1994-07-29 2003-02-17 ブラザー工業株式会社 モンタージュ作成装置
US5990901A (en) * 1997-06-27 1999-11-23 Microsoft Corporation Model based image editing and correction
JPH11306372A (ja) * 1998-04-17 1999-11-05 Sharp Corp 画像加工装置、画像加工方法およびその方法を記憶した記憶媒体
JP2001268594A (ja) * 2000-03-15 2001-09-28 Infiniteface.Com Inc 三次元ビューティーシミュレーション用クライアントサーバシステム
JP2003116053A (ja) * 2001-10-05 2003-04-18 Hitachi Ltd 特殊効果データ符号化方法及び特殊効果表示方法及び特殊効果データ編集方法
JP2003263641A (ja) * 2002-03-11 2003-09-19 Mitsubishi Heavy Ind Ltd 移動分析装置
US20070153091A1 (en) * 2005-12-29 2007-07-05 John Watlington Methods and apparatus for providing privacy in a communication system
FR2907569B1 (fr) * 2006-10-24 2009-05-29 Jean Marc Robin Procede et dispositif de simulation virtuelle d'une sequence d'images video.
JP2011053942A (ja) * 2009-09-02 2011-03-17 Seiko Epson Corp 画像処理装置、画像処理方法および画像処理プログラム
EP2638526B1 (en) * 2010-11-12 2020-04-29 Provenance Asset Group LLC Method and apparatus for selecting content segments
US9007473B1 (en) * 2011-03-30 2015-04-14 Rawles Llc Architecture for augmented reality environment
CN102567031A (zh) * 2012-03-01 2012-07-11 盛乐信息技术(上海)有限公司 视频特效扩充方法及系统
US8824793B2 (en) * 2012-03-02 2014-09-02 Adobe Systems Incorporated Methods and apparatus for applying a bokeh effect to images
US9298931B2 (en) * 2012-08-15 2016-03-29 Empire Technology Development Llc Digital media privacy protection
CN105451090B (zh) * 2014-08-26 2019-03-29 联想(北京)有限公司 图像处理方法和图像处理装置
JP6369246B2 (ja) * 2014-09-08 2018-08-08 オムロン株式会社 似顔絵生成装置、似顔絵生成方法
JP6709993B2 (ja) * 2015-10-26 2020-06-17 パナソニックIpマネジメント株式会社 メイクパーツ生成装置およびメイクパーツ生成方法
US9838641B1 (en) * 2015-12-30 2017-12-05 Google Llc Low power framework for processing, compressing, and transmitting images at a mobile image capture device
CN105975935B (zh) * 2016-05-04 2019-06-25 腾讯科技(深圳)有限公司 一种人脸图像处理方法和装置
JP2017220039A (ja) * 2016-06-08 2017-12-14 大日本印刷株式会社 プログラム生成装置及びプログラム
CN106302124A (zh) * 2016-08-18 2017-01-04 北京奇虎科技有限公司 一种添加特效的方法及电子设备
WO2018033137A1 (zh) 2016-08-19 2018-02-22 北京市商汤科技开发有限公司 在视频图像中展示业务对象的方法、装置和电子设备
EP3321846A1 (en) * 2016-11-15 2018-05-16 Mastercard International Incorporated Systems and methods for secure biometric sample raw data storage

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055912A (zh) * 2009-10-29 2011-05-11 北京中星微电子有限公司 一种视频应用系统、视频特效处理系统和方法
CN103810739A (zh) * 2014-02-20 2014-05-21 南京师范大学 一种图像文字变形动画的生成方法
CN105868769A (zh) * 2015-01-23 2016-08-17 阿里巴巴集团控股有限公司 图像中的人脸关键点定位方法及装置
CN107343211A (zh) * 2016-08-19 2017-11-10 北京市商汤科技开发有限公司 视频图像处理方法、装置和终端设备
CN108280883A (zh) * 2018-02-07 2018-07-13 北京市商汤科技开发有限公司 变形特效程序文件包的生成及变形特效生成方法与装置

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220137781A (ko) * 2020-03-23 2022-10-12 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 특수효과 처리 방법 및 장치
JP2023518878A (ja) * 2020-03-23 2023-05-08 北京字節跳動網絡技術有限公司 特殊効果処理方法及び装置
JP7473674B2 (ja) 2020-03-23 2024-04-23 北京字節跳動網絡技術有限公司 特殊効果処理方法及び装置
US12299269B2 (en) 2020-03-23 2025-05-13 Beijing Bytedance Network Technology Co., Ltd. Special effect processing method and apparatus
KR102823643B1 (ko) * 2020-03-23 2025-06-20 두인 비전 컴퍼니 리미티드 특수효과 처리 방법 및 장치

Also Published As

Publication number Publication date
CN108280883B (zh) 2021-05-04
SG11202006343RA (en) 2020-07-29
JP2021508882A (ja) 2021-03-11
US20200327641A1 (en) 2020-10-15
US11270408B2 (en) 2022-03-08
KR102386640B1 (ko) 2022-04-14
JP7066855B2 (ja) 2022-05-13
KR20200094769A (ko) 2020-08-07
CN108280883A (zh) 2018-07-13

Similar Documents

Publication Publication Date Title
US11521389B2 (en) Method for generating special effect program file package, method for generating special effect, electronic device, and storage medium
US11270408B2 (en) Method and apparatus for generating special deformation effect program file package, and method and apparatus for generating special deformation effects
WO2019154339A1 (zh) 特效程序文件包的生成及特效生成方法与装置、电子设备
CN113658298B (zh) 特效程序文件包的生成及特效生成方法与装置
US11625878B2 (en) Method, apparatus, and system generating 3D avatar from 2D image
WO2019154338A1 (zh) 描边特效程序文件包的生成及描边特效生成方法与装置
CN109035373B (zh) 三维特效程序文件包的生成及三维特效生成方法与装置
CN106355629A (zh) 一种虚拟形象的配置方法及装置
CN113709549A (zh) 特效数据包生成、图像处理方法、装置、设备及存储介质
CN108536790B (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: 19751617

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020536147

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20207018884

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19751617

Country of ref document: EP

Kind code of ref document: A1