WO2020063319A1 - 动态表情生成方法、计算机可读存储介质和计算机设备 - Google Patents

动态表情生成方法、计算机可读存储介质和计算机设备 Download PDF

Info

Publication number
WO2020063319A1
WO2020063319A1 PCT/CN2019/104988 CN2019104988W WO2020063319A1 WO 2020063319 A1 WO2020063319 A1 WO 2020063319A1 CN 2019104988 W CN2019104988 W CN 2019104988W WO 2020063319 A1 WO2020063319 A1 WO 2020063319A1
Authority
WO
WIPO (PCT)
Prior art keywords
expression
video
video data
dynamic
text
Prior art date
Application number
PCT/CN2019/104988
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 US17/047,276 priority Critical patent/US11645804B2/en
Priority to JP2020552389A priority patent/JP7112508B2/ja
Priority to EP19864211.8A priority patent/EP3758364B1/en
Publication of WO2020063319A1 publication Critical patent/WO2020063319A1/zh
Priority to US18/188,742 priority patent/US20230230306A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/802D [Two Dimensional] animation, e.g. using sprites
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • 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
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/022Electronic editing of analogue information signals, e.g. audio or video signals
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/07User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail characterised by the inclusion of specific contents
    • H04L51/10Multimedia information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/414Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance
    • H04N21/41407Specialised client platforms, e.g. receiver in car or embedded in a mobile appliance embedded in a portable device, e.g. video client on a mobile phone, PDA, laptop
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/4223Cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8146Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/79Processing of colour television signals in connection with recording
    • H04N9/80Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback
    • H04N9/82Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only
    • H04N9/8205Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal
    • H04N9/8227Transformation of the television signal for recording, e.g. modulation, frequency changing; Inverse transformation for playback the individual colour picture signal components being recorded simultaneously only involving the multiplexing of an additional signal and the colour video signal the additional signal being at least another television signal
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method for generating dynamic expressions, a computer-readable storage medium, and a computer device.
  • the present application provides a method for generating dynamic expressions, a computer-readable storage medium, and a computer device, which can solve the technical problems of low efficiency in generating dynamic expressions in related technologies.
  • a dynamic expression generating method applied to computer equipment including:
  • the expression thumbnail is configured to, when a selection event for the expression thumbnail is detected in the expression input panel, add the dynamic thumbnail Emoticons are displayed as conversation messages in the conversation page.
  • a dynamic expression generating device includes:
  • a detection module configured to enter an expression input panel in a conversation page; and detect a video shooting event triggered in the expression input panel;
  • An acquisition module configured to acquire video data in response to the video shooting event
  • An acquisition module configured to acquire an editing operation for the video data
  • a synthesis module configured to synthesize dynamic expressions after processing each video frame in the video data according to the editing operation
  • An adding module is configured to add an expression thumbnail corresponding to the dynamic expression to the expression input panel; the expression thumbnail is used when a selection event for the expression thumbnail is detected in the expression input panel Displaying the dynamic expression as a conversation message on the conversation page.
  • a computer-readable storage medium stores a computer program.
  • the processor causes the processor to execute the steps of the dynamic expression generating method.
  • a computer device includes a memory and a processor.
  • the memory stores a computer program, and when the computer program is executed by the processor, causes the processor to execute the steps of the dynamic expression generating method.
  • FIG. 1 is an application environment diagram of a method for generating a dynamic expression in an embodiment
  • FIG. 2 is a schematic flowchart of a dynamic expression generating method according to an embodiment
  • FIG. 3 is a schematic diagram of an interface for displaying an expression input panel in a conversation page in an embodiment
  • FIG. 4 is a schematic diagram of an interface for displaying an expression shooting icon on a favorite tab of an expression input panel according to an embodiment
  • FIG. 5 is a schematic diagram of an interface of a video collection page in an embodiment
  • FIG. 6 is a schematic flowchart of a step of following up an emoticon message in a conversation page according to an embodiment
  • FIG. 7 is a schematic diagram of an interface for tracking an emoticon message in a conversation page according to an embodiment
  • FIG. 8 is a schematic diagram of an interface for displaying an editing icon on a video capture page in an embodiment
  • FIG. 9 is a schematic diagram of an interface for adding a dynamic expression to an expression input panel according to an embodiment
  • FIG. 10 is an overall flowchart of generating a dynamic expression in a specific application scenario
  • FIG. 11 is a schematic diagram of an interface for adding an expression to be attached corresponding to a selected expression thumbnail to video data according to an embodiment
  • FIG. 12 is a schematic diagram of an interface for adding acquired text to video data in an embodiment
  • FIG. 13 is a schematic flowchart of synthesizing dynamic expressions after processing each video frame in video data according to an editing operation in a specific embodiment
  • FIG. 15 is a structural block diagram of a dynamic expression generating device according to an embodiment
  • FIG. 16 is a structural block diagram of a computer device in one embodiment.
  • FIG. 1 is an application environment diagram of a method for generating a dynamic expression in an embodiment.
  • the dynamic expression generating method is applied to a dynamic expression generating system.
  • the dynamic expression generating system includes a terminal 110 and a server 120.
  • the terminal 110 and the server 120 are connected through a network.
  • the terminal 110 may be a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, and a notebook computer.
  • the server 120 may be implemented by an independent server or a server cluster composed of multiple servers.
  • the terminal 110 can enter the expression input panel in the conversation page, detect a video shooting event triggered in the expression input panel, and collect video data in response to the video shooting event; the terminal 110 can also obtain an editing operation for the video data and follow the editing operation After processing each video frame in the video data, a dynamic expression is synthesized; the terminal 110 can also add an expression thumbnail corresponding to the dynamic expression to the expression input panel; the expression thumbnail is used to detect the expression thumbnail for the expression thumbnail in the expression input panel.
  • the dynamic expression is displayed on the conversation page as a conversation message.
  • the terminal 110 may also send the collected video data and the obtained editing operations for the video data to the server 120, and the server 120 may perform After processing each video frame in the video data, a dynamic expression is synthesized, and the expression thumbnail corresponding to the synthesized dynamic expression is fed back to the terminal 110, and the terminal 110 adds the expression thumbnail in the expression input panel, so that the terminal 110 During the trigger operation of the expression thumbnail in the expression input board, a dynamic expression corresponding to the expression thumbnail can be pulled from the server 120, and the dynamic expression is displayed on the conversation page as a conversation message.
  • a dynamic expression generating method is provided. This method is applied to a computer device. In this embodiment, the method is mainly applied to the terminal 110 in FIG. 1 as an example. Referring to FIG. 2, the method for generating a dynamic expression specifically includes the following steps:
  • the conversation page is a page for displaying conversation messages.
  • the conversation page may be a page for displaying conversation messages sent by both parties in a social application.
  • a social application is an application for performing social interaction on the network based on a social network.
  • Social applications usually have an instant messaging function.
  • the social application may be an instant communication application, and the conversation message may be an instant conversation message.
  • An expression is an image with a meaning expression function, which can reflect the inner activity, emotion, emotion, or specific semantics of the user who sent the expression.
  • Expressions include static expressions and dynamic expressions.
  • a static expression is a frame of static pictures, which can be a PNG (Portable Network Graphics) file format
  • a dynamic expression is an animation, which is synthesized from multiple frames of pictures, and can be a GIF (Graphics, Interchange, Format, Image Interchange) Format) file format.
  • the expression input panel is a container that stores the expression thumbnails corresponding to each expression. Users can add new expressions in the expression input panel.
  • the expression input panel may further include multiple tabs for accommodating expression thumbnails corresponding to expressions of different categories or different sources, for example, a common tab for accommodating expression thumbnails corresponding to expressions designed by developers of social applications , Favorite tabs for accommodating the facial expression thumbnails corresponding to the facial expressions of the current user's favorite, adding tabs for downloading, saving or importing new facial expressions, and so on.
  • the expression input panel can be switched back and forth with the text input panel. The user can enter text in the text input box when switching to the text input panel, and send a text message to the communication partner. When switching to the expression input panel Send an emoticon message to the communication partner by entering an emoticon.
  • the expression input panel and the text input panel may be collectively referred to as a conversation panel.
  • the terminal may display the expression input icon on the conversation page, and when a trigger event for the expression input icon is detected, display the expression input panel on the conversation page and enter the expression input panel.
  • the terminal detects a trigger operation for any of the expression thumbnails in the expression input panel triggered by the current user, the terminal can obtain the expression corresponding to the expression thumbnail, and send the acquired expression to another registered login account of the communication partner. Terminal, and display the acquired expressions on the current conversation page.
  • the trigger operation for the expression thumbnail may be a click operation, a pressing operation, a moving operation, a sliding operation, or the like.
  • FIG. 3 is a schematic diagram showing an expression input panel on a conversation page in an embodiment.
  • the terminal may display the input box 31 on the conversation page 30, and when a trigger operation for the expression input icon 32 is detected in the input box 31, the expression input panel 33 is displayed on the conversation page 30.
  • the video shooting event is an event that triggers shooting a video.
  • the expression input panel includes not only the expression thumbnails corresponding to each expression, but also an expression shooting icon, and the terminal can detect a video shooting event for the expression shooting icon triggered by the current user.
  • the video shooting event triggered by the user for the expression shooting icon may be the video shooting event triggered in the expression input panel described above.
  • the video shooting event may be a click operation on the facial expression shooting icon.
  • the expression input panel may include multiple tabs, and the terminal may display the expression shooting icon in any one of the multiple tabs, so that the video shooting for the expression shooting icon can be detected on the tab. Event; the terminal can also display the emoji shooting icon on each tab, so that the terminal can detect the video shooting event of the emoji shooting icon triggered on any of the tabs.
  • FIG. 4 it is a schematic diagram showing an expression shooting icon on a favorite tab of an expression input panel in one embodiment.
  • the user may click on an expression shooting icon 41 on the favorite tab 40 in the expression input panel to trigger the shooting of video data.
  • S206 Collect video data in response to a video shooting event.
  • the video data is material for generating dynamic expressions, and the video data includes a plurality of captured video frames.
  • the terminal detects a video shooting event triggered in the expression input panel, in response to the video shooting event, the terminal controls the configured acquisition device to collect video data.
  • the collecting device may be, for example, a front camera or a rear camera configured on the terminal.
  • the terminal may jump from the conversation page to the video capture page, and directly call the capture device in the video capture page to start collecting video data, and display the collected video data in the video. Collection page until the collection is complete.
  • the terminal can end the acquisition when detecting the end event of the acquisition triggered by the user to obtain the video data.
  • step S206 in response to a video shooting event, collecting video data includes: in response to a video shooting event, jumping from a conversation page to a video capturing page; displaying a real-time captured picture in the video capturing page; detecting a video When the recording start event triggered on the acquisition page starts to record video data; until the recording end event is triggered on the video acquisition page, the recorded video data is obtained.
  • the recording start event may be a trigger event for a recording icon triggered by a user, such as a pressing operation, a clicking operation, or a sliding operation on a recording icon; the recording end event may be a state where the recording icon is switched from a pressed state to a non-pressed state Event, or an event where the recording duration of the recorded video data reaches the target duration.
  • the terminal can display the real-time captured images through the video collection page.
  • the user can capture the real-time images including the user's face through the front camera configured on the terminal, and can also collect the real-time images including the user's face through the configured rear camera.
  • Implementation screen When the recording start event triggered on the video capture page is detected, video data is recorded, and until the triggered recording end event is detected on the video capture page, the recorded video data is obtained.
  • FIG. 5 it is a schematic diagram of an interface of a video collection page in an embodiment.
  • the user can long press the recording icon 51 in the video collection page 50 to trigger the recording of the video data, and obtain the recorded video data when the pressing ends or when the duration of the recorded video data reaches the target duration, where
  • the target duration can be, for example, 5 to 10 seconds.
  • the method for generating a dynamic expression further includes:
  • S602 Acquire a follow-up operation for an emoticon message in a conversation page.
  • the emoticon message is a conversation message whose content is an emoticon.
  • the follow-up operation is also a video shooting event triggered by the user. The user can trigger the video shooting event in the expression input panel, or trigger the video shooting event through the expression message.
  • the terminal can detect the follow-up operation for the emoticon message triggered by the user, thereby triggering the collection of video data, obtaining the video data, and then performing the editing operation for obtaining the video data.
  • the editing operation processes each video frame in the video data to synthesize a dynamic expression, and adds the expression thumbnail corresponding to the dynamic expression to the expression input panel.
  • the terminal when the terminal detects a pressing operation on an expression in any expression message on the conversation page, the terminal displays a detailed menu corresponding to the expression, and detects a trigger triggered by the user for a “follow-up” option in the detailed menu. Operation to obtain a follow-up operation for the emoticon message.
  • the user can jump from the conversation page to the video capture page, and display the real-time captured image on the video capture page.
  • S606 Display the expression corresponding to the expression message on the video collection page in a semi-transparent manner.
  • S608 Superimposedly display the real-time captured image and the expression displayed in a semi-transparent manner.
  • the terminal can use the semi-transparent way of the expression corresponding to the expression message as the foreground of the screen captured in real time, and display it on the video capture page, so that the actual captured screen can be superimposed on the video capture page with the translucent expression. It can guide the recording of video data to the real-time captured frames. When the terminal can still detect the recording start event triggered on the video capture page, the terminal can start recording video data on the real-time captured picture; until the recording end event is triggered on the video capture page, the recorded video data is obtained. It should be noted that the expressions displayed in a semi-transparent manner are only used to guide the recording of video data, and the video data obtained after the video data recording ends do not include the expressions displayed in a semi-transparent manner.
  • step S606 may also be: displaying the text in the expression corresponding to the emoticon message in the video capture screen in the original style, and displaying the content other than the text in the expression corresponding to the emoticon message in the video in a semi-transparent manner.
  • the text is displayed on the video capture page in a non-transparent manner.
  • step S608 the screen captured in real time, the text displayed in the original style in the expression, and the content displayed in a semi-transparent manner can be superimposed and displayed on the video collection page.
  • the expression corresponding to the expression message when the expression corresponding to the expression message is a static expression, the static expression is used as a foreground to be superimposed on the real-time captured screen in a semi-transparent manner.
  • the expression corresponding to the expression message is a dynamic expression, the dynamic expression is cyclically played on the screen captured in real-time in a semi-transparent manner as a foreground.
  • FIG. 7 it is a schematic diagram of an interface for emoji messages in a conversation page according to an embodiment.
  • the user can click the emoticon message 71 on the conversation page 70 to pop up the detailed menu 72 corresponding to the emoticon in the emoticon message, and then the user clicks the “follow-up” option 73 in the detailed menu 72 to trigger the slave conversation.
  • Page 70 jumps to a video collection page 74, where video data collection is performed.
  • the editing operation is an operation for further processing the recorded video data.
  • the terminal can display the video cover of the recorded video data on the video collection page, and display the editing icons corresponding to each editing operation, to obtain the editing operation for the recorded video data triggered by the user through these editing icons.
  • the editing operations include a background removal operation to remove the background from the video data, an acceleration operation to accelerate the playback of the video data, an emoticon addition operation to add an additional expression to the video data, and an additional operation to add additional data to the video data Text-to-text operations, etc.
  • the expression addition operation may be, for example, a post expression operation, and the text addition operation may be, for example, a subtitle operation.
  • FIG. 8 it is a schematic diagram of displaying an editing icon on a video capture page in one embodiment.
  • a video cover 81 of the recorded video data is displayed, and the user is obtained by removing the background icon 82, the accelerated playback icon 83, the emoticon icon 84, or the subtitle icon 85 on the video collection page 80 Triggered editing operations on video data.
  • S210 Process each video frame in the video data according to the editing operation to synthesize a dynamic expression.
  • the video data includes multiple video frames
  • the terminal may perform corresponding processing on the video frames in the video data according to the obtained editing operations for the video data, and then synthesize each processed video frame to obtain a dynamic expression.
  • the file format of dynamic expressions can be GIF.
  • the terminal may synthesize each processed video frame to obtain a dynamic expression when detecting the user-composed confirmation composition operation, or may synthesize each processed video frame to obtain a dynamic expression after the editing operation is completed.
  • the method for generating dynamic expressions further includes: when no editing operation for video data is acquired and a confirmation composition operation is detected, then the video expressions in the collected video data can be synthesized directly to obtain dynamic expressions. .
  • the terminal does not detect a user-edited editing operation for video data on the video collection page, and when a user-triggered confirmation and synthesis operation for video data is detected on the page, it can correspond to the file format of dynamic expressions.
  • Encoding method directly encode each video frame in the collected video data, and synthesize each encoded video frame into a dynamic expression.
  • the method for generating dynamic expressions further comprises: detecting the transparency of the pixels included in each video frame before synthesizing the dynamic expressions; obtaining semi-transparent pixels from the included pixels according to the transparency; After the transparency of the semi-transparent pixels is adjusted to a non-transparent value, the dynamic expression is synthesized.
  • the transparency of each pixel can be represented by the value of the opacity parameter of each pixel.
  • the value of the opacity parameter can be expressed as a percentage (such as (0% to 100%), an integer (such as 0 to 255), or a real number (such as 0 to 1).
  • the value of the opacity parameter of a pixel is 0%, then It is completely transparent, that is, invisible.
  • the value of the non-transparency parameter is 100%, the pixel is completely opaque, and the pixels of the non-transparency parameter between 0% and 100% can be displayed through the background. Out, these pixels are semi-transparent pixels.
  • the terminal can detect the transparency of each pixel in each video frame and adjust the transparency of the semi-transparent pixels in each video frame to a non-transparent value before synthesizing each video frame to obtain a dynamic expression.
  • the expression thumbnail corresponds to one expression.
  • the thumbnail of the expression may be a reduced image of the static expression, and for a dynamic expression, a thumbnail of the first frame or the last frame of the dynamic expression may be taken as the thumbnail of the expression.
  • Expression thumbnails are stored in correspondence with expressions.
  • the terminal may add an expression thumbnail corresponding to a dynamic expression obtained by finally synthesizing each video frame to the expression input panel, so that when the terminal detects a selection event for the expression thumbnail in the expression input panel, the terminal may add The dynamic expression corresponding to the expression thumbnail is sent to the communication partner, and the dynamic expression is displayed on the conversation page of the terminal used by the current user.
  • the terminal may also obtain a removal operation for any expression in the expression input panel, and remove the expression from the expression input panel according to the removal operation.
  • FIG. 9 it is a schematic diagram of an interface for adding a dynamic expression to an expression input panel in one embodiment.
  • the terminal executes the steps of synthesizing dynamic expressions after processing each video frame in the video data according to the editing operation, and corresponding the synthesized dynamic expressions.
  • the emoticon thumbnail 92 is added to the emoticon input panel 93, and the user clicks the emoticon thumbnail 92 to send the corresponding dynamic emoticon 94 to the communication partner, and displays the dynamic emoticon on the conversation page 95.
  • the terminal may obtain user information of the current user, and store the generated dynamic expression on the server corresponding to the user information, so that the current user can use the dynamic expression on different devices.
  • the social application may be Wechat, and the terminal may store the generated dynamic expression in correspondence with the current user ’s WeChat.
  • the user can pull the dynamic expression corresponding to the WeChat from the server. .
  • FIG. 10 it is an overall flowchart of generating dynamic expressions in a specific application scenario.
  • trigger a video shooting event in the expression input panel or expression message on the conversation page then, enter the video collection page to collect video data; then, the user clicks the background icon, acceleration icon, expression additional icon or text additional icon as needed,
  • the video data is edited; then, the user clicks the confirm synthesis button to generate a dynamic expression according to the edited video data; finally, the dynamic expression is stored corresponding to the user information and added to the expression input panel.
  • a user-triggered video shooting event after entering the expression input panel in the conversation page, a user-triggered video shooting event can be detected directly in the expression input panel, and video data is collected in response to the video shooting event as a material for generating a dynamic expression. No need to collect material by yourself.
  • the video frames in the video data can also be processed according to the user's editing operations to synthesize dynamic expressions, and the expression thumbnails corresponding to the synthesized dynamic expressions are added to the expressions.
  • the user After entering in the panel, the user can select the added dynamic expression from the expression input panel and send it to the communication partner, which can not only meet the user's personalized needs, but also does not need to use additional tools, which can greatly improve the efficiency of generating dynamic expressions.
  • the editing operation includes a background removal operation; step S210, synthesizing dynamic expressions after processing each video frame in the video data according to the editing operation includes: extracting facial features from each video frame according to the image attributes of each video frame; Obtain the outline information of the human body in each video frame according to the facial features; obtain the background area of each video frame according to the outline information; adjust the transparency of each pixel in the background area to a transparent value; synthesize each adjusted video frame to obtain a dynamic expression.
  • the terminal uses the video data obtained by recording the screen as the material to synthesize dynamic expressions, which can obtain some personalized, More interesting dynamic expressions.
  • the background removal operation refers to an event triggered by the user through the background removal icon in the video collection page, and the terminal may perform background removal processing on each video frame in the video data after detecting the background removal operation.
  • the image attributes of a video frame include the pixel value, color component value, hue, saturation, brightness, color channel, etc. of each pixel in the video frame.
  • Face features are features capable of expressing faces included in a video frame.
  • the terminal can extract the face features of each video frame according to the image attributes of each video frame through the trained machine learning model, and the extracted face features can express each According to the information contained in the video frame, the positions of the organs of the face or the predefined feature points are obtained in each video frame according to the extracted facial features.
  • the positions can be expressed in two-dimensional coordinates, so that according to the positions of the organs of multiple faces
  • the position or the position of multiple feature points in the video frame is used to obtain the contour information of the human body.
  • the contour information includes the contour information of the face shape and the contour information of the body shape. In this way, the terminal can obtain the face and contour information in each video frame according to the contour information.
  • the transparency of each pixel in the background area is adjusted to a completely transparent transparency value, so that the background area is not visible, and the background video processing is performed on the collected video data so that Video frames synthesize dynamic expressions.
  • the background removal processing is performed on each video frame, so that the synthesized dynamic expression is also not present.
  • Messy background the user can trigger the background removal operation directly on the video capture page to remove the background of the captured video data. No additional tools are required to perform background removal and then synthesize dynamic expressions, which improves the efficiency of generating dynamic expressions.
  • the editing operation includes an acceleration operation; step S210, synthesizing dynamic expressions after processing each video frame in the video data according to the editing operation includes: calculating a timestamp array corresponding to the video data after the acceleration operation; traversing the timestamp array Element values in the video; video frames corresponding to the timestamp and element values are selected from the video data until the traversal is completed; the selected video frames are synthesized to obtain a dynamic expression.
  • the acceleration operation refers to an event triggered by a user through an acceleration icon in a video collection page, and the terminal may accelerate the collected video data when the event is detected to obtain an accelerated dynamic expression.
  • the timestamp array is an array composed of the timestamps of the collected video data.
  • the corresponding timestamp array is an array composed of several timestamps extracted from the original timestamp of the video data. The number of decimations is related to the acceleration rate.
  • the terminal can traverse each element value in the timestamp array, select the corresponding video frame from the video data according to the traversed element value, and then select the selected video frame.
  • Video frames synthesize dynamic expressions.
  • calculating the time stamp array corresponding to the video data after the acceleration operation specifically includes: obtaining the recording duration of the captured video data, and calculating the original time of each video frame in the video data according to the recording duration and the frame rate of the video data. Poke to obtain the acceleration magnification corresponding to the acceleration operation, select the original timestamp from the original timestamp according to the acceleration magnification, and generate the timestamp array corresponding to the accelerated operation according to the selected timestamp.
  • the original timestamp corresponding to each video frame of the video data may be:
  • the terminal can calculate the values of the elements in the corresponding timestamp array after the acceleration operation are:
  • the corresponding timestamp array after the corresponding acceleration operation can also be predefined, and the terminal only needs to press the predefined time
  • the stamp array extracts the corresponding video frames from the video data.
  • corresponding video frames can be extracted from the original video data, and the extracted video frames are synthesized to obtain a dynamic expression, thereby achieving acceleration of the collected video data. Play.
  • no additional tools are needed to accelerate the processing of the collected video data, which improves the efficiency of generating dynamic expressions.
  • the editing operation includes an expression addition operation
  • step S210 synthesizing dynamic expressions after processing each video frame in the video data according to the editing operation includes: displaying an expression input panel in response to the expression addition operation; and obtaining an expression input panel
  • the emoticons to be attached corresponding to the emoticon thumbnails selected in the middle add the emoticons of the emoticons to be added to each video frame of the video data; synthesize each video frame to which the emoticon is added to obtain a dynamic emoticon.
  • the expression addition operation refers to an event triggered by the user through the expression addition icon in the video collection page.
  • the expression processing is added to the collected video data to obtain a dynamic expression with the added expression.
  • the expression is derived from the expression in the expression input panel.
  • the terminal when the terminal obtains an expression addition operation for video data, the terminal displays an expression input panel on the video collection page, obtains the expression to be attached corresponding to the expression thumbnail selected by the user from the expression input panel, and adds the expression to be attached to In each video frame of the video data, the terminal can synthesize the video frame to which the expression is added into a dynamic expression. Since the expressions in the expression input panel include thumbnails corresponding to the expressions collected by users according to their own interests, and also include thumbnails corresponding to user-defined dynamic expressions, users can add expressions to the collected video data according to their own interests. The synthesized dynamic expressions are more in line with the personalized needs of users.
  • FIG. 11 it is a schematic diagram of an interface for adding an expression to be attached corresponding to a selected expression thumbnail to video data in an embodiment.
  • the terminal pops up the expression input panel 1103 in the video collection page 1101, and the user clicks the expression reduction in the expression input panel 1103.
  • the terminal can add the expression corresponding to the expression thumbnail selected by the user to the video data.
  • adding the emoticons to be added to each video frame of the video data includes: generating a plurality of different emoticons according to the emoticons to be attached; and respectively mapping the plurality of different emoticons to the video data.
  • Each video frame; a corresponding expression map is added to each video frame in the video data.
  • the expression to be attached may be a static expression.
  • the terminal may directly add the to-be-added expressions to respective video frames of the video data.
  • the terminal may also generate a plurality of emoticons of different specifications corresponding to the emoticon to be attached, and each video frame corresponding to the plurality of emoticons of different specifications respectively adds corresponding emoticons to each video frame.
  • the synthesized dynamic expression is played, the added expression can present a dynamic shaking effect.
  • the emoticons of different specifications may be the same as the content of the emoticons to be attached, but with different sizes.
  • the frame rate of the collected video data is 40.
  • the terminal After acquiring the to-be-added expressions corresponding to the expression thumbnails selected by the user from the expression input panel, the terminal generates four different-sized expression maps corresponding to the to-be-added expressions. , For large-sized emoticons, medium-sized emoticons, small-sized emoticons, and small-sized emoticons, respectively, for every 1 second of video data collected, large-sized emoticons can be added in frames 1 to 5.
  • the expression to be attached may be a dynamic expression.
  • the terminal can obtain each frame of the emoticons to be attached, and respectively correspond to a plurality of different emoticons to each video frame in the video data; and add corresponding emoticons to each video frame in the video data.
  • a plurality of different expression maps corresponding to the expression to be attached may be cyclically added to each video frame of the video data; when the length of the expression to be attached is equal to the total length of the video data During the duration, multiple different emoticons corresponding to the expression to be attached can be added to the corresponding video frame one by one; when the length of the expression to be attached is greater than the total duration of the video data, multiple expressions corresponding to the expression to be attached can be added.
  • the previous multiple emoticons in the figure correspond to each video frame of the video data, or the corresponding emoticons are extracted from the multiple emoticons corresponding to the emoticons to be attached to each video frame of the video data, and the corresponding emoticons are To the corresponding video frame.
  • the editing operation includes a text appending operation; step S210, synthesizing dynamic expressions after processing each video frame in the video data according to the editing operation includes: obtaining a text to be added in response to the text appending operation; Text is added to each video frame of video data; each video frame to which text is added is synthesized to obtain a dynamic expression.
  • the text addition operation refers to an event triggered by a user through a text addition icon in a video collection page.
  • the terminal may add text processing to the captured video data to obtain a text-added dynamic expression.
  • obtaining the text to be added includes: providing a text input box, obtaining the text input in the text input box as the text to be added; or obtaining the voice data recorded when the video data is collected, and performing the voice data processing.
  • Speech recognition gets the text to be added. That is, the added text may be text entered by the user or text obtained by performing speech recognition on the voice data in the video data.
  • the terminal when the terminal obtains a text additional operation for video data, the terminal displays a text input panel on the video capture page, and obtains the text entered by the user in the text input box of the text input panel as the text to be added.
  • the added text is added to each video frame of the video data, and the terminal can synthesize the video frame with the added text into a dynamic expression.
  • the terminal may also perform voice recognition on the voice data in the video data when the text additional operation for the video data is acquired, and add the recognized text to each video frame as the text to be added.
  • the terminal can also display the text obtained by speech recognition in a text input panel, and the user can edit the text to ensure the accuracy of the text to be added.
  • FIG. 12 it is a schematic diagram of an interface for adding acquired text to video data in one embodiment.
  • the terminal pops up a text input panel 1203 in the video collection page 1201, and the user enters the text "stunned by the text input panel 1203" ", Click” Finish ( ⁇ ) "and the terminal will add the text entered by the user to the video data.
  • the terminal may directly add text to be added to each video frame of the video data.
  • the terminal can also generate multiple texts with different font sizes or different font colors according to the acquired text; corresponding multiple texts with different font sizes or different font colors to each video frame in the video data; each video in the video data Corresponding text is added to each frame. In this way, when the synthesized dynamic expression is played, the added text can present a dynamic shaking effect.
  • the frame rate of the collected video data is 40.
  • the terminal can generate four different font size emoticons corresponding to the input text, which are large text. , Medium font text, small font text, and small font text, then for every 1 second of video data collected, you can add large font text in frames 1 to 5, and in frames 6 to 10 Add medium font text, add small font text in frames 11 to 15, add small font text in frames 16 to 20, add large font text in frames 21 to 25 ..., And so on, corresponding text can be added to each video frame of the video data.
  • the user input or text obtained through speech recognition can be directly obtained, and then it can be directly added to the collected video data, and dynamic expressions can be synthesized without adding text through other tools. , Which improves the efficiency of generating dynamic expressions.
  • FIG. 13 it is a schematic flowchart of synthesizing dynamic expressions after processing video frames in video data according to an editing operation in a specific embodiment.
  • each processed video frame is synthesized into a dynamic expression according to the corresponding coding standard.
  • FIG. 14 it is a schematic flowchart of generating a dynamic expression in a specific embodiment. Referring to FIG. 14, the method includes:
  • S1402 Enter the expression input panel in the conversation page, and detect the video shooting event triggered in the expression input panel; in response to the video shooting event, jump from the conversation page to the video capture page; display the real-time captured image in the video capture page;
  • S1404 obtain a follow-up operation for the emoticon message in the conversation page; jump from the conversation page to the video acquisition page in response to the follow-up operation; display the emoticon corresponding to the emoticon message in the video acquisition page in a translucent manner; Superimposed display with a translucent expression.
  • the facial features are extracted for each video frame according to the image attributes of each video frame; the contour information of the human body in each video frame is obtained according to the facial features; the contour information of each video frame is obtained according to the contour information.
  • Background area adjusting the transparency of each pixel in the background area to a transparent value; synthesizing each adjusted video frame to obtain a dynamic expression.
  • the editing operation includes an expression addition operation
  • the expression input panel is displayed in response to the expression addition operation; obtaining the expression to be attached corresponding to the expression thumbnail selected from the expression input panel; and generating a plurality of different expressions according to the expression to be attached Map; corresponding to different video frames in the video data, each video frame is added to the video data in each video frame corresponding to the corresponding emoticon map; each video frame added emoticon is synthesized to get dynamic expression.
  • S1420 Add an expression thumbnail corresponding to the dynamic expression to the expression input panel; the expression thumbnail is used to display the dynamic expression as a conversation message on the conversation page when a selection event for the expression thumbnail is detected in the expression input panel.
  • a user-triggered video shooting event after entering the expression input panel in the conversation page, a user-triggered video shooting event can be detected directly in the expression input panel, and video data is collected in response to the video shooting event as a material for generating a dynamic expression. No need to collect material by yourself.
  • the video frames in the video data can also be processed according to the user's editing operations to synthesize dynamic expressions, and the expression thumbnails corresponding to the synthesized dynamic expressions are added to the expressions.
  • the user After entering in the panel, the user can select the added dynamic expression from the expression input panel and send it to the communication partner, which can not only meet the user's personalized needs, but also does not need to use additional tools, which can greatly improve the efficiency of generating dynamic expressions.
  • FIG. 14 is a schematic flowchart of a dynamic expression generating method according to an embodiment. It should be understood that although the steps in the flowchart of FIG. 14 are sequentially displayed in accordance with the directions of the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless explicitly stated in this document, the execution of these steps is not strictly limited, and these steps can be performed in other orders. Moreover, at least a part of the steps in FIG. 14 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
  • a dynamic expression generating device 1500 includes a detection module 1502, a collection module 1504, an acquisition module 1506, a synthesis module 1508, and an addition module 1510, where:
  • a detection module 1502 is configured to enter an expression input panel in a conversation page; and detect a video shooting event triggered in the expression input panel;
  • An acquisition module 1504 configured to acquire video data in response to a video shooting event
  • An acquisition module 1506, configured to acquire an editing operation for video data
  • a synthesis module 1508 configured to synthesize dynamic expressions after processing each video frame in the video data according to an editing operation
  • Adding module 1510 is used to add the expression thumbnail corresponding to the dynamic expression to the expression input panel; the expression thumbnail is used to display the dynamic expression as a conversation message when a selection event for the expression thumbnail is detected in the expression input panel Session page.
  • the acquisition module 1504 includes a jump module, a display module, a recording module, and a video data acquisition module; the jump module is used to jump from the conversation page to the video acquisition page in response to a video shooting event; the display module is used to Display the real-time captured image on the video capture page; the recording module is used to start recording video data when the recording start event triggered on the video capture page is detected; the video data acquisition module is used until the recording end event is triggered on the video capture page, Get the recorded video data.
  • the jump module is used to jump from the conversation page to the video acquisition page in response to a video shooting event
  • the display module is used to Display the real-time captured image on the video capture page
  • the recording module is used to start recording video data when the recording start event triggered on the video capture page is detected
  • the video data acquisition module is used until the recording end event is triggered on the video capture page, Get the recorded video data.
  • the editing operation includes a background removal operation; the synthesis module 1508 is further configured to extract the facial features of each video frame according to the image attributes of each video frame; obtain the contour information of the human body in each video frame according to the facial features; The contour information obtains the background area of each video frame; adjusts the transparency of each pixel in the background area to a transparent value; and synthesizes each adjusted video frame to obtain a dynamic expression.
  • the editing operation includes an acceleration operation; the composition module 1508 is further configured to calculate a timestamp array corresponding to the video data after the acceleration operation; traverse the element values in the timestamp array; and select a timestamp from the video data corresponding to the element value Video frames until the traversal is complete; synthesize the selected video frames to obtain dynamic expressions.
  • the editing operation includes an expression addition operation; the synthesis module 1508 is further configured to display an expression input panel in response to the expression addition operation; obtain an expression to be attached corresponding to the expression thumbnail selected from the expression input panel; An emoticon is added to each video frame of the video data; each video frame to which the emoticon is added is synthesized to obtain a dynamic emoticon.
  • the synthesizing module 1508 is further configured to generate a plurality of different expression maps according to the expressions to be attached; correspondingly, the plurality of different expression maps to each video frame in the video data; each video frame in the video data Add the corresponding emoticons in.
  • the editing operation includes a text appending operation;
  • the composition module 1508 further includes a text acquiring module and a text adding module;
  • the text acquiring module is configured to acquire the text to be added in response to the text appending operation;
  • the added text is added to each video frame of the video data;
  • the synthesis module is also used to synthesize each video frame to which the text is added to obtain a dynamic expression.
  • the text obtaining module is further configured to provide a text input box, and obtain the text input in the text input box as the text to be added.
  • the text acquisition module is further configured to acquire voice data recorded during video data collection, and perform voice recognition on the voice data to obtain text to be added.
  • the dynamic expression generating device 1500 further includes a transparency adjustment module; the transparency adjustment module is configured to detect the transparency of the pixels included in each video frame before synthesizing the dynamic expression; and obtain the translucency from the included pixels according to the transparency. Pixels; after adjusting the transparency of the translucent pixels in each video frame to a non-transparent value, the dynamic expression is synthesized.
  • the dynamic expression generating device 1500 further includes a follow-up module, which is used to obtain a follow-up operation for the emoticon message in the conversation page; respond to the follow-up operation to jump from the conversation page to the video collection page;
  • the expression corresponding to the message is displayed on the video capture page in a semi-transparent manner; the real-time captured image is superimposed with the expression displayed in a semi-transparent manner.
  • the synthesis module 1508 is further configured to directly synthesize the video frames in the collected video data to obtain a dynamic expression when no editing operation is acquired for the video data and a confirmation synthesis operation is detected.
  • the above dynamic expression synthesizing device 1500 after entering the expression input panel in the conversation page, can directly detect the video shooting event triggered by the user in the expression input panel, and collect video data in response to the video shooting event as a material for generating a dynamic expression No need to collect material by yourself.
  • the video frames in the video data can also be processed according to the user's editing operations to synthesize dynamic expressions, and the expression thumbnails corresponding to the synthesized dynamic expressions are added to the expressions.
  • the user After entering in the panel, the user can select the added dynamic expression from the expression input panel and send it to the communication partner, which can not only meet the user's personalized needs, but also does not need to use additional tools, which can greatly improve the efficiency of generating dynamic expressions.
  • FIG. 16 shows an internal structure diagram of a computer device in one embodiment.
  • the computer device may specifically be the terminal 110 in FIG. 1.
  • the computer device includes the computer device including a processor, a memory, a network interface, an input device, and a display screen connected through a system bus.
  • the memory includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium of the computer device stores an operating system and a computer program.
  • the processor can implement a dynamic expression generating method.
  • a computer program can also be stored in the internal memory, and when the computer program is executed by the processor, the processor can cause the processor to execute a dynamic expression generating method.
  • the display screen of a computer device can be a liquid crystal display or an electronic ink display screen.
  • the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the computer device casing. It can be an external keyboard, trackpad, or mouse.
  • the camera of the computer device may be a front camera or a rear camera, and the sound collection device of the computer device may be a microphone.
  • FIG. 16 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may be Include more or fewer parts than shown in the figure, or combine certain parts, or have a different arrangement of parts.
  • the dynamic expression generating device 1500 provided in this application may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in FIG. 16.
  • the memory of the computer device may store various program modules constituting the dynamic expression generating device 1500, such as the detection module 1502, the acquisition module 1504, the acquisition module 1506, the synthesis module 1508, and the addition module 1510 shown in FIG.
  • the computer program constituted by each program module causes the processor to execute the steps in the dynamic expression generating method of each embodiment of the present application described in this specification.
  • the computer device shown in FIG. 16 may perform steps S202 and S204 by the detection module 1502 in the dynamic expression generating device 1500 shown in FIG. 15.
  • the computer device may execute step S206 through the acquisition module 1504.
  • the computer device may execute step S208 through the acquisition module 1506.
  • the computer device may execute step S210 through the composition module 1508.
  • the computer device may execute step S212 by adding the module 1510.
  • a computer device which includes a memory and a processor.
  • the memory stores a computer program.
  • the processor is caused to execute the steps of the dynamic expression generating method.
  • the steps of the method for generating dynamic expressions herein may be the steps in the methods for generating dynamic expressions of the foregoing embodiments.
  • a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor causes the processor to execute the steps of the dynamic expression generating method described above.
  • the steps of the method for generating dynamic expressions herein may be the steps in the methods for generating dynamic expressions of the foregoing embodiments.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM dual data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Synchlink DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)
  • Television Signal Processing For Recording (AREA)
  • Image Analysis (AREA)

