限制骨架数量 [英] Limit the number of skeletons

查看:76
本文介绍了限制骨架数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些应用程序使用SDK中的Body Basics示例。

I have some application using the Body Basics example from SDK.

如您所知,kinect v2同时获得了许多骷髅。我的应用程序使用关节点进行一些计算,但如果同时出现多个骨架,我得到错误的结果。

Like you know, the kinect v2 get many skeletons simultaneously. My application uses the joint points to do some calculations, but if more then one skeleton appears at same time, i get the wrong result.

Soo,我需要一些解决方案,我想在2 :

Soo, i need some solution, i thinked in 2:

- 将骨架的数字限制为1,只有出现的第一个骨架停留在那里。

- Limiting the numeber of skeletons to 1, and only the first skeleton that appears stay there.

- 限制捕获距离,只捕获更近的骨架。

- Limiting the distance of capture, only the closer skeleton will be captured.

我更喜欢第一个,但如果有人欢迎其他想法。

I prefer the first one, but if someone has other idea will be welcome.

抱歉我的英文不好并谢谢你。 

Sorry for my bad english and Thanks you. 

推荐答案

我认为第一种方式不起作用:

I think the first way won't work:

frame.GetAndRefreshBodyData(bodies);

GetAndRefreshBodyData 需要一个大小为6的数组。这相当于

GetAndRefreshBodyData needs an array with size 6. That's equivalent to

bodies = new Body[kinect.BodyFrameSource.BodyCount];

我不确定,如果他们自去年以来改变了这一点。所以最好的方法是替代2,检查z坐标。

I am not sure, if they changed this since last year. So the best way to go is alternative 2, checking z-coordinates.

祝你好运,

Alex





这篇关于限制骨架数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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