chengzhengxin / sdm

Supervised Descent Method Apply to Face Alignment, and Head Pose Estimation with Linear Regression. It is cross-platfrom, easily compile in windows, ubuntu, even in Android & iOS.
448 stars 197 forks source link

why do so can get Roll, Yaw, Pitch Angles? #1

Open liuqunzhong opened 8 years ago

liuqunzhong commented 8 years ago

src/include/ldmarkmodel.cpp getPose what's the principle?

你好,请问您的代码里计算roll yaw pitch的公式或原理是什么呢?

liuqunzhong commented 8 years ago

how to get the estimateHeadPose2dArray and estimateHeadPose2dArray2, and waht they mean?

chengzhengxin commented 8 years ago

linear regression, MatrixA denotes facial landmarks(as a 14d vector), MatrixW(that is estimateHeadPose2dArray2) means weights(as a 14X3 matrix), then we can get angles from MatrixAngle(3d vector) = MatrixA*MatrixW;

liuqunzhong commented 8 years ago

谢谢! 你好,estimateHeadPose2dArray2是怎么得到的呢?线性回归? 如果我用10个或更多个点,怎么再得到一个estimateHeadPose2dArray2呢?

chengzhengxin commented 8 years ago

是的,可以预先通过10个三维模型,人工标定这些三位模型里面的脸部特征点,然后随机旋转平移这些特特征点,然后通过相机成像模型投影得到二维点。这样就有了二维脸部特征点到头部姿态的映射。然后线性回归。

liuqunzhong commented 8 years ago

谢谢你! 3d点和2d点,solvePnP,可以得到rvec,再Rodrigues可以得到旋转矩阵,从这个旋转矩阵能得到三个角度吗?有的人说直接对旋转矩阵decomposeProjectionMatrix可以得到eularAngles,但是得到的这三个角度很怪,看不出来有什么规律。

emily1314 commented 7 years ago

你好,请问estimateHeadPose2dArray这个矩阵是怎么得到的呢?为什么是15*9?这个9列是指的什么呢?谢谢!

liuqunzhong commented 7 years ago

你好 如果有一些标记人脸旋转角度的图像 是否可以用人脸区域的特征比如hog 训练回归模型呢 目的是检测到人脸区域后计算该区域的特征 然后通过回归模型得到大致的角度