我目前正在使用微软的SDK跟踪一张脸,并且可以检测到脸上的121点。我可以得到以下庄园中各点的坐标:
if (!this.lastFaceTrackSucceeded || this.skeletonTrackingState != SkeletonTrackingState.Tracked)
return;
var faceModelPts = new List<Point>();
var faceModel = new List<FaceModelTriangle>();
for (int i = 0; i < this.facePoints.Count; i++)
{
faceModelPts.Add(new Point(this.facePoints[i].X + 0.5f, this.facePoints[i].Y + 0.5f));
FaceDataPoints.XPointInfo[i] = this.facePoints[i].X;
FaceDataPoints.YPointInfo[i] = this.facePoints[i].Y;
}
但这些点似乎是彩色图像的坐标。如何获取有关每个像素的相应深度信息。比如用户脸上点“20”?
答案 0 :(得分:0)
找到答案
“GetProjected3DShape”形状保存面部跟踪基础使用的2D坐标
要获取深度信息,请使用“Get3DShape”
比较2
private EnumIndexableCollection<FeaturePoint, PointF> ColourPoints;
private EnumIndexableCollection<FeaturePoint, Vector3DF> DepthPoints;
深度点保存每个面部点的X,Y和Z坐标信息