CN107886559A - Method and apparatus for generating picture - Google Patents

Method and apparatus for generating picture Download PDF

Info

Publication number
CN107886559A
CN107886559A CN201711223801.4A CN201711223801A CN107886559A CN 107886559 A CN107886559 A CN 107886559A CN 201711223801 A CN201711223801 A CN 201711223801A CN 107886559 A CN107886559 A CN 107886559A
Authority
CN
China
Prior art keywords
dynamic picture
dimensional
dimensional dynamic
picture
face object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711223801.4A
Other languages
Chinese (zh)
Inventor
郝冀宣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201711223801.4A priority Critical patent/CN107886559A/en
Publication of CN107886559A publication Critical patent/CN107886559A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • 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/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the present application discloses the method and apparatus for generating picture.One embodiment of this method includes:In response to determining to include face object in target video, the posture feature of the face object is extracted;The Three-Dimensional Dynamic picture matched with the posture feature of the face object is found out from default Three-Dimensional Dynamic picture set;Enter row format conversion to the target video, generate face dynamic picture;The Three-Dimensional Dynamic picture and the face dynamic picture that posture feature with the face object is matched are overlapped, and generate three-dimensional overlay dynamic picture.The embodiment of the present application enriches the available picture resource of user.

Description

Method and apparatus for generating picture
Technical field
The invention relates to field of computer technology, and in particular to Internet technical field, it is more particularly, to raw Into the method and apparatus of picture.
Background technology
Augmented reality (Augmented Reality, AR) picture is extraordinary for user because of its outstanding third dimension Available resources, can be carrying out online chat or network comment etc..In existing input scene, user can make The expression way of non-linguistic information is used as by the use of existing picture resource.
The content of the invention
The embodiment of the present application proposes the data capture method and device for server.
In a first aspect, the embodiment of the present application provides a kind of method for generating picture, including:In response to determining target Face object is included in video, extracts the posture feature of face object;Found out from default Three-Dimensional Dynamic picture set with The Three-Dimensional Dynamic picture of the posture feature matching of face object;Enter row format conversion to target video, generate face dynamic picture; The Three-Dimensional Dynamic picture and face dynamic picture that posture feature with face object is matched are overlapped, and generation three-dimensional overlay moves State picture.
In certain embodiments, each Three-Dimensional Dynamic picture in default Three-Dimensional Dynamic picture set is configured with corresponding appearance State feature templates;The Three-Dimensional Dynamic matched with the posture feature of face object is found out from default Three-Dimensional Dynamic picture set Picture, including:By at least one Three-Dimensional Dynamic figure in the posture feature of face object and default Three-Dimensional Dynamic picture set The posture feature template of piece matches, to determine the Three-Dimensional Dynamic picture matched with the posture feature of face object.
In certain embodiments, the posture feature with face object is found out from default Three-Dimensional Dynamic picture set The Three-Dimensional Dynamic picture matched somebody with somebody, including:Extract the feature of each Three-Dimensional Dynamic picture in Three-Dimensional Dynamic picture set;Utilize face object The feature of posture feature and at least one Three-Dimensional Dynamic picture in default Three-Dimensional Dynamic picture set match, to determine The Three-Dimensional Dynamic picture matched with the posture feature of face object.
In certain embodiments, Three-Dimensional Dynamic picture includes at least one Three-Dimensional Dynamic element, each Three-Dimensional Dynamic element point A predeterminable area of face object is not corresponded to;The Three-Dimensional Dynamic picture and face that posture feature with face object is matched move State picture is overlapped, and generates three-dimensional overlay dynamic picture, including:Determine position and the chi of each predeterminable area of face object It is very little;Each Three-Dimensional Dynamic element in the Three-Dimensional Dynamic picture that will be matched with the posture feature of face object with corresponding preset areas The positions and dimensions that domain matches are superimposed upon on face dynamic picture, generate three-dimensional overlay dynamic picture.
In certain embodiments, method also includes:Target video is obtained, and detects in target video whether include face pair As, wherein, target video is to be selected by terminal device in response to detecting user in the expression figure chosen area of interface of input method Surely input the operation of Three-Dimensional Dynamic picture and gather.
Second aspect, the embodiment of the present application provide a kind of device for being used to generate picture, including:Extraction unit, configuration For in response to determining to include face object in target video, extracting the posture feature of face object;Searching unit, it is configured to The Three-Dimensional Dynamic picture matched with the posture feature of face object is found out from default Three-Dimensional Dynamic picture set;Generation is single Member, it is configured to enter target video row format conversion, generates face dynamic picture;Superpositing unit, be configured to by with face The Three-Dimensional Dynamic picture and face dynamic picture of the posture feature matching of object are overlapped, and generate three-dimensional overlay dynamic picture.
In certain embodiments, each Three-Dimensional Dynamic picture in default Three-Dimensional Dynamic picture set is configured with corresponding appearance State feature templates;Searching unit is further configured to:By the posture feature of face object and default Three-Dimensional Dynamic pictures The posture feature template of at least one Three-Dimensional Dynamic picture in conjunction matches, to determine to match with the posture feature of face object Three-Dimensional Dynamic picture.
In certain embodiments, searching unit, including:Extraction module, it is configured to extract in Three-Dimensional Dynamic picture set The feature of each Three-Dimensional Dynamic picture;Determining module, it is configured to the posture feature using face object and default Three-Dimensional Dynamic The feature of at least one Three-Dimensional Dynamic picture in picture set matches, to determine what is matched with the posture feature of face object Three-Dimensional Dynamic picture.
In certain embodiments, Three-Dimensional Dynamic picture includes at least one Three-Dimensional Dynamic element, each Three-Dimensional Dynamic element point A predeterminable area of face object is not corresponded to;Superpositing unit, including:Parameter determination module, it is configured to determine face object Each predeterminable area positions and dimensions;Laminating module, the three-dimensional for being configured to match the posture feature with face object are moved Each Three-Dimensional Dynamic element in state picture is superimposed upon face Dynamic Graph with the positions and dimensions to match with corresponding predeterminable area On piece, three-dimensional overlay dynamic picture is generated.
In certain embodiments, the device also includes:Acquiring unit, it is configured to obtain target video, and detects target Whether face object is included in video, wherein, target video is in response to detecting user in interface of input method by terminal device Expression figure chosen area in select input Three-Dimensional Dynamic picture operation and gather.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including:One or more processors;Storage dress Put, for storing one or more programs, when one or more programs are executed by one or more processors so that one or more Individual processor is realized such as the method for any embodiment in the method for handling image.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable recording medium, are stored thereon with computer journey Sequence, realized when the program is executed by processor such as the method for any embodiment in the method for handling image.
The method and apparatus for generating picture that the embodiment of the present application provides, first, in response to determining in target video Include face object, the posture feature of extraction face object.Then, find out from default Three-Dimensional Dynamic picture set and people The Three-Dimensional Dynamic picture of the posture feature matching of face object.Afterwards, row format conversion is entered to target video, generates face Dynamic Graph Piece.Finally, the Three-Dimensional Dynamic picture and face dynamic picture posture feature with face object matched is overlapped, generation three Dimension superposition dynamic picture.The embodiment of the present application enriches the available picture resource of user.
Brief description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 is the flow chart for being used to generate one embodiment of the method for picture according to the application;
Fig. 3 is the schematic diagram for being used to generate an application scenarios of the method for picture according to the application;
Fig. 4 A are the flow charts for being used to generate another embodiment of the method for picture according to the application;
Fig. 4 B are the schematic diagrames for the three-dimensional overlay dynamic picture that the method flow according to Fig. 4 A is generated;
Fig. 5 is the flow chart for being used to generate another embodiment of the method for picture according to the application;
Fig. 6 is the structural representation for being used to generate one embodiment of the device of picture according to the application;
Fig. 7 is adapted for the structural representation of the computer system of the electronic equipment for realizing the embodiment of the present application.
Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Be easy to describe, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the method for being used to generate picture that can apply the application or the implementation of the device for generating picture The exemplary system architecture 100 of example.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 provide communication link medium.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 101,102,103 by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed, such as web browser should on terminal device 101,102,103 With, shopping class application, searching class application, JICQ, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments for having camera, including but not limited to intelligent hand Machine, tablet personal computer, E-book reader, dynamic image expert's compression standard audio aspect 4) player, portable calculating on knee Machine and desktop computer etc..
Server 105 can be to provide the server of various services, such as to the input on terminal device 101,102,103 Method provides the backstage input method server of the supports such as dictionary, expression storehouse.Backstage input method server can be to receiving input Request is analyzed and processed, and result (such as input results) is fed back into terminal device.
It should be noted that the embodiment of the present application provided be used for generate picture method can by terminal device 101, 102nd, 103 or server 105 perform, correspondingly, the device for generating picture can be arranged at terminal device 101,102, 103 or server 105 in.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematical.According to realizing need Will, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the flow for being used to generate one embodiment of the method for picture according to the application is shown 200.This is used for the method for generating picture, comprises the following steps:
Step 201, in response to determining to include face object in target video, the posture feature of face object is extracted.
In the present embodiment, electronic equipment (such as the terminal shown in Fig. 1 thereon is run for generating the method for picture Equipment or server) after it is determined that including face object in target video, then respond:Extract the appearance of above-mentioned face object State feature.Above-mentioned electronic equipment can pass through terminal device used in wired connection mode or radio connection from user Receive above-mentioned target video.The target video can be that user is shot using above-mentioned terminal device or user uploads Into above-mentioned terminal device.Posture feature is the feature of the posture of reflection face object, can be represented in vector form.Than Such as, posture feature can be the position relationship between several characteristic points of face object.Characteristic point can be carried from picture The point of the expression face characteristic taken out, can accurately indicate a site in face, for example can be face, can also It is right eye angle, upper lip centre site of right eye etc..In actual scene, different posture features represents the different emotions of people State, such as facial pose of the people when doing different expression (doing different facial actions in other words) are different.In the present embodiment By extracting the posture feature of face object, to express the different emotional states that face object implies.
In practice, the posture feature of face object can be extracted by the identification of human face posture.Specifically, can adopt With the posture feature of various ways extraction face object.Specifically, local binary patterns (Local Binary can be used Pattern, LBP), active appearance models (Active Appearance Model, AAM) etc. carry out the extraction of posture feature.
In the present embodiment, the posture of face object can be countenance, can also be facial action.Countenance is In the emotion that facial expressiveness goes out.For example countenance can be indignation, happiness etc..Facial action is moved what face made Make.For example facial action can be opened one's mouth, close one's eyes etc..
Step 202, three matched with the posture feature of face object are found out from default Three-Dimensional Dynamic picture set Tie up dynamic picture.
In the present embodiment, above-mentioned electronic equipment is found out and face object from default Three-Dimensional Dynamic picture set The Three-Dimensional Dynamic picture that matches of posture feature.Three-Dimensional Dynamic picture is the dynamic picture for showing three-dimensional stereo effect.Three The set of dimension dynamic picture is the picture set being made up of Three-Dimensional Dynamic picture.Each Zhang San tie up dynamic picture all with face object Corresponding relation be present in several posture features.Different Three-Dimensional Dynamic pictures corresponds to the combination of different posture features.This is corresponding Relation can be stored in advance in local or other electronic equipments, for example is existed in a manner of mapping table.It is right by this The posture feature with face object should be related to, the Three-Dimensional Dynamic figure corresponding with the posture feature of face object can be found Piece.Herein, can be without using whole posture features of face object in Three-Dimensional Dynamic picture corresponding to lookup.Such as The posture feature related to nose and eyes can only be used.
In practice, Three-Dimensional Dynamic picture can be AR dynamic pictures.
Step 203, row format conversion is entered to target video, generates face dynamic picture.
In the present embodiment, above-mentioned electronic equipment enters row format conversion to above-mentioned target video.Form conversion result be Face dynamic picture.Herein, form conversion is the form that target video is converted to dynamic picture from video format.Such as Target video can be converted to GIF forms from mpeg format.Face dynamic picture is the dynamic picture comprising face.
Step 204, the Three-Dimensional Dynamic picture and face dynamic picture posture feature with face object matched is folded Add, generate three-dimensional overlay dynamic picture.
In the present embodiment, above-mentioned electronic equipment is folded the Three-Dimensional Dynamic picture found and face dynamic picture Add, generate three-dimensional overlay dynamic picture.Presented in the three-dimensional overlay dynamic picture generated in above-mentioned Three-Dimensional Dynamic picture Three-Dimensional Dynamic pattern, while also present above-mentioned face object.In practice, the three-dimensional overlay dynamic picture of generation can be through Cross the AR dynamic pictures of superposition.Specifically, each frame picture of Three-Dimensional Dynamic picture can be first extracted, and extracts face Dynamic Graph Each frame picture in piece.Afterwards, each frame picture in each the frame picture and face dynamic picture in Three-Dimensional Dynamic picture is entered Row superposition.
With continued reference to Fig. 3, Fig. 3 is the signal for being used to generate the application scenarios of the method for picture according to the present embodiment Figure.In Fig. 3 application scenarios, user shoots and uploads one section of video to server 301 by terminal device 302 first 303.Afterwards, above-mentioned server 301 extracts the posture of face object in response to determining to include face object in above-mentioned video 303 Feature 304.Above-mentioned server 301 is found out and the posture feature of face object 304 from default Three-Dimensional Dynamic picture set The Three-Dimensional Dynamic picture 305 of matching.Above-mentioned server 301 enters row format conversion to above-mentioned video 303, generates face dynamic picture 306.The Three-Dimensional Dynamic picture 305 and face dynamic picture 306 that above-mentioned server 301 matches the posture feature with face object It is overlapped, generation three-dimensional overlay dynamic picture 307.
The method that above-described embodiment of the application provides enriches the available picture resource of user.
With further reference to Fig. 4 A, it illustrates the flow 400 of another embodiment of the method for generating picture.The use In the flow 400 of the method for generation picture, comprise the following steps:
Step 401, in response to determining to include face object in target video, the posture feature of face object is extracted.
In the present embodiment, electronic equipment (such as the service shown in Fig. 1 thereon is run for generating the method for picture Device) after it is determined that including face object in target video, then respond:Extract the posture feature of above-mentioned face object.On Stating electronic equipment can be above-mentioned by terminal device reception used in wired connection mode or radio connection from user Target video.The target video can be that user is shot using above-mentioned terminal device or user uploads to above-mentioned end In end equipment.Posture feature is the feature of the posture of reflection face object.Posture feature can show in vector form.
Step 402, by least one three-dimensional in the posture feature of face object and default Three-Dimensional Dynamic picture set The posture feature template of dynamic picture matches, to determine the Three-Dimensional Dynamic picture matched with the posture feature of face object.
In the present embodiment, above-mentioned server is by the posture feature of face object and default Three-Dimensional Dynamic picture set The posture feature template of at least one Three-Dimensional Dynamic picture match, to determine matched with the posture feature of face object three Tie up dynamic picture.Each Three-Dimensional Dynamic picture in default Three-Dimensional Dynamic picture set is configured with corresponding posture feature template.
Posture feature template includes the posture feature of one group of fixation, and it is special that different Three-Dimensional Dynamic pictures corresponds to different postures Levy template.The posture feature of above-mentioned face object is matched with posture feature template, can be the posture for calculating face object Similarity between feature and posture feature template, posture feature is identical or the similarity of posture feature is more than default threshold value It is then matching.In addition it is also possible to select the maximum posture feature template as matching of similarity.In practice, can be according to Order set in advance is matched with each pose template.When the pose template for finding matching, then can stop matching Journey.So the posture feature of face object needs to match with least one posture feature template in the matching process.
Step 403, row format conversion is entered to target video, generates face dynamic picture.
In the present embodiment, above-mentioned server enters row format conversion to above-mentioned target video.The result that form is changed is people Face dynamic picture.Herein, form conversion is the form that target video is converted to dynamic picture from video format.Such as can So that target video is converted into GIF forms from mpeg format.Face dynamic picture is the dynamic picture for presenting face.
Step 404, the positions and dimensions of each predeterminable area of face object are determined.
In the present embodiment, above-mentioned server can determine the positions and dimensions of each predeterminable area of face object.Three Dimension dynamic picture includes at least one Three-Dimensional Dynamic element, and each Three-Dimensional Dynamic element corresponds to a preset areas of face object respectively Domain.Three-Dimensional Dynamic element is the part in the entirety for the three-D pattern that Three-Dimensional Dynamic picture is presented.Each Three-Dimensional Dynamic member Element can form the complete three-D pattern of a width presented in Three-Dimensional Dynamic picture.Specifically, above-mentioned server can be advance To face object zoning, to determine the predeterminable area of face object.By predetermined predeterminable area, above-mentioned people is determined The positions and dimensions of each predeterminable area of face object.For example a predeterminable area is left eye, it may be determined that left in face object The coordinate and width of the position of eye.In addition to the width, it can also determine that length etc. is used as size.
Step 405, each Three-Dimensional Dynamic element in the Three-Dimensional Dynamic picture posture feature with face object matched with The positions and dimensions to match with corresponding predeterminable area are superimposed upon on face dynamic picture, generate three-dimensional overlay dynamic picture.
In the present embodiment, in the Three-Dimensional Dynamic picture that above-mentioned server can match the posture feature of face object Each Three-Dimensional Dynamic element overlaid generates three-dimensional overlay dynamic picture on above-mentioned face dynamic picture.Specifically with it is each The positions and dimensions that predeterminable area corresponding to Three-Dimensional Dynamic element matches are overlapped.Such as one in Three-Dimensional Dynamic picture Individual Three-Dimensional Dynamic element is the left eye for having 3-D effect, the left eye in corresponding face object.This can be had to a left side for 3-D effect The positions and dimensions of eye are arranged to the positions and dimensions of left eye in face object, are overlapped afterwards.The three-dimensional overlay of generation moves State picture is as shown in Figure 4 B.
The present embodiment is by the way that the posture feature template of the posture feature of face object and Three-Dimensional Dynamic picture is matched, energy Enough Three-Dimensional Dynamic pictures for quickly and accurately determining to be superimposed with face object, so as to the three-dimensional overlay dynamic picture energy of generation The more accurately affective state for the people that expression target video is gathered.In addition by by each Three-Dimensional Dynamic element and face object Each predeterminable area is corresponding to be superimposed, it is ensured that and Three-Dimensional Dynamic element adapts to size and the position of each predeterminable area of face object, The effect of lifting superposition picture.
With further reference to Fig. 5, it illustrates the flow 500 of another embodiment of the method for generating picture.The use In the flow 500 of the method for generation picture, comprise the following steps:
Step 501, target video is obtained, and detects in target video whether include face object.
In the present embodiment, target video is in response to detecting expression figure of the user in interface of input method by terminal device The operation of input Three-Dimensional Dynamic picture is selected in chosen area and is gathered.Interface of input method for terminal device display screen to The interface input that family is presented.Expression figure chosen area is to choose the region of expression figure.The target video can be with It is that user is shot using above-mentioned terminal device or user is uploaded in above-mentioned terminal device.
In practice, terminal device can call camera, carry out video acquisition by camera, generate target video. Afterwards, according to Face datection (such as detection of facial contour) etc., detect in target video whether include face object.
It should be noted that the electronic equipment for carrying out performing operation in the present embodiment can be server or end End equipment.When electronic equipment is server, above-mentioned electronic equipment can pass through wired connection mode or radio connection Above-mentioned target video is received from terminal device used in user.And when electronic equipment is terminal device, electronic equipment can be with The target video that user uploads is received, or video is gathered by camera.
Step 502, in response to determining to include face object in target video, the posture feature of face object is extracted.
In the present embodiment, electronic equipment (such as the electronics shown in Fig. 1 thereon is run for generating the method for picture Equipment) after it is determined that including face object in target video, then respond:Extract the posture feature of above-mentioned face object. Posture feature is the feature of the posture of reflection face object.Posture feature can show in vector form.In practice, can be with The posture feature of face object is extracted by the identification of human face posture.
Step 503, the feature of each Three-Dimensional Dynamic picture in Three-Dimensional Dynamic picture set is extracted.
In the present embodiment, above-mentioned electronic equipment extracts the spy of each Three-Dimensional Dynamic picture from Three-Dimensional Dynamic picture set Sign.Here feature can use vector representation.Specifically, feature can be each three of the three-D pattern in Three-Dimensional Dynamic picture Tie up the position relationship between dynamic element.The extraction of feature can use various ways, such as, local binary patterns can be used (Local Binary Pattern, LBP), Deep ID (Deep hidden identity feature) etc. carry out feature Extraction.
Step 504, the posture feature using face object and at least one three in default Three-Dimensional Dynamic picture set The feature of dimension dynamic picture matches, to determine the Three-Dimensional Dynamic picture matched with the posture feature of face object.
In the present embodiment, above-mentioned electronic equipment is by the posture feature of face object and default Three-Dimensional Dynamic picture set In the feature of at least one Three-Dimensional Dynamic picture match, to determine the Three-Dimensional Dynamic matched with the posture feature of face object Picture.It is similar between the feature of Three-Dimensional Dynamic picture that step 503 extracts to calculate the posture feature of face object Degree.It is then matching that similarity, which is more than default threshold value,.In practice, can be according to order set in advance and each Three-Dimensional Dynamic The feature of picture is matched.When the feature for finding matching, then it can stop matching process.So people in the matching process The posture feature of face object needs the feature with least one Three-Dimensional Dynamic picture to match.
Step 505, row format conversion is entered to target video, generates face dynamic picture.
In the present embodiment, above-mentioned electronic equipment enters row format conversion to above-mentioned target video.Form conversion result be Face dynamic picture.Herein, form conversion is the form that target video is converted to dynamic picture from video format.Such as Target video can be converted to GIF forms from mpeg format.Face dynamic picture is the dynamic picture for presenting face.
Step 506, the Three-Dimensional Dynamic picture and face dynamic picture posture feature with face object matched is folded Add, generate three-dimensional overlay dynamic picture.
In the present embodiment, above-mentioned electronic equipment is folded the Three-Dimensional Dynamic picture found and face dynamic picture Add, generate three-dimensional overlay dynamic picture.Presented in the three-dimensional overlay dynamic picture generated in above-mentioned Three-Dimensional Dynamic picture Three-Dimensional Dynamic pattern, while also present above-mentioned face object.In practice, the three-dimensional overlay dynamic picture of generation can be through Cross the AR dynamic pictures of superposition.Specifically, each frame picture of Three-Dimensional Dynamic picture can be first extracted, and extracts face Dynamic Graph Each frame picture in piece.Afterwards, each frame picture in each the frame picture and face dynamic picture in Three-Dimensional Dynamic picture is entered Row superposition.
The present embodiment by the way that the feature of the posture feature of face object and Three-Dimensional Dynamic picture is matched, can quickly, The Three-Dimensional Dynamic picture being superimposed with face object is precisely determined, so as to which the three-dimensional overlay dynamic picture of generation can be more accurately The affective state for the people that expression target video is gathered.
With further reference to Fig. 6 as the realization to method shown in above-mentioned each figure, it is used to generate figure this application provides one kind One embodiment of the device of piece, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2, and the device can specifically answer For in various electronic equipments.
As Fig. 6 shows, the device 600 for being used to handle image of the present embodiment includes:Extraction unit 601, searching unit 602, Generation unit 603 and superpositing unit 604.Wherein, extraction unit 601, it is configured in response to determining to include people in target video Face object, extract the posture feature of face object;Searching unit 602, it is configured to from default Three-Dimensional Dynamic picture set Find out the Three-Dimensional Dynamic picture matched with the posture feature of face object;Generation unit 603, it is configured to enter target video Row format is changed, and generates face dynamic picture;Superpositing unit 604, it is configured to match the posture feature with face object Three-Dimensional Dynamic picture and face dynamic picture are overlapped, and generate three-dimensional overlay dynamic picture.
In the present embodiment, extraction unit 601 then responds after it is determined that including face object in target video: Extract the posture feature of above-mentioned face object.Said extracted unit 601 can pass through wired connection mode or wireless connection side Terminal device used in formula from user receives above-mentioned target video.The target video can be that user uses above-mentioned terminal device Shoot or user is uploaded in above-mentioned terminal device.Posture feature is the feature of the posture of reflection face object, It can represent in vector form.For example posture feature can be the position relationship between several characteristic points of face object. Characteristic point can be the point of the expression face characteristic extracted from picture, can accurately indicate a position in face Point, for example can be the right eye angle of face or right eye, upper lip centre site etc..It is different in actual scene Posture feature represents the different emotions state of people, such as people is when doing different expression (doing different facial actions in other words) Facial pose is different.By extracting the posture feature of face object in the present embodiment, to express the difference that face object implies Emotional state.
In the present embodiment, searching unit 602 is found out and face object from default Three-Dimensional Dynamic picture set The Three-Dimensional Dynamic picture that posture feature matches.Three-Dimensional Dynamic picture is the dynamic picture for showing three-dimensional stereo effect.It is three-dimensional Dynamic picture set is the picture set being made up of Three-Dimensional Dynamic picture.If each Zhang San tie up dynamic picture all with face object Corresponding relation be present in a dry posture feature.Different Three-Dimensional Dynamic pictures corresponds to the combination of different posture features.The corresponding pass System can be stored in advance in local or other electronic equipments, for example is existed in a manner of mapping table.It is corresponding by this The posture feature of relation and face object, the Three-Dimensional Dynamic picture corresponding with the posture feature of face object can be found. Herein, can be without using whole posture features of face object in Three-Dimensional Dynamic picture corresponding to lookup.Such as can be with Only use the posture feature related to nose and eyes.
In the present embodiment, generation unit 603 enters row format conversion to above-mentioned target video.The result that form is changed is people Face dynamic picture.Herein, form conversion is the form that target video is converted to dynamic picture from video format.Such as can So that target video is converted into GIF forms from mpeg format.Face dynamic picture is the dynamic picture for presenting face.
In the present embodiment, the Three-Dimensional Dynamic picture found and face dynamic picture are overlapped by superpositing unit 604, Generate three-dimensional overlay dynamic picture.The three-dimensional in above-mentioned Three-Dimensional Dynamic picture is presented in the three-dimensional overlay dynamic picture generated Dynamic pattern, while also present above-mentioned face object.In practice, the three-dimensional overlay dynamic picture of generation can be by folded The AR dynamic pictures added.Specifically, each frame picture of Three-Dimensional Dynamic picture can be first extracted, and is extracted in face dynamic picture Each frame picture.Afterwards, each frame picture in each the frame picture and face dynamic picture in Three-Dimensional Dynamic picture is folded Add.
In some optional implementations of the present embodiment, each Three-Dimensional Dynamic in default Three-Dimensional Dynamic picture set Picture is configured with corresponding posture feature template;Searching unit is further configured to:By the posture feature of face object and in advance If Three-Dimensional Dynamic picture set in the posture feature template of at least one Three-Dimensional Dynamic picture match, to determine and face The Three-Dimensional Dynamic picture of the posture feature matching of object.
In some optional implementations of the present embodiment, searching unit, including:Extraction module, it is configured to extract The feature of each Three-Dimensional Dynamic picture in Three-Dimensional Dynamic picture set;Determining module, it is configured to special using the posture of face object Levy and match with the feature of at least one Three-Dimensional Dynamic picture in default Three-Dimensional Dynamic picture set, to determine and face pair The Three-Dimensional Dynamic picture of the posture feature matching of elephant.
In some optional implementations of the present embodiment, Three-Dimensional Dynamic picture includes at least one Three-Dimensional Dynamic member Element, each Three-Dimensional Dynamic element correspond to a predeterminable area of face object respectively;Superpositing unit, including:Parameter determination module, match somebody with somebody Put the positions and dimensions of each predeterminable area for determining face object;Laminating module, it is configured to the appearance with face object Each Three-Dimensional Dynamic element in the Three-Dimensional Dynamic picture of state characteristic matching is with the position to match with corresponding predeterminable area and chi It is very little to be superimposed upon on face dynamic picture, generate three-dimensional overlay dynamic picture.
In some optional implementations of the present embodiment, the device also includes:Acquiring unit, it is configured to obtain mesh Video is marked, and detects in target video whether include face object, wherein, target video is in response to detecting by terminal device User selectes the operation of input Three-Dimensional Dynamic picture and gathered in the expression figure chosen area of interface of input method.
Fig. 7 shows the structural representation of the computer installation suitable for being used for the electronic equipment for realizing the embodiment of the present application. As shown in fig. 7, computer installation 700 includes CPU (CPU) 701, it can be according to being stored in read-only storage (ROM) program in 702 or performed each from the program that storage part 708 is loaded into random access storage device (RAM) 703 Kind appropriate action and processing.In RAM 703, also it is stored with device 700 and operates required various programs and data.CPU 701st, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to bus 704。
I/O interfaces 705 are connected to lower component:Importation 706 including keyboard, mouse etc.;Penetrated including such as negative electrode The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage part 708 including hard disk etc.; And the communications portion 709 of the NIC including LAN card, modem etc..Communications portion 709 via such as because The network of spy's net performs communication process.Driver 710 is also according to needing to be connected to I/O interfaces 705.Detachable media 711, such as Disk, CD, magneto-optic disk, semiconductor memory etc., it is arranged on as needed on driver 710, in order to read from it Computer program be mounted into as needed storage part 708.
Especially, according to embodiments herein, computer is may be implemented as above with reference to the process of flow chart description Software program.For example, embodiments herein includes a kind of computer program product, it includes being carried on computer-readable medium On computer program, the computer program include be used for execution flow chart shown in method program code.In such reality To apply in example, the computer program can be downloaded and installed by communications portion 709 from network, and/or from detachable media 711 are mounted.When the computer program is performed by CPU (CPU) 701, perform what is limited in the present processes Above-mentioned function.It should be noted that the computer-readable medium of the application can be computer-readable signal media or calculating Machine readable storage medium storing program for executing either the two any combination.Computer-readable recording medium for example can be --- but it is unlimited In --- electricity, magnetic, optical, electromagnetic, infrared ray or arrangement of semiconductors, device or device, or any combination above.Calculate The more specifically example of machine readable storage medium storing program for executing can include but is not limited to:Electrically connecting, be portable with one or more wires Formula computer disk, hard disk, random access storage device (RAM), read-only storage (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer-readable recording medium can be any includes or storage program Tangible medium, the program can be commanded performs device, device either device use or it is in connection.And in this Shen Please in, computer-readable signal media can include in a base band or as carrier wave a part propagation data-signal, its In carry computer-readable program code.The data-signal of this propagation can take various forms, and include but is not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium beyond storage medium, the computer-readable medium can send, propagate or transmit for by Instruction executing device, device either device use or program in connection.The journey included on computer-readable medium Sequence code can be transmitted with any appropriate medium, be included but is not limited to:Wirelessly, electric wire, optical cable, RF etc., or it is above-mentioned Any appropriate combination.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, the part of the module, program segment or code include one or more use In the executable instruction of logic function as defined in realization.It should also be noted that marked at some as in the realization replaced in square frame The function of note can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actually It can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also to note Meaning, the combination of each square frame and block diagram in block diagram and/or flow chart and/or the square frame in flow chart can be with holding Function as defined in row or the special hardware based system of operation are realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag Include extraction unit, searching unit, generation unit and superpositing unit.Wherein, the title of these units not structure under certain conditions The paired restriction of the unit in itself, for example, extraction unit is also described as the " list of the posture feature of extraction face object Member ".
As on the other hand, present invention also provides a kind of computer-readable medium, the computer-readable medium can be Included in device described in above-described embodiment;Can also be individualism, and without be incorporated the device in.Above-mentioned calculating Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the device so that should Device:In response to determining to include face object in target video, the posture feature of face object is extracted;From default Three-Dimensional Dynamic The Three-Dimensional Dynamic picture matched with the posture feature of face object is found out in picture set;Enter row format to target video to turn Change, generate face dynamic picture;The Three-Dimensional Dynamic picture and face dynamic picture that posture feature with face object is matched enter Row superposition, generates three-dimensional overlay dynamic picture.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the particular combination of above-mentioned technical characteristic forms Scheme, while should also cover in the case where not departing from foregoing invention design, carried out by above-mentioned technical characteristic or its equivalent feature The other technical schemes for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein The technical scheme that the technical characteristic of energy is replaced mutually and formed.

Claims (12)

1. a kind of method for generating picture, including:
In response to determining to include face object in target video, the posture feature of the face object is extracted;
The Three-Dimensional Dynamic figure matched with the posture feature of the face object is found out from default Three-Dimensional Dynamic picture set Piece;
Enter row format conversion to the target video, generate face dynamic picture;
The Three-Dimensional Dynamic picture and the face dynamic picture that posture feature with the face object is matched are overlapped, raw Into three-dimensional overlay dynamic picture.
2. the method according to claim 11, wherein, each Three-Dimensional Dynamic figure in the default Three-Dimensional Dynamic picture set Piece is configured with corresponding posture feature template;
The three-dimensional matched with the posture feature of the face object that found out from default Three-Dimensional Dynamic picture set is moved State picture, including:
By at least one Three-Dimensional Dynamic in the posture feature of the face object and the default Three-Dimensional Dynamic picture set The posture feature template of picture matches, to determine the Three-Dimensional Dynamic picture matched with the posture feature of the face object.
3. according to the method for claim 1, wherein, it is described found out from default Three-Dimensional Dynamic picture set with it is described The Three-Dimensional Dynamic picture of the posture feature matching of face object, including:
Extract the feature of each Three-Dimensional Dynamic picture in the Three-Dimensional Dynamic picture set;
It is dynamic using the posture feature and at least one three-dimensional in the default Three-Dimensional Dynamic picture set of the face object The feature of state picture matches, to determine the Three-Dimensional Dynamic picture matched with the posture feature of the face object.
4. according to the method for claim 1, wherein, the Three-Dimensional Dynamic picture includes at least one Three-Dimensional Dynamic element, Each Three-Dimensional Dynamic element corresponds to a predeterminable area of the face object respectively;
The Three-Dimensional Dynamic picture that posture feature with the face object is matched and the face dynamic picture are folded Add, generate three-dimensional overlay dynamic picture, including:
Determine the positions and dimensions of each predeterminable area of the face object;
Each Three-Dimensional Dynamic element in the Three-Dimensional Dynamic picture that the posture feature with the face object is matched with it is right The positions and dimensions that the predeterminable area answered matches are superimposed upon on the face dynamic picture, generate three-dimensional overlay dynamic picture.
5. according to the method for claim 1, wherein, methods described also includes:
Target video is obtained, and detects in the target video whether include face object, wherein, the target video is by end End equipment is in response to detecting user selected behaviour for inputting Three-Dimensional Dynamic picture in the expression figure chosen area of interface of input method Make and gather.
6. a kind of device for being used to generate picture, including:
Extraction unit, it is configured to, in response to determining to include face object in target video, extract the posture of the face object Feature;
Searching unit, it is configured to find out the posture feature with the face object from default Three-Dimensional Dynamic picture set The Three-Dimensional Dynamic picture of matching;
Generation unit, it is configured to enter the target video row format conversion, generates face dynamic picture;
Superpositing unit, the Three-Dimensional Dynamic picture and the face for being configured to match the posture feature with the face object move State picture is overlapped, and generates three-dimensional overlay dynamic picture.
7. device according to claim 6, wherein, each Three-Dimensional Dynamic figure in the default Three-Dimensional Dynamic picture set Piece is configured with corresponding posture feature template;
The searching unit is further configured to:
By at least one Three-Dimensional Dynamic in the posture feature of the face object and the default Three-Dimensional Dynamic picture set The posture feature template of picture matches, to determine the Three-Dimensional Dynamic picture matched with the posture feature of the face object.
8. device according to claim 6, wherein, the searching unit, including:
Extraction module, it is configured to extract the feature of each Three-Dimensional Dynamic picture in the Three-Dimensional Dynamic picture set;
Determining module, it is configured to using in the posture feature of the face object and the default Three-Dimensional Dynamic picture set The feature of at least one Three-Dimensional Dynamic picture match, to determine that the three-dimensional matched with the posture feature of the face object is moved State picture.
9. device according to claim 6, wherein, the Three-Dimensional Dynamic picture includes at least one Three-Dimensional Dynamic element, Each Three-Dimensional Dynamic element corresponds to a predeterminable area of the face object respectively;
The superpositing unit, including:
Parameter determination module, it is configured to determine the positions and dimensions of each predeterminable area of the face object;
Laminating module, each three be configured in the Three-Dimensional Dynamic picture that matches the posture feature with the face object Dimension dynamic element is superimposed upon on the face dynamic picture with the positions and dimensions to match with corresponding predeterminable area, generation three Dimension superposition dynamic picture.
10. device according to claim 6, wherein, described device also includes:
Acquiring unit, it is configured to obtain target video, and detects in the target video whether include face object, wherein, The target video be by terminal device in response to detect user in the expression figure chosen area of interface of input method select it is defeated Enter the operation of Three-Dimensional Dynamic picture and gather.
11. a kind of electronic equipment, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processors are real The now method as described in any in claim 1-5.
12. a kind of computer-readable recording medium, is stored thereon with computer program, wherein, when the program is executed by processor Realize the method as described in any in claim 1-5.
CN201711223801.4A 2017-11-29 2017-11-29 Method and apparatus for generating picture Pending CN107886559A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711223801.4A CN107886559A (en) 2017-11-29 2017-11-29 Method and apparatus for generating picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711223801.4A CN107886559A (en) 2017-11-29 2017-11-29 Method and apparatus for generating picture

Publications (1)

Publication Number Publication Date
CN107886559A true CN107886559A (en) 2018-04-06

Family

ID=61775866

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711223801.4A Pending CN107886559A (en) 2017-11-29 2017-11-29 Method and apparatus for generating picture

Country Status (1)

Country Link
CN (1) CN107886559A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108765522A (en) * 2018-05-15 2018-11-06 维沃移动通信有限公司 A kind of dynamic image generation method and mobile terminal
CN109671014A (en) * 2018-11-26 2019-04-23 深圳艺达文化传媒有限公司 From the plait stacking method and Related product to shoot the video
CN110176044A (en) * 2018-06-08 2019-08-27 腾讯科技(深圳)有限公司 Information processing method, device, storage medium and computer equipment
CN110188712A (en) * 2019-06-03 2019-08-30 北京字节跳动网络技术有限公司 Method and apparatus for handling image
CN110399764A (en) * 2018-04-24 2019-11-01 华为技术有限公司 Face identification method, device and computer-readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104637035A (en) * 2015-02-15 2015-05-20 百度在线网络技术(北京)有限公司 Method, device and system for generating cartoon face picture
CN104715447A (en) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 Image synthesis method and device
CN104915634A (en) * 2015-02-16 2015-09-16 百度在线网络技术(北京)有限公司 Image generation method based on face recognition technology and apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104637035A (en) * 2015-02-15 2015-05-20 百度在线网络技术(北京)有限公司 Method, device and system for generating cartoon face picture
CN104915634A (en) * 2015-02-16 2015-09-16 百度在线网络技术(北京)有限公司 Image generation method based on face recognition technology and apparatus
CN104715447A (en) * 2015-03-02 2015-06-17 百度在线网络技术(北京)有限公司 Image synthesis method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
樰篱: "阿里云首推免费人脸识别SDK让每个APP轻松拥有短视频AR特效", 《HTTPS://YQ.ALIYUN.COM/ARTICLES/216752?SPM=5176.100244.TEAMHOMELEFT.1.DLHTJZ》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399764A (en) * 2018-04-24 2019-11-01 华为技术有限公司 Face identification method, device and computer-readable medium
CN108765522A (en) * 2018-05-15 2018-11-06 维沃移动通信有限公司 A kind of dynamic image generation method and mobile terminal
CN110176044A (en) * 2018-06-08 2019-08-27 腾讯科技(深圳)有限公司 Information processing method, device, storage medium and computer equipment
CN109671014A (en) * 2018-11-26 2019-04-23 深圳艺达文化传媒有限公司 From the plait stacking method and Related product to shoot the video
CN110188712A (en) * 2019-06-03 2019-08-30 北京字节跳动网络技术有限公司 Method and apparatus for handling image
CN110188712B (en) * 2019-06-03 2021-10-12 北京字节跳动网络技术有限公司 Method and apparatus for processing image

Similar Documents

Publication Publication Date Title
US10997445B2 (en) Facial recognition-based authentication
CN107886559A (en) Method and apparatus for generating picture
CN111787242B (en) Method and apparatus for virtual fitting
CN108525305B (en) Image processing method, image processing device, storage medium and electronic equipment
CN106682632B (en) Method and device for processing face image
TW505892B (en) System and method for promptly tracking multiple faces
WO2020078119A1 (en) Method, device and system for simulating user wearing clothing and accessories
CN108509915A (en) The generation method and device of human face recognition model
CN108898185A (en) Method and apparatus for generating image recognition model
CN108388889B (en) Method and device for analyzing face image
CN107153496A (en) Method and apparatus for inputting emotion icons
CN108073910A (en) For generating the method and apparatus of face characteristic
CN108491808B (en) Method and device for acquiring information
CN109344762A (en) Image processing method and device
CN108062544A (en) For the method and apparatus of face In vivo detection
CN108509916A (en) Method and apparatus for generating image
CN108229375B (en) Method and device for detecting face image
CN108171204A (en) Detection method and device
CN109241934A (en) Method and apparatus for generating information
Zhang et al. Emotion detection using Kinect 3D facial points
CN108491881A (en) Method and apparatus for generating detection model
CN110059624A (en) Method and apparatus for detecting living body
CN110110666A (en) Object detection method and device
CN110633677A (en) Face recognition method and device
JP6593949B1 (en) Information processing apparatus and marketing activity support apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180406