C#中的人脸跟踪入门 [英] Face Tracking in C# getting started

查看:117
本文介绍了C#中的人脸跟踪入门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我已经想出如何用Kinect跟踪一只手,但我无法弄清楚跟踪一个面部点所需的一切。我知道如何在跟踪器开始运行时索引点(使用GetProjected3DShape()),但我不知道我需要启动跟踪器的所有
代码行。在我开始使用Kinect传感器后,有人可以从头开始解释如何启动面部跟踪器吗?

 private static void Main(string [] args) 
{

//找到第一个连接的传感器
KinectSensor sensor = KinectSensor.KinectSensors.Where(s => s.Status == KinectStatus.Connected).FirstOrDefault() ;
if(sensor == null)
{
Console.WriteLine(" No No Kinect sensor found!");
Console.ReadLine();
返回;
}

//使用传感器创建跟踪骨架的对象
跟踪器跟踪器=新跟踪器(传感器);
Console.WriteLine(" Tracker created");

//启动传感器
sensor.Start();
Console.WriteLine("传感器已启动");

//运行直到用户按下键盘上的'q'或'Q'
while(Char.ToLowerInvariant(Console.ReadKey()。KeyChar)!='q'){ }

//现在我要做什么来追踪脸部?




提前感谢您的帮助!

解决方案

查看工具包中的facetracker wpf示例。您需要跟踪身体ID。这也将为您提供有关该功能的更多信息:


http: //msdn.microsoft.com/en-us/library/jj130970.aspx


Hi all,

I've figured out how to track a hand with the Kinect, but I can't figure out everything that's required to track a face point. I know how to index the points (using GetProjected3DShape()) once the tracker starts running, but I don't know all the lines of code I need to get the tracker started. Can someone please explain from the ground up how to start the face tracker after I've gotten the Kinect sensor started?

private static void Main(string[] args)
        {

            // Find the first connected sensor
            KinectSensor sensor = KinectSensor.KinectSensors.Where(s => s.Status == KinectStatus.Connected).FirstOrDefault();
            if (sensor == null)
            {
                Console.WriteLine("No Kinect sensor found!");
                Console.ReadLine();
                return;
            }

            // Create object that will track skeletons using the sensor
            Tracker tracker = new Tracker(sensor);
            Console.WriteLine("Tracker created");

            // Start the sensor
            sensor.Start();
            Console.WriteLine("Sensor started");

            // Run until the user presses 'q' or 'Q' on the keyboard
            while (Char.ToLowerInvariant(Console.ReadKey().KeyChar) != 'q') {}

            // NOW WHAT DO I DO TO TRACK THE FACE?



Thanks in advance for the help!

解决方案

have a look at the facetracker wpf sample from the toolkit. You need tracked body id's. This will also give you more info on the feature:

http://msdn.microsoft.com/en-us/library/jj130970.aspx


这篇关于C#中的人脸跟踪入门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