WO2019154338A1 - 描边特效程序文件包的生成及描边特效生成方法与装置 - Google Patents

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

Info

Publication number
WO2019154338A1
WO2019154338A1 PCT/CN2019/074501 CN2019074501W WO2019154338A1 WO 2019154338 A1 WO2019154338 A1 WO 2019154338A1 CN 2019074501 W CN2019074501 W CN 2019074501W WO 2019154338 A1 WO2019154338 A1 WO 2019154338A1
Authority
WO
WIPO (PCT)
Prior art keywords
key point
target object
stroke effect
parameter
image
Prior art date
Application number
PCT/CN2019/074501
Other languages
English (en)
French (fr)
Inventor
许亲亲
李展鹏
Original Assignee
北京市商汤科技开发有限公司
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 北京市商汤科技开发有限公司 filed Critical 北京市商汤科技开发有限公司
Priority to JP2020535033A priority Critical patent/JP7033372B2/ja
Priority to SG11202006480XA priority patent/SG11202006480XA/en
Priority to KR1020207018869A priority patent/KR102386639B1/ko
Publication of WO2019154338A1 publication Critical patent/WO2019154338A1/zh
Priority to US16/917,986 priority patent/US11640683B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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/107Static hand or arm
    • G06V40/113Recognition of static hand signs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present application relates to computer vision technology, and in particular to a method and device for generating a stroke effect program file package and a stroke effect.
  • 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 stroke effect.
  • a method for generating a stroke effect program file package includes:
  • a stroke effect program file package is generated according to the parameter value of the stroke effect parameter of the target object.
  • the target object includes any one or more of the following: at least a part of a character, an object, and an imported child material.
  • the method further includes:
  • the generated stroke effect program file package according to the parameter value of the stroke effect parameter of the target object includes: generating the stroke effect program file package according to the correspondence relationship and the parameter value.
  • the area to be stroked of the target object includes: at least part of an object segmentation boundary area of the image where the target object is located, or the target A fitted line of at least two key points of the object.
  • the method further includes: receiving a target object selection instruction input through an interaction interface of the operation bar, selecting the target object, and generating the target object.
  • the stroke effect parameter setting interface and displaying the stroke effect parameter setting interface of the target object under the operation bar.
  • the acquiring a parameter value of the stroke effect parameter of the target object includes: receiving a stroke effect parameter setting interface by using the target object The parameter value of the stroke effect parameter sent by the interactive interface in .
  • the acquiring a parameter value of a stroke effect parameter of the target object includes: receiving a stroke effect by the target object in response to receiving a parameter value of the stroke effect parameter sent by the interaction interface in the parameter setting interface, the set parameter value is used as a parameter value of the stroke effect parameter of the target object; and/or, in response to not receiving the target object through the target object
  • the stroke effect parameter sets the parameter value of the stroke effect parameter sent by the interaction interface in the interface, and uses the preset parameter value as the parameter value of the stroke effect parameter of the target object.
  • the target object is one or more.
  • the stroke effect parameter includes any one or more of the following:
  • Display parameter used to control whether the stroke effect is displayed
  • Width parameter used to indicate the width of the stroke
  • Color parameter used to indicate the color of the stroke
  • Trigger event parameter used to indicate the trigger event that triggers the display of the stroke effect
  • Delay trigger parameter used to indicate the time to delay the display of the stroke effect
  • Display frame number parameter used to indicate how many frames are displayed by the stroke effect
  • Trigger end parameter a trigger event used to indicate the end of the display stroke effect
  • Beauty/Beauty Effect Parameters Used to indicate the beauty/beauty effect displayed on the preset part when the stroke effect is displayed.
  • the trigger event includes any one or more of the following: no event trigger, eye motion, head motion, eyebrow motion, Hand movements, mouth movements, shoulder movements, deformation effects, sticker effects, sound effects.
  • the method further includes: receiving a cancel instruction of canceling the stroke effect of the target object input through the interaction interface of the operation bar, and deleting the target object Stroke effect parameters.
  • the method further includes: displaying a reference image of the target object by using a content display column.
  • a reference image of at least a part of the character includes any one or more of the following : complete image, head image, face image, shoulder image, arm image, gesture image, waist image, leg image, foot image.
  • the method further includes: displaying, according to the parameter value of the stroke effect parameter of the target object, the target object in the content display column Stroke effect.
  • the method further includes: displaying a key point of the target object in the content display column.
  • the key point includes any one or more of the following: a head key point, a face key point, a shoulder key point, and an arm. Key points, key points of the gesture, key points of the waist, key points of the legs, key points of the foot, key points of the human skeleton.
  • the head key point includes any one or more of the following: an overhead key point, a nose key point, and a chin key point; /or,
  • the facial face key point includes any one or more of the following: a facial contour key point, an eye key point, an eyebrow key point, a nose key point, a mouth key point; and/or,
  • the shoulder key points include any one or more of the following: a shoulder intersection key point at a position where the shoulder and the head meet, and a midpoint position between the key point of the arm root contour and the key point of the shoulder intersection a key point in the shoulder contour; and/or,
  • the key points of the arm include any one or more of the following: a wrist contour key point, an elbow contour key point, an arm root contour key point, and a midpoint position between the wrist contour key point and the elbow contour key point. a key point in the midpoint of the arm contour, and a midpoint of the midpoint of the boom at a midpoint between the key point of the elbow contour and the key point of the arm root contour; and/or,
  • the gesture key points include any one or more of the following: four vertex keys of the gesture box, and a center key point of the gesture frame; and/or,
  • the leg key points include 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 between a key point of the knee contour and a key point of the ankle contour
  • the midpoint of the calf contour at the midpoint position, the midpoint of the inner contour of the thigh at the midpoint between the key point of the knee and the key point of the ankle, and the key point of the outer contour of the knee and the outer thigh a key point in the outer contour of the thigh at the midpoint between the contour key points; and/or,
  • the waist key point includes any one or more of the following: N equally divided between the outer point contour of the thigh root and the key point of the arm root contour, and the generated N equal points; wherein the N is greater than 1; and / or,
  • the foot key points include any one or more of the following: a toe key point and a heel key point; and/or,
  • the human skeleton key points include 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, a left elbow bone key point, a left wrist bone key point, a 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 bone key points, and neck bone key points.
  • the eye key point includes any one or more of the following: a left eye key point, a left eye pupil center key point, and a left eye center point. Key points, key points in the right eye, key points in the center of the right eye, and key points in the center of the right eye; and/or
  • the eyebrow key point includes any one or more of the following: a left eyebrow key point and a right eyebrow key point; and/or
  • the key points of the nose include any one or more of the following: a key point of the nose bridge, a key point below the nose, and a key point of the contour of the outside of the nose; and/or
  • the key points of the mouth include any one or more of the following: an upper lip key point, and a lower lip key point.
  • the method further includes: displaying an operation interface, where the operation interface includes: the operation column, the content display column, and/or the program file column.
  • the operation interface includes three areas of a left side, a middle side, and a right side;
  • the displaying an operation interface includes: displaying the operation bar on a left side of the operation interface, displaying the 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 method further includes: saving, according to the received save instruction, a location pointed by the save instruction The stroke effect program file package.
  • the saving the stroke effect program file package at the location pointed by the save instruction according to the received save instruction comprises:
  • the compressed file package is stored in a folder pointed to by the save location.
  • a method for generating a stroke effect including:
  • the method before the acquiring the parameter value of the stroke effect parameter of the target object, the method further includes:
  • And obtaining the parameter value of the stroke effect parameter of the target object comprising: acquiring a parameter value of the stroke effect parameter of the target object in the stroke effect program file package.
  • the stroke effect program file package is generated by using a method for generating a stroke effect program file package according to any one of the embodiments of the present application.
  • the method further includes:
  • the determining a region to be stroked of the target object includes:
  • the at least partially segmented boundary region is the to-be-drawn region of the target object.
  • the determining a region to be stroked of the target object includes:
  • a fitting line of at least two key points of the target object is a to-be-drawn area of the target object.
  • the acquiring a key point detection result of the target object in the image to be processed includes: performing, by using a neural network, the image to be processed The key points of the target object are detected, and the key point detection results are output.
  • the key point detection result includes any one or more of the following: a position of the key point in the image; a pre-determination of the key point Set the number.
  • the image to be processed includes any one or more of the following: a still image, an image in a video.
  • the stroke effect parameter includes: a trigger event parameter, where the trigger action parameter is used to indicate a trigger event that triggers a display stroke effect;
  • the method further includes: detecting whether a trigger event corresponding to a parameter value of the trigger event parameter occurs in the image to be processed;
  • Generating a stroke effect of the target object on the image to be processed based on a parameter value of a target object in the image to be processed and a stroke effect parameter of the target object including: in response to detecting the image a trigger event corresponding to the parameter value in which the trigger event parameter appears in the image to be processed, and the image is generated on the image to be processed based on the target object in the image to be processed and the parameter value of the stroke effect parameter of the target object The stroke effect of the target object.
  • the stroke effect parameter includes: a trigger end parameter: the trigger end parameter is used to indicate a trigger event that ends the display stroke effect;
  • the method further includes: detecting whether a trigger event corresponding to the parameter value of the trigger end parameter occurs in the image to be processed; and triggering in response to detecting the parameter value of the trigger end parameter in the image to be processed An event that cancels a stroke effect of the target object generated on the image to be processed.
  • the stroke effect parameter includes: a beauty/beauty effect parameter, and the beauty/beauty effect parameter is used to indicate when the stroke effect is displayed.
  • the method further includes: generating a stroke effect of the target object on the image to be processed based on a parameter value of a target object in the image to be processed to be processed and a stroke effect parameter of the target object, according to the The beauty/beauty effect parameter is displayed, and the beauty/beauty effect is displayed on the image to be processed.
  • the importing the stroke effect program file package comprises: calling the stroke effect program file package by calling an interface function for reading the file package Read into the memory; parse the stroke effect program file package to obtain a stroke effect program file, where the stroke effect program file includes a parameter value of the stroke effect parameter of the target object.
  • the acquiring the parameter value of the stroke effect parameter of the target object comprises: creating a sticker handle by using an interface function for creating a sticker handle; reading the The parameter value of the stroke effect parameter of the target object in the stroke effect program file is stored in the sticker handle.
  • the method when the image to be processed is an image in a video, the method further includes: according to the target object in the stroke effect program file in the sticker handle The parameter value of the stroke effect parameter acquires the number of video frames displayed by the stroke effect of the target object in the video, and reads the video image corresponding to the number of the video frames from the video in advance.
  • the method further includes: in response to the stroke effect file package being played, destroying the sticker handle by an interface function for calling a destroy sticker handle.
  • a device for generating a stroke effect program file package includes:
  • a first obtaining module configured to acquire a parameter value of a stroke effect parameter of the target object
  • the first generating module is configured to generate a stroke effect program file package according to the parameter value of the stroke effect parameter of the target object.
  • the target object includes any one or more of the following: at least a part of a character, an object, and an imported child material.
  • the method further includes:
  • the first generating module is configured to: generate the stroke effect program file package according to the correspondence relationship and the parameter value.
  • the object to be stroked of the target object includes: at least part of an object segmentation boundary region of the image of the target object, or the target A fitted line of at least two key points of the object.
  • the method further includes: an operation bar, including an interaction interface, configured to receive a target object selection instruction input through the interaction interface, and select the target An object, generating a stroke effect parameter setting interface of the target object, and displaying a stroke effect parameter setting interface of the target object under the operation column;
  • the first acquiring module is configured to receive a parameter value of a stroke effect parameter sent by an interaction interface in a stroke effect parameter setting interface of the target object.
  • the first obtaining module is configured to: in response to receiving the interaction in the stroke effect parameter setting interface of the target object The parameter value of the stroke effect parameter sent by the interface, the set parameter value is used as the parameter value of the stroke effect parameter of the target object; and/or, in response to not receiving the stroke effect parameter setting by the target object The parameter value of the stroke effect parameter sent by the interaction interface in the interface, and the preset parameter value is used as the parameter value of the stroke effect parameter of the target object.
  • the stroke effect parameter includes any one or more of the following:
  • Display parameter used to control whether the stroke effect is displayed.
  • Width parameter used to indicate the width of the stroke
  • Color parameter used to indicate the color of the stroke
  • Trigger event parameter used to indicate the trigger event that triggers the display of the stroke effect
  • Delay trigger parameter used to indicate the time to delay the display of the stroke effect
  • Display frame number parameter used to indicate how many frames are displayed by the stroke effect
  • Trigger end parameter a trigger event used to indicate the end of the display stroke effect
  • Beauty/Beauty Effect Parameters Used to indicate the beauty/beauty effect displayed on the preset part when the stroke effect is displayed.
  • the trigger event includes any one or more of the following: no event trigger, eye motion, head motion, eyebrow motion, Hand movements, mouth movements, shoulder movements, deformation effects, sticker effects, sound effects.
  • the first obtaining module is configured to: receive a cancel instruction of canceling a stroke effect of the target object input through an interaction interface of the operation bar, Delete the stroke effect parameter of the target object.
  • the operation column further includes: a content display column, configured to display a reference image of the target object.
  • the reference image of at least a part of the character includes any one or more of the following characters of the character : complete image, head image, face image, shoulder image, arm image, gesture image, waist image, leg image, foot image.
  • the content display column is further configured to display the target object according to the parameter value of the stroke effect parameter of the target object. Stroke effect.
  • the content display column is further configured to display a key point of the target object.
  • the key point includes any one or more of the following: a head key point, a face key point, a shoulder key point, an arm Key points, key points of the gesture, key points of the waist, key points of the legs, key points of the foot, key points of the human skeleton.
  • the head key point includes any one or more of the following: an overhead key point, a nose tip key point, and a chin key point; /or,
  • the facial face key point includes any one or more of the following: a facial contour key point, an eye key point, an eyebrow key point, a nose key point, a mouth key point; and/or,
  • the shoulder key points include any one or more of the following: a shoulder intersection key point at a position where the shoulder and the head meet, and a midpoint position between the key point of the arm root contour and the key point of the shoulder intersection a key point in the shoulder contour; and/or,
  • the key points of the arm include any one or more of the following: a wrist contour key point, an elbow contour key point, an arm root contour key point, and a midpoint position between the wrist contour key point and the elbow contour key point. a key point in the midpoint of the arm contour, and a midpoint of the midpoint of the boom at a midpoint between the key point of the elbow contour and the key point of the arm root contour; and/or,
  • the gesture key points include any one or more of the following: four vertex keys of the gesture box, and a center key point of the gesture frame; and/or,
  • the leg key points include 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 between a key point of the knee contour and a key point of the ankle contour
  • the midpoint of the calf contour at the midpoint position, the midpoint of the inner contour of the thigh at the midpoint between the key point of the knee and the key point of the ankle, and the key point of the outer contour of the knee and the outer thigh a key point in the outer contour of the thigh at the midpoint between the contour key points; and/or,
  • the waist key point includes any one or more of the following: N equally divided between the outer point contour of the thigh root and the key point of the arm root contour, and the generated N equal points; wherein the N is greater than 1; and / or,
  • the foot key points include any one or more of the following: a toe key point and a heel key point; and/or,
  • the human skeleton key points include 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, a left elbow bone key point, a left wrist bone key point, a 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 bone key points, and neck bone key points.
  • the eye key point includes any one or more of the following: a left eye key point, a left eye pupil center key point, and a left eye center point. Key points, key points in the right eyelid, key points in the center of the right eye pupil, and key points in the center of the right eye; and/or,
  • the eyebrow key point includes any one or more of the following: a left eyebrow key point and a right eyebrow key point; and/or,
  • the key points of the nose include 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/or,
  • the key points of the mouth include any one or more of the following: an upper lip key point, and a lower lip key point.
  • the method further includes: an operation interface, the operation interface includes: the operation bar, the content display column and/or the program file column.
  • the operation interface includes three areas of a left side, a middle side, and a right side; the left side of the operation interface is the operation column, The middle of the operation interface is the content display column, and the right side of the operation interface is the program file column.
  • the method further includes: a saving module, configured to save the stroke special effect program at a position pointed by the save instruction according to the received save instruction File package.
  • the saving module is configured to: in response to receiving the save instruction, display a save path selection interface and a compression interface; and receive the save path Selecting a save location sent by the interface; receiving a compression mode sent according to the compression interface, and compressing the stroke effect program file package according to the compression manner to generate a compressed file package; storing the compressed file package to The save location points to the folder.
  • a stroke special effect generating apparatus including:
  • a second obtaining module configured to acquire a parameter value of a stroke effect parameter of the target object
  • a second generating module configured to generate a stroke effect of the target object on the image to be processed based on a parameter value of a target object in the image to be processed and a stroke effect parameter of the target object.
  • the method further includes:
  • the second obtaining module is configured to obtain a parameter value of a stroke effect parameter of the target object in the stroke effect program file package.
  • the stroke special effect program file package adopts a method for generating a stroke effect program file package or a stroke special effect program according to any one of the embodiments of the present application.
  • the file generation device is generated.
  • the method further includes: a determining module, configured to determine a to-be-drawn area of the target object;
  • the second generating module is configured to: according to a correspondence between a parameter value of a stroke effect parameter of the target object in the stroke effect program file package and a to-be-drawn area of the target object, in the to-be-drawn
  • the edge region generates the stroke effect.
  • the determining module is configured to: acquire the target object in the image to be processed and a portion other than the target object in the image to be processed Performing an object segmentation result; determining, based on the object segmentation result, that at least a portion of the segmentation boundary region is the object to be stroked region of the target object.
  • the determining module is configured to: acquire a key point detection result of the target object in the image to be processed; and determine, according to the key point detection result, A fitted line of at least two key points of the target object is a region to be stroked of the target object.
  • the method when the determining module acquires a key point detection result of the target object in the image to be processed, the method is configured to use the neural network to process the to-be-processed The image performs key point detection of the target object and outputs a key point detection result.
  • the key point detection result includes any one or more of the following: a position of the key point in the image to be processed; the key point The preset number.
  • the image to be processed includes any one or more of the following: a still image, an image in a video.
  • the stroke effect parameter includes: a trigger event parameter, where the trigger action parameter is used to indicate a trigger event that triggers the display of the stroke effect;
  • the device further includes: a detecting module, configured to detect whether a trigger event corresponding to the parameter value of the trigger event parameter occurs in the image to be processed;
  • the second generating module is configured to: based on the detection module detecting a trigger event corresponding to a parameter value of the trigger event parameter in the image to be processed, based on the target object and the target object in the image to be processed a parameter value of the stroke effect parameter, and a stroke effect of the target object is generated on the image to be processed.
  • the stroke effect parameter includes: a trigger end parameter: the trigger end parameter is used to indicate a trigger event that ends the display of the stroke effect;
  • the device further includes: a detecting module, configured to detect whether a trigger event corresponding to the parameter value of the trigger end parameter occurs in the image to be processed;
  • the second generating module is further configured to cancel the triggering event generated on the image to be processed, in response to the detecting module detecting a trigger event corresponding to a parameter value of the triggering end parameter in the image to be processed The stroke effect of the target object.
  • the stroke effect parameter includes: a beauty/beauty effect parameter, and the beauty/beauty effect parameter is used to indicate when the stroke effect is displayed.
  • the second generating module is further configured to: when generating a stroke effect of the target object on the image to be processed, based on a parameter value of a target object in the image to be processed and a stroke effect parameter of the target object, Displaying a beauty/beauty effect on the image to be processed according to the beauty/beauty effect parameter.
  • the importing module is configured to: read the stroke effect program file package into a memory by calling an interface function for reading a file package;
  • the stroke effect program file package obtains a stroke effect program file, and the stroke effect program file includes a parameter value of the stroke effect parameter of the target object.
  • the second obtaining module is configured to: create a sticker handle by using an interface function for creating a sticker handle; and read the target in the stroke effect program file The parameter value of the object's stroke effect parameter is stored in the sticker handle.
  • the device when the image to be processed is an image in a video, the device further includes: a third acquiring module, configured to perform the drawing according to the sticker handle Obtaining a parameter value of a stroke effect parameter of the target object in the edge effect program file, acquiring a number of video frames displayed by the stroke effect of the target object in the video, and reading the number of the video frames from the video in advance Corresponding video image.
  • a third acquiring module configured to perform the drawing according to the sticker handle Obtaining a parameter value of a stroke effect parameter of the target object in the edge effect program file, acquiring a number of video frames displayed by the stroke effect of the target object in the video, and reading the number of the video frames from the video in advance Corresponding video image.
  • the second obtaining module is further configured to: by means of an interface function for calling the destroying the sticker handle, in response to the stroke effect program file package being played. Destroy the sticker handle.
  • 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 stroke effect program file package provided by the above embodiment of the present application, an electronic device, a program, and a medium, acquire parameter values of a stroke effect parameter of a target object, and according to the stroke effect parameter of the target object The parameter value is generated, and the stroke effect program file package is generated, so that the stroke effect is added to the target object in the image based on the stroke effect program file package, and the stroke effect of the target object in the image is implemented, and the embodiment of the present application does not need to manually
  • the stroke effect program file executable by the rendering engine can be generated, the operation is simple, the time required is short, the overall efficiency of the stroke effect effect is improved, and the error that may be caused by manually writing the program file is avoided, and the effective protection is effectively guaranteed.
  • the accuracy of the stroke effect is achieved.
  • the parameter value of the edge effect parameter generates a stroke effect of the target object on the image, thereby realizing the stroke effect of the target object in the image, realizing the stroke effect of the image, and improving the image playing effect.
  • FIG. 1 is a flow chart of an embodiment of a method for generating a stroke effect program file package according to the present application.
  • FIG. 2 is an exemplary schematic diagram of key points of a face in an embodiment of the present application.
  • FIG. 3 is an exemplary schematic diagram of a hand motion in an embodiment of the present application.
  • FIG. 4 is an exemplary schematic diagram of an operation interface of a device for generating a stroke effect program file package according to an embodiment of the present application.
  • FIG. 5 is a flowchart of another embodiment of a method for generating a stroke effect program file package according to the present application.
  • FIG. 6 is a flowchart of an embodiment of a method for generating a stroke effect of the present application.
  • FIG. 7 is a flowchart of another embodiment of a method for generating a stroke effect of the present application.
  • FIG. 8 is a schematic structural diagram of an embodiment of a device for generating a stroke effect program file package according to the present application.
  • FIG. 9 is a schematic structural diagram of another embodiment of a device for generating a stroke effect program file package according to the present application.
  • FIG. 10 is a schematic structural diagram of an embodiment of a stroke effect generating apparatus according to the present application.
  • FIG. 11 is a schematic structural view of another embodiment of the stroke effect generating apparatus of the present application.
  • FIG. 12 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 flow chart of an embodiment of a method for generating a stroke effect program file package according to the present application.
  • the method for generating the stroked effect program file package in each embodiment of the present application can be implemented by, for example, but not limited to, one device (the apparatus for generating a stroke effect program file package in the embodiment of the present application).
  • the method for generating a stroked effect program file package of the embodiment includes:
  • the target object may include, but is not limited to, any one or more of the following: at least a part of a character, an object, an imported child material, and the like.
  • 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 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 target object may be one or more.
  • the parameter values of the stroke effect parameters of the plurality of target objects can be acquired, and the stroke effect program file package is generated based on the parameter values of the stroke effect parameters of the plurality of target objects.
  • the stroke effect or the stroke effect in the embodiments of the present application which may also be referred to as outline rendering, refers to rendering the outline of the target object with a certain color and/or a certain thickness of the line.
  • the stroke effect program file package may be used to perform stroke special effect processing on the target object in the image, add a stroke to the target object in the image, and implement a stroke effect, for example, a target object in the video image. Perform rendering processing of the AR effect.
  • the embodiments of the present application can be applied to images, videos, games, etc., for example, in order to highlight an object in the game, a stroke effect can be added to a certain target object in the game based on the embodiment of the present application.
  • the method for generating a stroke effect program file package acquires a parameter value of a stroke effect parameter of the target object, and generates a stroke effect program according to the parameter value of the stroke effect parameter of the target object.
  • the file package is configured to add a stroke effect to the target object in the image based on the stroke effect program file package, and implement a stroke effect of the target object in the image.
  • the embodiment of the present application can generate the rendering engine without manually writing the program file.
  • the executable stroke effect program file is simple in operation and short in time, which improves the overall efficiency of the stroke effect implementation, and avoids errors that may occur in the manual writing of the program file, thereby effectively ensuring the accuracy of the stroke effect.
  • the method for generating a stroked effect program file package may further include: receiving a target object selection instruction input through an interaction interface of the operation bar, selecting a target object, and generating a stroke effect parameter setting interface of the target object, And the stroke effect parameter setting interface of the target object is displayed under the operation bar.
  • the operation 102 can be implemented by receiving a parameter value of the stroke effect parameter sent by the interaction interface in the stroke effect parameter setting interface of the target object.
  • operation 102 may be implemented by: in response to receiving a parameter value of a stroke effect parameter sent by an interaction interface in a stroke effect parameter setting interface of the target object, using the set parameter value as The parameter value of the stroke effect parameter of the target object; and/or, in response to the parameter value of the stroke effect parameter sent by the interaction interface in the stroke effect parameter setting interface of the target object, the preset parameter value is used as the preset parameter value The parameter value of the stroke effect parameter of the target object.
  • the method further includes: receiving a cancel instruction of canceling a stroke effect of the target object input through an interaction interface of the operation bar, and deleting a stroke effect of the target object parameter.
  • the method for generating the stroked effect program file package of the present application may further include: establishing a correspondence between the parameter to be drawn of the target object and the parameter value of the stroke effect parameter of the target object.
  • the operation 104 may include: generating a stroke effect according to the correspondence between the parameter to be stroked of the target object and the parameter value of the stroke effect parameter of the target object and the parameter value of the stroke effect parameter of the target object.
  • Program file package That is, in the stroke effect program package of the embodiment, a correspondence relationship between the parameter to be stroked of the target object and the parameter value of the stroke effect parameter of the target object may be further included.
  • the object to be stroked of the target object may include, but is not limited to, at least part of an object segmentation boundary region of the image in which the target object is located, or a line of fit of at least two key points of the target object.
  • the key points of the target object can be defined in advance.
  • the above-mentioned key points may be, for example but 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 point.
  • 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 to-be-drawn area of the target object may be preset as: a fitting line of at least two predetermined key points of the target object.
  • a fitting line of at least two predetermined key points of the target object when the target object is a face, a plurality of key points may be defined for the face, so that in the stroke effect generation, the line to be drawn of the face is determined based on the fitted line of the face key points.
  • the target object when the target object is a gesture (hand), a plurality of key points may be defined for the gesture (hand), so that in the stroke effect generation, based on the gesture (hand) key point
  • the fitted line determines the area to be stroked of the hand.
  • the target object when the target object is the head, multiple key points may be defined for the head, so that in the stroke effect generation, the head line is determined based on the fitting line of the head key point. Border area.
  • FIG. 2 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.
  • the stroke effect parameter includes any one or more of the following:
  • Display parameter Used to control whether the stroke effect is displayed.
  • the parameter values include “Yes” and “No”. When the parameter value is "Yes”, it indicates that the deformation area needs to be displayed during video playback, and the parameter value is "No". ” indicates that there is no need to display the deformed area during video playback;
  • color parameter (Color) used to indicate the color of the stroke, for example, you can set the color block display color picker for the user to choose, you can display white by default;
  • trigger event parameter used to indicate the trigger event that triggers the display of the stroke effect. It refers to what event triggers the stroke effect of the display target object, and its parameter value may include each trigger event, and the user may select at least one event from the preset event set as the trigger action. That is, during the video playback or image playback, when the corresponding trigger event is detected, the stroke effect of the display target object can be triggered, for example, when the trigger event “open mouth” specified in the trigger time parameter is detected in the video, the display starts.
  • the stroke effect of the mouth is used to indicate the trigger event that triggers the display of the stroke effect. It refers to what event triggers the stroke effect of the display target object, and its parameter value may include each trigger event, and the user may select at least one event from the preset event set as the trigger action. That is, during the video playback or image playback, when the corresponding trigger event is detected, the stroke effect of the display target object can be triggered, for example, when the trigger event “open mouth” specified in the trigger time parameter is detected
  • delay trigger parameter used to indicate the time to delay the display of the stroke effect, that is: when detecting a trigger event in the trigger event parameter from a frame in the video, how many frames are delayed to start displaying the description of the target object Edge effects, you can set or select the time to delay the display of the stroke effect of the target object as its parameter value;
  • Display Frames parameter used to indicate how many frames are displayed by the stroke effect.
  • the number of frames can be selected by the user, and the number of selected frames can be exemplarily set to 0, indicating that the stroke effect is always displayed;
  • trigger end parameter used to indicate the end of the display of the stroke effect of the trigger event, refers to the end of the display of the target object's stroke effect, its parameter value includes each trigger event, the user can set from the preset event Select at least one event as the trigger event for the stroke effect that ends the target object.
  • the trigger event may include, but is not limited to, any one or more of the following: no event trigger, eye motion, head motion, eyebrow motion, hand motion, mouth motion, shoulder Department action, deformation effects, sticker effects, sound effects;
  • beauty / beauty (beauty and / or beauty) effect parameters used to indicate the beauty of the target object (or other object) when displaying the stroke effect of the target object and / or Beauty effects, such as red lips, beautiful eyes, blue eyes, etc. For example, when the stroke effect of the head is displayed, a red lip is displayed at the mouth.
  • the trigger event may include, but is not limited to, any one or more of the following: no event trigger, eye motion, head motion, eyebrow motion, hand motion, mouth motion, shoulder Department action, deformation effects, sticker effects, sound effects.
  • 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.
  • Deformation effects such as facial deformation
  • Sticker effects such as rainbow effects on the mouth, earrings on the ears, etc.
  • Sound effects for example, some kind of sound effects
  • FIG. 3 it is an exemplary schematic diagram of the hand motion in the embodiment of the present application.
  • the method further includes: displaying a reference image of the target object through the content display column.
  • the reference image of at least a part of the character includes, for example, but not limited to, any one or more of the following: a complete image, a head image, a face image, a shoulder image , arm images, gesture images, waist images, leg images, foot images, and more.
  • the method further includes: displaying a stroke of the target object in the content display column according to the parameter value of the stroke effect parameter of the target object effect.
  • the method further includes: generating a stroke effect program file package, starting according to the received startup instruction, and displaying an operation interface, where the operation interface includes: Column, 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 operation interface may include: displaying an operation bar 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 left side operation column shows an example of the content of the BackgroundEdge
  • the target object selection instruction can be received through the interaction interface 21 in the left operation column, and another part of the interaction interface under the target object can be used.
  • the content display column can display the stroke effect of the target object according to the parameter value of the stroke effect parameter of the target object;
  • the program file display column on the right side is used to display the display area therein 22 displays the content of the stroke effect program file that implements the stroke effect of the target object, and the stroke effect program file package can be exported through the save instruction interface 23 in the program file display column, that is, the stroke effect program file package is generated and saved.
  • the action bar may include a stroke effect parameter setting interface.
  • the apparatus for generating a stroke effect program file package may include a stroke effect program file set in advance, which may be, for example, a lightweight data exchange format based on a JavaScript language (JavaScript). Object Notiation, json) file, or any other executable program file.
  • the parameter value of the stroke effect parameter in the stroke effect program file may be vacant or preset as a default value, and when the parameter value set for the stroke effect parameter is received, the corresponding parameter value in the stroke effect program file is automatically Updated to the received parameter value.
  • the generating device of the stroke effect program file package may include an operation bar, where the operation bar is provided with at least one interaction interface for receiving a parameter value set for the stroke effect of the target object;
  • the device for generating the special effect program package may further include a program file display field, and the program file for displaying the stroke effect of the target object is as shown in FIG. 4 , which is a device for generating a stroke effect program file package in the embodiment of the present application.
  • An operation interface example diagram, the operation interface of the generation device of the stroke effect program package includes an operation block and a program file display column.
  • the program file display column displays that the stroke effect parameter of the target object is vacant or is preset to a default value.
  • the stroke effect program file receives the parameter value set for the stroke effect parameter of a target object through the interactive interface of the operation bar, the parameter value of the stroke effect parameter of the target object is updated to the most recently received parameter.
  • the program file display bar displays the stroke effect program file after the parameter value is updated in real time.
  • 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 stroke effect package can be realized based on the user setting operation of the parameter value of the stroke effect parameter of the target object in the operation column. Simple, short time required, improve the overall efficiency of the stroke effect, and avoid the errors that may occur in the manual writing of the program file, effectively ensuring the accuracy of the stroke effect.
  • FIG. 5 is a flowchart of another embodiment of a method for generating a stroke effect program file package according to the present application. As shown in FIG. 5, the method for generating the stroked effect program file package of the embodiment includes:
  • the generating device of the stroke effect program file package is started according to the received startup command, and displays an operation interface, where the operation interface includes: an operation column, a content display column, and a program file column.
  • 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 target object may include, but is not limited to, any one or more of the following: at least a part of a character, an object, an imported child material, and the like.
  • the operation 306 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 102 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by an operation interface executed by the processor or a content display bar in the operation interface.
  • the operation 308 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 further includes: displaying a key point of the target object in the content display column.
  • the method may further include: saving the location pointed by the save instruction according to the received save instruction. Stroke effect program package.
  • the saving of the stroke effect file package at the location pointed by the save instruction according to the received save instruction may include:
  • the stroke effect program file package can be compressed and saved, so as to be imported into the mobile phone terminal for the stroke effect generation.
  • the stroke effect program file package can be imported into the terminal, and the stroke object effect generation is performed on the target object in the image played by the terminal.
  • FIG. 6 is a flowchart of an embodiment of a method for generating a stroke effect of the present application.
  • the method for generating the stroke effect 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 referred to as a stroke effect generation device).
  • the stroke 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 method for generating a stroke effect of the 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 executed by the processor.
  • the parameter value of the stroke effect parameter of the target object is obtained based on the stroke effect generation method provided by the above embodiment of the present application; and the parameter value of the stroke effect parameter of the target object and the target object in the image to be processed is to be
  • the stroke effect of the target object is generated on the image, thereby realizing the stroke effect of the target object in the image, realizing the stroke effect of the image, and improving the image playback effect.
  • the method further includes: importing a stroke effect program file package.
  • the importing the stroke effect program file package may include: reading the stroke effect program file package into the memory by calling an interface function for reading the file package; and parsing the stroke effect program file package The stroke effect file is obtained, and the stroke effect program file includes the parameter value of the stroke effect parameter of the target object.
  • the stroked effect program file may include, for example, but is not limited to, a stroke effect program file generated by a json program or other executable program.
  • the operation 402 may include: acquiring a parameter value of a stroke effect parameter of the target object in the stroke effect program file package.
  • the above described stroke effect program file package may be, but is not limited to, generated by using the generation method embodiment of any of the above-described stroke effect program file packages of the present application.
  • the stroke effect program package may include parameter values of at least one stroke effect parameter of the target object.
  • the stroke effect program package may further include: a correspondence between a parameter to be stroked of the target object and a parameter value of the stroke effect parameter of the target object.
  • the operation 402 may include: creating a sticker handle by an interface function for creating a sticker handle; reading a parameter value of a stroke effect parameter of the target object in the stroke effect program file, and storing the parameter value in the sticker handle .
  • the foregoing embodiment may further include: acquiring a stroke effect of the target object according to a parameter value of a stroke effect parameter of the target object in the stroke effect program file in the sticker handle.
  • the number of video frames displayed in the video, and the video image corresponding to the number of video frames is read in advance from the video.
  • the method further includes: in response to the stroke effect file package being played, destroying the sticker handle by using an interface function for calling the destroy sticker handle.
  • the method further includes: determining a region to be stroked of the target object.
  • the operation 404 may include: generating a drawing in the to-be-drawn area based on the correspondence between the parameter value of the stroke effect parameter of the target object in the stroke effect program file package and the target object to be stroked area Side effects.
  • determining the area to be stroked of the target object may include: acquiring a part of the image to be processed and a part other than the target object in the image to be processed, and performing an object segmentation result; determining at least part of the segmentation boundary based on the result of the object segmentation The area is the area to be stroked of the target object.
  • determining a region to be stroked of the target object may include: acquiring a key point detection result of the target object in the image to be processed; and determining a fitting line of at least two key points of the target object based on the key point detection result; The target area to be stroked.
  • the key point detection result of the target object in the image to be processed can be obtained by: performing a key point detection of the target object through the neural network, and outputting the key point detection result.
  • the key point detection result therein may include, for example but not limited to, any one or more of the following: a position of a key point in the image; a preset number of the key point.
  • the image to be processed may include, for example but not limited to, any one or more of the following: a still image, an image in a video, and the like.
  • the stroke effect parameter may include: a trigger event parameter, where the trigger action parameter is used to indicate a trigger event that triggers the display of the stroke effect.
  • the method further includes: detecting whether a trigger event corresponding to the parameter value of the trigger event parameter occurs in the image.
  • the operation 404 may include: in response to detecting a trigger event corresponding to the parameter value of the trigger event parameter in the image to be processed, based on the parameter value of the target object and the stroke effect parameter of the target object in the image to be processed, on the image to be processed Generates a stroke effect for the target object.
  • the stroke effect parameter may include: a trigger end parameter: the trigger end parameter is used to indicate a trigger event that ends the display of the stroke effect.
  • the method further includes: detecting whether a trigger event corresponding to the parameter value of the trigger end parameter occurs in the image to be processed; and in response to detecting the trigger event corresponding to the parameter value of the trigger end parameter in the image to be processed, Cancel the stroke effect of the target object generated on the image to be processed.
  • the stroke effect parameter includes: a beauty/beauty (beauty and/or beauty) effect parameter, and the beauty/beauty effect parameter It is used to indicate the beauty/beauty (beauty and/or beauty) effect displayed on the preset portion when the stroke effect is displayed.
  • the method further includes: generating a stroke effect of the target object on the image to be processed based on the parameter values of the stroke effect parameter of the target object and the target object in the image to be processed, according to the beauty/ The makeup effect parameter displays the beauty/beauty effect on the image to be processed.
  • FIG. 7 is a flowchart of another embodiment of a method for generating a stroke effect of the present application. As shown in FIG. 7, the method for generating a stroke effect of the embodiment includes:
  • the stroked effect program file may include, for example, but is not limited to, a stroke effect program file generated by a json program or other executable program.
  • the operations 502-504 may be performed by a processor invoking a corresponding instruction stored in a memory or by an import module executed by the processor.
  • the operations 506-508 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 510 may be performed by a processor invoking a corresponding instruction stored in a memory, or may be performed by a third acquisition module executed by the processor.
  • the sticker handle is destroyed by an interface function for calling the destroy sticker handle.
  • the operations 512-514 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 embodiments of the present invention can be used for various static images or video playback scenarios, for example, for a live video scene containing a character, and a stroke effect is generated for the target object in the live video, where the target object is, for example, Can be: ears, hands, face, hair, neck, shoulders, etc.
  • the method for generating the stroke effect program file package and the method for generating the stroke effect provided by the embodiment of the present application may be performed 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 the stroke effect program file package and the method for generating the stroke effect effect provided by the embodiment of the present application may be executed by a processor, such as the processor executing the corresponding instruction stored in the memory to perform the method mentioned in the embodiment of the present application. Any method of generating a stroke effect package and a stroke 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. 8 is a schematic structural diagram of an embodiment of a device for generating a stroke effect program file package according to the present application.
  • the apparatus for generating a stroke effect program file package according to each embodiment of the present application can be used to implement the method for generating each of the above-described stroke effect program file packages of the present application.
  • the apparatus for generating a stroke effect program file package of this embodiment includes: a first acquisition module and a first generation module. among them:
  • the first obtaining module is configured to obtain a parameter value of a stroke effect parameter of the target object.
  • the target object may include, but is not limited to, any one or more of the following: at least a part of a character, an object, an imported child material, and the like.
  • the first generating module is configured to generate a stroke effect program file package according to the parameter value of the stroke effect parameter of the target object.
  • the device for generating a stroke effect program file package acquires a parameter value of a stroke effect parameter of the target object, and generates a stroke effect program according to the parameter value of the stroke effect parameter of the target object.
  • the file package is configured to add a stroke effect to the target object in the image based on the stroke effect program file package, and implement a stroke effect of the target object in the image.
  • the embodiment of the present application can generate the rendering engine without manually writing the program file.
  • the executable stroke effect program file is simple in operation and short in time, which improves the overall efficiency of the stroke effect implementation, and avoids errors that may occur in the manual writing of the program file, thereby effectively ensuring the accuracy of the stroke effect.
  • FIG. 9 is a schematic structural diagram of another embodiment of a device for generating a stroke effect program file package according to the present application.
  • the apparatus for generating a stroked effect program file package further includes: an establishment module, configured to establish a boundary between a target area and a parameter value of the target object. Correspondence relationship.
  • the first generating module is configured to: generate a stroke effect program file package according to the correspondence relationship and the parameter value.
  • the target area to be stroked may include, but is not limited to, at least part of an object segmentation boundary area of the image in which the target object is located, or a fitted line of at least two key points of the target object.
  • the apparatus for generating a stroke effect program file package may further include: an operation bar, including an interaction interface, configured to receive a target object selection instruction input through the interaction interface, and select The target object generates a stroke effect parameter setting interface of the target object, and displays a stroke effect parameter setting interface of the target object under the operation bar.
  • the first obtaining module is configured to receive a parameter value of the stroke effect parameter sent by the interaction interface in the stroke effect parameter setting interface of the target object.
  • the first acquisition module is configured to: in response to receiving the description sent by the interaction interface in the stroke effect parameter setting interface of the target object The parameter value of the edge effect parameter, the set parameter value is used as the parameter value of the stroke effect parameter of the target object; and/or, in response to not receiving the description sent by the interaction interface in the stroke effect parameter setting interface of the target object The parameter value of the edge effect parameter, with the preset parameter value as the parameter value of the stroke effect parameter of the target object.
  • the first acquisition module is configured to: receive a cancel instruction of canceling a stroke effect of the target object input through an interaction interface of the operation bar, Delete the stroke effect parameters of the target object.
  • the operation bar may further include: a content display column for displaying a reference image of the target object.
  • the reference image of at least a portion of the character may include, for example, but not limited to, any one or more of the following: a complete image, a head image, a facial image, a shoulder Images, arm images, gesture images, waist images, leg images, foot images.
  • the content display bar may be further configured to display the stroke effect of the target object according to the parameter value of the stroke effect parameter of the target object.
  • the content display bar can also be used to display key points of the target object.
  • the method further includes: an operation interface, where the operation interface includes: the operation column, and the content display Column and / or program file bar.
  • the operation interface includes three areas of the left side, the middle side, and the right side; wherein the left side of the operation interface is an operation bar, the middle part of the operation interface is a content display column, and the right side of the operation interface is a program file column. .
  • the method further includes: a saving module, configured to save the instruction according to the received save instruction. Save the stroke effect package.
  • 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 stroke 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. 10 is a schematic structural diagram of an embodiment of a stroke effect generating apparatus according to the present application.
  • the stroke effect generation device of each embodiment of the present application can be used to implement the above-described various stroke effect generation methods of the present application.
  • the stroke effect generation device of this embodiment includes: a second acquisition module and a second generation module. among them:
  • the second obtaining module is configured to obtain a parameter value of the stroke effect parameter of the target object.
  • the second generating module is configured to generate a stroke effect of the target object on the image to be processed based on the parameter values of the stroke effect parameter of the target object and the target object in the image to be processed.
  • the image to be processed therein may include, for example but not limited to, any one or more of the following: a still image, an image in a video.
  • the stroke special effect generating device acquires a parameter value of a stroke effect parameter of the target object; and based on the target value of the target object in the image to be processed and the parameter value of the stroke effect parameter of the target object, The stroke effect of the target object is generated on the image, thereby realizing the stroke effect of the target object in the image, realizing the stroke effect of the image, and improving the image playback effect.
  • FIG. 11 is a schematic structural view of another embodiment of the stroke effect generating apparatus of the present application.
  • the stroke effect generating apparatus of this embodiment further includes: an importing module for importing a stroke effect program file package.
  • the second obtaining module is configured to obtain a parameter value of a stroke effect parameter of the target object in the stroke effect program file package.
  • the stroke effect program file package of the embodiment may be generated by, for example, but not limited to, a method or device for generating a stroke effect program file package according to any embodiment of the present application.
  • the method further includes: a determining module, configured to determine a region to be stroked of the target object.
  • the second generation module is configured to generate a correspondence between the parameter value of the stroke effect parameter of the target object in the stroke effect program file package and the target object to be stroked area, Stroke effects.
  • the determining module is configured to: obtain a segmentation result of the target object in the image to be processed and a portion other than the target object in the image to be processed; and determine, according to the segmentation result of the object, the at least partially segmented boundary region as the target object. The area to be stroked.
  • the determining module is configured to: obtain a key point detection result of the target object in the image to be processed; and determine, according to the key point detection result, that the fitting line of the at least two key points of the target object is the target object Stroke area.
  • the method when the determining module acquires the key point detection result of the target object in the image to be processed, the method is used to detect the key point of the target object through the neural network, and output the key point detection result.
  • the key point detection result therein may include, for example but not limited to, any one or more of the following: a position of a key point in the image; a preset number of the key point.
  • the stroke effect parameter includes a trigger event parameter
  • the trigger action parameter is used to indicate a trigger event that triggers the display of the stroke effect.
  • the stroke effect generating apparatus of the embodiment may further include: a detecting module, configured to detect whether a trigger event corresponding to a parameter value of the trigger event parameter occurs in the image to be processed.
  • the second generating module is configured to: in response to the detecting module detecting a trigger event corresponding to the parameter value of the trigger event parameter in the image to be processed, based on the parameter value of the target object and the stroke effect parameter of the target object in the image to be processed, Generates a stroke effect for the target object on the image to be processed.
  • the stroke effect parameter includes: a trigger end parameter: the trigger end parameter is used to indicate a trigger event that ends the display of the stroke effect.
  • the stroke effect generating apparatus of the embodiment may further include: a detecting module, configured to detect whether a trigger event corresponding to the parameter value of the trigger end parameter occurs in the image to be processed.
  • the second generation module is further configured to cancel the stroke effect of the target object generated on the image to be processed, in response to the detection module detecting a trigger event corresponding to the parameter value of the trigger end parameter in the image to be processed.
  • the stroke effect parameter includes: a beauty/beauty effect parameter, and the beauty/beauty effect parameter is used to indicate that the stroke effect is displayed.
  • the second generating module may be further configured to generate a target object on the image to be processed based on parameter values of the stroke effect parameter of the target object and the target object in the image to be processed.
  • the beauty/beauty effect is displayed on the image to be processed according to the beauty/beauty effect parameter.
  • the import module is configured to: read the stroke effect program file package into the memory by calling an interface function for reading the file package; and parse the stroke
  • the special effect program package obtains the stroke effect program file, and the stroke effect program file includes the parameter value of the stroke effect parameter of the target object.
  • the second obtaining module is configured to: create a sticker handle by using an interface function for creating a sticker handle; and read the target object in the stroke effect program file.
  • the parameter value of the stroke effect parameter is stored in the sticker handle.
  • the stroke effect generating apparatus of each embodiment may further include: a third acquiring module, configured to describe the target object in the stroke effect file according to the sticker handle.
  • the parameter value of the edge effect parameter acquires the number of video frames displayed by the stroke effect of the target object in the video, and reads the video image corresponding to the number of video frames from the video in advance.
  • the second obtaining module is further configured to: in response to the stroke effect file package being played, destroying the sticker handle by using an interface function for calling the destruction of the sticker handle.
  • 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 stroke effect program file package or a stroke effect generation method according to any one of the embodiments of the present application.
  • FIG. 12 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, communication units, 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 stroke effect parameter of the target object; according to the stroke effect parameter of the target object The parameter value is generated to generate a stroke effect package.
  • a network card which may include, but is not limited to, an IB (Infiniband) network card
  • 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 stroke effect parameter of the target
  • acquiring a parameter value of a stroke effect parameter of the target object For example, acquiring a parameter value of a stroke effect parameter of the target object; generating a stroke of the target object on the image based on a target value of the target object in the image to be processed and a parameter value of the stroke effect parameter of the target object Special effects.
  • 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 writes executable instructions to the ROM at runtime, the executable instructions causing the processor to perform operations corresponding to any of the methods of the present application.
  • 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. 12 is only an optional implementation manner.
  • the number and types of components in the foregoing FIG. 12 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.
  • 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 computer instructions, when the computer instruction is run in a processor of the device, the method for generating a stroke effect program file package according to any embodiment of the present application, or the description Edge 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 method for generating the stroke effect program file package of any embodiment of the present application is implemented. , or stroke 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Graphics (AREA)
  • Processing Or Creating Images (AREA)
  • Image Analysis (AREA)

