CN109583370A - Human face structure grid model method for building up, device, electronic equipment and storage medium - Google Patents

Human face structure grid model method for building up, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109583370A
CN109583370A CN201811446734.7A CN201811446734A CN109583370A CN 109583370 A CN109583370 A CN 109583370A CN 201811446734 A CN201811446734 A CN 201811446734A CN 109583370 A CN109583370 A CN 109583370A
Authority
CN
China
Prior art keywords
face
initial
key point
structured grid
grid model
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
CN201811446734.7A
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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201811446734.7A priority Critical patent/CN109583370A/en
Publication of CN109583370A publication Critical patent/CN109583370A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • G06V40/165Detection; Localisation; Normalisation using facial parts and geometric relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/757Matching configurations of points or features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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/174Facial expression recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Geometry (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The disclosure is directed to a kind of human face structure grid model method for building up, device, electronic equipment and storage mediums, belong to technical field of image processing.The described method includes: the face key point of detection two-dimension human face image;The face key point of face key point and preset average face structured grid model based on the two-dimension human face image, the determining Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;Based on the initial projective geometry parameter, in the Initial Face structured grid model, determine face key point corresponding with the two-dimension human face image, face key point corresponding with the two-dimension human face image in face key point and the Initial Face structured grid model based on the two-dimension human face image, the determining output human face structure grid model to match with two-dimension human face image.The complexity for establishing human face structure grid model using the disclosure is lower.

Description

Human face structure grid model method for building up, device, electronic equipment and storage medium
Technical field
This disclosure relates to technical field of image processing more particularly to a kind of human face structure grid model method for building up, device, Electronic equipment and storage medium.
Background technique
Currently, computer vision field is quickly grown, human face structure grid model establishing techniques are led as computer vision The hot spot technology in domain has been widely applied to the industries such as identification, virtual reality, computer game.And human face structure grid Model foundation technology is to be acquired to face information based on facial image, established the facial image pair in a computer mostly The human face structure grid model answered.Wherein, human face structure grid model is a threedimensional model, and the threedimensional model is by many faces Vertex composition, there is corresponding three-dimensional coordinate on each face vertex, is provided with line between adjacent face vertex, forms many Triangle, such threedimensional model be like by triangle sets at grid constitute, it is common so be called human face structure grid model Face vertex between line formed polygon have triangle, rectangle etc..
The relevant technologies need to get at least two people shot from different perspectives when establishing human face structure grid model Face image, and based on the facial image got, depth information is obtained, to establish human face structure grid model.
In implementing the present disclosure, the inventor finds that the existing technology has at least the following problems:
Need to obtain in the related technology different angle shooting multiple facial images, and obtain these facial images it Before, also the correlation between image picking-up apparatus is demarcated, calibration process is relative complex, can thus make face knot The complexity that network forming lattice model is established is very high.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of human face structure grid model method for building up, dress It sets, electronic equipment and storage medium.
According to the first aspect of the embodiments of the present disclosure, a kind of human face structure grid model method for building up is provided, comprising:
Detect the face key point of two-dimension human face image;
The face of face key point and preset average face structured grid model based on the two-dimension human face image is crucial Point, the determining Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two dimension The corresponding face key point of facial image, face key point and the Initial Face Structure Network based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in lattice model, the determining output face to match with two-dimension human face image Structured grid model.
Optionally, described to be based on the initial projective geometry parameter, in the Initial Face structured grid model, determine Face key point corresponding with the two-dimension human face image, face key point based on the two-dimension human face image and described initial Face key point corresponding with the two-dimension human face image in human face structure grid model, determination and the two-dimension human face image phase Matched output human face structure grid model, comprising:
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two dimension The corresponding face key point of facial image;
With described two in face key point and the Initial Face structured grid model based on the two-dimension human face image Tie up the corresponding face key point of facial image, the determining intermediate face structured grid model to match with the two-dimension human face image With intermediate projective geometry parameter;
Judge whether to meet preset loop stop conditions;
If meeting preset loop stop conditions, by the intermediate face structured grid model, be determined as with it is described The output human face structure grid model that two-dimension human face image matches;
It is in described by the Initial Face structured grid model modification if being unsatisfactory for preset loop stop conditions Between human face structure grid model, the initial projective geometry parameter is updated to the intermediate projective geometry parameter, goes to execution: Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two-dimension human face image Corresponding face key point.
Optionally, the face key point based on the two-dimension human face image and preset average face structured grid model Face key point, the determining Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry Parameter, comprising:
The face of face key point and preset average face structured grid model based on the two-dimension human face image is crucial Point determines Initial Face structured grid parameter and initial projective geometry parameter;
Based on the Initial Face structured grid parameter, the determining Initial Face knot to match with the two-dimension human face image Network forming lattice model;
In the face key point based on the two-dimension human face image and the Initial Face structured grid model with institute State the corresponding face key point of two-dimension human face image, the determining intermediate face structured grid to match with the two-dimension human face image Model and intermediate projective geometry parameter, comprising:
With described two in face key point and the Initial Face structured grid model based on the two-dimension human face image The corresponding face key point of facial image is tieed up, determines intermediate face structured grid parameter and intermediate projective geometry parameter;
Based on the intermediate face structured grid parameter, the determining intermediate face knot to match with the two-dimension human face image Network forming lattice model.
Optionally, described to be based on the initial projective geometry parameter, in the Initial Face structured grid model, determine Face key point corresponding with the two-dimension human face image, comprising:
If the initial projective geometry parameter is the initial projective geometry parameter determined for the first time in cyclic process, base Initial projective geometry parameter, default projective geometry parameter and the default weighted value determined for the first time in cyclic process, determines and adjusts Initial projective geometry parameter after whole, if the initial projective geometry parameter is not the initial of determination for the first time in cyclic process Projective geometry parameter, then initial projective geometry parameter, the last initial projection determined determined based on this in cyclic process Geometric parameter and default weighted value determine initial projective geometry parameter adjusted;
Based on the initial projective geometry parameter adjusted, in the Initial Face structured grid model, determine with The corresponding face key point of the two-dimension human face image.
Optionally, described to be based on the Initial Face structured grid parameter, determination matches with the two-dimension human face image Initial Face structured grid model, comprising:
Based on the Initial Face structured grid parameter, the corresponding average face Structure Network of the average face structured grid model Lattice parameter and default weighted value determine Initial Face structured grid parameter adjusted;
Based on the Initial Face structured grid parameter adjusted, the determining and two-dimension human face image matches first Beginning human face structure grid model;
It is described to be based on the intermediate face structured grid parameter, the determining go-between to match with the two-dimension human face image Face structured grid model, comprising:
If the intermediate face structured grid parameter is intermediate structure mesh parameter determining for the first time in cyclic process, Then based on the intermediate face structured grid parameter, Initial Face structured grid parameter and default power determined for the first time in cyclic process Weight values determine intermediate face structured grid parameter adjusted, if the intermediate face structured grid parameter is not circulated throughout The intermediate face structured grid parameter determined for the first time in journey, the then intermediate face Structure Network determined based on this in cyclic process Lattice parameter, the last intermediate face structured grid parameter determined and default weighted value, determine intermediate human face structure adjusted Mesh parameter;
It is determining to match with the two-dimension human face image based on the intermediate face structured grid parameter adjusted Between human face structure grid model.
Optionally, at least one of described preset loop stop conditions, including the following conditions:
Cycle-index reaches preset threshold;
The intermediate projective geometry parameter is less than preset threshold relative to the variable quantity of the initial projective geometry parameter;
The corresponding majorized function output valve of the intermediate projective geometry parameter is relative to the initial projective geometry parameter pair The variable quantity for the majorized function output valve answered is less than preset threshold.
Optionally, described to be based on the initial projective geometry parameter, in the Initial Face structured grid model, determine Face key point corresponding with the two-dimension human face image, comprising:
In the Initial Face structured grid model, the wheel of the vertex line composition between each target face vertex is determined Profile;
In the face key point of the Initial Face structured grid model, the target being located on the outside of the contour line is determined Face key point;
By the position of each target face key point, it is adjusted in target face vertex crucial with the target face Point is apart from nearest target face apex;
Face unadjusted in target face key point adjusted and the Initial Face structured grid model is crucial Point is determined as face key point corresponding with the two-dimension human face image in the Initial Face structured grid model.
According to the second aspect of an embodiment of the present disclosure, a kind of human face structure grid model is provided and establishes device, comprising:
Detection unit is configured as the face key point of detection two-dimension human face image;
Determination unit is configured as face key point and preset average face Structure Network based on the two-dimension human face image The face key point of lattice model determines the Initial Face structured grid model to match with the two-dimension human face image and initially penetrates Shadow geometric parameter;
Output unit is configured as based on the initial projective geometry parameter, in the Initial Face structured grid model In, determine corresponding with two-dimension human face image face key point, the face key point based on the two-dimension human face image with Face key point corresponding with the two-dimension human face image in the Initial Face structured grid model, determining and two-dimension human face figure As the output human face structure grid model to match.
Optionally, the output unit, is configured as:
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two dimension The corresponding face key point of facial image;
With described two in face key point and the Initial Face structured grid model based on the two-dimension human face image Tie up the corresponding face key point of facial image, the determining intermediate face structured grid model to match with the two-dimension human face image With intermediate projective geometry parameter;
Judge whether to meet preset loop stop conditions;
If meeting preset loop stop conditions, by the intermediate face structured grid model, be determined as with it is described The output human face structure grid model that two-dimension human face image matches;
It is in described by the Initial Face structured grid model modification if being unsatisfactory for preset loop stop conditions Between human face structure grid model, the initial projective geometry parameter is updated to the intermediate projective geometry parameter, goes to execution: Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two-dimension human face image Corresponding face key point.
Optionally, the determination unit, is configured as:
The face of face key point and preset average face structured grid model based on the two-dimension human face image is crucial Point determines Initial Face structured grid parameter and initial projective geometry parameter;
Based on the Initial Face structured grid parameter, the determining Initial Face knot to match with the two-dimension human face image Network forming lattice model;
In the face key point based on the two-dimension human face image and the Initial Face structured grid model with institute State the corresponding face key point of two-dimension human face image, the determining intermediate face structured grid to match with the two-dimension human face image Model and intermediate projective geometry parameter, comprising:
With described two in face key point and the Initial Face structured grid model based on the two-dimension human face image The corresponding face key point of facial image is tieed up, determines intermediate face structured grid parameter and intermediate projective geometry parameter;
Based on the intermediate face structured grid parameter, the determining intermediate face knot to match with the two-dimension human face image Network forming lattice model.
Optionally, the output unit, is configured as:
If the initial projective geometry parameter is the initial projective geometry parameter determined for the first time in cyclic process, base Initial projective geometry parameter, default projective geometry parameter and the default weighted value determined for the first time in cyclic process, determines and adjusts Initial projective geometry parameter after whole, if the initial projective geometry parameter is not the initial of determination for the first time in cyclic process Projective geometry parameter, then initial projective geometry parameter, the last initial projection determined determined based on this in cyclic process Geometric parameter and default weighted value determine initial projective geometry parameter adjusted;
Based on the initial projective geometry parameter adjusted, in the Initial Face structured grid model, determine with The corresponding face key point of the two-dimension human face image.
Optionally, the determination unit, is configured as:
Based on the Initial Face structured grid parameter, the corresponding average face Structure Network of the average face structured grid model Lattice parameter and default weighted value determine Initial Face structured grid parameter adjusted;
Based on the Initial Face structured grid parameter adjusted, the determining and two-dimension human face image matches first Beginning human face structure grid model;
If the intermediate face structured grid parameter is intermediate structure mesh parameter determining for the first time in cyclic process, Then based on the intermediate face structured grid parameter, Initial Face structured grid parameter and default power determined for the first time in cyclic process Weight values determine intermediate face structured grid parameter adjusted, if the intermediate face structured grid parameter is not circulated throughout The intermediate face structured grid parameter determined for the first time in journey, the then intermediate face Structure Network determined based on this in cyclic process Lattice parameter, the last intermediate face structured grid parameter determined and default weighted value, determine intermediate human face structure adjusted Mesh parameter;
It is determining to match with the two-dimension human face image based on the intermediate face structured grid parameter adjusted Between human face structure grid model.
Optionally, at least one of described preset loop stop conditions, including the following conditions:
Cycle-index reaches preset threshold;
The intermediate projective geometry parameter is less than preset threshold relative to the variable quantity of the initial projective geometry parameter;
The corresponding majorized function output valve of the intermediate projective geometry parameter is relative to the initial projective geometry parameter pair The variable quantity for the majorized function output valve answered is less than preset threshold.
Optionally, the determination unit, is configured as:
In the Initial Face structured grid model, the wheel of the vertex line composition between each target face vertex is determined Profile;
In the face key point of the Initial Face structured grid model, the target being located on the outside of the contour line is determined Face key point;
By the position of each target face key point, it is adjusted in target face vertex crucial with the target face Point is apart from nearest target face apex;
Face unadjusted in target face key point adjusted and the Initial Face structured grid model is crucial Point is determined as face key point corresponding with the two-dimension human face image in the Initial Face structured grid model.
According to the third aspect of an embodiment of the present disclosure, a kind of electronic equipment is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Detect the face key point of two-dimension human face image;
The face of face key point and preset average face structured grid model based on the two-dimension human face image is crucial Point, the determining Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two dimension The corresponding face key point of facial image, face key point and the Initial Face Structure Network based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in lattice model, the determining output face to match with two-dimension human face image Structured grid model.
According to a fourth aspect of embodiments of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, when described When instruction in storage medium is executed by the processor of electronic equipment, so that electronic equipment is able to carry out a kind of human face structure grid Method for establishing model, which comprises
Detect the face key point of two-dimension human face image;
The face of face key point and preset average face structured grid model based on the two-dimension human face image is crucial Point, the determining Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two dimension The corresponding face key point of facial image, face key point and the Initial Face Structure Network based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in lattice model, the determining output face to match with two-dimension human face image Structured grid model.
According to a fifth aspect of the embodiments of the present disclosure, a kind of application program is provided, when application program terminal at runtime, So that electronic equipment executes a kind of human face structure grid model method for building up, which comprises
Detect the face key point of two-dimension human face image;
The face of face key point and preset average face structured grid model based on the two-dimension human face image is crucial Point, the determining Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two dimension The corresponding face key point of facial image, face key point and the Initial Face Structure Network based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in lattice model, the determining output face to match with two-dimension human face image Structured grid model.
The technical scheme provided by this disclosed embodiment can include the following benefits: detect one got first The face key point of two-dimension human face image, then the face key point based on the two-dimension human face image and preset average face Structure Network The face key point of lattice model, can determine the Initial Face structured grid model to match with the two-dimension human face image and just Beginning projective geometry parameter.It is then based on the initial projective geometry parameter determined, it can be in Initial Face works grid model In, determine key point corresponding with the two-dimension human face image obtained, finally based on these in Initial Face structured grid model, It determines the key point in key point corresponding with the two-dimension human face image obtained and two-dimension human face image, that is, can determine that and two dimension The output human face structure grid model that facial image matches.In this way can a two-dimension human face image based on acquisition, To determine the output human face structure grid model to match with the two-dimension human face image, without being marked to image picking-up apparatus Fixed, complexity is lower.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention Example, and be used to explain the principle of the present invention together with specification.
It is used to explain the principle of the present invention together with specification.
Fig. 1 is a kind of flow chart of human face structure grid model method for building up shown according to an exemplary embodiment.
Fig. 2 is a kind of schematic diagram of human face structure grid model shown according to an exemplary embodiment.
Fig. 3 is a kind of schematic diagram of human face structure grid model shown according to an exemplary embodiment.
Fig. 4 is a kind of flow chart of human face structure grid model method for building up shown according to an exemplary embodiment.
Fig. 5 is the block diagram that a kind of human face structure grid model shown according to an exemplary embodiment establishes device.
Fig. 6 is the structural block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Fig. 7 is the structural block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended The example of device and method being described in detail in claims, some aspects of the invention are consistent.
The exemplary embodiment of the disclosure provides a kind of human face structure grid model method for building up, and this method can be by electricity Sub- equipment is realized.Electronic equipment can be the terminals such as mobile phone, desktop computer, be also possible to server.Electronic equipment can pass through bat It takes the photograph or the modes such as network transmission obtains two-dimension human face image, for example, mobile phone self-timer or shooting net cast etc..The disclosure provides Method can to terminal obtain single two-dimensional facial image establish human face structure grid model.And then terminal can be based on people Face structured grid model carries out change face processing or identification processing etc..The embodiment of the present disclosure by taking the application scenarios changed face as an example into Row scheme elaborates, and other situations are similar therewith, and the present embodiment is not repeating.
Fig. 1 is a kind of flow chart of method for establishing human face structure grid model shown according to an exemplary embodiment, As shown in Figure 1, human face structure grid model method for building up is for including the following steps in terminal.
In step s101, the face key point of two-dimension human face image is detected.
In an implementation, user uses the terminal with camera function to carry out self-timer or shoot other people, and terminal can obtain The two dimensional image shot to user, then carries out recognition of face to the two dimensional image, this is carried out used in recognition of face Face recognition algorithms can be the face recognition algorithms based on deep learning, face recognition algorithms based on model etc..First eventually End is detected with the presence or absence of face in this two dimensional image, and detects face location, i.e., in the two dimensional image, determines one A includes the rectangle frame of face, and the two dimensional image in the rectangle frame can be called two-dimension human face image.Then again to determining The two-dimension human face image carry out face critical point detection, wherein face key point is prespecified to be able to reflect face The point of some organ characteristics, such as left inside canthus point, right corners of the mouth point, prenasale.The face key point that will test out again is remembered Record, M=[M1, M2……Mn], wherein each face key point has a number, number 1 is right respectively according to certain sequence to n A face key point is answered, then n is key point number, and the numerical value of n is by the pre-set face to be detected of face recognition algorithms The number of key point determines that common n can be 68,83,101 etc., MnIndicate that the two dimension for the face key point that number is n is sat Mark (xn, yn)。
In step s 102, the face key point based on two-dimension human face image and preset average face structured grid model Face key point, the determining Initial Face structured grid model to match with two-dimension human face image and initial projective geometry parameter.
Wherein, preset average face structured grid model is three-dimensional face model as shown in Figure 2, average face structured grid Model is the human face structure grid that is able to reflect Generic face feature of the technical staff based on public human face structure feature production Model, many of average face structured grid model face vertex, there are its respective number and three-dimensional coordinate in each face vertex. When making average face structured grid model, average face structured grid model face key point can be set, each face closes Key point can be one in face vertex.The face key point number and number of average face structured grid model, with above-mentioned people The face key point number for the two-dimension human face image that face identification is determined is identical with number.And Initial Face structured grid model Face number of vertices is identical as the face number of vertices of average face structured grid model, Initial Face structured grid model face Vertex number is identical as the face vertex number of average face structured grid model, the face vertex of Initial Face structured grid model Coordinate it is different from the coordinate on face vertex of average face structured grid model.Initial projective geometry parameter be include rotation ginseng One matrix of number, translation parameters, zooming parameter etc..
Optionally, it determines that the processing of initial projective geometry parameter and Initial Face structured grid model can be such that be based on The face key point of the face key point of two-dimension human face image and preset average face structured grid model, determines Initial Face knot Structure mesh parameter and initial projective geometry parameter;Based on Initial Face structured grid parameter, determination and two-dimension human face image phase The Initial Face structured grid model matched.
Wherein, Initial Face structured grid parameter is the set for including the faces property parameters such as gender, fat or thin, the colour of skin, Here face character parameter is indicated with degree value.
In an implementation, technical staff can pre-establish a face structured grid model library, the face structured grid mould Many of type human face structure grid model, each face structured grid model are corresponding with a face structured grid parameter, people Face structured grid parameter reflects the face character feature of its corresponding human face structure grid model, if it is desired to obtain face category Human face structure mesh parameter between the face character feature for the face wire frame model that property feature has built up between two, can be with It is realized by way of interpolation.
In the present exemplary embodiment, optimal method can be used, to determine Initial Face structured grid parameter and initial Projective geometry parameter, specific majorized function are as follows:
|B·F(I1, A) and-M1|xy+|B·F(I2, A) and-M2|xy+……|B·F(I1, A) and-Mn|xy=θ, wherein B is to true Fixed initial projective geometry parameter, F (I1, A) and arrive F (In, A) and it is that Initial Face structured grid parameter to be determined is corresponding initial Face key point I in human face structure grid model1To InThree-dimensional coordinate, A is that Initial Face structured grid to be determined is joined Number, M1To MnFor the two-dimensional coordinate of the face key point in two-dimension human face image, θ is majorized function output valve, when θ reaches minimum When, that is, the position of the face key point of two-dimension human face image and the face key point in human face structure grid model are mapped to two It is minimum after position difference summation after dimensional plane, it is determined that when θ minimum, corresponding B is initial projective geometry parameter, corresponding A For Initial Face structured grid parameter, then the Initial Face structured grid parameter determined is updated to the face knot pre-established In network forming lattice model library, Initial Face structured grid model corresponding with the Initial Face structured grid parameter can be obtained. It should be noted that the function needs to carry out each parameter in function before being calculated assignment, B is unit matrix B0, A is The corresponding average face structured grid parameter A of average face structured grid model0, then F (I1, A) and arrive F (In, A) and it is preset average face The face key point of structured grid model.
Optionally, Initial Face structured grid parameter, the determining Initial Face to match with two-dimension human face image are being based on When structured grid model, first the Initial Face structured grid parameter can be adjusted, correspondingly, can be located as follows Reason: it based on Initial Face structured grid parameter, the corresponding average face structured grid parameter of average face structured grid model and presets Weighted value determines Initial Face structured grid parameter adjusted, is based on Initial Face structured grid parameter adjusted, determines The Initial Face structured grid model to match with two-dimension human face image.
In an implementation, Initial Face structured grid parameter A, the corresponding average face structure of average face structured grid model are based on Mesh parameter A0With default weighted value r, Initial Face structured grid parameter is adjusted, i.e. A '=Ar+A0(1-r), In, A ' is Initial Face structured grid parameter adjusted.Being weighted adjustment to Initial Face structured grid parameter in this way can So that the Initial Face structured grid parameter determined is not too large relative to the variation of average face structured grid parameter, so i.e. Make Initial Face structured grid of the accurate Initial Face structured grid parameter before average face structured grid parameter and adjustment Between parameter, Initial Face structured grid parameter adjusted also can be closer to the accurate Initial Face structured grid parameter. Then, Initial Face structured grid parameter adjusted is updated in the human face structure grid model library pre-established, To obtain Initial Face structured grid model corresponding with the Initial Face structured grid parameter adjusted.
In step s 103, it is based on initial projective geometry parameter, in Initial Face structured grid model, determining and two dimension The corresponding face key point of facial image.
Optionally, which determines that face key point corresponding with two-dimension human face image can be handled as follows: first In beginning human face structure grid model, the contour line of the vertex line composition between each target face vertex is determined;In Initial Face In the face key point of structured grid model, the target face key point being located on the outside of contour line is determined;By each target face The position of key point is adjusted in target face vertex with target face key point apart from nearest target face apex;It will Unadjusted face key point in target face key point adjusted and Initial Face structured grid model, is determined as initial people Face key point corresponding with the two-dimension human face image in face structured grid model.
In an implementation, by all face vertex in the Initial Face structured grid model of above-mentioned determination, according to determining Initial projective geometry parameter, projection carries out line to two-dimensional surface, then to the point in two-dimensional surface, for example, if vertex 1 is first It is connected respectively with face vertex 2, face vertex 5 in beginning structured grid model, then, the point in 1 projection to two-dimensional surface of vertex Also to be connected respectively with the point in 2 projection to two-dimensional surface of face vertex, the point in 5 projection to two-dimensional surface of face vertex, i.e., A two-dimension human face grid image is obtained, by the number on the target face vertex on the contour line of the two-dimension human face grid image It is recorded.In Initial Face structured grid model, the position of the representative points of record number is determined, and determine each mesh The contour line for marking the vertex line composition between face vertex needs as shown in figure 3, the curve of black overstriking is expressed as contour line To illustrate that the curve of black overstriking herein is only used as iconicity representation, in practice and there is no the black overstrikings Curve.In the face key point of the Initial Face structured grid model, there is Partial key point that can be located on the outside of the contour line, really The key point being positioned on the outside of contour line is target face key point.By the position of determining each target face key point, adjust With it apart from nearest target face apex in the whole target face vertex on the contour line.Finally, by mesh adjusted Unadjusted face key point in face key point and the Initial Face structured grid model is marked, the Initial Face structure is determined as Face key point corresponding with two-dimension human face image in grid model.
Optionally, it is being based on initial projective geometry parameter, in Initial Face structured grid model, determining and two-dimension human face When the corresponding face key point of image, first initial projective geometry parameter can be adjusted, correspondingly, can be located as follows Reason: based on initial projective geometry parameter, default projective geometry parameter and default weighted value, initial projective geometry adjusted is determined Parameter is based on initial projective geometry parameter adjusted, in Initial Face structured grid model, determining and two-dimension human face image Corresponding face key point.
In an implementation, based on initial projective geometry parameter B, default projective geometry parameter B0With default weighted value r, to initial Projective geometry parameter is adjusted, i.e. B '=Br+B0(1-r), wherein the value range of default weighted value r 0 to 1 it Between, B ' is initial projective geometry parameter adjusted.Being weighted adjustment to initial projective geometry parameter in this way can make to determine Initial projective geometry parameter out is not too large relative to the variation of default projective geometry parameter, accordingly even when accurately initially penetrating Shadow geometric parameter is between the initial projective geometry parameter before default projective geometry parameter and adjustment, initial projection adjusted Geometric parameter also can be closer to the accurate initial projective geometry parameter.Then true using initial projective geometry parameter adjusted Fixed face key point corresponding with two-dimension human face image, the specific method for determining face key point is same as described above, does not do herein It repeats.
In step S104, with two in face key point and Initial Face structured grid model based on two-dimension human face image Tie up the corresponding face key point of facial image, the determining output human face structure grid model to match with two-dimension human face image.
In an implementation, by face key point corresponding with two-dimension human face image in determining Initial Face structured grid model It is updated in the function of above-mentioned optimal method with the face key point of two-dimension human face image:
|B·F(I1, A) and-M1|xy+|B·F(I2, A) and-M2|xy+……|B·F(I1, A) and-Mn|xy=θ, wherein B is to true The fixed corresponding projective geometry parameter of output human face structure grid model, F (I1, A) and arrive F (In, A) and it is output face to be determined Face key point I in structured grid model1To InThree-dimensional coordinate, A is that output human face structure grid model to be determined is corresponding Human face structure mesh parameter, M1To MnFor the two-dimensional coordinate of the face key point in two-dimension human face image, θ is that majorized function is defeated It is worth out, when θ reaches minimum, that is, the position of the face key point of two-dimension human face image and the people in human face structure grid model Face key point is mapped to minimum after the summation of the position difference after two-dimensional surface, it is determined that when θ minimum, corresponding A is to be determined defeated The corresponding human face structure mesh parameter of human face structure grid model out, then the human face structure mesh parameter determined is updated to pre- In the human face structure grid model library first established, it can be obtained from the face structured grid model library and two-dimension human face image The output human face structure grid model to match.
User can select texture of the pre-designed face graph as the face wire frame model in the terminal, should Each vertex correspondence of human face structure grid model has a 2 d texture coordinate, which answers one in texture It is corresponding thus can be added to the face structured grid model according to 2 d texture coordinate by a position for pixel in texture On vertex, just there is corresponding texture on the vertex of the face structured grid model in this way, then will be added to the face of texture The face graph to match with facial image can be obtained to two-dimensional surface in structured grid model projection, then by the types of facial makeup in Beijing operas Scheme to be overlapped with the facial image of user, face graph will thus be shown in the display screen of terminal to people on upper layer Face changes the effect of the types of facial makeup in Beijing operas.
Fig. 4 is a kind of flow chart of human face structure grid model method for building up shown according to an exemplary embodiment, such as Shown in Fig. 4, human face structure grid model method for building up is for including the following steps in terminal.
Step S401 detects the face key point of two-dimension human face image.
Step S402, the face of face key point and preset average face structured grid model based on two-dimension human face image Key point, the determining Initial Face structured grid model to match with two-dimension human face image and initial projective geometry parameter.
Optionally, it determines that the processing of initial projective geometry parameter and Initial Face structured grid model can be such that be based on The face key point of the face key point of two-dimension human face image and preset average face structured grid model, determines Initial Face knot Structure mesh parameter and initial projective geometry parameter;Based on Initial Face structured grid parameter, determination and two-dimension human face image phase The Initial Face structured grid model matched.
Optionally, Initial Face structured grid parameter, the determining Initial Face to match with two-dimension human face image are being based on When structured grid model, first the Initial Face structured grid parameter can be adjusted, correspondingly, can be located as follows Reason: it based on Initial Face structured grid parameter, the corresponding average face structured grid parameter of average face structured grid model and presets Weighted value determines Initial Face structured grid parameter adjusted;Based on Initial Face structured grid parameter adjusted, determine The Initial Face structured grid model to match with two-dimension human face image.
Step S403 is based on initial projective geometry parameter, in Initial Face structured grid model, determining and two-dimension human face The corresponding face key point of image.
Optionally, it is being based on initial projective geometry parameter, in Initial Face structured grid model, determining and two-dimension human face When the corresponding face key point of image, first determining initial projective geometry parameter can be adjusted, correspondingly, can carry out Following processing: it if initial projective geometry parameter is the initial projective geometry parameter determined for the first time in cyclic process, is based on Initial projective geometry parameter, default projective geometry parameter and the default weighted value determined for the first time in cyclic process, determines adjustment Initial projective geometry parameter afterwards, if the initial projective geometry parameter is not the initial projection determined for the first time in cyclic process Geometric parameter, then initial projective geometry parameter, the last initial projective geometry determined determined based on this in cyclic process Parameter and default weighted value determine initial projective geometry parameter adjusted, based on the initial projective geometry ginseng adjusted Number determines face key point corresponding with the two-dimension human face image in Initial Face structured grid model.
Step S404, in face key point and the Initial Face structured grid model based on two-dimension human face image with institute State the corresponding face key point of two-dimension human face image, the determining intermediate face structured grid to match with the two-dimension human face image Model and intermediate projective geometry parameter.
Optionally, the determining intermediate face structured grid model to match with two-dimension human face image and intermediate projective geometry are joined Several processing can be such that in face key point and Initial Face structured grid model based on two-dimension human face image with two-dimentional people The corresponding face key point of face image determines intermediate face structured grid parameter and intermediate projective geometry parameter;Based on go-between Face structured grid parameter, the determining intermediate face structured grid model to match with two-dimension human face image.
In an implementation, optimal method can be used, to determine intermediate face structured grid parameter and intermediate projective geometry Parameter, specific implementation function are as follows:
|B·F(I1, A) and-M1|xy+|B·F(I2, A) and-M2|xy+……|B·F(I1, A) and-Mn|xy=θ, wherein B is to true Fixed intermediate projective geometry parameter, F (I1, A) and arrive F (In, A) and it is the corresponding centre of intermediate face structured grid parameter to be determined Face key point I in human face structure grid model1To InThree-dimensional coordinate, A is intermediate face structured grid ginseng to be determined Number, M1To MnFor the two-dimensional coordinate of the face key point in two-dimension human face image, θ is majorized function output valve, when θ reaches minimum When, that is, the face in the position of the face key point of two-dimension human face image and intermediate face structured grid model to be determined is crucial It puts minimum after the position difference after being mapped to two-dimensional surface is summed, it is determined that when θ minimum, corresponding B is intermediate projective geometry ginseng Number, corresponding A is intermediate face structured grid parameter, then the intermediate face structured grid parameter determined is updated to and is built in advance In vertical human face structure grid model library, intermediate human face structure corresponding with the intermediate face structured grid parameter can be obtained Grid model.
Optionally, intermediate face structured grid parameter, the determining intermediate face to match with two-dimension human face image are being based on When structured grid model, first intermediate human face structure mesh parameter can be adjusted, correspondingly, can be handled as follows: If the intermediate face structured grid parameter is intermediate structure mesh parameter determining for the first time in cyclic process, it is based on following Intermediate face structured grid parameter, Initial Face structured grid parameter and the default weighted value determined for the first time during ring, really Fixed intermediate face structured grid parameter adjusted, if the intermediate face structured grid parameter is not first in cyclic process The intermediate face structured grid parameter of secondary determination, then based in cyclic process this determine intermediate face structured grid parameter, The intermediate face structured grid parameter and default weighted value that last time determines determine intermediate face structured grid ginseng adjusted Number, then determine the corresponding Initial Face structured grid model of intermediate face structured grid parameter adjusted.
Step S405 judges that the corresponding majorized function output valve of intermediate projective geometry parameter is joined relative to initial projective geometry Whether the variable quantity of the corresponding majorized function output valve of number is less than preset threshold.If the corresponding optimization of centre projective geometry parameter Function-output is less than preset threshold relative to the variable quantity of the corresponding majorized function output valve of initial projective geometry parameter, then holds Row step S407;If projective geometry parameter corresponding majorized function output valve in centre is corresponding relative to initial projective geometry parameter Majorized function output valve variable quantity be not less than preset threshold, then by Initial Face structured grid model modification be the go-between Initial projective geometry parameter is updated to the intermediate projective geometry parameter by face structured grid model, then is gone to and executed step S404.
Intermediate face structured grid model is determined as the output face to match with two-dimension human face image by step S406 Structured grid model.
The Rule of judgment terminated in above-mentioned steps for circulation can also be that cycle-index reaches preset threshold, intermediate projection Geometric parameter is less than preset threshold etc. relative to the variable quantity of the initial projective geometry parameter.
In addition, it is necessary to which what is illustrated is the specific processing method of exemplary embodiment shown in Fig. 4, with example shown in FIG. 1 The specific processing method of correlation step is identical in property embodiment, and this will not be repeated here.
Fig. 5 is the device block diagram that a kind of human face structure grid model shown according to an exemplary embodiment is established.Reference Fig. 5, the device include detection unit 501, determination unit 502 and output unit 503.
Detection unit 501 is configured as the face key point of detection two-dimension human face image;
Determination unit 502 is configured as face key point and preset average face knot based on the two-dimension human face image The face key point of network forming lattice model, the determining Initial Face structured grid model to match with the two-dimension human face image and first Beginning projective geometry parameter;
Output unit 503 is configured as based on the initial projective geometry parameter, in the Initial Face structured grid mould In type, face key point corresponding with the two-dimension human face image, the face key point based on the two-dimension human face image are determined With face key point corresponding with the two-dimension human face image in the Initial Face structured grid model, determining and two-dimension human face The output human face structure grid model that image matches.
Optionally, the output unit 503, is configured as:
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two dimension The corresponding face key point of facial image;
With described two in face key point and the Initial Face structured grid model based on the two-dimension human face image Tie up the corresponding face key point of facial image, the determining intermediate face structured grid model to match with the two-dimension human face image With intermediate projective geometry parameter;
Judge whether to meet preset loop stop conditions;
If meeting preset loop stop conditions, by the intermediate face structured grid model, be determined as with it is described The output human face structure grid model that two-dimension human face image matches;
It is in described by the Initial Face structured grid model modification if being unsatisfactory for preset loop stop conditions Between human face structure grid model, the initial projective geometry parameter is updated to the intermediate projective geometry parameter, goes to execution: Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two-dimension human face image Corresponding face key point.
Optionally, the determination unit 502, is configured as:
The face of face key point and preset average face structured grid model based on the two-dimension human face image is crucial Point determines Initial Face structured grid parameter and initial projective geometry parameter;
Based on the Initial Face structured grid parameter, the determining Initial Face knot to match with the two-dimension human face image Network forming lattice model;
In the face key point based on the two-dimension human face image and the Initial Face structured grid model with institute State the corresponding face key point of two-dimension human face image, the determining intermediate face structured grid to match with the two-dimension human face image Model and intermediate projective geometry parameter, comprising:
With described two in face key point and the Initial Face structured grid model based on the two-dimension human face image The corresponding face key point of facial image is tieed up, determines intermediate face structured grid parameter and intermediate projective geometry parameter;
Based on the intermediate face structured grid parameter, the determining intermediate face knot to match with the two-dimension human face image Network forming lattice model.
Optionally, the output unit 503, is configured as:
If the initial projective geometry parameter is the initial projective geometry parameter determined for the first time in cyclic process, base Initial projective geometry parameter, default projective geometry parameter and the default weighted value determined for the first time in cyclic process, determines and adjusts Initial projective geometry parameter after whole, if the initial projective geometry parameter is not the initial of determination for the first time in cyclic process Projective geometry parameter, then initial projective geometry parameter, the last initial projection determined determined based on this in cyclic process Geometric parameter and default weighted value determine initial projective geometry parameter adjusted;
Based on the initial projective geometry parameter adjusted, in the Initial Face structured grid model, determine with The corresponding face key point of the two-dimension human face image.
Optionally, the determination unit 502, is configured as:
Based on the Initial Face structured grid parameter, the corresponding average face Structure Network of the average face structured grid model Lattice parameter and default weighted value determine Initial Face structured grid parameter adjusted;
Based on the Initial Face structured grid parameter adjusted, the determining and two-dimension human face image matches first Beginning human face structure grid model;
If the intermediate face structured grid parameter is intermediate structure mesh parameter determining for the first time in cyclic process, Then based on the intermediate face structured grid parameter, Initial Face structured grid parameter and default power determined for the first time in cyclic process Weight values determine intermediate face structured grid parameter adjusted, if the intermediate face structured grid parameter is not circulated throughout The intermediate face structured grid parameter determined for the first time in journey, the then intermediate face Structure Network determined based on this in cyclic process Lattice parameter, the last intermediate face structured grid parameter determined and default weighted value, determine intermediate human face structure adjusted Mesh parameter;
It is determining to match with the two-dimension human face image based on the intermediate face structured grid parameter adjusted Between human face structure grid model.
Optionally, at least one of described preset loop stop conditions, including the following conditions:
Cycle-index reaches preset threshold;
The intermediate projective geometry parameter is less than preset threshold relative to the variable quantity of the initial projective geometry parameter;
The corresponding majorized function output valve of the intermediate projective geometry parameter is relative to the initial projective geometry parameter pair The variable quantity for the majorized function output valve answered is less than preset threshold.
Optionally, the determination unit 502, is configured as:
In the Initial Face structured grid model, the wheel of the vertex line composition between each target face vertex is determined Profile;
In the face key point of the Initial Face structured grid model, the target being located on the outside of the contour line is determined Face key point;
By the position of each target face key point, it is adjusted in target face vertex crucial with the target face Point is apart from nearest target face apex;
Face unadjusted in target face key point adjusted and the Initial Face structured grid model is crucial Point is determined as face key point corresponding with the two-dimension human face image in the Initial Face structured grid model.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 6 is the structural block diagram of a kind of electronic equipment shown according to an exemplary embodiment.Electronic equipment can be end End 600, such as: smart phone, tablet computer.Terminal 600 is also possible to referred to as other names such as user equipment, portable terminal Claim.
In general, terminal 600 includes: processor 601 and memory 602.
Processor 601 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 601 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 601 also may include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.? In some embodiments, processor 601 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 601 can also be wrapped AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning Calculating operation.
Memory 602 may include one or more computer readable storage mediums, which can To be tangible and non-transient.Memory 602 may also include high-speed random access memory and nonvolatile memory, Such as one or more disk storage equipments, flash memory device.In some embodiments, non-transient in memory 602 Computer readable storage medium for storing at least one instruction, at least one instruction for performed by processor 601 with Realize human face structure grid model method for building up provided herein.
In some embodiments, terminal 600 is also optional includes: peripheral device interface 603 and at least one peripheral equipment. Specifically, peripheral equipment includes: radio circuit 604, touch display screen 605, camera 606, voicefrequency circuit 607, positioning component At least one of 608 and power supply 609.
Peripheral device interface 603 can be used for I/O (Input/Output, input/output) is relevant outside at least one Peripheral equipment is connected to processor 601 and memory 602.In some embodiments, processor 601, memory 602 and peripheral equipment Interface 603 is integrated on same chip or circuit board;In some other embodiments, processor 601, memory 602 and outer Any one or two in peripheral equipment interface 603 can realize on individual chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 604 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates Frequency circuit 604 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 604 turns electric signal It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 604 wraps It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 604 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but is not limited to: WWW, Metropolitan Area Network (MAN), Intranet, each third generation mobile communication network (2G, 3G, 4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, it penetrates Frequency circuit 604 can also include NFC (Near Field Communication, wireless near field communication) related circuit, this Application is not limited this.
Touch display screen 605 is for showing UI (User Interface, user interface).The UI may include figure, text Sheet, icon, video and its their any combination.Touch display screen 605 also have acquisition touch display screen 605 surface or The ability of the touch signal of surface.The touch signal can be used as control signal and be input to processor 601 and be handled.Touching Display screen 605 is touched for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or soft keyboard.In some embodiments In, touch display screen 605 can be one, and the front panel of terminal 600 is arranged;In further embodiments, touch display screen 605 It can be at least two, be separately positioned on the different surfaces of terminal 600 or in foldover design;In still other embodiments, touch Display screen 605 can be flexible display screen, be arranged on the curved surface of terminal 600 or on fold plane.Even, touch display screen 605 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Touch display screen 605 can use LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) Etc. materials preparation.
CCD camera assembly 606 is for acquiring image or video.Optionally, CCD camera assembly 606 include front camera and Rear camera.In general, front camera is for realizing video calling or self-timer, rear camera is for realizing photo or video Shooting.In some embodiments, rear camera at least two are main camera, depth of field camera, wide-angle imaging respectively Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle Pan-shot and VR (Virtual Reality, virtual reality) shooting function are realized in camera fusion.In some embodiments In, CCD camera assembly 606 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, be also possible to double-colored temperature flash of light Lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for the light compensation under different-colour.
Voicefrequency circuit 607 is used to provide the audio interface between user and terminal 600.Voicefrequency circuit 607 may include wheat Gram wind and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and converts sound waves into electric signal and be input to processor 601 are handled, or are input to radio circuit 604 to realize voice communication.For stereo acquisition or the purpose of noise reduction, wheat Gram wind can be it is multiple, be separately positioned on the different parts of terminal 600.Microphone can also be array microphone or omnidirectional's acquisition Type microphone.Loudspeaker is then used to that sound wave will to be converted to from the electric signal of processor 601 or radio circuit 604.Loudspeaker can To be traditional wafer speaker, it is also possible to piezoelectric ceramic loudspeaker.When loudspeaker is piezoelectric ceramic loudspeaker, not only may be used To convert electrical signals to the audible sound wave of the mankind, the sound wave that the mankind do not hear can also be converted electrical signals to survey Away from etc. purposes.In some embodiments, voicefrequency circuit 607 can also include earphone jack.
Positioning component 608 is used for the current geographic position of positioning terminal 600, to realize navigation or LBS (Location Based Service, location based service).Positioning component 608 can be the GPS (Global based on the U.S. Positioning System, global positioning system), China dipper system or Russia Galileo system positioning group Part.
Power supply 609 is used to be powered for the various components in terminal 600.Power supply 609 can be alternating current, direct current, Disposable battery or rechargeable battery.When power supply 609 includes rechargeable battery, which can be wired charging electricity Pond or wireless charging battery.Wired charging battery is the battery to be charged by Wireline, and wireless charging battery is by wireless The battery of coil charges.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 600 further includes having one or more sensors 610.The one or more sensors 610 include but is not limited to: acceleration transducer 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, Optical sensor 615 and proximity sensor 616.
The acceleration that acceleration transducer 611 can detecte in three reference axis of the coordinate system established with terminal 600 is big It is small.For example, acceleration transducer 611 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 601 can With the acceleration of gravity signal acquired according to acceleration transducer 611, touch display screen 605 is controlled with transverse views or longitudinal view Figure carries out the display of user interface.Acceleration transducer 611 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 612 can detecte body direction and the rotational angle of terminal 600, and gyro sensor 612 can To cooperate with acquisition user to act the 3D of terminal 600 with acceleration transducer 611.Processor 601 is according to gyro sensor 612 Following function may be implemented in the data of acquisition: when action induction (for example changing UI according to the tilt operation of user), shooting Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 605 in terminal 600 can be set in pressure sensor 613.Work as pressure When the side frame of terminal 600 is arranged in sensor 613, it can detecte user to the gripping signal of terminal 600, believed according to the gripping Number carry out right-hand man's identification or prompt operation.When the lower layer of touch display screen 605 is arranged in pressure sensor 613, Ke Yigen According to user to the pressure operation of touch display screen 605, realization controls the operability control on the interface UI.Operability Control includes at least one of button control, scroll bar control, icon control, menu control.
Fingerprint sensor 614 is used to acquire the fingerprint of user, according to the identity of collected fingerprint recognition user.Knowing Not Chu the identity of user when being trusted identity, authorize the user to execute relevant sensitive operation, the sensitive operation by processor 601 Including solution lock screen, check encryption information, downloading software, payment and change setting etc..End can be set in fingerprint sensor 614 Front, the back side or the side at end 600.When being provided with physical button or manufacturer Logo in terminal 600, fingerprint sensor 614 can To be integrated with physical button or manufacturer Logo.
Optical sensor 615 is for acquiring ambient light intensity.In one embodiment, processor 601 can be according to optics The ambient light intensity that sensor 615 acquires controls the display brightness of touch display screen 605.Specifically, when ambient light intensity is higher When, the display brightness of touch display screen 605 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 605 is bright Degree.In another embodiment, the ambient light intensity that processor 601 can also be acquired according to optical sensor 615, dynamic adjust The acquisition parameters of CCD camera assembly 606.
Proximity sensor 616, also referred to as range sensor are generally arranged at the front of terminal 600.Proximity sensor 616 is used In the distance between the front of acquisition user and terminal 600.In one embodiment, when proximity sensor 616 detects user When the distance between front of terminal 600 gradually becomes smaller, touch display screen 605 is controlled by processor 601 and is cut from bright screen state It is changed to breath screen state;When proximity sensor 616 detects user and the distance between the front of terminal 600 becomes larger, by Processor 601 controls touch display screen 605 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of structure shown in Fig. 6 not structure paired terminal 600, can wrap It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
Fig. 7 is the structural block diagram of another electronic equipment shown according to an exemplary embodiment, which can be with It is server 700, it may include one or one that server 700, which can generate bigger difference because configuration or performance are different, The above processor (central processing units, CPU) 701 and one or more memory 702, wherein Be stored at least one instruction in the memory 702, at least one instruction loaded by the processor 701 and executed with Realize above-mentioned human face structure grid model method for building up, method includes: to detect the face key point of two-dimension human face image;Based on institute The face key point of two-dimension human face image and the face key point of preset average face structured grid model are stated, is determined and described two The Initial Face structured grid model and initial projective geometry parameter that dimension facial image matches;Based on the initial projective geometry Parameter determines face key point corresponding with the two-dimension human face image, is based in the Initial Face structured grid model In the face key point of the two-dimension human face image and the Initial Face structured grid model with the two-dimension human face image pair The face key point answered, the determining output human face structure grid model to match with two-dimension human face image.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory of instruction, above-metioned instruction can be executed by the processor of above-mentioned electronic equipment to complete above-mentioned human face structure grid Method for establishing model, method include: to detect the face key point of two-dimension human face image;Face based on the two-dimension human face image The face key point of key point and preset average face structured grid model, the determining and two-dimension human face image match first Beginning human face structure grid model and initial projective geometry parameter;Based on the initial projective geometry parameter, in the Initial Face In structured grid model, face key point corresponding with the two-dimension human face image is determined, based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in face key point and the Initial Face structured grid model determines The output human face structure grid model to match with two-dimension human face image.For example, non-transitorycomputer readable storage medium can To be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
In the exemplary embodiment, a kind of application program, including one or more instruction are additionally provided, this one or more Instruction can be executed by the processor of above-mentioned electronic equipment, to complete above-mentioned human face structure grid model method for building up, this method It include: the face key point for detecting two-dimension human face image;Face key point based on the two-dimension human face image and preset flat The face key point of equal face structured grid model, the determining Initial Face structured grid mould to match with the two-dimension human face image Type and initial projective geometry parameter;Based on the initial projective geometry parameter, in the Initial Face structured grid model, really Fixed face key point corresponding with the two-dimension human face image, face key point based on the two-dimension human face image and it is described at the beginning of Face key point corresponding with the two-dimension human face image in beginning human face structure grid model, determination and two-dimension human face image phase The output human face structure grid model matched.Optionally, above-metioned instruction can also be executed by the processor of above-mentioned electronic equipment with complete At other steps involved in the above exemplary embodiments.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are wanted by right It asks and points out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.

Claims (10)

1. a kind of human face structure grid model method for building up characterized by comprising
Detect the face key point of two-dimension human face image;
The face key point of face key point and preset average face structured grid model based on the two-dimension human face image, really The fixed Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two-dimension human face The corresponding face key point of image, face key point and the Initial Face structured grid mould based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in type, the determining output human face structure to match with two-dimension human face image Grid model.
2. human face structure grid model method for building up according to claim 1, which is characterized in that described based on described initial Projective geometry parameter determines that face corresponding with the two-dimension human face image closes in the Initial Face structured grid model Key point, in face key point and the Initial Face structured grid model based on the two-dimension human face image with the two-dimentional people The corresponding face key point of face image, the determining output human face structure grid model to match with the two-dimension human face image, packet It includes:
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two-dimension human face The corresponding face key point of image;
In face key point and the Initial Face structured grid model based on the two-dimension human face image with the two-dimentional people The corresponding face key point of face image, the determining intermediate face structured grid model to match with the two-dimension human face image and in Between projective geometry parameter;
Judge whether to meet preset loop stop conditions;
If meeting preset loop stop conditions, the intermediate face structured grid model is determined as and the two dimension The output human face structure grid model that facial image matches;
It is the go-between by the Initial Face structured grid model modification if being unsatisfactory for preset loop stop conditions The initial projective geometry parameter is updated to the intermediate projective geometry parameter, goes to execution: being based on by face structured grid model The initial projective geometry parameter, in the Initial Face structured grid model, determination is corresponding with the two-dimension human face image Face key point.
3. human face structure grid model method for building up according to claim 2, which is characterized in that described to be based on the two dimension The face key point of the face key point of facial image and preset average face structured grid model, the determining and two-dimension human face The Initial Face structured grid model and initial projective geometry parameter that image matches, comprising:
The face key point of face key point and preset average face structured grid model based on the two-dimension human face image, really Determine Initial Face structured grid parameter and initial projective geometry parameter;
Based on the Initial Face structured grid parameter, the determining Initial Face Structure Network to match with the two-dimension human face image Lattice model;
With described two in the face key point based on the two-dimension human face image and the Initial Face structured grid model Tie up the corresponding face key point of facial image, the determining intermediate face structured grid model to match with the two-dimension human face image With intermediate projective geometry parameter, comprising:
In face key point and the Initial Face structured grid model based on the two-dimension human face image with the two-dimentional people The corresponding face key point of face image determines intermediate face structured grid parameter and intermediate projective geometry parameter;
Based on the intermediate face structured grid parameter, the determining intermediate face Structure Network to match with the two-dimension human face image Lattice model.
4. human face structure grid model method for building up according to claim 3, which is characterized in that described based on described initial Projective geometry parameter determines that face corresponding with the two-dimension human face image closes in the Initial Face structured grid model Key point, comprising:
If the initial projective geometry parameter is the initial projective geometry parameter determined for the first time in cyclic process, it is based on following Initial projective geometry parameter, default projective geometry parameter and the default weighted value determined for the first time during ring, after determining adjustment Initial projective geometry parameter, if the initial projective geometry parameter be not in cyclic process for the first time determine initial projection Geometric parameter, then initial projective geometry parameter, the last initial projective geometry determined determined based on this in cyclic process Parameter and default weighted value determine initial projective geometry parameter adjusted;
Based on the initial projective geometry parameter adjusted, in the Initial Face structured grid model, it is determining with it is described The corresponding face key point of two-dimension human face image.
5. human face structure grid model method for building up according to claim 4, which is characterized in that described based on described initial Human face structure mesh parameter, the determining Initial Face structured grid model to match with the two-dimension human face image, comprising:
Based on the Initial Face structured grid parameter, the corresponding average face structured grid ginseng of the average face structured grid model Several and default weighted value determines Initial Face structured grid parameter adjusted;
Based on the Initial Face structured grid parameter adjusted, the determining initial people to match with the two-dimension human face image Face structured grid model;
It is described to be based on the intermediate face structured grid parameter, the determining intermediate face knot to match with the two-dimension human face image Network forming lattice model, comprising:
If the intermediate face structured grid parameter is intermediate structure mesh parameter determining for the first time in cyclic process, base Intermediate face structured grid parameter, Initial Face structured grid parameter and the default weight determined for the first time in cyclic process Value, determines intermediate face structured grid parameter adjusted, if the intermediate face structured grid parameter is not cyclic process The intermediate face structured grid parameter that middle first time determines, the then intermediate face structured grid determined based on this in cyclic process Parameter, the last intermediate face structured grid parameter determined and default weighted value, determine intermediate face Structure Network adjusted Lattice parameter;
Based on the intermediate face structured grid parameter adjusted, the determining go-between to match with the two-dimension human face image Face structured grid model.
6. human face structure grid model method for building up according to claim 2, which is characterized in that the preset circulation knot At least one of beam condition, including the following conditions:
Cycle-index reaches preset threshold;
The intermediate projective geometry parameter is less than preset threshold relative to the variable quantity of the initial projective geometry parameter;
The corresponding majorized function output valve of the intermediate projective geometry parameter is corresponding relative to the initial projective geometry parameter The variable quantity of majorized function output valve is less than preset threshold.
7. human face structure grid model method for building up described in -6 according to claim 1, which is characterized in that described based on described first Beginning projective geometry parameter determines face corresponding with the two-dimension human face image in the Initial Face structured grid model Key point, comprising:
In the Initial Face structured grid model, the profile of the vertex line composition between each target face vertex is determined Line;
In the face key point of the Initial Face structured grid model, the target face being located on the outside of the contour line is determined Key point;
By the position of each target face key point, be adjusted in target face vertex with the target face key point away from From nearest target face apex;
By unadjusted face key point in target face key point adjusted and the Initial Face structured grid model, really It is set to face key point corresponding with the two-dimension human face image in the Initial Face structured grid model.
8. a kind of human face structure grid model establishes device characterized by comprising
Execution unit is configured as the face key point of detection two-dimension human face image;
Determination unit is configured as face key point and preset average face structured grid mould based on the two-dimension human face image The face key point of type, the determining Initial Face structured grid model to match with the two-dimension human face image and initial projection are several What parameter;
Output unit is configured as based on the initial projective geometry parameter, in the Initial Face structured grid model, really Fixed face key point corresponding with the two-dimension human face image, face key point based on the two-dimension human face image and it is described at the beginning of Face key point corresponding with the two-dimension human face image in beginning human face structure grid model, determination and two-dimension human face image phase The output human face structure grid model matched.
9. a kind of electronic equipment characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Detect the face key point of two-dimension human face image;
The face key point of face key point and preset average face structured grid model based on the two-dimension human face image, really The fixed Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two-dimension human face The corresponding face key point of image, face key point and the Initial Face structured grid mould based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in type, the determining output human face structure to match with two-dimension human face image Grid model.
10. a kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of electronic equipment When device executes, so that electronic equipment is able to carry out a kind of human face structure grid model method for building up, which comprises
Detect the face key point of two-dimension human face image;
The face key point of face key point and preset average face structured grid model based on the two-dimension human face image, really The fixed Initial Face structured grid model to match with the two-dimension human face image and initial projective geometry parameter;
Based on the initial projective geometry parameter, in the Initial Face structured grid model, the determining and two-dimension human face The corresponding face key point of image, face key point and the Initial Face structured grid mould based on the two-dimension human face image Face key point corresponding with the two-dimension human face image in type, the determining output human face structure to match with two-dimension human face image Grid model.
CN201811446734.7A 2018-11-29 2018-11-29 Human face structure grid model method for building up, device, electronic equipment and storage medium Pending CN109583370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811446734.7A CN109583370A (en) 2018-11-29 2018-11-29 Human face structure grid model method for building up, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811446734.7A CN109583370A (en) 2018-11-29 2018-11-29 Human face structure grid model method for building up, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109583370A true CN109583370A (en) 2019-04-05

Family

ID=65925518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811446734.7A Pending CN109583370A (en) 2018-11-29 2018-11-29 Human face structure grid model method for building up, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109583370A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223218A (en) * 2019-05-16 2019-09-10 北京达佳互联信息技术有限公司 Face image processing process, device, electronic equipment and storage medium
CN110348524A (en) * 2019-07-15 2019-10-18 深圳市商汤科技有限公司 A kind of human body critical point detection method and device, electronic equipment and storage medium
CN110942007A (en) * 2019-11-21 2020-03-31 北京达佳互联信息技术有限公司 Hand skeleton parameter determination method and device, electronic equipment and storage medium
CN111652978A (en) * 2019-06-26 2020-09-11 广州虎牙科技有限公司 Grid generation method and device, electronic equipment and storage medium
CN113239600A (en) * 2021-07-09 2021-08-10 成都理工大学 Method for constructing two-dimensional random network model of complex rock mass

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110223218A (en) * 2019-05-16 2019-09-10 北京达佳互联信息技术有限公司 Face image processing process, device, electronic equipment and storage medium
CN110223218B (en) * 2019-05-16 2024-01-12 北京达佳互联信息技术有限公司 Face image processing method and device, electronic equipment and storage medium
CN111652978A (en) * 2019-06-26 2020-09-11 广州虎牙科技有限公司 Grid generation method and device, electronic equipment and storage medium
CN111652978B (en) * 2019-06-26 2024-03-05 广州虎牙科技有限公司 Grid generation method and device, electronic equipment and storage medium
CN110348524A (en) * 2019-07-15 2019-10-18 深圳市商汤科技有限公司 A kind of human body critical point detection method and device, electronic equipment and storage medium
CN110348524B (en) * 2019-07-15 2022-03-04 深圳市商汤科技有限公司 Human body key point detection method and device, electronic equipment and storage medium
CN110942007A (en) * 2019-11-21 2020-03-31 北京达佳互联信息技术有限公司 Hand skeleton parameter determination method and device, electronic equipment and storage medium
CN110942007B (en) * 2019-11-21 2024-03-05 北京达佳互联信息技术有限公司 Method and device for determining hand skeleton parameters, electronic equipment and storage medium
CN113239600A (en) * 2021-07-09 2021-08-10 成都理工大学 Method for constructing two-dimensional random network model of complex rock mass

Similar Documents

Publication Publication Date Title
US11436779B2 (en) Image processing method, electronic device, and storage medium
US11517099B2 (en) Method for processing images, electronic device, and storage medium
CN109583370A (en) Human face structure grid model method for building up, device, electronic equipment and storage medium
CN109978936B (en) Disparity map acquisition method and device, storage medium and equipment
CN109978989A (en) Three-dimensional face model generation method, device, computer equipment and storage medium
CN110148178A (en) Camera localization method, device, terminal and storage medium
US20220164159A1 (en) Method for playing audio, terminal and computer-readable storage medium
CN109947338B (en) Image switching display method and device, electronic equipment and storage medium
CN111028144B (en) Video face changing method and device and storage medium
CN109886208B (en) Object detection method and device, computer equipment and storage medium
CN113763228B (en) Image processing method, device, electronic equipment and storage medium
CN109558837A (en) Face critical point detection method, apparatus and storage medium
CN109977775A (en) Critical point detection method, apparatus, equipment and readable storage medium storing program for executing
CN109522863A (en) Ear's critical point detection method, apparatus and storage medium
CN109978996A (en) Generate method, apparatus, terminal and the storage medium of expression threedimensional model
CN109166150A (en) Obtain the method, apparatus storage medium of pose
CN110136236A (en) Personalized face's display methods, device, equipment and the storage medium of three-dimensional character
CN110163833A (en) The method and apparatus for determining the folding condition of disconnecting link
CN112308103B (en) Method and device for generating training samples
CN108848405A (en) Image processing method and device
CN109754439A (en) Scaling method, device, electronic equipment and medium
CN109189290A (en) Click on area recognition methods, device and computer readable storage medium
CN109445963A (en) Content share method, device, equipment and computer readable storage medium
CN108965769A (en) Image display method and device
CN110147796A (en) Image matching method and device

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