目前我正在开展一个使用Kinect的项目,这个项目要求我知道那个人在那个时候所看到的地方,我发现我需要找到那个人的视线.
现在,我可以找到人的骨骼的头部但不能跟踪眼球运动.
if (body.TrackingState == SkeletonTrackingState.Tracked)
{
Joint joint = body.Joints[JointType.Head];
SkeletonPoint skeletonPoint = joint.Position;
// 2D coordinates in pixels
System.Drawing.Point point = new System.Drawing.Point();
if (_mode == CameraMode.Color)
{
// Skeleton-to-Color mapping
ColorImagePoint colorPoint = _sensor.CoordinateMapper.MapSkeletonPointToColorPoint(skeletonPoint, ColorImageFormat.RgbResolution640x480Fps30);
point.X = colorPoint.X;
point.Y = colorPoint.Y;
//Console.WriteLine(" X == " + point.X + " Y == " + point.Y);
X = (int)Math.Floor(point.X + 0.5);
Y = (int)Math.Floor(point.Y + 0.5);
}
// DRAWING...
Ellipse ellipse = new Ellipse
{
Fill = System.Windows.Media.Brushes.LightBlue,
Width …Run Code Online (Sandbox Code Playgroud)