Abstract

本申请实施例公开了一种描边特效程序文件包的生成及描边特效生成方法与装置,其中,描边特效程序文件包的生成方法包括:获取目标对象的描边效果参数的参数值;根据所述目标对象的描边效果参数的参数值,生成描边特效程序文件包。本申请实施例提供了一种生成描边特效程序文件包的方案,无需通过手动书写程序文件,便可生成渲染引擎可执行的描边特效程序文件包,操作简单、所需时间短,提升了描边特效实现的整体效率,有效保障了描边特效的准确性。

Description

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

Claims (76)

  1. 一种描边特效程序文件包的生成方法,其特征在于,包括:
    获取目标对象的描边效果参数的参数值;
    根据所述目标对象的描边效果参数的参数值,生成描边特效程序文件包。
  2. 根据权利要求1所述的方法,其特征在于,所述目标对象包括以下任意一项或多项:人物的至少一部分,物体,导入的子素材。
  3. 根据权利要求1或2所述的方法,其特征在于,还包括:
    建立所述目标对象的待描边区和所述参数值之间的对应关系;
    所述根据所述目标对象的描边效果参数的参数值,生成的描边特效程序文件包,包括:根据所述对应关系和所述参数值,生成所述描边特效程序文件包。
  4. 根据权利要求3所述的方法,其特征在于,所述目标对象的待描边区包括:所述目标对象所在图像的至少部分物体分割边界区,或者,所述目标对象的至少两个关键点的拟合线。
  5. 根据权利要求1-4任一所述的方法,其特征在于,还包括:接收通过操作栏的交互接口输入的目标对象选取指令,选取所述目标对象,生成所述目标对象的描边效果参数设置界面,并在所述操作栏下显示所述目标对象的描边效果参数设置界面。
  6. 根据权利要求5所述的方法,其特征在于,所述获取目标对象的描边效果参数的参数值,包括:接收通过所述目标对象的描边效果参数设置界面中的交互接口发送的描边效果参数的参数值。
  7. 根据权利要求5或6所述的方法,其特征在于,所述获取目标对象的描边效果参数的参数值,包括:响应于接收到通过所述目标对象的描边效果参数设置界面中的交互接口发送的描边效果参数的参数值,以设置的参数值作为所述目标对象的描边效果参数的参数值;和/或,响应于未接收到通过所述目标对象的描边效果参数设置界面中的交互接口发送的描边效果参数的参数值,以预设参数值作为所述目标对象的描边效果参数的参数值。
  8. 根据权利要求1-7任一所述的方法,其特征在于,所述目标对象为一个或多个。
  9. 根据权利要求1-8任一所述的方法,其特征在于,所述描边效果参数包括以下任意一项或多项:
    显示参数:用于控制是否显示描边效果;
    宽度参数:用于表示描边的宽度;
    颜色参数:用于表示描边的颜色;
    触发事件参数:用于表示触发显示描边效果的触发事件;
    延迟触发参数:用于表示延迟显示描边效果的时间;
    显示帧数参数:用于表示描边效果显示多少帧数;
    触发结束参数:用于表示结束显示描边效果的触发事件;
    美颜/美妆效果参数:用于表示显示描边效果时在预设部位显示的美颜/美妆效果。
  10. 根据权利要求9所述的方法,其特征在于,所述触发事件包括以下任意一项或多项:无事件触发,眼部动作,头部动作,眉部动作,手部动作,嘴部动作,肩部动作,变形特效,贴纸特效,声音特效。
  11. 根据权利要求5-10任一所述的方法,其特征在于,还包括:接收通过操作栏的交互接口输入的取消目标对象的描边效果的取消指令,删除所述目标对象的描边效果参数。
  12. 根据权利要求1-11任一所述的方法,其特征在于,还包括:通过内容显示栏显示所述目标对象的参考图像。
  13. 根据权利要求12所述的方法,其特征在于,所述目标对象为人物时,所述人物的至少一部分的参考图像包括所述人物的以下任意一项或多项:完整图像,头部图像,脸部图像,肩部图像,手臂图像,手势图像,腰部图像,腿部图像,脚部图像。
  14. 根据权利要求12或13所述的方法,其特征在于,还包括:根据所述目标对象的描边效果参数的参数值,在所述内容显示栏显示所述目标对象的描边效果。
  15. 根据权利要求12-14任一所述的方法,其特征在于,还包括:在所述内容显示栏显示所述目标对象的关键点。
  16. 根据权利要求15所述的方法,其特征在于,所述关键点包括以下任意一种或多种:头部关键点,脸部关键点,肩部关键点,手臂关键点,手势关键点,腰部关键点,腿部关键点,脚部关键点,人体骨骼关键点。
  17. 根据权利要求16所述的方法,其特征在于,所述头部关键点包括以下任意一项或多项:头顶关键点,鼻尖关键点,以及下巴关键点;和/或,
    所述面部脸部关键点包括以下任意一项或多项:脸部轮廓关键点,眼睛关键点,眉毛关键点,鼻子关键点,嘴部关键点;和/或,
    所述肩部关键点包括以下任意一项或多项:位于肩部与头部交汇位置处的肩头交汇关键点,以及位于臂根轮廓关键点与肩头交汇关键点之间的中点位置处的肩轮廓中点关键点;和/或,
    所述手臂关键点包括以下任意一项或多项:手腕轮廓关键点,胳膊肘轮廓关键点,臂根轮廓关键点,位于手腕轮廓关键点与胳膊肘轮廓关键点之间的中点位置处的小臂轮廓中点关键点,以及位于胳膊肘轮廓关键点与臂根轮廓关键点之间的中点位置处的大臂中点关键点;和/或,
    所述手势关键点包括以下任意一项或多项:手势框的四个顶点关键点,以及手势框的中心关键点;和/或,
    所述腿部关键点包括以下任意一项或多项:裆部关键点,膝盖轮廓关键点,脚踝轮廓关键点,大腿根部外侧轮廓关键点,位于膝盖轮廓关键点与脚踝轮廓关键点之间的中点位置处的小腿轮廓中点关键点,位于膝盖内轮廓关键点与裆部关键点之间的中点位置处的大腿内轮廓中点关键点,以及位于膝盖外轮廓关键点与大腿根部外侧轮廓关键点之间的中点位置处的大腿外轮廓中点关键点;和/或,
    所述腰部关键点包括以下任意一项或多项:将大腿根部外侧轮廓关键点与臂根轮廓关键点之间N等分,所产生的N 个等分点;其中,所述N大于1;和/或,
    所述脚部关键点包括以下任意一项或多项:脚尖关键点以及足跟关键点;和/或,
    所述人体骨骼关键点把包括以下任意一项或多项:右肩骨骼关键点,右肘骨骼关键点,右腕骨骼关键点,左肩骨骼关键点,左肘骨骼关键点,左腕骨骼关键点,右髋骨骼关键点,右膝骨骼关键点,右踝骨骼关键点,左髋骨骼关键点,左膝骨骼关键点,左踝骨骼关键点,头顶骨骼关键点,以及脖子骨骼关键点。
  18. 根据权利要求17所述的方法,其特征在于,所述眼睛关键点包括以下任意一项或多项:左眼眶关键点,左眼瞳孔中心关键点,左眼中心关键点,右眼眶关键点,右眼瞳孔中心关键点,以及右眼中心关键点;和/或
    所述眉毛关键点包括以下任意一项或多项:左眉毛关键点以及右眉毛关键点;和/或
    所述鼻子关键点包括以下任意一项或多项:鼻梁关键点,鼻子下沿关键点,以及鼻子外侧轮廓关键点;和/或
    所述嘴部关键点包括以下任意一项或多项:上嘴唇关键点,以及下嘴唇关键点。
  19. 根据权利要求5-18任一所述的方法,其特征在于,还包括:显示操作界面,所述操作界面包括:所述操作栏,内容显示栏和/或程序文件栏。
  20. 根据权利要求19所述的方法,其特征在于,所述操作界面包括左侧、中部和右侧三个区域;
    所述显示操作界面,包括:在所述操作界面的左侧显示所述操作栏,在所述操作界面的中部显示所述内容显示栏,在所述操作界面的右侧显示所述程序文件栏。
  21. 根据权利要求1-20任一所述的方法,其特征在于,所述生成描边特效程序文件包之后,还包括:根据接收到的保存指令在所述保存指令指向的位置保存所述描边特效程序文件包。
  22. 根据权利要求21所述的方法,其特征在于,所述根据接收到的保存指令在所述保存指令指向的位置保存所述描边特效程序文件包,包括:
    响应于接收到保存指令,显示保存路径选择接口和压缩接口;
    接收通过所述保存路径选择接口发送的保存位置;以及接收基于所述压缩接口发送的压缩方式,并根据所述压缩方式对所述描边特效程序文件包进行压缩,生成压缩文件包;
    将所述压缩文件包存储至所述保存位置指向的文件夹中。
  23. 一种描边特效生成方法,其特征在于,包括:
    获取目标对象的描边效果参数的参数值;
    基于待处理图像中的目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边特效。
  24. 根据权利要求23所述的方法,其特征在于,所述获取目标对象的描边效果参数的参数值之前,还包括:导入描边特效程序文件包;
    所述获取目标对象的描边效果参数的参数值,包括:获取所述描边特效程序文件包中目标对象的描边效果参数的参数值。
  25. 根据权利要求24所述的方法,其特征在于,所述描边特效程序文件包采用如权利要求1-22任一所述的方法生成。
  26. 根据权利要求24-25任一所述的方法,其特征在于,还包括:
    确定目标对象的待描边区;
    所述基于待处理图像中的所述目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边效果,包括:基于所述描边特效程序文件包中所述目标对象的描边效果参数的参数值与所述目标对象的待描边区之间的对应关系,在所述待描边区生成所述描边特效。
  27. 根据权利要求26所述的方法,其特征在于,所述确定目标对象的待描边区,包括:
    获取所述待处理图像中的所述目标对象与所述待处理图像中所述目标对象以外的部分进行物体分割结果;
    基于物体分割结果确定至少部分分割边界区为所述目标对象的待描边区。
  28. 根据权利要求26所述的方法,其特征在于,所述确定目标对象的待描边区,包括:
    获取所述待处理图像中所述目标对象的关键点检测结果;
    基于所述关键点检测结果,确定所述目标对象的至少两个关键点的拟合线为所述目标对象的待描边区。
  29. 根据权利要求28所述的方法,其特征在于,所述获取所述待处理图像中所述目标对象的关键点检测结果,包括:通过神经网络,对所述待处理图像进行所述目标对象的关键点检测,并输出关键点检测结果。
  30. 根据权利要求29所述的方法,其特征在于,所述关键点检测结果包括以下任意一项或多项:所述关键点在所述图像中的位置;所述关键点的预设编号。
  31. 根据权利要求23-30任一所述的方法,其特征在于,所述待处理图像包括以下任意一项或多项:静态图像,视频中的图像。
  32. 根据权利要求23-31任一所述的方法,其特征在于,所述描边效果参数包括:触发事件参数,所述触发动作参数用于表示触发显示描边效果的触发事件;
    所述方法还包括:检测所述待处理图像中是否出现所述触发事件参数的参数值对应的触发事件;
    所述基于待处理图像中的目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边效果,包括:响应于检测到所述图待处理像中出现所述触发事件参数的参数值对应的触发事件,基于待处理图像中的目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边特效。
  33. 根据权利要求23-32任一所述的方法,其特征在于,所述描边效果参数包括:触发结束参数:所述触发结束参数用于表示结束显示描边效果的触发事件;
    所述方法还包括:检测所述待处理图像中是否出现所述触发结束参数的参数值对应的触发事件;响应于检测到所述待处理图像中出现所述触发结束参数的参数值对应的触发事件,取消在所述待处理图像上生成的所述目标对象的描边特效。
  34. 根据权利要求23-33任一所述的方法,其特征在于,所述描边效果参数包括:美颜/美妆效果参数,所述美颜/美妆效果参数用于表示显示描边效果时在预设部位显示的美颜/美妆效果;
    所述方法还包括:基于待处理图像中的目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边特效时,根据所述美颜/美妆效果参数,在所述待处理图像上显示美颜/美妆效果。
  35. 根据权利要求24-34任一所述的方法,其特征在于,所述导入描边特效程序文件包,包括:通过调用用于读取文件包的接口函数,将所述描边特效程序文件包读入内存;解析所述描边特效程序文件包,获得描边特效程序文件,所述描边特效程序文件包括所述目标对象的描边效果参数的参数值。
  36. 根据权利要求35所述的方法,其特征在于,所述获取目标对象的描边效果参数的参数值,包括:通过用于创建贴纸句柄的接口函数创建贴纸句柄;读取所述描边特效程序文件中目标对象的描边效果参数的参数值、并存储至所述贴纸句柄中。
  37. 根据权利要求36所述的方法,其特征在于,所述待处理图像为视频中图像时,所述方法还包括:根据所述贴纸句柄中所述描边特效程序文件中目标对象的描边效果参数的参数值,获取所述目标对象的描边特效在所述视频中显示的视频帧数,并预先从所述视频中读取所述视频帧数对应的视频图像。
  38. 根据权利要求36或37所述的方法,其特征在于,还包括:响应于所述描边特效程序文件包播放完毕,通过用于调用销毁贴纸句柄的接口函数销毁所述贴纸句柄。
  39. 一种描边特效程序文件包的生成装置,其特征在于,包括:
    第一获取模块,用于获取目标对象的描边效果参数的参数值;
    第一生成模块,用于根据所述目标对象的描边效果参数的参数值,生成描边特效程序文件包。
  40. 根据权利要求39所述的装置,其特征在于,所述目标对象包括以下任意一项或多项:人物的至少一部分,物体,导入的子素材。
  41. 根据权利要求39或40所述的装置,其特征在于,还包括:
    建立模块,用于建立所述目标对象的待描边区和所述参数值之间的对应关系;
    所述第一生成模块用于:根据所述对应关系和所述参数值,生成所述描边特效程序文件包。
  42. 根据权利要求41所述的装置,其特征在于,所述目标对象的待描边区包括:所述目标对象所在图像的至少部分物体分割边界区,或者,所述目标对象的至少两个关键点的拟合线。
  43. 根据权利要求39-42任一所述的装置,其特征在于,还包括:
    操作栏,包括交互接口,用于接收通过所述交互接口输入的目标对象选取指令,选取所述目标对象,生成所述目标对象的描边效果参数设置界面,并在所述操作栏下显示所述目标对象的描边效果参数设置界面;
    所述第一获取模块,用于接收通过所述目标对象的描边效果参数设置界面中的交互接口发送的描边效果参数的参数值。
  44. 根据权利要求43所述的装置,其特征在于,所述第一获取模块,用于:响应于接收到通过所述目标对象的描边效果参数设置界面中的交互接口发送的描边效果参数的参数值,以设置的参数值作为所述目标对象的描边效果参数的参数值;和/或,响应于未接收到通过所述目标对象的描边效果参数设置界面中的交互接口发送的描边效果参数的参数值,以预设参数值作为所述目标对象的描边效果参数的参数值。
  45. 根据权利要求39-44任一所述的装置,其特征在于,所述描边效果参数包括以下任意一项或多项:
    显示参数:用于控制是否显示描边效果;
    宽度参数:用于表示描边的宽度;
    颜色参数:用于表示描边的颜色;
    触发事件参数:用于表示触发显示描边效果的触发事件;
    延迟触发参数:用于表示延迟显示描边效果的时间;
    显示帧数参数:用于表示描边效果显示多少帧数;
    触发结束参数:用于表示结束显示描边效果的触发事件;
    美颜/美妆效果参数:用于表示显示描边效果时在预设部位显示的美颜/美妆效果。
  46. 根据权利要求45所述的装置,其特征在于,所述触发事件包括以下任意一项或多项:无事件触发,眼部动作,头部动作,眉部动作,手部动作,嘴部动作,肩部动作,变形特效,贴纸特效,声音特效。
  47. 根据权利要求43-46任一所述的装置,其特征在于,所述第一获取模块用于:接收通过操作栏的交互接口输入的取消目标对象的描边效果的取消指令,删除所述目标对象的描边效果参数。
  48. 根据权利要求43-47任一所述的装置,其特征在于,所述操作栏还包括:内容显示栏,用于显示所述目标对象的参考图像。
  49. 根据权利要求48所述的装置,其特征在于,所述目标对象为人物时,所述人物的至少一部分的参考图像包括所述人物的以下任意一项或多项:完整图像,头部图像,脸部图像,肩部图像,手臂图像,手势图像,腰部图像,腿部图像,脚部图像。
  50. 根据权利要求48或49所述的装置,其特征在于,所述内容显示栏,还用于根据所述目标对象的描边效果参数的参数值,显示所述目标对象的描边效果。
  51. 根据权利要求48-50任一所述的装置,其特征在于,所述内容显示栏,还用于显示所述目标对象的关键点。
  52. 根据权利要求51所述的装置,其特征在于,所述关键点包括以下任意一种或多种:头部关键点,脸部关键点,肩部关键点,手臂关键点,手势关键点,腰部关键点,腿部关键点,脚部关键点,人体骨骼关键点。
  53. 根据权利要求52所述的装置,其特征在于,所述头部关键点包括以下任意一项或多项:头顶关键点,鼻尖关键点,以及下巴关键点;和/或,
    所述面部脸部关键点包括以下任意一项或多项:脸部轮廓关键点,眼睛关键点,眉毛关键点,鼻子关键点,嘴部关键点;和/或,
    所述肩部关键点包括以下任意一项或多项:位于肩部与头部交汇位置处的肩头交汇关键点,以及位于臂根轮廓关键点与肩头交汇关键点之间的中点位置处的肩轮廓中点关键点;和/或,
    所述手臂关键点包括以下任意一项或多项:手腕轮廓关键点,胳膊肘轮廓关键点,臂根轮廓关键点,位于手腕轮廓关键点与胳膊肘轮廓关键点之间的中点位置处的小臂轮廓中点关键点,以及位于胳膊肘轮廓关键点与臂根轮廓关键点之间的中点位置处的大臂中点关键点;和/或,
    所述手势关键点包括以下任意一项或多项:手势框的四个顶点关键点,以及手势框的中心关键点;和/或,
    所述腿部关键点包括以下任意一项或多项:裆部关键点,膝盖轮廓关键点,脚踝轮廓关键点,大腿根部外侧轮廓关键点,位于膝盖轮廓关键点与脚踝轮廓关键点之间的中点位置处的小腿轮廓中点关键点,位于膝盖内轮廓关键点与裆部关键点之间的中点位置处的大腿内轮廓中点关键点,以及位于膝盖外轮廓关键点与大腿根部外侧轮廓关键点之间的中点位置处的大腿外轮廓中点关键点;和/或,
    所述腰部关键点包括以下任意一项或多项:将大腿根部外侧轮廓关键点与臂根轮廓关键点之间N等分,所产生的N个等分点;其中,所述N大于1;和/或,
    所述脚部关键点包括以下任意一项或多项:脚尖关键点以及足跟关键点;和/或,
    所述人体骨骼关键点把包括以下任意一项或多项:右肩骨骼关键点,右肘骨骼关键点,右腕骨骼关键点,左肩骨骼关键点,左肘骨骼关键点,左腕骨骼关键点,右髋骨骼关键点,右膝骨骼关键点,右踝骨骼关键点,左髋骨骼关键点,左膝骨骼关键点,左踝骨骼关键点,头顶骨骼关键点,以及脖子骨骼关键点。
  54. 根据权利要求53所述的装置,其特征在于,所述眼睛关键点包括以下任意一项或多项:左眼眶关键点,左眼瞳孔中心关键点,左眼中心关键点,右眼眶关键点,右眼瞳孔中心关键点,以及右眼中心关键点;和/或,
    所述眉毛关键点包括以下任意一项或多项:左眉毛关键点以及右眉毛关键点;和/或,
    所述鼻子关键点包括以下任意一项或多项:鼻梁关键点,鼻子下沿关键点,以及鼻子外侧轮廓关键点;和/或,
    所述嘴部关键点包括以下任意一项或多项:上嘴唇关键点,以及下嘴唇关键点。
  55. 根据权利要求43-54任一所述的装置,其特征在于,还包括:操作界面,所述操作界面包括:所述操作栏,所述内容显示栏和/或程序文件栏。
  56. 根据权利要求55所述的装置,其特征在于,所述操作界面包括左侧、中部和右侧三个区域;所述操作界面的左侧为所述操作栏,所述操作界面的中部为所述内容显示栏,所述操作界面的右侧为所述程序文件栏。
  57. 根据权利要求39-56任一所述的装置,其特征在于,还包括:保存模块,用于根据接收到的保存指令在所述保存指令指向的位置保存所述描边特效程序文件包。
  58. 根据权利要求57所述的装置,其特征在于,所述保存模块用于:响应于接收到保存指令,显示保存路径选择接口和压缩接口;接收通过所述保存路径选择接口发送的保存位置;以及接收基于所述压缩接口发送的压缩方式,并根据所述压缩方式对所述描边特效程序文件包进行压缩,生成压缩文件包;将所述压缩文件包存储至所述保存位置指向的文件夹中。
  59. 一种描边特效生成装置,其特征在于,包括:
    第二获取模块,用于获取目标对象的描边效果参数的参数值;
    第二生成模块,用于基于待处理图像中的目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边特效。
  60. 根据权利要求59所述的装置,其特征在于,还包括:导入模块,用于导入描边特效程序文件包;
    所述第二获取模块用于获取所述描边特效程序文件包中目标对象的描边效果参数的参数值。
  61. 根据权利要求60所述的装置,其特征在于,所述描边特效程序文件包采用如权利要求1-22任一所述的方法或者权利要求39-58任一所述的装置生成。
  62. 根据权利要求60-61任一所述的装置,其特征在于,还包括:确定模块,用于确定目标对象的待描边区;
    所述第二生成模块用于基于所述描边特效程序文件包中所述目标对象的描边效果参数的参数值与所述目标对象的待描边区之间的对应关系,在所述待描边区生成所述描边特效。
  63. 根据权利要求62所述的装置,其特征在于,所述确定模块用于:获取所述待处理图像中的所述目标对象与所述待处理图像中所述目标对象以外的部分进行物体分割结果;基于物体分割结果确定至少部分分割边界区为所述目标对象的待描边区。
  64. 根据权利要求62所述的装置,其特征在于,所述确定模块用于:获取所述待处理图像中所述目标对象的关键点检测结果;基于所述关键点检测结果,确定所述目标对象的至少两个关键点的拟合线为所述目标对象的待描边区。
  65. 根据权利要求64所述的装置,其特征在于,所述确定模块获取所述待处理图像中所述目标对象的关键点检测结果时,用于通过神经网络,对所述待处理图像进行所述目标对象的关键点检测,并输出关键点检测结果。
  66. 根据权利要求65所述的装置,其特征在于,所述关键点检测结果包括以下任意一项或多项:所述关键点在所述待处理图像中的位置;所述关键点的预设编号。
  67. 根据权利要求59-66任一所述的装置,其特征在于,所述待处理图像包括以下任意一项或多项:静态图像,视频中的图像。
  68. 根据权利要求59-67任一所述的装置,其特征在于,所述描边效果参数包括:触发事件参数,所述触发动作参数用于表示触发显示描边效果的触发事件;
    所述装置还包括:检测模块,用于检测所述待处理图像中是否出现所述触发事件参数的参数值对应的触发事件;
    所述第二生成模块用于:响应于所述检测模块检测到所述待处理图像中出现所述触发事件参数的参数值对应的触发事件,基于待处理图像中的目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边特效。
  69. 根据权利要求59-68任一所述的装置,其特征在于,所述描边效果参数包括:触发结束参数:所述触发结束参数用于表示结束显示描边效果的触发事件;
    所述装置还包括:检测模块,用于检测所述待处理图像中是否出现所述触发结束参数的参数值对应的触发事件;
    所述第二生成模块,还用于响应于所述检测模块检测到所述待处理图像中出现所述触发结束参数的参数值对应的触发事件,取消在所述待处理图像上生成的所述目标对象的描边特效。
  70. 根据权利要求59-69任一所述的装置,其特征在于,所述描边效果参数包括:美颜/美妆效果参数,所述美颜/美妆效果参数用于表示显示描边效果时在预设部位显示的美颜/美妆效果;
    所述第二生成模块,还用于基于待处理图像中的目标对象和所述目标对象的描边效果参数的参数值,在所述待处理图像上生成所述目标对象的描边特效时,根据所述美颜/美妆效果参数,在所述待处理图像上显示美颜/美妆效果。
  71. 根据权利要求60-70任一所述的装置,其特征在于,所述导入模块用于:通过调用用于读取文件包的接口函数,将所述描边特效程序文件包读入内存;解析所述描边特效程序文件包,获得描边特效程序文件,所述描边特效程序文件包括所述目标对象的描边效果参数的参数值。
  72. 根据权利要求71所述的装置,其特征在于,所述第二获取模块用于:通过用于创建贴纸句柄的接口函数创建贴纸句柄;读取所述描边特效程序文件中目标对象的描边效果参数的参数值、并存储至所述贴纸句柄中。
  73. 根据权利要求72所述的装置,其特征在于,所述图像为视频中图像时,所述装置还包括:第三获取模块,用于根据所述贴纸句柄中所述描边特效程序文件中目标对象的描边效果参数的参数值,获取所述目标对象的描边特效在所述视频中显示的视频帧数,并预先从所述视频中读取所述视频帧数对应的视频图像。
  74. 根据权利要求72或73所述的装置,其特征在于,所述第二获取模块,还用于响应于所述描边特效程序文件包播放完毕,通过用于调用销毁贴纸句柄的接口函数销毁所述贴纸句柄。
  75. 一种电子设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述存储器中存储的计算机程序,且所述计算机程序被执行时,实现上述权利要求1-38中任一项所述的方法。
  76. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时,实现上述权利要求1-38中任一项所述的方法。
