人脸对齐5个点

人脸对齐5个点仿射变换
人脸识别过程中,人脸对齐往往是最重要的一步,对齐的结果往往影响之后提取人脸特征的准确率,opencv内置的仿射变换仅仅需要三个点,而需对齐的人脸关键点一般是5个、68个、128个,本文提供一种n点对齐的放射变换点,以5个关键点的对齐为例:
归一化的五点坐标为:

[(0.31556875000000000, 0.4615741071428571),
(0.68262291666666670, 0.4615741071428571),
(0.50026249999999990, 0.6405053571428571),
(0.34947187500000004, 0.8246919642857142),
(0.65343645833333330, 0.8246919642857142)]
假如要裁剪的face大小为(112, 96),即:(height, width),则face的最终location点为:(xwidth, yheight)
[(30.2946, 51.6963),
(65.5318, 51.6963),
(48.0252, 71.7366),
(33.5493, 92.3655),
(62.7299, 92.3655)]

具体就是
[(0.31556875000000000xwidth, 0.4615741071428571xheight),
(0.68262291666666670xwidth, 0.4615741071428571xheight),
(0.50026249999999990xwidth, 0.6405053571428571xheight),
(0.34947187500000004xwidth, 0.8246919642857142xheight),
(0.65343645833333330xwidth, 0.8246919642857142xheight)]

x是相乘

你可能感兴趣的:(深度学习,神经网络)