Open
Description
Hi, @anhttran
I really want to learn all your work. :). And of course there will be many questions for you. :(
In the file "BaselFaceEstimator.cpp", there is the code snippet as below. I couldn't figure out why there are two sets of landmarks, and why the yaw angle could affect the selection of landmark index?
Any explanation from anyone would be appreciated. Thanks in advance..
// Get 3D landmarks points (68x3), given 3D shape (Vx3) and yaw angle
cv::Mat BaselFaceEstimator::getLM(cv::Mat shape, float yaw){
cv::Mat lm(bf.lmInd.rows,3,CV_32F);
for (int i=0;i<lm.rows;i++){
int ind;
if (yaw > 0 && yaw < M_PI/9 && i < 8) ind = bf.lmInd.at<int>(i,0)-1;
else if (yaw < 0 && yaw > -M_PI/9 && i > 8 && i < 17) ind = bf.lmInd.at<int>(i,0)-1;
else
ind = bf.lmInd2.at<int>(i)-1;
for (int j=0;j<3;j++){
lm.at<float>(i,j) = shape.at<float>(ind,j);
}
}
return lm;
}
Metadata
Metadata
Assignees
Labels
No labels