PCT/CN2019/074501 2018-02-06 2019-02-01 描边特效程序文件包的生成及描边特效生成方法与装置 WO2019154338A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2020535033A JP7033372B2 (ja) 2018-02-06 2019-02-01 輪郭描画特殊効果プログラムファイルパッケージの生成方法及び装置、並びに輪郭描画特殊効果生成方法及び装置
SG11202006480XA SG11202006480XA (en) 2018-02-06 2019-02-01 Stroke special effect program file package generating method and apparatus, and stroke special effect generating method and apparatus
KR1020207018869A KR102386639B1 (ko) 2018-02-06 2019-02-01 스트로크 특수 효과 프로그램 파일 패키지의 생성 및 스트로크 특수 효과 생성 방법과 장치
US16/917,986 US11640683B2 (en) 2018-02-06 2020-07-01 Stroke special effect program file package generating method and apparatus, and stroke special effect generating method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810118942.8 2018-02-06
CN201810118942.8A CN108399654B (zh) 2018-02-06 2018-02-06 描边特效程序文件包的生成及描边特效生成方法与装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/917,986 Continuation US11640683B2 (en) 2018-02-06 2020-07-01 Stroke special effect program file package generating method and apparatus, and stroke special effect generating method and apparatus

Publications (1)

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

Family