Abstract

本申请涉及一种动态表情生成方法、计算机可读存储介质和计算机设备,所述方法包括:在会话页面中进入表情输入面板;检测在表情输入面板中触发的视频拍摄事件;响应于视频拍摄事件,采集视频数据;获取针对视频数据的编辑操作;按照编辑操作对视频数据中各视频帧进行处理后合成动态表情;将动态表情对应的表情缩略图添加至表情输入面板中;表情缩略图用于在表情输入面板中检测到针对表情缩略图的选取事件时,将动态表情作为会话消息展示在会话页面中。本申请提供的方案能够大大提高生成动态表情的效率。

Description

动态表情生成方法、计算机可读存储介质和计算机设备
本申请要求于2018年09月27日提交的申请号为2018111328446、发明名称为“动态表情生成方法、装置、计算机可读存储介质和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种动态表情生成方法、计算机可读存储介质和计算机设备。
背景技术
随着互联网的快速发展,出现了各式各样的在线社交应用,包括即时通讯应用等。在使用这些社交应用的过程中,为了更形象、生动的表达想说的话,用户经常会发送一些动态表情,能够大大促进用户之间交流的灵活性和趣味性。
目前,许多动态表情一般都是由社交应用的开发者预先设计好的,用户下载或保存后即可使用,这些动态表情无法满足用户的个性化需求。为了能够使用自定义的动态表情,用户只能先通过额外的工具对自己喜欢的素材处理后生成动态表情,再将动态表情导入至社交应用中方便自己使用,显然,这种生成动态表情的方式效率极低。
发明内容
本申请提供一种动态表情生成方法、计算机可读存储介质和计算机设备,可以解决相关技术中生成动态表情的方式效率较低的技术问题。
一种动态表情生成方法,应用于计算机设备,包括:
在会话页面中进入表情输入面板;
检测在所述表情输入面板中触发的视频拍摄事件;
响应于所述视频拍摄事件,采集视频数据;
获取针对所述视频数据的编辑操作;
按照所述编辑操作对所述视频数据中各视频帧进行处理后合成动态表情;
将所述动态表情对应的表情缩略图添加至所述表情输入面板中;所述表情缩略图用于在所述表情输入面板中检测到针对所述表情缩略图的选取事件时,将所述动态表情作为会话消息展示在所述会话页面中。
一种动态表情生成装置,所述装置包括:
检测模块,用于在会话页面中进入表情输入面板;检测在所述表情输入面板中触发的视频拍摄事件;
采集模块,用于响应于所述视频拍摄事件,采集视频数据;
获取模块,用于获取针对所述视频数据的编辑操作;
合成模块,用于按照所述编辑操作对所述视频数据中各视频帧进行处理后合成动态表情;
添加模块,用于将所述动态表情对应的表情缩略图添加至所述表情输入面板中;所述表 情缩略图用于在所述表情输入面板中检测到针对所述表情缩略图的选取事件时,将所述动态表情作为会话消息展示在所述会话页面中。
一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行上述动态表情生成方法的步骤。
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行上述动态表情生成方法的步骤。
附图说明
图1为一个实施例中动态表情生成方法的应用环境图;
图2为一个实施例中动态表情生成方法的流程示意图;
图3为一个实施例中在会话页面中展示表情输入面板的界面示意图;
图4为一个实施例中在表情输入面板的收藏页签中展示表情拍摄图标步骤的界面示意图;
图5为一个实施例中视频采集页面的界面示意图;
图6为一个实施例中对会话页面中表情消息跟拍的步骤的流程示意图;
图7为一个实施例中对会话页面中表情消息跟拍的界面示意图;
图8为一个实施例中在视频采集页面中展示编辑图标的界面示意图;
图9为一个实施例中将动态表情添加至表情输入面板的界面示意图;
图10为一个具体的应用场景中生成动态表情的整体流程图;
图11为一个实施例中将选择的表情缩略图对应的待附加表情添加至视频数据中的界面示意图;
图12为一个实施例中将获取的文本添加至视频数据中的界面示意图;
图13为一个具体的实施例中按照编辑操作对视频数据中各视频帧进行处理后合成动态表情的流程示意图;
图14为一个具体的实施例中生成动态表情的流程示意图;
图15为一个实施例中动态表情生成装置的结构框图;
图16为一个实施例中计算机设备的结构框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1为一个实施例中动态表情生成方法的应用环境图。参照图1,该动态表情生成方法应用于动态表情生成系统。该动态表情生成系统包括终端110和服务器120。终端110和服务器120通过网络连接。终端110具体可以是移动终端,移动终端具体可以手机、平板电脑、笔记本电脑等中的至少一种。服务器120可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
终端110可在会话页面中进入表情输入面板,检测在表情输入面板中触发的视频拍摄事件,并响应于视频拍摄事件,采集视频数据;终端110还可获取针对视频数据的编辑操作,按照编辑操作对视频数据中各视频帧进行处理后合成动态表情;终端110还可将动态表情对 应的表情缩略图添加至表情输入面板中;表情缩略图用于在表情输入面板中检测到针对表情缩略图的选取事件时,将动态表情作为会话消息展示在会话页面中。
需要说明的是,上述的应用环境只是一个示例,在一些实施例中,终端110还可将采集的视频数据以及获取的针对该视频数据的编辑操作发送至服务器120,由服务器120按照编辑操作对视频数据中各视频帧进行处理后合成动态表情,并将合成的动态表情对应的表情缩略图反馈至终端110,由终端110在表情输入面板中添加该表情缩略图,这样终端110在检测到针对表情输入板中该表情缩略图的触发操作时,可从服务器120拉取与该表情缩略图对应的动态表情,并将该动态表情作为会话消息展示在会话页面中。
如图2所示,在一个实施例中,提供了一种动态表情生成方法。该方法应用于计算机设备,本实施例主要以该方法应用于上述图1中的终端110来举例说明。参照图2,该动态表情生成方法具体包括如下步骤:
S202,在会话页面中进入表情输入面板。
其中,会话页面是用于展示会话消息的页面,比如可以是社交应用中用于展示会话双方发送的会话消息的页面。社交应用是基于社交网络进行网络社交互动的应用,社交应用通常具有即时通信功能,社交应用可以是即时通信应用等,会话消息就可以是即时会话消息。
表情是一种具有意思表达功能的图像,可反映发送该表情的用户的内心活动、情绪、情感或特定语义。表情包括静态表情和动态表情。通常,静态表情是一帧静态图片,可以是PNG(Portable Network Graphics,便携式网络图形)的文件格式,而动态表情是一个动画,由多帧图片合成,可以是GIF(Graphics Interchange Format,图像互换格式)的文件格式。
表情输入面板是存放各个表情对应的表情缩略图的容器,用户可在表情输入面板中添加新的表情。表情输入面板还可以包括用于容纳不同类别或不同来源的表情对应的表情缩略图的多个页签,比如,用于容纳社交应用的开发者自行设计的表情对应的表情缩略图的常用页签、用于容纳当前用户收藏的表情对应的表情缩略图的收藏页签以及用于下载、保存或导入新的表情的添加页签,等等。通常,在会话页面中,表情输入面板可以与文本输入面板来回切换,用户可在切换至文本输入面板时在文本输入框中输入文本,并向通信对方发送文本消息,在切换至表情输入面板时通过输入表情向通信对方发送表情消息。表情输入面板与文本输入面板可统称为会话面板。
具体地,终端可在会话页面中展示表情输入图标,在检测到针对该表情输入图标的触发事件时,在会话页面中展示表情输入面板,进入到表情输入面板中。终端就可在检测到当前用户触发的针对表情输入面板中任意一个表情缩略图的触发操作时,获取该表情缩略图对应的表情,将获取的表情发送至登录了通信对方的登录账号的另一终端,并将获取的表情展示在当前的会话页面中。本实施例中,针对表情缩略图的触发操作可以是点击操作、按压操作、移动操作或滑动操作等。
图3为一个实施例中在会话页面中展示表情输入面板的示意图。参照图3终端可在会话页面30中展示输入框31,在输入框31中检测到针对表情输入图标32的触发操作时,在会话页面30中展示表情输入面板33。
S204,检测在表情输入面板中触发的视频拍摄事件。
其中,视频拍摄事件是触发拍摄视频的事件。具体地,表情输入面板中不仅包括各个表情对应的表情缩略图,还可包括表情拍摄图标,终端可检测当前用户触发的针对该表情拍摄图标的视频拍摄事件。该用户触发的针对该表情拍摄图标的视频拍摄事件即可以为上述在表 情输入面板中触发的视频拍摄事件。视频拍摄事件可以是针对该表情拍摄图标的点击操作。
在一个实施例中,表情输入面板可包括多个页签,终端可在这多个页签中的任意一个页签中展示表情拍摄图标,从而可在该页签检测针对表情拍摄图标的视频拍摄事件;终端也可以在每一个页签中均展示表情拍摄图标,这样,终端可检测在任一个页签中触发的表情拍摄图标的视频拍摄事件。
如图4所示,为一个实施例中在表情输入面板的收藏页签中展示表情拍摄图标的示意图。参照图4,用户可在进入到表情输入面板中的收藏页签40,点击表情拍摄图标41,触发视频数据的拍摄。
S206,响应于视频拍摄事件,采集视频数据。
其中,视频数据是生成动态表情的素材,视频数据包括采集的多个视频帧。具体地,终端可在检测到在表情输入面板中触发的视频拍摄事件时,响应于该视频拍摄事件,控制配置的采集装置采集视频数据。采集装置比如可以是终端上配置的前置摄像头或后置摄像头。
在一个实施例中,终端可在检测到视频拍摄事件时,从会话页面跳转至视频采集页面,并在视频采集页面中直接调用采集装置开始采集视频数据,并将采集的视频数据展示在视频采集页面中,直至采集完成。终端可以在检测到用户触发的采集结束事件时结束采集,获得视频数据。
在一个实施例中,步骤S206,响应于视频拍摄事件,采集视频数据包括:响应于视频拍摄事件,从会话页面跳转至视频采集页面;在视频采集页面中展示实时采集的画面;检测到视频采集页面中触发的录制启动事件时,开始录制视频数据;直到视频采集页面中触发录制结束事件时,获得录制完成的视频数据。
其中,录制启动事件可以是用户触发的针对录制图标的触发事件,比如针对录制图标的按压操作、点击操作或滑动操作等;录制结束事件可以是录制图标的状态从被按压状态切换至未按压状态的事件,或者是录制视频数据的录制时长达到目标时长的事件。
具体地,终端可通过视频采集页面展示实时采集的画面,比如,用户可通过终端上配置的前置摄像头采集包括用户人脸的实时画面,还可以通过配置的后置摄像头采集包括用户人脸的实施画面。在检测到在视频采集页面中触发的录制启动事件时,就开始录制视频数据,直到在视频采集页面中检测到触发的录制结束事件时,就获取录制完成的视频数据。
如图5所示,为一个实施例中视频采集页面的界面示意图。参照图5,用户可在视频采集页面50中长按录制图标51,触发启动视频数据的录制,并在按压结束时或者录制视频数据的时长到达目标时长时,就获得录制完成的视频数据,其中目标时长比如可以是5至10秒。
如图6所示,在一个实施例中,动态表情生成方法还包括:
S602,获取针对会话页面中表情消息的跟拍操作。
其中,表情消息是以表情为内容的会话消息。跟拍操作也是用户触发的视频拍摄事件。用户既可以在表情输入面板中触发视频拍摄事件,也可以通过表情消息触发视频拍摄事件。
具体地,对于展示在会话页面中的表情消息,终端可检测用户触发的针对该表情消息的跟拍操作,从而触发视频数据的采集,获得视频数据,再执行获取针对视频数据的编辑操作,按照编辑操作对视频数据中各视频帧进行处理后合成动态表情,将动态表情对应的表情缩略图添加至表情输入面板中的步骤。
在一个实施例中,终端可在检测到针对会话页面中任意一个表情消息中表情的按压操作时,展示该表情对应的详情菜单,检测用户触发的针对该详情菜单中“跟拍”选项的触发操 作,获取针对该表情消息的跟拍操作。
S604,响应跟拍操作从会话页面跳转至视频采集页面。
具体地,在检测到针对表情消息的跟拍操作后,可从会话页面跳转至视频采集页面,在视频采集页面中展示实时采集的画面。
S606,将表情消息对应的表情以半透明方式展示在视频采集页面中。
S608,将实时采集的画面与以半透明方式展示的表情叠加展示。
具体地,终端可将表情消息对应的表情以半透明方式作为实时采集的画面的前景,展示在视频采集页面中,这样,实际采集到的画面就可以与半透明的表情叠加显示在视频采集页面中,能够引导对实时采集的画面录制视频数据。终端仍可在检测到视频采集页面中触发的录制启动事件时,开始对实时采集的画面录制视频数据;直到视频采集页面中触发录制结束事件时,获得录制完成的视频数据。需要说明的是,以半透明方式展示的表情仅用于引导视频数据的录制,在视频数据录制结束后获得的视频数据中并不包括半透明方式展示的表情。
在一个实施例中,步骤S606还可以是,将表情消息对应的表情中的文本以原始样式展示在视频采集画面中,将表情消息对应的表情中除文本以外的内容以半透明方式展示在视频采集页面中,即文本是以非透明方式展示在视频采集页面中的。那么,在步骤S608就可以是,将实时采集的画面,与该表情中以原始样式展示的文本以及以半透明方式展示的内容叠加展示在视频采集页面中。
在一个实施例中,当表情消息对应的表情为静态表情时,则该静态表情作为前景以半透明方式叠加在实时采集的画面上。当表情消息对应的表情为动态表情时,则该动态表情作为前景以半透明方式循环地在实时采集的画面上播放。
如图7所示,为一个实施例中对会话页面中表情消息跟拍的界面示意图。在图7中,用户可点击会话页面70中的表情消息71后弹出该表情消息中表情所对应的详情菜单72,用户再点击该详情菜单72中的“跟拍”选项73,从而触发从会话页面70跳转至视频采集页面74,在该视频采集页面74中进行视频数据的采集。
S208,获取针对视频数据的编辑操作。
其中,编辑操作是对录制的视频数据进行进一步处理的操作。终端可在视频采集页面中展示录制的视频数据的视频封面,并展示各个编辑操作对应的编辑图标,获取用户通过这些编辑图标触发的针对录制的视频数据的编辑操作。编辑操作包括用于去除视频数据中的背景的去背景操作、用于对视频数据进行加速播放的加速操作、用于在视频数据中添加额外表情的表情附加操作和用于在视频数据中添加额外文字的文字附加操作,等等。表情附加操作比如可以是贴表情操作,文字附加操作比如可以是贴字幕操作。
如图8所示,为一个实施例中在视频采集页面中展示编辑图标的示意图。参照图8,在视频采集页面80中,展示录制的视频数据的视频封面81,获取用户在该视频采集页面80中通过去背景图标82、加速播放图标83、贴表情图标84或贴字幕图标85的触发的针对视频数据的编辑操作。
S210,按照编辑操作对视频数据中各视频帧进行处理后合成动态表情。
其中,视频数据包括多个视频帧,终端可按照获取的针对视频数据的编辑操作对视频数据中各个视频帧进行相应的处理,再将处理后的各个视频帧合成得到动态表情,合成后得到的动态表情的文件格式可以是GIF。终端可在检测到用户触发的确认合成操作时,将处理后的各个视频帧合成得到动态表情,也可在编辑操作完成后就对处理后的各个视频帧合成得到 动态表情。
在一个实施例中,动态表情生成方法还包括:当未获取到针对视频数据的编辑操作、且检测到确认合成操作时,则可直接根据采集的视频数据中各视频帧进行合成,得到动态表情。
具体地,若终端未在视频采集页面检测到用户触发的针对视频数据的编辑操作,而在该页面检测到用户触发的针对视频数据的确认合成操作时,就可以按照动态表情的文件格式所对应编码方式,直接对采集的视频数据中各视频帧进行编码,将编码后的各视频帧合成动态表情。
在一个实施例中,动态表情生成方法还包括:在合成动态表情前,检测各视频帧所包括像素点的透明度;根据透明度从所包括像素点中获取半透明像素点;将各视频帧中的半透明像素点的透明度调整至非透明值后,进行动态表情的合成。
其中,各像素点的透明度可用各个像素的非透明度参数的值来表示,非透明度参数的值越大,则该像素点越不透明。非透明度参数的值可以用百分比(比如(0%到100%)、整数(比如0到255)或者实数(比如0到1)表示。比如一个像素点的非透明度参数的值为0%,那它就是完全透明的,也就是看不见的,非透明度参数的值为100%则该像素点完全不透明,而非透明度参数的值处于0%至100%之间的像素点则可以透过背景显示出来,这些像素点为半透明像素点。
为了避免生成的动态表情因为具有透明度在不同背景的界面中显示出来时会出现不同的效果,导致动态表情不能表达出原有的意思,因此,在对处理后的各个视频帧合成动态表情之前,终端可对各视频帧中各像素点的透明度进行检测,并将各视频帧中半透明像素点的透明度调整至非透明值之后,才能将各视频帧进行合成得到动态表情。
S212,将动态表情对应的表情缩略图添加至表情输入面板中;表情缩略图用于在表情输入面板中检测到针对表情缩略图的选取事件时,将动态表情作为会话消息展示在会话页面中。
其中,表情缩略图与一个表情对应。对于静态表情而言,表情缩略图可以是静态表情的缩小图,对于动态表情而言,可以取动态表情的首帧图或最后一帧图的缩小图作为表情缩略图。表情缩略图与表情对应存储。
具体地,终端可将最终合成各视频帧得到的动态表情对应的表情缩略图添加至表情输入面板中,这样,终端在表情输入面板中检测到针对该表情缩略图的选取事件时,就可以将该表情缩略图对应的动态表情发送给通信对方,并将该动态表情展示在当前用户所使用终端的会话页面中。终端还可获取针对表情输入面板中任意一个表情的移除操作,根据移除操作从表情输入面板中移除该表情。
如图9所示,为一个实施例中将动态表情添加至表情输入面板的界面示意图。当用户在视频采集页面90中对视频数据编辑完成后,点击确认合成图标91,终端就执行按照编辑操作对视频数据中各视频帧进行处理后合成动态表情的步骤,并将合成的动态表情对应的表情缩略图92添加至表情输入面板93中,用户点击该表情缩略图92就可以将对应的动态表情94发送至通信对方,并将该动态表情展示在会话页面95中。
在一个实施例中,终端可获取当前用户的用户信息,将生成的动态表情与该用户信息对应存储在服务器上,以便当前用户可以在不同的设备上都能使用该动态表情。比如,社交应用可以是微信(Wechat),终端可将生成动态表情与当前用户的微信号对应存储,用户在不同设备上登录该微信号时就可以从服务器拉取与该微信号对应的动态表情。
如图10所示,为一个具体的应用场景中生成动态表情的整体流程图。首先,在会话页 面的表情输入面板或表情消息中触发视频拍摄事件;然后,进入视频采集页面采集视频数据;接着,用户根据需要点击去背景图标、加速图标、表情附加图标或文本附加图标,对视频数据进行编辑;接着,用户点击确认合成按钮根据编辑后的视频数据生成动态表情;最后将动态表情与用户信息对应存储并添加至表情输入面板中。
上述动态表情生成方法,在进入会话页面中的表情输入面板后,可直接在表情输入面板中检测用户触发的视频拍摄事件,并响应于该视频拍摄事件采集视频数据,作为生成动态表情的素材,无需自行收集素材。在获取到针对采集的视频数据的编辑操作时,还可以按照用户的编辑操作对视频数据中各个视频帧进行相应的处理后合成动态表情,在将合成的动态表情对应的表情缩略图添加至表情输入面板中之后,用户就可从表情输入面板中选取添加的动态表情发送给通信对方,不仅能够满足用户个性化需求,也无需使用额外的工具,能够大大提高生成动态表情的效率。
在一个实施例中,编辑操作包括去背景操作;步骤S210,按照编辑操作对视频数据中各视频帧进行处理后合成动态表情包括:按照各视频帧的图像属性对各视频帧提取人脸特征;根据人脸特征获取各视频帧中人体的轮廓信息;按照轮廓信息获取各视频帧的背景区域;将背景区域中各像素点的透明度调整至透明值;对调整后的各视频帧进行合成得到动态表情。
当终端实时采集的画面中包括人脸时,比如用户通过前置摄像头采集的画面中包括用户的人脸,终端以录制该画面得到的视频数据作为素材合成动态表情,就能够得到一些个性化、更具趣味性的动态表情。
其中,去背景操作是指用户通过视频采集页面中的去背景图标触发的事件,终端可在检测到该去背景操作后对视频数据中各视频帧进行去背景处理。视频帧的图像属性包括视频帧中各像素点的像素值、颜色分量值、色调、饱和度、亮度、色彩通道等。人脸特征是能够表达视频帧中所包括人脸的特征。
具体地,终端在检测到针对采集的视频数据的去背景操作后,可通过训练好的机器学习模型按照各视频帧的图像属性对各视频帧提取人脸特征,提取的人脸特征能够表达各视频帧所包含的信息,根据提取的人脸特征在各个视频帧中获取人脸的器官或预定义的特征点所在的位置,位置可以用二维坐标表示,从而根据多个人脸的器官所在的位置或多个特征点在视频帧中的位置得到人体的轮廓信息,轮廓信息包括人脸脸型的轮廓信息和体型的轮廓信息,这样,终端就可按照轮廓信息获取各视频帧中除人脸和人体之外的背景区域,将背景区域中各像素点的透明度调整至完全透明的透明值,使得背景区域不可见,就实现了对采集的视频数据进行去背景处理,以便基于去背景后的各视频帧合成动态表情。
在本实施例中,在获取了视频帧中背景区域后,通过将背景区域中各像素点的像素值调整至透明值,实现对各视频帧进行去背景处理,从而使得合成的动态表情也没有了杂乱的背景。并且,用户直接在视频采集页面中触发去背景操作就可实现对采集的视频数据进行去背景,无需额外的工具进行去背景处理后再合成动态表情,提高了生成动态表情的效率。
在一个实施例中,编辑操作包括加速操作;步骤S210,按照编辑操作对视频数据中各视频帧进行处理后合成动态表情包括:计算视频数据经过加速操作后对应的时间戳数组;遍历时间戳数组中的元素值;从视频数据选取时间戳与元素值对应的视频帧,直至遍历完毕;对选取的各视频帧进行合成得到动态表情。
其中,加速操作是指用户通过视频采集页面中的加速图标触发的事件,终端可在检测到该事件时对采集的视频数据进行加速处理,以得到加速的动态表情。时间戳数组是采集的视频数据的时间戳构成的数组,经过加速操作后对应的时间戳数组是视频数据原始的时间戳中抽取的若干个时间戳构成的数组。抽取的数量与加速的倍率有关。
具体地,终端可在计算得到视频数据经过加速后的时间戳数组后,对该时间戳数组中各个元素值进行遍历,按照遍历的元素值从视频数据中选取相应的视频帧,然后对选取的视频帧合成动态表情。
在一个实施例中,计算视频数据经过加速操作后对应的时间戳数组具体包括:获取采集的视频数据的录制时长,根据录制时长和视频数据的帧率计算得到视频数据中各视频帧原始的时间戳,获取加速操作对应的加速倍率,按照加速倍率从原始的时间戳中间隔选取原始的时间戳,根据选取的时间戳生成加速操作后对应的时间戳数组。
比如,若采集的视频数据的时长为5秒,该视频数据的帧率为40,即每秒40帧视频,则该视频数据各个视频帧对应的原始的时间戳可以是:
0.025、0.050、0.075、0.100、0.125、0.150、0.175、0.200、……、4.900、4.925、4.950、4.975、5.000;
若加速操作对应的倍率是2倍,那么终端可计算经过加速操作后对应的时间戳数组中各元素值分别为:
0.050、0.100、0.150、0.200、0.250、0.300、……、4.850、4.900、4.950、5.000。
在一个实施例中,若采集的视频数据的时长、加速操作对应的倍率均是预先定义的,那么相应的加速操作后对应的时间戳数组也可预先定义好,终端只需按预先定义的时间戳数组从视频数据中抽取相应的视频帧。
在上述实施例中,通过计算加速操作后对应的时间戳数组,可从原始的视频数据中抽取相应的视频帧,将抽取的视频帧合成后得到动态表情,实现了对采集的视频数据的加速播放。并且,也不需要额外的工具对采集的视频数据进行加速处理,提高了生成动态表情的效率。
在一个实施例中,编辑操作包括表情附加操作;步骤S210,按照编辑操作对视频数据中各视频帧进行处理后合成动态表情包括:响应于表情附加操作,展示表情输入面板;获取从表情输入面板中选择的表情缩略图对应的待附加表情;将待附加表情的表情图添加到视频数据的各视频帧中;对添加了表情图的各视频帧进行合成得到动态表情。
其中,表情附加操作是指用户通过视频采集页面中的表情附加图标触发的事件,终端可在检测到该事件时对采集的视频数据进行添加表情处理,以得到添加了表情的动态表情,添加的表情是源自于表情输入面板中的表情。
具体地,终端在获取到针对视频数据的表情附加操作时,在视频采集页面中展示表情输入面板,获取用户从表情输入面板中选取的表情缩略图对应的待附加表情,将待附加表情添加在视频数据的各个视频帧中,终端就可以将添加了表情的视频帧合成动态表情。由于表情输入面板中的表情包括用户按照自己的兴趣收藏的表情对应的缩略图,还包括用户自定义的动态表情对应的缩略图,因而用户可按自己的兴趣在采集的视频数据中添加表情,这样合成的动态表情更符合用户的个性化需求。
如图11所示,为一个实施例中将选择的表情缩略图对应的待附加表情添加至视频数据中的界面示意图。参照图11,终端在检测到用户在视频采集页面1101中通过点击表情附加 图标1102触发的表情附加操作后,在视频采集页面1101中弹出表情输入面板1103,用户点击表情输入面板1103中的表情缩略图1104,终端就可将用户选择的表情缩略图对应的表情添加到视频数据中。
在一个实施例中,将待附加表情的表情图添加到视频数据的各视频帧中包括:根据待附加表情生成多个不同的表情图;将多个不同的表情图分别对应到视频数据中的各视频帧;在视频数据中的各视频帧中分别添加相对应的表情图。
在一个实施例中,待附加表情可以是静态表情。终端可直接将该待附加表情分别添加在视频数据的各个视频帧中。终端也可生成与该待附加表情对应的多个不同规格的表情图,将这多个不同规格的表情图分别对应的各个视频帧,在各个视频帧中分别添加对应的表情图,这样,在播放合成得到的动态表情时,添加进来的表情可以呈现出一种动态的晃动效果。
在一个实施例中,不同规格的表情图可以是与待附加表情的内容相同、但尺寸不同的表情图。比如,采集的视频数据的帧率为40,终端可在获取到用户从表情输入面板中选取的表情缩略图对应的待附加表情后,就生成与待附加表情对应的四个不同尺寸的表情图,分别为大尺寸表情图、中尺寸表情图、小尺寸表情图和加小尺寸表情图,那么,对于采集的每1秒的视频数据,可在第1帧至第5帧中添加大尺寸表情图,在第6帧至第10帧中添加中尺寸表情图,在第11帧至第15帧中添加小尺寸表情图,在第16帧至第20帧中添加加小尺寸表情图,在第21帧至第25帧中添加大尺寸表情图……,依此类推,可在视频数据的各视频帧中添加相应的表情图。
在一个实施例中,待附加表情可以是动态表情。终端可获取待附加表情中每一帧表情图,将多个不同的表情图分别对应到视频数据中的各视频帧;在视频数据中的各视频帧中分别添加相对应的表情图。当待附加表情的时长小于视频数据的总时长时,可将待附加表情对应的多个不同的表情图循环地添加至视频数据的各个视频帧中;当待附加表情的时长等于视频数据的总时长时,可将待附加表情对应的多个不同的表情图一一添加至对应的视频帧中;当待附加表情的时长大于视频数据的总时长时,可从待附加表情对应的多个表情图中截取在前的多个表情图对应到视频数据的各视频帧,或者从待附加表情对应的多个表情图中抽取相应的表情图对应到视频数据的各视频帧,将对应的表情图添加至相应的视频帧中。
在上述实施例中,通过在采集的视频数据中添加从表情输入面板中选取的表情,避免了添加的内容较为单一,不能添加用户喜欢的内容的问题。比如,只能添加一些贴纸,并且这些贴纸是由开发者自行设计的固定贴纸,从而生成的动态表情不能满足用户的个性化需求。并且,是在完成视频数据的采集后用户可直接在视频数据中添加表情,不需要额外的根据对采集的视频数据进行贴表情处理,提高了生成动态表情的效率。
在一个实施例中,编辑操作包括文本附加操作;步骤S210,按照编辑操作对视频数据中各视频帧进行处理后合成动态表情包括:响应于文本附加操作,获取待添加的文本;将待添加的文本添加到视频数据的各视频帧中;对添加了文本的各视频帧进行合成得到动态表情。
其中,文本附加操作是指用户通过视频采集页面中的文本附加图标触发的事件,终端可在检测到该事件时对采集的视频数据进行添加文本处理,以得到添加了文本的动态表情。在一个实施例中,获取待添加的文本包括:提供文本输入框,获取在文本输入框中输入的文本作为待添加的文本;或者,获取在采集视频数据时录制的语音数据,对语音数据进行语音识别得到待添加的文本。也就是,添加的文本可以是用户输入的文本也可以是对视频数据中的 语音数据进行语音识别得到的文本。
具体地,终端在获取到针对视频数据的文本附加操作时,在视频采集页面中展示文本输入面板,获取用户在文本输入面板的文本输入框中输入的文本,作为待添加文本,将获取的待添加文本添加在视频数据的各个视频帧中,终端就可以将添加了文本的视频帧合成动态表情。终端也可在获取到针对视频数据的文本附加操作时,对视频数据中的语音数据进行语音识别,将识别到的文本作为待添加文本添加到各个视频帧中。终端还可将语音识别得到的文本展示在文本输入面板中,用户可对该文本进行编辑,以保证待添加文本的准确性。
如图12所示,为一个实施例中将获取的文本添加至视频数据中的界面示意图。参照图12,终端在检测到用户在视频采集页面1201中通过点击文本附加图标1202触发的文本附加操作后,在视频采集页面1201中弹出文本输入面板1203,用户通过文本输入面板1203输入文本“目瞪口呆”,点击“完成(√)”后终端就可将用户输入的文本添加到视频数据中。
在一个实施例中,终端可直接将待添加的文本添加到视频数据的各视频帧中。终端也可根据获取的文本生成多个不同字体大小或不同字体颜色的文本;将多个不同字体大小或不同字体颜色的文本分别对应到视频数据中的各视频帧;在视频数据中的各视频帧中分别添加相对应的文本。这样,在播放合成得到的动态表情时,添加的文本可以呈现出一种动态的晃动效果。
比如,采集的视频数据的帧率为40,终端可在获取到用户从文本输入面板中输入的文本后,就生成与输入的文本对应的四个不同字体大小的表情图,分别为大字体文本、中字体文本、小字体文本和加小字体文本,那么,对于采集的每1秒的视频数据,可在第1帧至第5帧中添加大字体文本,在第6帧至第10帧中添加中字体文本,在第11帧至第15帧中添加小字体文本,在第16帧至第20帧中添加加小字体文本,在第21帧至第25帧中添加大字体文本……,依此类推,可在视频数据的各视频帧中添加相应的文本。
在上述实施例中,通过在视频采集页面中展示文本输入面板,可直接获取用户输入的或语音识别得到文本,就可以直接添加至采集的视频数据中,无需通过其它工具添加文本后合成动态表情,提高了生成动态表情的效率。
如图13所示,为一个具体的实施例中按照编辑操作对视频数据中各视频帧进行处理后合成动态表情的流程示意图。参照图13,首先判断是否获取到针对视频数据的加速操作,若是,则获取与采集的视频数据按照加速操作后对应的时间戳数组,遍历时间戳数组的元素值,从视频数据中选取与元素值对应的视频帧;若否,则获取视频数据中的每一个视频帧;接着判断是否获取到针对视频数据的去背景操作,若是,则对选取或获取的视频帧的背景区域中各像素点的透明度调整为透明值;接着判断是否获取到针对视频数据的表情附加操作或文本附加操作,若是,则在选取或获取的视频帧中绘制获取的待附加表情或待附加文本;进一步地,还可截除选取或获取的视频帧的四个圆角,并将视频帧中的半透明像素点的透明度调整为非透明值,最后将处理后的各个视频帧按照相应的编码标准合成动态表情。
如图14所示,为一个具体的实施例中生成动态表情的流程示意图。参照图14,该方法包括:
S1402,在会话页面中进入表情输入面板,检测在表情输入面板中触发的视频拍摄事件;响应于视频拍摄事件,从会话页面跳转至视频采集页面;在视频采集页面中展示实时采集的 画面;
或者,S1404,获取针对会话页面中表情消息的跟拍操作;响应跟拍操作从会话页面跳转至视频采集页面;将表情消息对应的表情以半透明方式展示在视频采集页面中;将实时采集的画面与以半透明方式展示的表情叠加展示。
S1406,检测到视频采集页面中触发的录制启动事件时,开始录制视频数据。
S1408,直到视频采集页面中触发录制结束事件时,获得录制完成的视频数据。
S1410,获取针对视频数据的编辑操作;
S1412,当编辑操作包括去背景操作时,则按照各视频帧的图像属性对各视频帧提取人脸特征;根据人脸特征获取各视频帧中人体的轮廓信息;按照轮廓信息获取各视频帧的背景区域;将背景区域中各像素点的透明度调整至透明值;对调整后的各视频帧进行合成得到动态表情。
S1414,当编辑操作包括加速操作时,则计算视频数据经过加速操作后对应的时间戳数组;遍历时间戳数组中的元素值;从视频数据选取时间戳与元素值对应的视频帧,直至遍历完毕;对选取的各视频帧进行合成得到动态表情。
S1416,当编辑操作包括表情附加操作时,则响应于表情附加操作,展示表情输入面板;获取从表情输入面板中选择的表情缩略图对应的待附加表情;根据待附加表情生成多个不同的表情图;将多个不同的表情图分别对应到视频数据中的各视频帧;在视频数据中的各视频帧中分别添加相对应的表情图;对添加了表情图的各视频帧进行合成得到动态表情。
S1418,当编辑操作包括文本附加操作时,则响应于文本附加操作,提供文本输入框,获取在文本输入框中输入的文本作为待添加的文本,或者,获取在采集视频数据时录制的语音数据,对语音数据进行语音识别得到待添加的文本;将待添加的文本添加到视频数据的各视频帧中;对添加了文本的各视频帧进行合成得到动态表情。
S1420,将动态表情对应的表情缩略图添加至表情输入面板中;表情缩略图用于在表情输入面板中检测到针对表情缩略图的选取事件时,将动态表情作为会话消息展示在会话页面中。
上述动态表情生成方法,在进入会话页面中的表情输入面板后,可直接在表情输入面板中检测用户触发的视频拍摄事件,并响应于该视频拍摄事件采集视频数据,作为生成动态表情的素材,无需自行收集素材。在获取到针对采集的视频数据的编辑操作时,还可以按照用户的编辑操作对视频数据中各个视频帧进行相应的处理后合成动态表情,在将合成的动态表情对应的表情缩略图添加至表情输入面板中之后,用户就可从表情输入面板中选取添加的动态表情发送给通信对方,不仅能够满足用户个性化需求,也无需使用额外的工具,能够大大提高生成动态表情的效率。
图14为一个实施例中动态表情生成方法的流程示意图。应该理解的是,虽然图14的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图14中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图15所示,提供了一种动态表情生成装置1500,该装置1500包括检测模块1502、采集模块1504、获取模块1506、合成模块1508和添加模块1510,其中:
检测模块1502,用于在会话页面中进入表情输入面板;检测在表情输入面板中触发的视频拍摄事件;
采集模块1504,用于响应于视频拍摄事件,采集视频数据;
获取模块1506,用于获取针对视频数据的编辑操作;
合成模块1508,用于按照编辑操作对视频数据中各视频帧进行处理后合成动态表情;
添加模块1510,用于将动态表情对应的表情缩略图添加至表情输入面板中;表情缩略图用于在表情输入面板中检测到针对表情缩略图的选取事件时,将动态表情作为会话消息展示在会话页面中。
在一个实施例中,采集模块1504包括跳转模块、展示模块、录制模块和视频数据获取模块;跳转模块用于响应于视频拍摄事件,从会话页面跳转至视频采集页面;展示模块用于在视频采集页面中展示实时采集的画面;录制模块用于检测到视频采集页面中触发的录制启动事件时,开始录制视频数据;视频数据获取模块用于直到视频采集页面中触发录制结束事件时,获得录制完成的视频数据。
在一个实施例中,编辑操作包括去背景操作;合成模块1508还用于按照各视频帧的图像属性对各视频帧提取人脸特征;根据人脸特征获取各视频帧中人体的轮廓信息;按照轮廓信息获取各视频帧的背景区域;将背景区域中各像素点的透明度调整至透明值;对调整后的各视频帧进行合成得到动态表情。
在一个实施例中,编辑操作包括加速操作;合成模块1508还用于计算视频数据经过加速操作后对应的时间戳数组;遍历时间戳数组中的元素值;从视频数据选取时间戳与元素值对应的视频帧,直至遍历完毕;对选取的各视频帧进行合成得到动态表情。
在一个实施例中,编辑操作包括表情附加操作;合成模块1508还用于响应于表情附加操作,展示表情输入面板;获取从表情输入面板中选择的表情缩略图对应的待附加表情;将待附加表情的表情图添加到视频数据的各视频帧中;对添加了表情图的各视频帧进行合成得到动态表情。
在一个实施例中,合成模块1508还用于根据待附加表情生成多个不同的表情图;将多个不同的表情图分别对应到视频数据中的各视频帧;在视频数据中的各视频帧中分别添加相对应的表情图。
在一个实施例中,编辑操作包括文本附加操作;合成模块1508还包括文本获取模块和文本添加模块;文本获取模块用于响应于文本附加操作,获取待添加的文本;文本添加模块用于将待添加的文本添加到视频数据的各视频帧中;合成模块还用于对添加了文本的各视频帧进行合成得到动态表情。
在一个实施例中,文本获取模块还用于提供文本输入框,获取在文本输入框中输入的文本作为待添加的文本。在一个实施例中,文本获取模块还用于获取在采集视频数据时录制的语音数据,对语音数据进行语音识别得到待添加的文本。
在一个实施例中,动态表情生成装置1500还包括透明度调整模块;透明度调整模块用于在合成动态表情前,检测各视频帧所包括像素点的透明度;根据透明度从所包括像素点中获取半透明像素点;将各视频帧中的半透明像素点的透明度调整至非透明值后,进行动态表情的合成。
在一个实施例中,动态表情生成装置1500还包括跟拍模块,跟拍模块用于获取针对会话页面中表情消息的跟拍操作;响应跟拍操作从会话页面跳转至视频采集页面;将表情消息对应的表情以半透明方式展示在视频采集页面中;将实时采集的画面与以半透明方式展示的表情叠加展示。
在一个实施例中,合成模块1508还用于当未获取到针对视频数据的编辑操作、且检测到确认合成操作时,则直接根据采集的视频数据中各视频帧进行合成,得到动态表情。
上述动态表情合成装置1500,在进入会话页面中的表情输入面板后,可直接在表情输入面板中检测用户触发的视频拍摄事件,并响应于该视频拍摄事件采集视频数据,作为生成动态表情的素材,无需自行收集素材。在获取到针对采集的视频数据的编辑操作时,还可以按照用户的编辑操作对视频数据中各个视频帧进行相应的处理后合成动态表情,在将合成的动态表情对应的表情缩略图添加至表情输入面板中之后,用户就可从表情输入面板中选取添加的动态表情发送给通信对方,不仅能够满足用户个性化需求,也无需使用额外的工具,能够大大提高生成动态表情的效率。
图16示出了一个实施例中计算机设备的内部结构图。该计算机设备具体可以是图1中的终端110。如图16所示,该计算机设备包括该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、输入装置和显示屏。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质存储有操作系统,还可存储有计算机程序,该计算机程序被处理器执行时,可使得处理器实现动态表情生成方法。该内存储器中也可储存有计算机程序,该计算机程序被处理器执行时,可使得处理器执行动态表情生成方法。计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。计算机设备的摄像头可以是前置摄像头或后置摄像头,计算机设备的声音采集装置可以是麦克风。
本领域技术人员可以理解,图16中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,本申请提供的动态表情生成装置1500可以实现为一种计算机程序的形式,计算机程序可在如图16所示的计算机设备上运行。计算机设备的存储器中可存储组成该动态表情生成装置1500的各个程序模块,比如,图15所示的检测模块1502、采集模块1504、获取模块1506、合成模块1508和添加模块1510。各个程序模块构成的计算机程序使得处理器执行本说明书中描述的本申请各个实施例的动态表情生成方法中的步骤。
例如,图16所示的计算机设备可以通过如图15所示的动态表情生成装置1500中的检测模块1502执行步骤S202和步骤S204。计算机设备可通过采集模块1504执行步骤S206。计算机设备可通过获取模块1506执行步骤S208。计算机设备可通过合成模块1508执行步骤S210。计算机设备可通过添加模块1510执行步骤S212。
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机程序,计算机程序被处理器执行时,使得处理器执行上述动态表情生成方法的步骤。此处动态表情生成方法的步骤可以是上述各个实施例的动态表情生成方法中的步骤。
在一个实施例中,提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时,使得处理器执行上述动态表情生成方法的步骤。此处动态表情生成方法的步骤可以是上述各个实施例的动态表情生成方法中的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种动态表情生成方法,其特征在于,应用于计算机设备,包括:
    在会话页面中进入表情输入面板;
    检测在所述表情输入面板中触发的视频拍摄事件;
    响应于所述视频拍摄事件,采集视频数据;
    获取针对所述视频数据的编辑操作;
    按照所述编辑操作对所述视频数据中各视频帧进行处理后合成动态表情;
    将所述动态表情对应的表情缩略图添加至所述表情输入面板中;所述表情缩略图用于在所述表情输入面板中检测到针对所述表情缩略图的选取事件时,将所述动态表情作为会话消息展示在所述会话页面中。
  2. 根据权利要求1所述的方法,其特征在于,所述响应于所述视频拍摄事件,采集视频数据包括:
    响应于所述视频拍摄事件,从所述会话页面跳转至视频采集页面;
    在所述视频采集页面中展示实时采集的画面;
    检测到所述视频采集页面中触发的录制启动事件时,开始录制视频数据;
    直到所述视频采集页面中触发录制结束事件时,获得录制完成的视频数据。
  3. 根据权利要求1所述的方法,其特征在于,所述编辑操作包括去背景操作;所述按照所述编辑操作对所述视频数据中各视频帧进行处理后合成动态表情包括:
    按照各所述视频帧的图像属性对各所述视频帧提取人脸特征;
    根据所述人脸特征获取各所述视频帧中人体的轮廓信息;
    按照所述轮廓信息获取各所述视频帧的背景区域;
    将所述背景区域中各像素点的透明度调整至透明值;
    对调整后的各视频帧进行合成得到动态表情。
  4. 根据权利要求1所述的方法,其特征在于,所述编辑操作包括加速操作;所述按照所述编辑操作对所述视频数据中各视频帧进行处理后合成动态表情包括:
    计算所述视频数据经过加速操作后对应的时间戳数组;
    遍历所述时间戳数组中的元素值;
    从所述视频数据选取时间戳与所述元素值对应的视频帧,直至遍历完毕;
    对选取的各视频帧进行合成得到动态表情。
  5. 根据权利要求1所述的方法,其特征在于,所述编辑操作包括表情附加操作;所述按照所述编辑操作对所述视频数据中各视频帧进行处理后合成动态表情包括:
    响应于所述表情附加操作,展示所述表情输入面板;
    获取从所述表情输入面板中选择的表情缩略图对应的待附加表情;
    将所述待附加表情的表情图添加到所述视频数据的各所述视频帧中;
    对添加了表情图的各视频帧进行合成得到动态表情。
  6. 根据权利要求5所述的方法,其特征在于,所述将所述待附加表情的表情图添加到所述视频数据的各所述视频帧中包括:
    根据所述待附加表情生成多个不同的表情图;
    将所述多个不同的表情图分别对应到所述视频数据中的各视频帧;
    在所述视频数据中的各视频帧中分别添加相对应的所述表情图。
  7. 根据权利要求1所述的方法,其特征在于,所述编辑操作包括文本附加操作;所述按照所述编辑操作对所述视频数据中各视频帧进行处理后合成动态表情包括:
    响应于所述文本附加操作,获取待添加的文本;
    将所述待添加的文本添加到所述视频数据的各所述视频帧中;
    对添加了文本的各视频帧进行合成得到动态表情。
  8. 根据权利要求7所述的方法,其特征在于,所述获取待添加的文本包括:
    提供文本输入框,获取在所述文本输入框中输入的文本作为待添加的文本;
    或者,获取在采集视频数据时录制的语音数据,对所述语音数据进行语音识别得到待添加的文本。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述方法还包括:
    在合成动态表情前,检测各所述视频帧所包括像素点的透明度;
    根据所述透明度从所包括像素点中获取半透明像素点;
    将各所述视频帧中的半透明像素点的透明度调整至非透明值后,进行动态表情的合成。
  10. 根据权利要求1至8任一项所述的方法,其特征在于,还包括:
    获取针对所述会话页面中表情消息的跟拍操作;
    响应所述跟拍操作从所述会话页面跳转至视频采集页面;
    将所述表情消息对应的表情以半透明方式展示在视频采集页面中;
    将实时采集的画面与以半透明方式展示的表情叠加展示。
  11. 根据权利要求1至8任一项所述的方法,其特征在于,还包括:
    当未获取到针对所述视频数据的编辑操作、且检测到确认合成操作时,则
    直接根据采集的所述视频数据中各视频帧进行合成,得到动态表情。
  12. 一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行如权利要求1至11中任一项所述方法的步骤。
  13. 一种计算机设备,其特征在于,包括存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至11中任一项所述方法的步骤。
  14. 根据权利要求13所述的计算机设备,其特征在于,所述处理器用于:
    响应于所述视频拍摄事件,从所述会话页面跳转至视频采集页面;
    在所述视频采集页面中展示实时采集的画面;
    检测到所述视频采集页面中触发的录制启动事件时,开始录制视频数据;
    直到所述视频采集页面中触发录制结束事件时,获得录制完成的视频数据。
  15. 根据权利要求13所述的计算机设备,其特征在于,所述编辑操作包括去背景操作;所述处理器用于:
    按照各所述视频帧的图像属性对各所述视频帧提取人脸特征;
    根据所述人脸特征获取各所述视频帧中人体的轮廓信息;
    按照所述轮廓信息获取各所述视频帧的背景区域;
    将所述背景区域中各像素点的透明度调整至透明值;
    对调整后的各视频帧进行合成得到动态表情。
  16. 根据权利要求13所述的计算机设备,其特征在于,所述编辑操作包括加速操作;所述处理器用于:
    计算所述视频数据经过加速操作后对应的时间戳数组;
    遍历所述时间戳数组中的元素值;
    从所述视频数据选取时间戳与所述元素值对应的视频帧,直至遍历完毕;
    对选取的各视频帧进行合成得到动态表情。
  17. 根据权利要求13所述的计算机设备,其特征在于,所述编辑操作包括表情附加操作;所述处理器用于:
    响应于所述表情附加操作,展示所述表情输入面板;
    获取从所述表情输入面板中选择的表情缩略图对应的待附加表情;
    将所述待附加表情的表情图添加到所述视频数据的各所述视频帧中;
    对添加了表情图的各视频帧进行合成得到动态表情。
  18. 根据权利要求17所述的计算机设备,其特征在于,所述处理器用于:
    根据所述待附加表情生成多个不同的表情图;
    将所述多个不同的表情图分别对应到所述视频数据中的各视频帧;
    在所述视频数据中的各视频帧中分别添加相对应的所述表情图。
  19. 根据权利要求13所述的计算机设备,其特征在于,所述编辑操作包括文本附加操作;所述处理器用于:
    响应于所述文本附加操作,获取待添加的文本;
    将所述待添加的文本添加到所述视频数据的各所述视频帧中;
    对添加了文本的各视频帧进行合成得到动态表情。
  20. 根据权利要求19所述的计算机设备,其特征在于,所述处理器用于:
    提供文本输入框,获取在所述文本输入框中输入的文本作为待添加的文本;
    或者,获取在采集视频数据时录制的语音数据,对所述语音数据进行语音识别得到待添加的文本。
PCT/CN2019/104988 2018-09-27 2019-09-09 动态表情生成方法、计算机可读存储介质和计算机设备 WO2020063319A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US17/047,276 US11645804B2 (en) 2018-09-27 2019-09-09 Dynamic emoticon-generating method, computer-readable storage medium and computer device
JP2020552389A JP7112508B2 (ja) 2018-09-27 2019-09-09 動画スタンプの生成方法並びにそのコンピュータプログラム及びコンピュータ装置
EP19864211.8A EP3758364B1 (en) 2018-09-27 2019-09-09 Dynamic emoticon-generating method, computer-readable storage medium and computer device
US18/188,742 US20230230306A1 (en) 2018-09-27 2023-03-23 Animated emoticon generation method, computer-readable storage medium, and computer device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811132844.6A CN109120866B (zh) 2018-09-27 2018-09-27 动态表情生成方法、装置、计算机可读存储介质和计算机设备
CN201811132844.6 2018-09-27

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US17/047,276 A-371-Of-International US11645804B2 (en) 2018-09-27 2019-09-09 Dynamic emoticon-generating method, computer-readable storage medium and computer device
US18/188,742 Continuation US20230230306A1 (en) 2018-09-27 2023-03-23 Animated emoticon generation method, computer-readable storage medium, and computer device

Publications (1)

Publication Number Publication Date
WO2020063319A1 true WO2020063319A1 (zh) 2020-04-02

Family

ID=64857005

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/104988 WO2020063319A1 (zh) 2018-09-27 2019-09-09 动态表情生成方法、计算机可读存储介质和计算机设备

Country Status (5)

Country Link
US (2) US11645804B2 (zh)
EP (1) EP3758364B1 (zh)
JP (1) JP7112508B2 (zh)
CN (1) CN109120866B (zh)
WO (1) WO2020063319A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464430A (zh) * 2020-04-09 2020-07-28 腾讯科技(深圳)有限公司 一种动态表情展示方法、动态表情创建方法及装置
CN111638837A (zh) * 2020-05-13 2020-09-08 维沃移动通信有限公司 一种消息处理方法及电子设备
EP4171048A4 (en) * 2020-10-09 2024-02-21 Beijing Zitiao Network Technology Co Ltd VIDEO PROCESSING METHOD AND APPARATUS
EP4236328A4 (en) * 2020-11-27 2024-04-24 Beijing Zitiao Network Technology Co Ltd METHOD AND APPARATUS FOR SHARING VIDEO, ELECTRONIC DEVICE AND STORAGE MEDIUM

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120866B (zh) 2018-09-27 2020-04-03 腾讯科技(深圳)有限公司 动态表情生成方法、装置、计算机可读存储介质和计算机设备
CN109816759B (zh) * 2019-01-25 2023-11-17 维沃移动通信有限公司 一种表情生成方法及装置
CN110141857A (zh) * 2019-04-26 2019-08-20 腾讯科技(深圳)有限公司 虚拟角色的面部显示方法、装置、设备及存储介质
CN110321009B (zh) * 2019-07-04 2023-04-07 北京百度网讯科技有限公司 Ar表情处理方法、装置、设备和存储介质
CN110807408B (zh) * 2019-10-30 2022-08-19 百度在线网络技术(北京)有限公司 人物属性识别方法及装置
US11477366B2 (en) 2020-03-31 2022-10-18 Snap Inc. Selfie setup and stock videos creation
CN112306224A (zh) * 2020-04-30 2021-02-02 北京字节跳动网络技术有限公司 人机交互方法、装置和电子设备
CN111541950B (zh) * 2020-05-07 2023-11-03 腾讯科技(深圳)有限公司 表情的生成方法、装置、电子设备及存储介质
CN111586466B (zh) * 2020-05-08 2021-05-28 腾讯科技(深圳)有限公司 一种视频数据处理方法、装置及存储介质
CN111603771B (zh) * 2020-05-22 2023-06-23 腾讯科技(深圳)有限公司 动画生成方法、装置、设备及介质
US11159458B1 (en) * 2020-06-10 2021-10-26 Capital One Services, Llc Systems and methods for combining and summarizing emoji responses to generate a text reaction from the emoji responses
CN111669640B (zh) * 2020-06-18 2022-03-15 广州繁星互娱信息科技有限公司 虚拟物品转移特效的显示方法、装置、终端及存储介质
CN112749357B (zh) * 2020-09-15 2024-02-06 腾讯科技(深圳)有限公司 基于分享内容的交互方法、装置和计算机设备
CN112153475B (zh) * 2020-09-25 2022-08-05 北京字跳网络技术有限公司 用于生成文字模式的视频的方法、装置、设备和介质
CN112698769B (zh) * 2020-12-25 2023-09-26 北京字节跳动网络技术有限公司 信息交互方法、装置、设备、存储介质及程序产品
CN112699263B (zh) * 2021-01-08 2023-05-23 郑州科技学院 基于ai的二维美术图像动态展示方法及装置
CN114816599B (zh) * 2021-01-22 2024-02-27 北京字跳网络技术有限公司 图像显示方法、装置、设备及介质
US11550452B1 (en) * 2021-06-09 2023-01-10 Gopro, Inc. Presentation of a media sequence
US11657558B2 (en) * 2021-09-16 2023-05-23 International Business Machines Corporation Context-based personalized communication presentation
CN114780190B (zh) * 2022-04-13 2023-12-22 脸萌有限公司 消息处理方法、装置、电子设备及存储介质
CN115269886A (zh) * 2022-08-15 2022-11-01 北京字跳网络技术有限公司 媒体内容处理方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150006657A1 (en) * 2012-03-09 2015-01-01 Tencent Technology (Shenzhen)Company Limited Method and apparatus for processing an animated emoticon
CN106658079A (zh) * 2017-01-05 2017-05-10 腾讯科技(深圳)有限公司 自定义生成表情图像的方法及装置
CN107370887A (zh) * 2017-08-30 2017-11-21 维沃移动通信有限公司 一种表情生成方法及移动终端
US20180108111A1 (en) * 2015-06-19 2018-04-19 Alibaba Group Holding Limited Previewing dynamic images and expressions
CN109120866A (zh) * 2018-09-27 2019-01-01 腾讯科技(深圳)有限公司 动态表情生成方法、装置、计算机可读存储介质和计算机设备

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6232965B1 (en) * 1994-11-30 2001-05-15 California Institute Of Technology Method and apparatus for synthesizing realistic animations of a human speaking using a computer
JP3983624B2 (ja) 2002-08-09 2007-09-26 シャープ株式会社 画像合成装置、画像合成方法、画像合成プログラム、および画像合成プログラムを記録した記録媒体
US20050163379A1 (en) * 2004-01-28 2005-07-28 Logitech Europe S.A. Use of multimedia data for emoticons in instant messaging
CN101179688B (zh) * 2007-05-17 2010-12-15 腾讯科技(深圳)有限公司 一种动态表情图片的实现方法及装置
CN101179471B (zh) * 2007-05-31 2011-07-27 腾讯科技(深圳)有限公司 一种具有文字的用户个性化动态表情图片实现方法及装置
JP4924721B2 (ja) 2010-01-20 2012-04-25 カシオ計算機株式会社 携帯端末、及び、素材バンク管理システム
US8902235B2 (en) * 2011-04-07 2014-12-02 Adobe Systems Incorporated Methods and systems for representing complex animation using scripting capabilities of rendering applications
US20130147933A1 (en) 2011-12-09 2013-06-13 Charles J. Kulas User image insertion into a text message
JP5889028B2 (ja) 2012-02-13 2016-03-22 キヤノン株式会社 動画記録装置及びその制御方法、コンピュータプログラム、記憶媒体
KR20140042427A (ko) * 2012-09-28 2014-04-07 삼성전자주식회사 애니메이션 이모티콘을 생성하는 장치 및 그 방법
US10289265B2 (en) 2013-08-15 2019-05-14 Excalibur Ip, Llc Capture and retrieval of a personalized mood icon
US20170024087A1 (en) 2013-11-27 2017-01-26 Shyam PATHY Integration of emotional artifacts into textual information exchange
CN104333688B (zh) 2013-12-03 2018-07-10 广州三星通信技术研究有限公司 基于拍摄的图像生成表情符的设备和方法
CN104917666B (zh) * 2014-03-13 2019-08-06 腾讯科技(深圳)有限公司 一种制作个性化动态表情的方法和装置
US10845982B2 (en) * 2014-04-28 2020-11-24 Facebook, Inc. Providing intelligent transcriptions of sound messages in a messaging application
CN104065913B (zh) * 2014-06-27 2017-11-07 上海聊聊网络科技有限公司 一种即时通信客户端
US10210645B2 (en) * 2015-06-07 2019-02-19 Apple Inc. Entity agnostic animation tool
US9608950B2 (en) * 2015-08-18 2017-03-28 Blend Systems, Inc. Systems and methods for sharing videos and images in a texting environment
KR20180048142A (ko) * 2016-11-02 2018-05-10 엘지전자 주식회사 이동 단말기 및 그 제어방법
KR20180057366A (ko) 2016-11-22 2018-05-30 엘지전자 주식회사 이동 단말기 및 그 제어방법
CN107240143A (zh) * 2017-05-09 2017-10-10 北京小米移动软件有限公司 表情包生成方法及装置
CN108255316B (zh) * 2018-01-23 2021-09-10 Oppo广东移动通信有限公司 动态调整表情符号的方法、电子装置及计算机可读存储介质
CN108573527B (zh) * 2018-04-18 2020-02-18 腾讯科技(深圳)有限公司 一种表情图片生成方法及其设备、存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150006657A1 (en) * 2012-03-09 2015-01-01 Tencent Technology (Shenzhen)Company Limited Method and apparatus for processing an animated emoticon
US20180108111A1 (en) * 2015-06-19 2018-04-19 Alibaba Group Holding Limited Previewing dynamic images and expressions
CN106658079A (zh) * 2017-01-05 2017-05-10 腾讯科技(深圳)有限公司 自定义生成表情图像的方法及装置
CN107370887A (zh) * 2017-08-30 2017-11-21 维沃移动通信有限公司 一种表情生成方法及移动终端
CN109120866A (zh) * 2018-09-27 2019-01-01 腾讯科技(深圳)有限公司 动态表情生成方法、装置、计算机可读存储介质和计算机设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3758364A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464430A (zh) * 2020-04-09 2020-07-28 腾讯科技(深圳)有限公司 一种动态表情展示方法、动态表情创建方法及装置
CN111638837A (zh) * 2020-05-13 2020-09-08 维沃移动通信有限公司 一种消息处理方法及电子设备
EP4171048A4 (en) * 2020-10-09 2024-02-21 Beijing Zitiao Network Technology Co Ltd VIDEO PROCESSING METHOD AND APPARATUS
EP4236328A4 (en) * 2020-11-27 2024-04-24 Beijing Zitiao Network Technology Co Ltd METHOD AND APPARATUS FOR SHARING VIDEO, ELECTRONIC DEVICE AND STORAGE MEDIUM

Also Published As

Publication number Publication date
JP2021517696A (ja) 2021-07-26
EP3758364A1 (en) 2020-12-30
JP7112508B2 (ja) 2022-08-03
EP3758364B1 (en) 2023-03-01
CN109120866A (zh) 2019-01-01
US11645804B2 (en) 2023-05-09
CN109120866B (zh) 2020-04-03
EP3758364A4 (en) 2021-05-19
US20230230306A1 (en) 2023-07-20
US20210158594A1 (en) 2021-05-27

Similar Documents

Publication Publication Date Title
WO2020063319A1 (zh) 动态表情生成方法、计算机可读存储介质和计算机设备
CN107770626B (zh) 视频素材的处理方法、视频合成方法、装置及存储介质
CN105791692B (zh) 一种信息处理方法、终端及存储介质
CN111612873B (zh) Gif图片生成方法、装置及电子设备
WO2021109678A1 (zh) 视频生成方法、装置、电子设备及存储介质
CN109948093B (zh) 表情图片生成方法、装置及电子设备
US11394888B2 (en) Personalized videos
CN110889379A (zh) 表情包生成方法、装置及终端设备
US20180143741A1 (en) Intelligent graphical feature generation for user content
CN110475140A (zh) 弹幕数据处理方法、装置、计算机可读存储介质和计算机设备
CN111722775A (zh) 图像处理方法、装置、设备及可读存储介质
CN114880062B (zh) 聊天表情展示方法、设备、电子设备及存储介质
WO2018177134A1 (zh) 用户生成内容处理方法、存储介质和终端
US10460490B2 (en) Method, terminal, and computer storage medium for processing pictures in batches according to preset rules
CN114693827A (zh) 表情生成方法、装置、计算机设备和存储介质
CN110166345A (zh) 资源分享方法、资源获取方法、装置和存储介质
CN115408763B (zh) 基于bim平台的构件生成方法
WO2022247766A1 (zh) 图像处理方法、装置及电子设备
CN116126177A (zh) 一种数据交互控制方法、装置、电子设备和存储介质
JP2017045374A (ja) 情報処理装置及びプログラム
CN113806570A (zh) 图像生成方法和生成装置、电子设备和存储介质
CN114827339A (zh) 消息输出方法、装置和电子设备
CN117395462A (zh) 媒体内容的生成方法、装置、电子设备和可读存储介质
CN116634215A (zh) 显示方法和装置
CN114816933A (zh) 带看笔记的生成方法、装置、可读存储介质和电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19864211

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020552389

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2019864211

Country of ref document: EP

Effective date: 20200921

NENP Non-entry into the national phase

Ref country code: DE