CN107153808A - The localization method and electronic equipment of a kind of face shape - Google Patents

The localization method and electronic equipment of a kind of face shape Download PDF

Info

Publication number
CN107153808A
CN107153808A CN201610124779.7A CN201610124779A CN107153808A CN 107153808 A CN107153808 A CN 107153808A CN 201610124779 A CN201610124779 A CN 201610124779A CN 107153808 A CN107153808 A CN 107153808A
Authority
CN
China
Prior art keywords
face shape
characteristic point
target image
initial position
face
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.)
Granted
Application number
CN201610124779.7A
Other languages
Chinese (zh)
Other versions
CN107153808B (en
Inventor
武俊敏
Original Assignee
Zhang Ying Information Technology (shanghai) 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 Zhang Ying Information Technology (shanghai) Co Ltd filed Critical Zhang Ying Information Technology (shanghai) Co Ltd
Priority to CN201610124779.7A priority Critical patent/CN107153808B/en
Publication of CN107153808A publication Critical patent/CN107153808A/en
Application granted granted Critical
Publication of CN107153808B publication Critical patent/CN107153808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The invention discloses a kind of localization method of face shape and electronic equipment, belong to image processing field.Methods described includes:The initial position of face shape is determined on target image;According to initial position, the position of the characteristic point of the face shape of target image is obtained by iteration.The present invention obtains the position of the characteristic point of the face shape of target image by iteration, it is achieved thereby that face shape is navigated on other such as cartoon figures, non-human object or true man's image target image, meet user's request, the position of characteristic point is obtained by iteration simultaneously, the accuracy of positioning is improved.

Description

The localization method and electronic equipment of a kind of face shape
Technical field
The present invention relates to image processing field, the localization method and electronic equipment of more particularly to a kind of face shape.
Background technology
Now, with recognition of face and the development of dummy model Expression Animation Technique, and instant video communication is in movement Popularization in terminal, increasing user selection is interacted by instant video, but increasing user is also not only It is satisfied with the instant video picture of the face comprising itself obtained by the camera of mobile device to interact with other people Mode, and be desirable to that in interaction video pictures can be changed, while can be showed emotion instead of communication two party.
Prior art is during instant video, when user is interacted by instant video, by instant video Face beautified, or the brightness of instant video picture is adjusted so that user is more willing to enter by instant video Row interaction.
But prior art is beautified to the face in instant video, or the brightness of instant video picture is adjusted Section, can not still meet user more has interesting requirement to video pictures during instant video, meanwhile, it is beautiful by face Change or the occupancy to instant video transmission bandwidth can further be increased to the brightness regulation of instant video picture, easily regard Frequency interim card, the situation for obscuring or going offline, Consumer's Experience is not good, in addition, in the social scene of some strangers, it is impossible to solve user It is unwilling impressive embarrassment.
The content of the invention
Face shape is navigated into other such as cartoon figures, non-human object or true man's image target image in order to realize On, user's request is met, while obtaining the position of characteristic point by iteration, the accuracy of positioning is improved, the embodiment of the present invention is carried The localization method and electronic equipment of a kind of face shape are supplied.The technical scheme is as follows:
First aspect includes there is provided a kind of localization method of face shape, methods described:
The initial position of face shape is determined on target image;
According to the initial position, the position of the characteristic point of the face shape of the target image is obtained by iteration.
With reference in a first aspect, in the first mode in the cards, the face shape include facial contour, eyebrow, At least one in eyes, nose and face.
It is described in mesh in second of mode in the cards with reference to the first mode in the cards of first aspect Determine that the initial position of face shape includes in logo image:
The initial position for determining the face shape is clicked on the target image;Or
The closed curve that user's input is obtained on the target image determines the initial position of the face shape;Or
Obtain the position of the face shape in target image;
The position of face shape in the instruction triggered according to user, the mobile target image, described in after movement The position of face shape is the initial position of the face shape;Or
The initial position for the face shape position of acquiescence being defined as on the target image.
With reference to first aspect or second of mode in the cards of first aspect, in the third mode in the cards In, described according to the initial position, the position of the characteristic point of the face shape of the target image is obtained by iteration to be included:
According to the initial position, the initial position of each characteristic point of the face shape is obtained;
The Grad of the initial position of each characteristic point is iterated respectively;
Obtain the position of each characteristic point after iteration.
With reference to the third mode in the cards of first aspect, in the 4th kind of mode in the cards, the difference The Grad of the initial position of each characteristic point is iterated including:
Respectively each characteristic point generates Gaussian function;
The optimal iterative value of each characteristic point position is calculated according to the Gaussian function and the Grad.
With reference to the 4th kind of mode in the cards of first aspect, in the 5th kind of mode in the cards, methods described Also include:
Smooth treatment is carried out to each characteristic point described in iterative process;
With reference to the 5th kind of mode in the cards of first aspect, in the 6th kind of mode in the cards, described pair repeatedly Each described characteristic point during generation, which carries out smooth treatment, to be included:
Gaussian filtering is carried out to each characteristic point described in iterative process.
With reference to the 6th kind of first aspect to first aspect any one mode in the cards, it may be realized at the 7th kind Mode in, methods described also includes:
The initial position on the target image shows the face shape.
With reference to the 6th kind of first aspect to first aspect any one mode in the cards, it may be realized at the 8th kind Mode in, methods described also includes:
The face shape behind the position of the characteristic point of the face shape of acquisition, display iteration.
Second aspect is there is provided a kind of electronic equipment, and the equipment includes:
Initial position determining module, the initial position for determining face shape on target image;
Characteristic point position acquisition module, for according to the initial position, the people of the target image to be obtained by iteration The position of the characteristic point of face shape.
With reference to second aspect, in the first mode in the cards, the face shape include facial contour, eyebrow, At least one in eyes, nose and face.
It is described initial in second of mode in the cards with reference to the first mode in the cards of second aspect Position determination module specifically for:
The initial position for determining the face shape is clicked on the target image;Or
The closed curve that user's input is obtained on the target image determines the initial position of the face shape;Or
Obtain the position of the face shape in target image;
The position of face shape in the instruction triggered according to user, the mobile target image, described in after movement The position of face shape is the initial position of the face shape;Or
The initial position for the face shape position of acquiescence being defined as on the target image.
With reference to second aspect or second of mode in the cards of second aspect, in the third mode in the cards In, the characteristic point position acquisition module includes:
Characteristic point initial position acquisition module, for according to the initial position, obtaining each of the face shape The initial position of characteristic point;
Grad iteration module, for being iterated respectively to the Grad of the initial position of each characteristic point;
Characteristic point position acquisition module after iteration, the position for obtaining each characteristic point after iteration.
With reference to the third mode in the cards of second aspect, in the 4th kind of mode in the cards, the gradient Value iteration module includes:
Gaussian function generation module, for being respectively each characteristic point generation Gaussian function;
Optimal iterative value computing module, for calculating each characteristic point position according to the Gaussian function and the Grad The optimal iterative value put.
With reference to the 4th kind of mode in the cards of second aspect, in the 5th kind of mode in the cards, the equipment Also include:
Smooth treatment module, for carrying out smooth treatment to each characteristic point described in iterative process;
It is described smooth in the 6th kind of mode in the cards with reference to the 5th kind of mode in the cards of second aspect Processing module specifically for:
Gaussian filtering is carried out to each characteristic point described in iterative process.
With reference to the 6th kind of second aspect to second aspect any one mode in the cards, it may be realized at the 7th kind Mode in, the equipment also module:
Initial position face shape display module, the people is shown for the initial position on the target image Face shape.
With reference to the 6th kind of second aspect to second aspect any one mode in the cards, it may be realized at the 8th kind Mode in, the equipment also module:
Face shape display module after iteration, for the position of the characteristic point of the face shape in acquisition, display changes The face shape after generation.
The third aspect is there is provided a kind of electronic equipment, and the electronic equipment includes display screen, memory and shown with described Display screen, the processor of memory connection, wherein, the memory is used to store batch processing code, and the processor is adjusted The program code stored with the memory is used to perform following operation:
The initial position of face shape is determined on target image;
According to the initial position, the position of the characteristic point of the face shape of the target image is obtained by iteration.
With reference to the third aspect, in the first mode in the cards, the face shape include facial contour, eyebrow, At least one in eyes, nose and face.
With reference to the first mode in the cards of the third aspect, in second of mode in the cards, the processing The program code that device calls the memory to be stored is used to perform following operation:
The initial position for determining the face shape is clicked on the target image;Or
The closed curve that user's input is obtained on the target image determines the initial position of the face shape;Or
Obtain the position of the face shape in target image;
The position of face shape in the instruction triggered according to user, the mobile target image, described in after movement The position of face shape is the initial position of the face shape;Or
The initial position for the face shape position of acquiescence being defined as on the target image.
With reference to the third aspect or second of mode in the cards of the third aspect, in the third mode in the cards In, the program code that the processor calls the memory to be stored is used to perform following operation:
According to the initial position, the initial position of each characteristic point of the face shape is obtained;
The Grad of the initial position of each characteristic point is iterated respectively;
Obtain the position of each characteristic point after iteration.
With reference to the third mode in the cards of the third aspect, in the 4th kind of mode in the cards, the processing The program code that device calls the memory to be stored is used to perform following operation:
Respectively each characteristic point generates Gaussian function;
The optimal iterative value of each characteristic point position is calculated according to the Gaussian function and the Grad.
With reference to the 4th kind of mode in the cards of the third aspect, in the 5th kind of mode in the cards, the processing The program code that device calls the memory to be stored is used to perform following operation:
Smooth treatment is carried out to each characteristic point described in iterative process;
With reference to the 5th kind of mode in the cards of the third aspect, in the 6th kind of mode in the cards, the processing The program code that device calls the memory to be stored is used to perform following operation:
Gaussian filtering is carried out to each characteristic point described in iterative process.
With reference to the 6th kind of the third aspect to second aspect any one mode in the cards, it may be realized at the 7th kind Mode in, the processor calls the program code that the memory stored to be used to perform following operation:
The initial position on the target image shows the face shape.
With reference to the 6th kind of the third aspect to second aspect any one mode in the cards, it may be realized at the 8th kind Mode in, the processor calls the program code that the memory stored to be used to perform following operation:
The face shape behind the position of the characteristic point of the face shape of acquisition, display iteration.
The embodiments of the invention provide a kind of localization method of face shape and electronic equipment.This method includes:In target The initial position of face shape is determined on image;According to the initial position, the face of the target image is obtained by iteration The position of the characteristic point of shape.So as to by iteration obtain target image face shape characteristic point position, realize by Face shape is navigated on other such as cartoon figures, the object of other non-personages or true man's image target image, meets use Family demand, while obtaining the position of characteristic point by iteration, improves the accuracy of positioning.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, makes required in being described below to embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing.
Fig. 1 is a kind of localization method flow chart of face shape provided in an embodiment of the present invention;
Fig. 2 is a kind of localization method flow chart of face shape provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of initial position for confirming target image provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of initial position for confirming target image provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of initial position for confirming target image provided in an embodiment of the present invention;
Fig. 6 is electronic devices structure schematic diagram provided in an embodiment of the present invention;
Fig. 7 is electronic devices structure schematic diagram provided in an embodiment of the present invention.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention Figure, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only this Invent a part of embodiment, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art exist The every other embodiment obtained under the premise of creative work is not made, the scope of protection of the invention is belonged to.
Embodiment one
The embodiments of the invention provide a kind of localization method of face shape, shown in reference picture 1, this method flow includes:
101st, the initial position of face shape is determined on target image.
Wherein, the face shape includes at least one in facial contour, eyebrow, eyes, nose and face.
Specifically, the process includes:
The initial position for determining the face shape is clicked on the target image;Or
The closed curve that user's input is obtained on the target image determines the initial position of the face shape;Or
Obtain the position of the face shape in target image;
The position of face shape in the instruction triggered according to user, the mobile target image, described in after movement The position of face shape is the initial position of the face shape;Or
The initial position for the face shape position of acquiescence being defined as on the target image.
102nd, according to the initial position, the position of the characteristic point of the face shape of the target image is obtained by iteration Put.
Specifically, the process includes:
According to the initial position, the initial position of each characteristic point of the face shape is obtained;
The Grad of the initial position of each characteristic point is iterated respectively;
Obtain the position of each characteristic point after iteration.
Wherein, respectively according to the Grad of the initial position of each characteristic point be iterated including:
Respectively each characteristic point generates Gaussian function;
The optimal iterative value of each characteristic point position is calculated according to the Gaussian function and the Grad.
Optionally, method also includes:
Smooth treatment is carried out to each characteristic point in iterative process.
Specifically, carrying out smooth treatment to each characteristic point in iterative process includes:
Gaussian filtering is carried out to each characteristic point in iterative process.
Optionally, method also includes:
The initial position on the target image shows the face shape.
Optionally, method also includes:
The face shape behind the position of the characteristic point of the face shape of acquisition, display iteration.
The embodiments of the invention provide a kind of localization method of face shape, people's shape of face of target image is obtained by iteration The position of the characteristic point of shape, realizes face shape navigating to other such as cartoon figure, the object of other non-personages or true man On the target images such as image, user's request is met, while obtaining the position of characteristic point by iteration, the accurate of positioning is improved Degree.
Embodiment two
The embodiments of the invention provide a kind of localization method of face shape, shown in reference picture 2, this method flow includes:
201st, the initial position of face shape is determined on target image.
Wherein, the face shape includes at least one in facial contour, eyebrow, eyes, nose and face.
In actual applications, the combination of the face shape includes facial contour, eyebrow, eyes, nose and face It can include:Facial contour, eyebrow, eyes, nose and face;Facial contour, eyes, nose and face;Facial contour, eyes And face;Eyebrow, eyes, nose and face;Eyes, nose and face;Eyes and face;Eyes;Face, in addition, also Other combinations can be included, be will not enumerate herein.
The target image includes object of cartoon figure, true man's image or other non-personages etc., other described non-personages Object include such as desktop, flowerpot, leaf, flower, automobile, cloud.
This determines that the process of the initial position of face shape can be accomplished by the following way on target image:
The initial position for determining the face shape is clicked on the target image.
Specifically, including the position where at least one in click eyebrow, eyes, nose and face or clicking on eyebrow, eye The position to be positioned of at least one in eyeball, nose and face.
If the target image is cartoon figure or true man's image, the eyebrow in cartoon figure or true man's image can be clicked on The position at the place of at least one in hair, eyes, nose and face, it is exemplary, should if the target image is cartoon figure Cartoon figure is the cartoon figure shown in a in Fig. 3, and face shape includes eyes and face, then is clicked on the target image true The initial position for the face shape recognized is referred in Fig. 3 the position indicated by arrow in a;If the target image includes other The object of non-personage, then click on the object of the non-personage and confirm that at least one in eyebrow, eyes, nose and face to be determined The position of position, exemplary, if the object of other non-personages is flowerpot, face shape includes eyes and face, then in the mesh The schematic diagram of the initial position of the face shape confirmed in mark object click is referred in Fig. 3 the position in b indicated by arrow.
This determines that the process of the initial position of face shape can also be accomplished by the following way on target image:
The closed curve that user's input is obtained on the target image determines the initial position of the face shape.
Specifically, being obtained on target image in facial contour, eyebrow, eyes, nose and face that user inputs extremely The closed curve of few one profile.
Can be the cartoon figure or true man for obtaining user's input if target image is cartoon figure or true man's image The outline close curve of at least one in facial contour, eyebrow, eyes, nose and the face of image, it is exemplary, if the target Image is cartoon figure, and the cartoon figure is the cartoon figure shown in a in Fig. 4, and face shape includes facial contour, eyes and mouth Bar, the then initial position that the face shape of the closed curve determination of user's input is obtained on the target image is referred to The position of closed curve in Fig. 4 in a indicated by arrow;If target image is the object of non-personage, user can be obtained and existed What is inputted on the object of the non-personage represents the outline position of at least one in facial contour, eyebrow, eyes, nose and face Closed curve, it is exemplary, if the object of other non-personages is flowerpot, face shape include facial contour, eyes and mouth Bar, the then initial position that the face shape of the closed curve determination of user's input is obtained on the destination object is referred to The position of the closed curve indicated by arrow in Fig. 4 in b.
This determines that the process of the initial position of face shape can also be accomplished by the following way on target image:
A, the face shape obtained in target image position.
Specifically, the target image includes cartoon figure and true man's image, the process can obtain target by recognizing The position of the characteristic point of face shape in image or the closed curve inputted by obtaining user obtain target image In face shape position, can also be by obtain user click in eyebrow, eyes, nose and face at least one Position, then by the position for the characteristic point for recognizing the face shape in the position acquisition target image clicked on, in addition, may be used also To realize the process by other means.
The position of face shape in b, the instruction triggered according to user, the mobile target image, with the institute after movement The position for stating face shape is the initial position of the face shape.
The instruction of user's triggering can be the instruction for the position for dragging face shape or click on face face The instruction of the position of shape, can also be other.
Specifically, the dragging triggered according to user is instructed, can be the people in the target image that dragging identification is obtained The position of the characteristic point of face shape, using the position of the face shape after dragging as the initial position of the face shape, Can be drag user input the target image that obtains of closed curve in face shape position, it is bent with the closure after dragging The position of line is the initial position of the face shape, in the target image that can also be the position acquisition that dragging identification is clicked on The position of the characteristic point of face shape, it is first by the face shape of the position of the characteristic point of the face shape after dragging Beginning position, in addition to this it is possible to including other modes.
The click commands triggered according to user, can be click on the new position to be moved to, by the target of acquisition The position of the characteristic point of face shape in image is moved to the new position, or the closure that the user of the acquisition is inputted Curve location is moved to the new position, in addition to this it is possible to including other modes.
Exemplary, if target image is cartoon figure, face shape includes eyes, by clicking on the target image obtained In the position of face shape be referred in Fig. 5 position indicated by the arrow in a, the dragging triggered according to user is instructed, The position of face shape in the mobile target image can be along along Fig. 5 indicated by b curve movement, it is mobile after target figure The position of face shape as in is referred in Fig. 5 the position indicated by arrow in c;If the click triggered according to user refers to Order, the schematic diagram of the click new position to be moved to is referred in Fig. 5 the position in d indicated by arrow, the mobile mesh Schematic diagram behind the position of face shape in logo image to new position is referred in Fig. 5 shown in e.
This determines that the process of the initial position of face shape can also be accomplished by the following way on target image:
The initial position for the face shape position of acquiescence being defined as on the target image.
Specifically, at least one in facial contour, eyebrow, eyes, nose and face of the position of the acquiescence including acquiescence Position.
In addition to aforesaid way, it can also by other means realize and the initial of face shape is determined on target image The process of position, the embodiment of the present invention is not limited to specific mode.
The process for the initial position that face shape is determined on target image can be realized in several ways, meet use The personalized demand in family, facilitates user to select different modes of operation, so as to further increase Consumer's Experience.
202nd, according to the initial position, the initial position of each characteristic point of the face shape is obtained.
Specifically, according to the initial position, obtaining the initial position co-ordinates of each characteristic point of the face shape.
According to the initial position co-ordinates of each characteristic point, the Grad of each characteristic point is calculated, Grad is represented such as Under:
grad(x,y)
Wherein, the mode of calculating is including the use of canny operators, and Laplace operator can also be sobe l operators, may be used also To be calculated by other operators.
203rd, the Grad of the initial position of each characteristic point is iterated respectively.
Specifically, the process includes:
A, respectively each characteristic point generation Gaussian function, the Gaussian function are expressed as follows:
Wherein, k represents coefficient, and e represents the truth of a matter of natural logrithm, (xi,yi) be ith feature point initial position co-ordinates.
B, the optimal iterative value for calculating according to the Gaussian function and the Grad each characteristic point position.
The optimal iterative value of each characteristic point position coordinate is calculated by below equation:
Wherein, the Grad and Gaussian function output valve of each characteristic point are obtained according to grad (x, y) × G (x, y) Product, the x and y obtained is an iteration result, if the x and y that are obtained do not restrain, using the x obtained and y under The initial position of an iteration continues above-mentioned iteration, until obtaining the optimal iterative value of each characteristic point.Wherein, it is front and rear twice The difference of iteration result can consider iteration convergence less than a certain threshold value.
204th, the position of each characteristic point after iteration is obtained.
Specifically, obtaining the position coordinates of each characteristic point after iteration.
It should be noted that step 202 to step 204 is realized according to the initial position, obtain described by iteration The process of the position of the characteristic point of the face shape of target image, can also be real by other means in addition to aforesaid way The existing process, the embodiment of the present invention is not limited to specific mode.
Optionally, during step 203 is performed, method also includes:
Smooth treatment is carried out to each characteristic point in iterative process.
Specifically, carrying out gaussian filtering to each characteristic point in iterative process, formula is as follows:
(x, y)=G (x, y) * X
Wherein, * represents convolution operation, X be in iterative process all feature point groups into matrix, the part that (x, y) includes Characteristic point is the non-deterministic characteristic point after smooth treatment.
It should be noted that the number of times being filtered can be preset times, the preset times can be according to actual needs It is configured, the embodiment of the present invention is not limited to specific preset times.
If it is worth noting that, the position coordinate value of the Partial Feature point obtained in iterative process is not sat in predeterminated position In the range of mark, then the Partial Feature point is the non-deterministic characteristic point in iterative process, each above-mentioned in iterative process Process of the step of characteristic point carries out smooth treatment including the characteristic point of the part uncertainty to be carried out to smooth treatment.
Optionally, after step 204, this method can also include:
205th, the initial position on the target image shows the face shape.
Specific display mode is not limited.
Exemplary, if the target image is cartoon figure, or true man's image, obtaining each of the face shape The initial position of individual characteristic point shows face shape.
Optionally, after step 204, method can also include:
206th, acquisition the face shape characteristic point position, display iteration after the face shape.
According to the coordinate of the position of the characteristic point of the face shape of acquisition, with the seat of the position of the characteristic point after iteration The mark display face shape.
The embodiments of the invention provide a kind of localization method of face shape, people's shape of face of target image is obtained by iteration The position of the characteristic point of shape, realizes face shape navigating to other such as cartoon figure, the object of other non-personages or true man On the target images such as image, user's request is met, while obtaining the position of characteristic point by iteration, the accurate of positioning is improved Degree;, can be with addition, by the way that face shape is navigated into other as on cartoon figure, the object of other non-personages or true man's images Apply in the field such as virtual reality, digital entertainment, communication and video conference, interpersonal interaction, when applying the friendship in instant video When during mutually, user can carry out instant video interaction, pole by cartoon figure, the object of other non-personages or true man's image The big interest for improving instant video call, meets user's request;In addition, in the social scene such as stranger, passing through Cartoon figure, the object of other non-personages or true man's image carry out instant video interaction, it is to avoid user is unwilling impressive ask Topic, improves Consumer's Experience;Meanwhile, during instant video interactive, pass through cartoon figure, the object of other non-personages or true People's image is interacted to be interacted compared to the picture obtained by camera, reduces the occupancy to the network bandwidth, it is to avoid The picture obtained when network condition is not good by camera interacts the video cardton easily occurred, the fuzzy or feelings such as go offline Condition, further increases Consumer's Experience, meets user's request.
Embodiment three
The embodiments of the invention provide a kind of electronic equipment 6, shown in reference picture 6, the equipment 6 includes:
Initial position determining module 61, the initial position for determining face shape on target image;
Characteristic point position acquisition module 62, for according to the initial position, the target image to be obtained by iteration The position of the characteristic point of face shape.
Optionally, the face shape includes at least one in facial contour, eyebrow, eyes, nose and face.
Optionally, the initial position determining module 61 specifically for:
The initial position for determining the face shape is clicked on the target image;Or
The closed curve that user's input is obtained on the target image determines the initial position of the face shape;Or
Obtain the position of the face shape in target image;
The position of face shape in the instruction triggered according to user, the mobile target image, described in after movement The position of face shape is the initial position of the face shape;Or
The initial position for the face shape position of acquiescence being defined as on the target image.
Optionally, the characteristic point position acquisition module 62 includes:
Characteristic point initial position acquisition module 621, for according to the initial position, obtaining each of the face shape The initial position of individual characteristic point;
Grad iteration module 622, for being changed respectively to the Grad of the initial position of each characteristic point Generation;
Characteristic point position acquisition module 623 after iteration, the position for obtaining each characteristic point after iteration.
Optionally, the Grad iteration module 622 includes:
Gaussian function generation module 6221, for being respectively each characteristic point generation Gaussian function;
Optimal iterative value computing module 6222, for calculating each feature according to the Gaussian function and the Grad The optimal iterative value of point position.
Optionally, the equipment 6 also includes:
Smooth treatment module 63, for carrying out smooth treatment to each characteristic point in iterative process;
Optionally, the smooth treatment module 63 specifically for:
Gaussian filtering is carried out to each characteristic point in iterative process.
Optionally, the equipment 6 also module:
Initial position face shape display module 64, shows described for the initial position on the target image Face shape.
Optionally, the equipment 6 also module:
Face shape display module 65 after iteration, for the position of the characteristic point of the face shape in acquisition, display The face shape after iteration.
The embodiments of the invention provide a kind of electronic equipment, the electronic equipment obtains people's shape of face of target image by iteration The position of the characteristic point of shape, realizes face shape navigating to other such as cartoon figure, other inhuman objects or true man's figure On the target images such as picture, user's request is met, while obtaining the position of characteristic point by iteration, the accurate of positioning is improved Degree;, can be with addition, by the way that face shape is navigated into other as on cartoon figure, the object of other non-personages or true man's images Apply in the field such as virtual reality, digital entertainment, communication and video conference, interpersonal interaction, when applying the friendship in instant video When during mutually, user can carry out instant video interaction, pole by cartoon figure, the object of other non-personages or true man's image The big interest for improving instant video call, meets user's request;In addition, in the social scene such as stranger, passing through Cartoon figure, the object of other non-personages or true man's image carry out instant video interaction, it is to avoid user is unwilling impressive ask Topic, improves Consumer's Experience;Meanwhile, during instant video interactive, pass through cartoon figure, the object of other non-personages or true People's image is interacted to be interacted compared to the picture obtained by camera, reduces the occupancy to the network bandwidth, it is to avoid The picture obtained when network condition is not good by camera interacts the video cardton easily occurred, the fuzzy or feelings such as go offline Condition, further increases Consumer's Experience, meets user's request.
Example IV
The embodiments of the invention provide a kind of electronic equipment 7, shown in reference picture 7, the electronic equipment 7 includes display screen 71st, memory 72 and the processor 73 being connected with the display screen 71, the memory 72, wherein, the memory 72 is used In storage batch processing code, the program code that the processor 73 calls the memory 72 to be stored is used to perform following behaviour Make:
The initial position of face shape is determined on target image;
According to the initial position, the position of the characteristic point of the face shape of the target image is obtained by iteration.
Optionally, the face shape includes at least one in facial contour, eyebrow, eyes, nose and face.
Optionally, the program code that the processor 73 calls the memory 72 to be stored is used to perform following operation:
The initial position for determining the face shape is clicked on the target image;Or
The closed curve that user's input is obtained on the target image determines the initial position of the face shape;Or
Obtain the position of the face shape in target image;
The position of face shape in the instruction triggered according to user, the mobile target image, described in after movement The position of face shape is the initial position of the face shape;Or
The initial position for the face shape position of acquiescence being defined as on the target image.
Optionally, the program code that the processor 73 calls the memory 72 to be stored is used to perform following operation:
According to the initial position, the initial position of each characteristic point of the face shape is obtained;
The Grad of the initial position of each characteristic point is iterated respectively;
Obtain the position of each characteristic point after iteration.
Optionally, the program code that the processor 73 calls the memory 72 to be stored is used to perform following operation:
Respectively each characteristic point generates Gaussian function;
The optimal iterative value of each characteristic point position is calculated according to the Gaussian function and the Grad.
With reference to the 4th kind of mode in the cards of the third aspect, in the 5th kind of mode in the cards, the processing The program code that device calls the memory to be stored is used to perform following operation:
Smooth treatment is carried out to each characteristic point in iterative process;
Optionally, the program code that the processor 73 calls the memory 72 to be stored is used to perform following operation:
Gaussian filtering is carried out to each characteristic point in iterative process.
Optionally, the program code that the processor 73 calls the memory 72 to be stored is used to perform following operation:
The initial position on the target image shows the face shape.
Optionally, the program code that the processor 73 calls the memory 72 to be stored is used to perform following operation:
The face shape behind the position of the characteristic point of the face shape of acquisition, display iteration.
The embodiments of the invention provide a kind of electronic equipment, the electronic equipment obtains people's shape of face of target image by iteration The position of the characteristic point of shape, realizes face shape navigating to other such as cartoon figure, the object of other non-personages or true man On the target images such as image, user's request is met, while obtaining the position of characteristic point by iteration, the accurate of positioning is improved Degree;, can be with addition, by the way that face shape is navigated into other as on cartoon figure, the object of other non-personages or true man's images Apply in the field such as virtual reality, digital entertainment, communication and video conference, interpersonal interaction, when applying the friendship in instant video When during mutually, user can carry out instant video interaction, pole by cartoon figure, the object of other non-personages or true man's image The big interest for improving instant video call, meets user's request;In addition, in the social scene such as stranger, passing through Cartoon figure, the object of other non-personages or true man's image carry out instant video interaction, it is to avoid user is unwilling impressive ask Topic, improves Consumer's Experience;Meanwhile, during instant video interactive, pass through cartoon figure, the object of other non-personages or true People's image is interacted to be interacted compared to the picture obtained by camera, reduces the occupancy to the network bandwidth, it is to avoid The picture obtained when network condition is not good by camera interacts the video cardton easily occurred, the fuzzy or feelings such as go offline Condition, further increases Consumer's Experience, meets user's request.
Above-mentioned all optional technical schemes, can form the alternative embodiment of the present invention, herein no longer using any combination Repeat one by one.
In addition, what schematic diagram listed in the embodiment of the present invention was merely exemplary, it is to aid in people in the art Member further understands the effect that method and this method described in the embodiment of the present invention are reached, not refers in particular to herein, the present invention Embodiment is not limited to specific schematic diagram.
It should be noted that:Above-described embodiment provide electronic equipment perform face shape localization method when, only more than The division progress of each functional module is stated for example, in practical application, as needed can distribute above-mentioned functions by difference Functional module complete, i.e., the internal structure of equipment is divided into different functional modules, with complete it is described above whole or Person's partial function.In addition, electronic equipment and the localization method embodiment of face shape that above-described embodiment is provided belong to same structure Think, it implements process and refer to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can be by hardware To complete, the hardware of correlation can also be instructed to complete by program, described program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.

Claims (10)

1. a kind of localization method of face shape, it is characterised in that methods described includes:
The initial position of face shape is determined on target image;
According to the initial position, the position of the characteristic point of the face shape of the target image is obtained by iteration.
2. according to the method described in claim 1, it is characterised in that the face shape include facial contour, eyebrow, eyes, At least one in nose and face.
3. method according to claim 2, it is characterised in that the initial bit that face shape is determined on target image Put including:
The initial position for determining the face shape is clicked on the target image;Or
The closed curve that user's input is obtained on the target image determines the initial position of the face shape;Or
Obtain the position of the face shape in target image;
The position of face shape in the instruction triggered according to user, the mobile target image, with the face after movement The position of shape is the initial position of the face shape;Or
The initial position for the face shape position of acquiescence being defined as on the target image.
4. the method according to claim 1 or 3, it is characterised in that described according to the initial position, is obtained by iteration The position of the characteristic point of the face shape of the target image includes:
According to the initial position, the initial position of each characteristic point of the face shape is obtained;
The Grad of the initial position of each characteristic point is iterated respectively;
Obtain the position of each characteristic point after iteration.
5. method according to claim 4, it is characterised in that the initial position respectively to each characteristic point Grad be iterated including:
Respectively each characteristic point generates Gaussian function;
The optimal iterative value of each characteristic point position is calculated according to the Gaussian function and the Grad.
6. method according to claim 5, it is characterised in that methods described also includes:
Smooth treatment is carried out to each characteristic point described in iterative process.
7. method according to claim 6, it is characterised in that described that each feature described in iterative process is clicked through Row smooth treatment includes:
Gaussian filtering is carried out to each characteristic point described in iterative process.
8. according to claim 1 to 7 any one methods described, it is characterised in that methods described also includes:
The initial position on the target image shows the face shape.
9. the method according to claim 1 to 7 any one, it is characterised in that methods described also includes:
The face shape behind the position of the characteristic point of the face shape of acquisition, display iteration.
10. a kind of electronic equipment, it is characterised in that the equipment includes:
Initial position determining module, the initial position for determining face shape on target image;
Characteristic point position acquisition module, for according to the initial position, people's shape of face of the target image to be obtained by iteration The position of the characteristic point of shape.
CN201610124779.7A 2016-03-04 2016-03-04 Face shape positioning method and electronic equipment Active CN107153808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610124779.7A CN107153808B (en) 2016-03-04 2016-03-04 Face shape positioning method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610124779.7A CN107153808B (en) 2016-03-04 2016-03-04 Face shape positioning method and electronic equipment

Publications (2)

Publication Number Publication Date
CN107153808A true CN107153808A (en) 2017-09-12
CN107153808B CN107153808B (en) 2021-02-09

Family

ID=59792473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610124779.7A Active CN107153808B (en) 2016-03-04 2016-03-04 Face shape positioning method and electronic equipment

Country Status (1)

Country Link
CN (1) CN107153808B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050207654A1 (en) * 2004-03-16 2005-09-22 Konstantin Rodyushkin Methods for estimating the position and shape of lips and for estimating the position of teeth in a sequence of digital images of a human face
CN102254151A (en) * 2011-06-16 2011-11-23 清华大学 Driver fatigue detection method based on face video analysis
CN105260705A (en) * 2015-09-15 2016-01-20 西安邦威电子科技有限公司 Detection method suitable for call receiving and making behavior of driver under multiple postures

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050207654A1 (en) * 2004-03-16 2005-09-22 Konstantin Rodyushkin Methods for estimating the position and shape of lips and for estimating the position of teeth in a sequence of digital images of a human face
CN102254151A (en) * 2011-06-16 2011-11-23 清华大学 Driver fatigue detection method based on face video analysis
CN105260705A (en) * 2015-09-15 2016-01-20 西安邦威电子科技有限公司 Detection method suitable for call receiving and making behavior of driver under multiple postures

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周志宇等: "应用梯度矢量流Snake和灰预测的人脸轮廓跟踪", 《光学精密工程》 *
赵小川等: "《MATLAB数字图像处理从仿真到C/C++代码的自动生成》", 30 September 2015 *

Also Published As

Publication number Publication date
CN107153808B (en) 2021-02-09

Similar Documents

Publication Publication Date Title
CN112541963B (en) Three-dimensional avatar generation method, three-dimensional avatar generation device, electronic equipment and storage medium
CN108932693B (en) Face editing and completing method and device based on face geometric information
US10839575B2 (en) User-guided image completion with image completion neural networks
US9064344B2 (en) Image transformation systems and methods
CN112070015B (en) Face recognition method, system, device and medium fusing occlusion scene
CN113362263B (en) Method, apparatus, medium and program product for transforming an image of a virtual idol
US20070230794A1 (en) Real-time automatic facial feature replacement
CN105447125A (en) Electronic equipment and makeup assisting method
CN107343225B (en) The method, apparatus and terminal device of business object are shown in video image
CN111369428B (en) Virtual head portrait generation method and device
CN108109121A (en) A kind of face based on convolutional neural networks obscures quick removing method
CN107578371A (en) Image processing method and device, electronic equipment and medium
CN110620884B (en) Expression-driven-based virtual video synthesis method and device and storage medium
CN110047122A (en) Render method, apparatus, electronic equipment and the computer readable storage medium of image
CN115049799A (en) Method and device for generating 3D model and virtual image
CN108170282A (en) For controlling the method and apparatus of three-dimensional scenic
CN109917917A (en) A kind of visual human's interactive software bus system and its implementation
JP2024506014A (en) Video generation method, device, equipment and readable storage medium
JP2016529752A (en) Image editing transmission to subordinate video sequences via dense motion fields
CN109389687A (en) Information processing method, device, equipment and readable storage medium storing program for executing based on AR
CN107766803A (en) Video personage based on scene cut dresss up method, apparatus and computing device
CN107153808A (en) The localization method and electronic equipment of a kind of face shape
CN109587035A (en) Head portrait methods of exhibiting, device, electronic equipment and the storage medium at session interface
CN116363249A (en) Controllable image generation method and device and electronic equipment
CN110321821A (en) Face alignment initial method and device, storage medium based on tripleplane

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210317

Address after: 2503, building 15, Longhai home, 5246 Yihai Avenue, Nanshan District, Shenzhen, Guangdong 518051

Patentee after: Xiao Feng

Address before: 200063 1st floor, No.28, tanjiadu Road, Putuo District, Shanghai

Patentee before: Palmwin Information Technology (Shanghai) Co.,Ltd.