ID=63095918

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/074501 WO2019154338A1 (zh) 2018-02-06 2019-02-01 描边特效程序文件包的生成及描边特效生成方法与装置

Country Status (6)

Country Link
US (1) US11640683B2 (zh)
JP (1) JP7033372B2 (zh)
KR (1) KR102386639B1 (zh)
CN (1) CN108399654B (zh)
SG (1) SG11202006480XA (zh)
WO (1) WO2019154338A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399654B (zh) * 2018-02-06 2021-10-22 北京市商汤科技开发有限公司 描边特效程序文件包的生成及描边特效生成方法与装置
CN110070555A (zh) * 2018-10-19 2019-07-30 北京微播视界科技有限公司 图像处理方法、装置、硬件装置
CN110070554A (zh) * 2018-10-19 2019-07-30 北京微播视界科技有限公司 图像处理方法、装置、硬件装置
CN110070496B (zh) * 2019-02-28 2020-07-31 北京字节跳动网络技术有限公司 图像特效的生成方法、装置和硬件装置
CN113315924A (zh) * 2020-02-27 2021-08-27 北京字节跳动网络技术有限公司 图像特效处理方法及装置
CN113521725A (zh) * 2021-07-26 2021-10-22 网易(杭州)网络有限公司 图案效果显示方法、存储介质及计算机设备
CN114125320B (zh) * 2021-08-31 2023-05-09 北京达佳互联信息技术有限公司 一种图像特效的生成方法及装置
CN117274432B (zh) * 2023-09-20 2024-05-14 书行科技(北京)有限公司 图像描边特效的生成方法、装置、设备和可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354789A (zh) * 2008-08-22 2009-01-28 北京中星微电子有限公司 一种图像面具特效的实现方法和设备
CN102567031A (zh) * 2012-03-01 2012-07-11 盛乐信息技术(上海)有限公司 视频特效扩充方法及系统
CN104123742A (zh) * 2014-07-21 2014-10-29 徐才 一种将静态漫画图片转化为二维动画的方法和播放器
CN104572123A (zh) * 2015-01-27 2015-04-29 广东欧珀移动通信有限公司 一种脚本生成方法及装置
CN108399654A (zh) * 2018-02-06 2018-08-14 北京市商汤科技开发有限公司 描边特效程序文件包的生成及描边特效生成方法与装置

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0935005A (ja) * 1995-07-13 1997-02-07 N T T Data Tsushin Kk ストローク抽出方法及びストローク抽出装置
JP3264619B2 (ja) * 1996-06-05 2002-03-11 キヤノン株式会社 画像処理装置および方法
JPH11312160A (ja) * 1998-02-13 1999-11-09 Fuji Xerox Co Ltd 自律的パ―ソナルアバタ―による文書注釈方法及び装置
JP3813579B2 (ja) * 2000-05-31 2006-08-23 シャープ株式会社 動画像編集装置、動画像編集プログラム、コンピュータ読み取り可能な記録媒体
CN1707682A (zh) * 2004-06-04 2005-12-14 电视纪制作有限公司 快速影像剪辑系统及方法
JP2006260198A (ja) * 2005-03-17 2006-09-28 Toshiba Corp 仮想化粧装置、仮想化粧方法および仮想化粧プログラム
JP4799105B2 (ja) 2005-09-26 2011-10-26 キヤノン株式会社 情報処理装置及びその制御方法、コンピュータプログラム、記憶媒体
CN101329402B (zh) * 2008-06-20 2010-12-29 西安电子科技大学 基于改进Wedgelet的多尺度SAR图像边缘检测方法
JP2010211308A (ja) 2009-03-06 2010-09-24 Fujifilm Corp メイクアップアドバイス装置、メイクアップアドバイス方法及びプログラム
US8713584B2 (en) * 2009-08-13 2014-04-29 Google Inc. Event-triggered server-side macros
CN102087750A (zh) * 2010-06-13 2011-06-08 湖南宏梦信息科技有限公司 一种动漫特效的制作方法
JP4862955B1 (ja) 2010-10-29 2012-01-25 オムロン株式会社 画像処理装置、画像処理方法、および制御プログラム
CN102693553B (zh) * 2011-08-26 2015-03-25 新奥特(北京)视频技术有限公司 一种实现三维效果的图表创建方法及装置
US9767605B2 (en) * 2012-02-24 2017-09-19 Nokia Technologies Oy Method and apparatus for presenting multi-dimensional representations of an image dependent upon the shape of a display
US9076247B2 (en) * 2012-08-10 2015-07-07 Ppg Industries Ohio, Inc. System and method for visualizing an object in a simulated environment
KR20160022832A (ko) * 2013-06-25 2016-03-02 톰슨 라이센싱 문자 입력을 위한 방법 및 디바이스
US9779534B2 (en) * 2013-08-28 2017-10-03 Qualcomm Incorporated Prefixed summed length in graphics processing
EP3039990B1 (en) 2013-08-30 2019-07-24 Panasonic Intellectual Property Management Co., Ltd. Makeup assistance device, makeup assistance system, makeup assistance method, and makeup assistance program
CN104778712B (zh) * 2015-04-27 2018-05-01 厦门美图之家科技有限公司 一种基于仿射变换的人脸贴图方法和系统
JP6876941B2 (ja) * 2016-10-14 2021-05-26 パナソニックIpマネジメント株式会社 バーチャルメイクアップ装置、バーチャルメイクアップ方法及びバーチャルメイクアッププログラム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101354789A (zh) * 2008-08-22 2009-01-28 北京中星微电子有限公司 一种图像面具特效的实现方法和设备
CN102567031A (zh) * 2012-03-01 2012-07-11 盛乐信息技术(上海)有限公司 视频特效扩充方法及系统
CN104123742A (zh) * 2014-07-21 2014-10-29 徐才 一种将静态漫画图片转化为二维动画的方法和播放器
CN104572123A (zh) * 2015-01-27 2015-04-29 广东欧珀移动通信有限公司 一种脚本生成方法及装置
CN108399654A (zh) * 2018-02-06 2018-08-14 北京市商汤科技开发有限公司 描边特效程序文件包的生成及描边特效生成方法与装置

