我很好奇,是否可以使用Kinect传感器的骨架算法。
更具体的说,我有一些深度图像,我想提取骨架。有可能吗?
发布于 2015-03-25 09:55:57
是的,这是可能的。
但很可能,这并不简单。
这种允许骨骼跟踪的算法被称为“从单深度图像中进行局部实时人体姿态识别”。换句话说,它是用来估计骨骼关节从一个单一的深度图像,这是你需要的。
使用SDK (比如Microsoft或您喜欢的任何其他工具)的优点是不需要重新实现骨架跟踪算法。事实上,它是相当复杂的,它也需要大量的训练数据被人为地创建和正确使用。
但是,如果您想了解更多关于它的信息,您可以在此页上找到所需的所有内容,其中有一个指向原纸的链接,还有一些关于构建用于实现该算法的培训数据集的辅助材料。
发布于 2014-05-06 00:11:06
要用Kinect跟踪骨架,您必须启用SkeletonStream并获取框架中的骨架信息(而不是从深度框架中获取信息)。没有骨骼信息存储在它们里面)。
首先,您必须在应用程序中启用框架流,就像对深度流或颜色流一样(我假设您理解这一点,因为您已经有了深度图像)。
sensor.SkeletonStream.Enable(new TransformSmoothParameters()
{
Smoothing = 0.5f,
Correction = 0.5f,
Prediction = 0.5f,
JitterRadius = 0.5f,
MaxDeviationRadius = 0.04f
});; // enable the skeleton stream, you could essentially not include any of the content in between the first and last curved brackets, as they are mainly used to stabilize the skeleton information (e.g. predict where a joint is if it disappears)
skeletonData = new Skeleton[kinect.SkeletonStream.FrameSkeletonArrayLength]; // this array will hold your skeletal data and is equivalent to the short array that holds your depth data.
sensor.SkeletonFrameReady += this.SkeletonFrameReady;然后,您必须有一个方法,每次Kinect有要显示的骨架帧(包含所有骨架信息的框架)时都会触发该方法。
private void SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
{
using (SkeletonFrame skeletonFrame = e.SkeletonFrame()) //get all the skeleton data
{
if (skeletonFrame == null) //if there's no data, then exit
{
return;
}
skeletonFrame.CopySkeletonDataTo(skeletonData); //copy all the skeleton data into our skeleton array. It's an array that holds data for up to 6 skeletons
Skeleton skeletonOfInterest = (from s in skeletonData
where s.TrackingState == SkeletonTrackingState.Tracked
select s).ElementAtOrDefault(1); //define the first skeleton thats tracked
//put code to manipulate skeletons. You have to go do some reading to find out how to work with the skeletons.
}
}MSDN通常是我学习如何使用Kinect的goto资源。如果您安装了Kinect SDK,那么在Developer浏览器中也有一些很好的示例。最后,另一个很好的资源是开始使用Apress的Microsoft 进行Kinect编程,这是我广泛依赖的。你可以在亚马逊上找到它。
https://stackoverflow.com/questions/23467476
复制相似问题