CN110020577B - Face key point expansion calculation method, storage medium, electronic device and system - Google Patents

Face key point expansion calculation method, storage medium, electronic device and system Download PDF

Info

Publication number
CN110020577B
CN110020577B CN201810023313.7A CN201810023313A CN110020577B CN 110020577 B CN110020577 B CN 110020577B CN 201810023313 A CN201810023313 A CN 201810023313A CN 110020577 B CN110020577 B CN 110020577B
Authority
CN
China
Prior art keywords
face
points
calculating
key point
key
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.)
Active
Application number
CN201810023313.7A
Other languages
Chinese (zh)
Other versions
CN110020577A (en
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810023313.7A priority Critical patent/CN110020577B/en
Publication of CN110020577A publication Critical patent/CN110020577A/en
Application granted granted Critical
Publication of CN110020577B publication Critical patent/CN110020577B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Abstract

The invention discloses a face key point expansion calculation method, a storage medium, electronic equipment and a system, which relate to the field of live broadcast picture processing and comprise the steps of establishing a world coordinate system based on a face position; taking the center points of the nose and the nose bridge in the face, and calculating a rotation angle alpha of the face on an xy plane; arbitrarily taking two points C (x, y) and D (x, y) in the key points of the face recognition 68, and calculating a reference point E (x, y) of a key point F (x, y) of the forehead part of the face to be calculated; calculating a distance L1 between a key point F (x, y) of the forehead part of the face to be sought and a reference point E (x, y); and calculating key points F (x, y) of the forehead part of the face to be sought. The invention can realize the calibration of the position coordinates of the key points of the forehead part of the human face.

Description

Face key point expansion calculation method, storage medium, electronic device and system
Technical Field
The invention belongs to the field of live broadcast picture processing, and particularly relates to a face key point expansion calculation method, a storage medium, electronic equipment and a system.
Background
The face key points refer to position information of key points of face parts such as eyebrows, eyes, a nose, a mouth, a face contour and the like of a face in a video or a picture, and are frequently used for processing the face parts in the picture or the video.
Currently, the key points of the general face 68 usually include only the position information of key points such as eyebrows, eyes, nose, mouth, and face contour, but do not include the key point information of the forehead of the face, and in the live broadcast application, the face of a person in the live broadcast picture often needs to be finely processed, so that the key point information of the forehead is needed, and the existing key points of the face 68 are obviously not suitable.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a human face key point expansion calculation method which can realize the calibration of the position coordinates of the key points of the forehead of a human face.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
establishing a world coordinate system based on the face position;
taking the center points of the nose and the nose bridge in the face, and calculating a rotation angle alpha of the face on an xy plane;
and (3) calculating a reference point E (x, y) of a key point F (x, y) of the forehead part of the face to be determined by arbitrarily taking two points C (x, y) and D (x, y) in the key points of the face recognition 68:
E.x=C.x*(1-β)+D.x*β
E.y=C.y*(1-β)+D.y*β
wherein, beta is a parameter, and the value range is [0.0, 1.0 ];
calculating a distance L1 between a key point F (x, y) of the forehead part of the face to be sought and a reference point E (x, y);
calculating a key point F (x, y) of the forehead part of the face to be sought:
F.x=E.x+cos(ɑ)*L1
F.y=E.y+sin(ɑ)*L1。
on the basis of the technical scheme, the center points of the nose and the nose bridge in the key point of the face recognition 68 are taken, and the rotation angle alpha of the face on the xy plane is calculated.
On the basis of the above technical scheme, a rotation angle α of the face on the xy plane is calculated, specifically:
L=sqr((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y))
ɑ=acos((A.x-B.x)/L)
wherein, sqr is an evolution function, A (x, y) is the coordinate of the center point of the nose in the key point of face identification 68, B (x, y) is the coordinate of the center point of the nose bridge in the key point of face identification 68, acos is an inverse cosine function, and L is the distance between the center points of the nose and the nose bridge in the key point of face identification 68.
On the basis of the technical scheme, the value of the beta is 0.2.
On the basis of the technical scheme, two points C (x, y) and D (x, y) of the arbitrarily-selected key points of the face recognition 68 are positioned near a key point F (x, y) of the forehead of the face to be determined.
The invention also provides a storage medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
The invention also provides an electronic device, which comprises a memory and a processor, wherein the memory stores a computer program running on the processor, and the processor executes the computer program to realize the method.
The invention also provides a face key point extension computing system, which comprises:
the creating module is used for creating a world coordinate system based on the face position;
the first calculation module is used for calculating a rotation angle alpha of the face on an xy plane by taking center points of the nose and the nose bridge in the face, and calculating a reference point E (x, y) of a key point F (x, y) of the forehead part of the face to be calculated by taking two points C (x, y) and D (x, y) in key points of face recognition 68:
E.x=C.x*(1-β)+D.x*β
E.y=C.y*(1-β)+D.y*β
wherein, beta is a parameter, and the value range is [0.0, 1.0 ];
the second calculating module is used for calculating the distance L1 between the key point F (x, y) of the forehead part of the face to be determined and the reference point E (x, y), and then calculating the key point F (x, y) of the forehead part of the face to be determined:
F.x=E.x+cos(ɑ)*L1
F.y=E.y+sin(ɑ)*L1。
on the basis of the technical scheme, the center points of the nose and the nose bridge in the key point of the face recognition 68 are taken, and the rotation angle alpha of the face on the xy plane is calculated.
On the basis of the technical scheme, two points C (x, y) and D (x, y) of the arbitrarily-selected key points of the face recognition 68 are positioned near a key point F (x, y) of the forehead of the face to be determined.
Compared with the prior art, the invention has the advantages that: based on the key points of the face identification 68, a world coordinate system is established for the face, the position coordinates of the key points of the forehead of the face are rapidly and efficiently solved by firstly solving the rotation angle of the face and a certain reference point in the face, a reference is provided for the precise processing of the face in a live broadcast picture, the forehead of the face is conveniently taken out, and the quality of the live broadcast picture is improved.
Drawings
FIG. 1 is a flowchart of a face key point expansion calculation method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
Referring to fig. 1, an embodiment of the present invention provides a face key point expansion calculation method, which is used for calculating key points of a forehead of a face based on face recognition 68 key points. It should be noted that, in the embodiment of the present invention, for the expression of the coordinate point value, for example, A.x is a value of an x axis in a (x, y), A.y is a value of a y axis in a (x, y), and the other expressions are similar to this. The face key point expansion calculation method of the embodiment of the invention specifically comprises the following steps:
s1: and establishing a world coordinate system based on the position of the face, namely establishing the world coordinate system for the face in the image or the video.
S2: and (4) taking the center points of the nose and the nose bridge in the face, and calculating a rotation angle alpha of the face on the xy plane. Specifically, the center points of the nose and the nose bridge in the key point of the face recognition 68 are taken, the rotation angle a of the face on the xy plane is calculated, and the rotation angle a of the face on the xy plane is calculated, which specifically includes:
L=sqr((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y))
ɑ=acos((A.x-B.x)/L)
wherein, sqr is an evolution function, A (x, y) is the coordinate of the center point of the nose in the key point of face identification 68, B (x, y) is the coordinate of the center point of the nose bridge in the key point of face identification 68, acos is an inverse cosine function, and L is the distance between the center points of the nose and the nose bridge in the key point of face identification 68.
S3: and (3) calculating a reference point E (x, y) of a key point F (x, y) of the forehead part of the face to be determined by arbitrarily taking two points C (x, y) and D (x, y) in the key points of the face recognition 68:
E.x=C.x*(1-β)+D.x*β
E.y=C.y*(1-β)+D.y*β
wherein, beta is a parameter, the value range is [0.0, 1.0], and the value of beta is generally 0.2. In order to improve the calculation accuracy, two points C (x, y) and D (x, y) of the key points of the face recognition 68 are arbitrarily located near the key point F (x, y) of the forehead of the face to be determined.
S4: and calculating a distance L1 between the key point F (x, y) of the forehead part of the face to be determined and the reference point E (x, y), namely the physical distance between the point F (x, y) and the point E (x, y) in a world coordinate system.
S5: calculating a key point F (x, y) of the forehead part of the face to be sought:
F.x=E.x+cos(ɑ)*L1
F.y=E.y+sin(ɑ)*L1。
the coordinates of a certain key point at the forehead of the human face are obtained, and the solving method for other key points of the forehead of the human face is similar to the solving method.
The face key point expansion calculation method provided by the embodiment of the invention is characterized in that a world coordinate system is established for a face based on 68 key points of face recognition, the rotation angle of the face and a certain reference point in the face are firstly solved, and then the position coordinates of key points of the forehead part of the face are quickly and efficiently solved, so that a reference is provided for the accurate processing of the face in a live broadcast picture, the forehead part of the face can be conveniently taken out, and the quality of the live broadcast picture is improved.
In addition, corresponding to the above-mentioned face key point extension calculation method, the present invention further provides a storage medium, where a computer program is stored on the storage medium, and when being executed by a processor, the computer program implements the steps of the face key point extension calculation method described in each of the above embodiments. The storage medium includes various media capable of storing program codes, such as a usb disk, a removable hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk, or an optical disk.
Referring to fig. 2, in correspondence to the above-mentioned face keypoint extension calculation method, the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement the face keypoint extension calculation method according to the above-mentioned embodiments.
The embodiment of the invention also provides a face key point expansion computing system based on the face key point expansion computing method, which comprises a creation module, a first computing module and a second computing module.
The creating module is used for creating a world coordinate system based on the face position; the first calculation module is used for calculating a rotation angle alpha of the face on an xy plane by taking center points of the nose and the nose bridge in the face, and calculating a reference point E (x, y) of a key point F (x, y) of the forehead part of the face to be calculated by taking two points C (x, y) and D (x, y) in key points of face recognition 68:
E.x=C.x*(1-β)+D.x*β
E.y=C.y*(1-β)+D.y*β
wherein, beta is a parameter, and the value range is [0.0, 1.0 ];
the second calculating module is used for calculating the distance L1 between the key point F (x, y) of the forehead part of the face to be required and the reference point E (x, y), and then calculating the key point F (x, y) of the forehead part of the face to be required:
F.x=E.x+cos(ɑ)*L1
F.y=E.y+sin(ɑ)*L1。
and (5) taking the center points of the nose and the nose bridge in the key points of the face recognition 68, and calculating the rotation angle alpha of the face on the xy plane. Two points C (x, y) and D (x, y) of the arbitrarily selected key points of the face recognition 68 are located near the key point F (x, y) of the forehead of the face to be sought.
The face key point expansion computing system of the embodiment of the invention establishes a world coordinate system for the face based on the face identification 68 key points, provides a reference for the accurate processing of the face in the live broadcast picture by firstly calculating the rotation angle of the face and a certain reference point in the face and then quickly and efficiently calculating the position coordinates of the key points of the forehead part of the face, is convenient to come out of the forehead part of the face and improves the quality of the live broadcast picture.
The present invention is not limited to the above-described embodiments, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements are also considered to be within the scope of the present invention. Those not described in detail in this specification are within the skill of the art.

Claims (10)

1. A face key point expansion calculation method is based on face recognition 68 key points and is characterized by comprising the following steps:
establishing a world coordinate system based on the face position;
taking the center points of the nose and the nose bridge in the face, and calculating a rotation angle alpha of the face on an xy plane;
and (3) calculating a reference point E (x, y) of a key point F (x, y) of the forehead part of the face to be determined by arbitrarily taking two points C (x, y) and D (x, y) in the key points of the face recognition 68:
E.x=C.x*(1-β)+D.x*β
E.y=C.y*(1-β)+D.y*β
wherein, beta is a parameter, and the value range is [0.0, 1.0 ];
calculating a distance L1 between a key point F (x, y) of the forehead part of the face to be sought and a reference point E (x, y);
calculating a key point F (x, y) of the forehead part of the face to be sought:
F.x=E.x+cos(ɑ)*L1
F.y=E.y+sin(ɑ)*L1。
2. the face keypoint extension computing method of claim 1, characterized in that: and (5) taking the center points of the nose and the nose bridge in the key points of the face recognition 68, and calculating the rotation angle alpha of the face on the xy plane.
3. The method for calculating face key point extension according to claim 2, wherein a rotation angle a of the face on an xy plane is calculated, specifically:
L=sqr((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y))
ɑ=acos((A.x-B.x)/L)
wherein, sqr is an evolution function, A (x, y) is the coordinate of the center point of the nose in the key point of face identification 68, B (x, y) is the coordinate of the center point of the nose bridge in the key point of face identification 68, acos is an inverse cosine function, and L is the distance between the center points of the nose and the nose bridge in the key point of face identification 68.
4. The face keypoint extension computing method of claim 1, characterized in that: the value of beta is 0.2.
5. The face keypoint extension computing method of claim 1, characterized in that: two points C (x, y) and D (x, y) of the arbitrarily selected key points of the face recognition 68 are located near the key point F (x, y) of the forehead of the face to be sought.
6. A storage medium having a computer program stored thereon, characterized in that: the computer program, when executed by a processor, implements the method of any of claims 1 to 5.
7. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that runs on the processor, characterized in that: the processor, when executing the computer program, implements the method of any of claims 1 to 5.
8. A face keypoint extension computing system, comprising:
the creating module is used for creating a world coordinate system based on the face position;
the first calculation module is used for calculating a rotation angle alpha of the face on an xy plane by taking center points of the nose and the nose bridge in the face, and calculating a reference point E (x, y) of a key point F (x, y) of the forehead part of the face to be calculated by taking two points C (x, y) and D (x, y) in key points of face recognition 68:
E.x=C.x*(1-β)+D.x*β
E.y=C.y*(1-β)+D.y*β
wherein, beta is a parameter, and the value range is [0.0, 1.0 ];
the second calculating module is used for calculating the distance L1 between the key point F (x, y) of the forehead part of the face to be determined and the reference point E (x, y), and then calculating the key point F (x, y) of the forehead part of the face to be determined:
F.x=E.x+cos(ɑ)*L1
F.y=E.y+sin(ɑ)*L1。
9. the face keypoint extension computing system of claim 8, wherein: and (5) taking the center points of the nose and the nose bridge in the key points of the face recognition 68, and calculating the rotation angle alpha of the face on the xy plane.
10. The face keypoint extension computing system of claim 8, wherein: two points C (x, y) and D (x, y) of the arbitrarily selected key points of the face recognition 68 are located near the key point F (x, y) of the forehead of the face to be sought.
CN201810023313.7A 2018-01-10 2018-01-10 Face key point expansion calculation method, storage medium, electronic device and system Active CN110020577B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810023313.7A CN110020577B (en) 2018-01-10 2018-01-10 Face key point expansion calculation method, storage medium, electronic device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810023313.7A CN110020577B (en) 2018-01-10 2018-01-10 Face key point expansion calculation method, storage medium, electronic device and system

Publications (2)

Publication Number Publication Date
CN110020577A CN110020577A (en) 2019-07-16
CN110020577B true CN110020577B (en) 2021-03-16

Family

ID=67188106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810023313.7A Active CN110020577B (en) 2018-01-10 2018-01-10 Face key point expansion calculation method, storage medium, electronic device and system

Country Status (1)

Country Link
CN (1) CN110020577B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112560555A (en) * 2019-09-25 2021-03-26 北京中关村科金技术有限公司 Method, device and storage medium for expanding key points
CN111126344B (en) * 2019-12-31 2023-08-01 杭州趣维科技有限公司 Method and system for generating key points of forehead of human face

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065360A (en) * 2013-01-16 2013-04-24 重庆绿色智能技术研究院 Generation method and generation system of hair style effect pictures
CN103116902A (en) * 2011-11-16 2013-05-22 华为软件技术有限公司 Three-dimensional virtual human head image generation method, and method and device of human head image motion tracking
CN107122774A (en) * 2017-03-28 2017-09-01 武汉斗鱼网络科技有限公司 A kind of adaptive chart pasting method moved with key point in image and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116902A (en) * 2011-11-16 2013-05-22 华为软件技术有限公司 Three-dimensional virtual human head image generation method, and method and device of human head image motion tracking
CN103065360A (en) * 2013-01-16 2013-04-24 重庆绿色智能技术研究院 Generation method and generation system of hair style effect pictures
CN107122774A (en) * 2017-03-28 2017-09-01 武汉斗鱼网络科技有限公司 A kind of adaptive chart pasting method moved with key point in image and system

Non-Patent Citations (10)

* Cited by examiner, † Cited by third party
Title
A Multiscale Constraints Method Localization of 3D Facial Feature Points;Hong-an Li等;《Computational and Mathematical Methods in Medicine》;20151231;第1-6页 *
Extraction ofFacial Feature Points Using Cumulative Distribution Function by Varying Single Threshold Group;Sushil Kumar Paul等;《IEEE/OSA/IAPR International Conference on Informatics,Electronics&Vision》;20121231;第806-811页 *
Gender Classification Based on 3D Face Geometry Features using SVM;Xia Han等;《2009 International Conference on CyberWorlds》;20091231;第114-118页, *
Landmark Localization Approach for Facial Computing;Raphael Angulu等;《2017 Conference on Information Communications Technology and Society》;20171231;第1-6页 *
二进制特征在人脸识别中的应用;梁孟醒;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150815(第8期);I138-1270 *
人脸特征的定位和提取;林福严等;《电子技术应用》;20001231(第7期);第17-18、21页 *
基于人脸识别的图像美化系统设计与实现;叶龙宝等;《中国优秀硕士学位论文全文数据库 信息科技辑》;20120715(第7期);I138-1715 *
基于并行卷积神经网络的人脸关键点定位方法研究;杨海燕等;《计算机应用研究》;20150831;第32卷(第8期);第2517-1519页 *
基于艺术规则的三维卡通人脸动画;刘守快;《中国优秀硕士学位论文全文数据库 信息科技辑》;20110115;I138-1184 *
基于视频图像的人脸表情识别技术的研究;叶敬福;《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》;20051215(第8期);I138-585 *

Also Published As

Publication number Publication date
CN110020577A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110096925B (en) Enhancement method, acquisition method and device of facial expression image
CN110175558B (en) Face key point detection method and device, computing equipment and storage medium
CN107705333B (en) Space positioning method and device based on binocular camera
WO2017186016A1 (en) Method and device for image warping processing and computer storage medium
US11238272B2 (en) Method and apparatus for detecting face image
CN108229301B (en) Eyelid line detection method and device and electronic equipment
CN107463865B (en) Face detection model training method, face detection method and device
CN108734078B (en) Image processing method, image processing apparatus, electronic device, storage medium, and program
JP5855416B2 (en) 3D coordinate acquisition device, camera posture estimation device, program
CN110020577B (en) Face key point expansion calculation method, storage medium, electronic device and system
CN110647782A (en) Three-dimensional face reconstruction and multi-pose face recognition method and device
CN108288052B (en) Iris image normalization method and device and computer readable storage medium
CN110348351B (en) Image semantic segmentation method, terminal and readable storage medium
CN112101247A (en) Face pose estimation method, device, equipment and storage medium
CN104091148A (en) Facial feature point positioning method and device
CN110032941B (en) Face image detection method, face image detection device and terminal equipment
JP5882929B2 (en) Image processing apparatus, image processing method, and image processing program
CN113298870B (en) Object posture tracking method and device, terminal equipment and storage medium
CN111079535B (en) Human skeleton action recognition method and device and terminal
JP6118976B2 (en) Head posture estimation apparatus, head posture estimation method, and program for causing computer to execute head posture estimation method
US11036968B2 (en) Method and apparatus for pattern recognition
CN109816709B (en) Monocular camera-based depth estimation method, device and equipment
CN111507925A (en) Picture repairing processing method, device, equipment and storage medium
CN111488836A (en) Face contour correction method, device, equipment and storage medium
CN109934058B (en) Face image processing method, face image processing device, electronic apparatus, storage medium, and program

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