Also Published As

Publication number Publication date
SG11202006480XA (en) 2020-08-28
CN108399654A (zh) 2018-08-14
US11640683B2 (en) 2023-05-02
KR20200094768A (ko) 2020-08-07
JP2021508121A (ja) 2021-02-25
CN108399654B (zh) 2021-10-22
JP7033372B2 (ja) 2022-03-10
KR102386639B1 (ko) 2022-04-14
US20200334875A1 (en) 2020-10-22

Similar Documents

Publication Publication Date Title
WO2019154338A1 (zh) 描边特效程序文件包的生成及描边特效生成方法与装置
US11521389B2 (en) Method for generating special effect program file package, method for generating special effect, electronic device, and storage medium
WO2019154339A1 (zh) 特效程序文件包的生成及特效生成方法与装置、电子设备
WO2019154337A1 (zh) 变形特效程序文件包的生成及变形特效生成方法与装置
CN108711180B (zh) 美妆和/或换脸特效程序文件包的生成及美妆和/或换脸特效生成方法与装置
KR102241153B1 (ko) 2차원 이미지로부터 3차원 아바타를 생성하는 방법, 장치 및 시스템
JP6967090B2 (ja) 人体輪郭キーポイントの検出方法、画像処理方法、装置及び機器
CN109035373B (zh) 三维特效程序文件包的生成及三维特效生成方法与装置
CN111641844B (zh) 直播互动方法、装置、直播系统及电子设备
CN114049468A (zh) 一种展示方法、装置、设备及存储介质
CN116437137A (zh) 直播处理方法、装置、电子设备及存储介质
JP2022050452A (ja) コンピュータプログラム、サーバ装置、端末装置、及び方法

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: 19751162

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020535033

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20207018869

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: 19751162

Country of ref document: EP

Kind code of ref document: A1