在一个程序中,我开发了一个接近这篇文章的手势识别框架。
但是当我坐在电脑前的时候,我发现了假阳性。kinect松散跟踪骨架,然后使用错误的数据。
1)我试图过滤这种行为:
return sk.Joints[JointType.Head].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.WristLeft].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.WristRight].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.HipLeft].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.HipRight].TrackingState == JointTrackingState.Tracked;但即使我的关节看不见。Kinect猜错了骨架!
2)我也尝试使用TransformSmoothParameters,但是没有什么变化(不知道最佳参数)。
3)我也读过,骨骼追踪丢失后的需要恢复。但我不知道怎么发现?事实上,我得到了许多查找/丢失的值,这在正常情况下很好,但当我在PC前触发假阳性。
是否有一种智能检测骨架的方法,即使它处于跟踪状态,也是完全错误的?
发布于 2013-08-21 21:51:55
好吧,所以我找到了一个更好的方法:
bool track = sk.Joints[JointType.Head].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.WristLeft].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.WristRight].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.HipLeft].TrackingState == JointTrackingState.Tracked
&& sk.Joints[JointType.HipRight].TrackingState == JointTrackingState.Tracked;
if (track) {
var head = sk.Joints[JointType.Head].Position;
var kludge = sk.Joints[JointType.FootLeft].Position;
var diff = Math.Abs(head.Y - kludge.Y) * 100;
track = diff > 80;
}如果脚和头之间的距离是完全假的,我假设骨架是马车。
发布于 2013-08-20 22:59:05
当API松散跟踪骨架时,防止与骨架流不匹配的唯一方法是使用深度传感器。
var head = sk.Joints[JointType.Head].Position;
var color = Sensor.MapSkeletonPointToColor(head, ColorFormat);
var depth1 = Sensor.MapSkeletonPointToDepth(head, DepthFormat);
var depth2 = DepthPixels[color.X + color.Y * DepthW];最后,
见日志:
Skeleton: 1,259978 Depth1: 1260 Depth2: 0
Skeleton: 1,259845 Depth1: 1260 Depth2: 0
Skeleton: 1,259783 Depth1: 1260 Depth2: 0
Skeleton: 1,259672 Depth1: 1260 Depth2: 0
Skeleton: 1,259808 Depth1: 1260 Depth2: 0
Skeleton: 1,256333 Depth1: 1256 Depth2: 1221
Skeleton: 1,25608 Depth1: 1256 Depth2: 1216
Skeleton: 1,255606 Depth1: 1256 Depth2: 1216
Skeleton: 1,24086 Depth1: 1241 Depth2: 0
Skeleton: 1,236984 Depth1: 1237 Depth2: 735
Skeleton: 1,233512 Depth1: 1234 Depth2: 725因为有时它写的是1221,我也不得不忽略depthFrame.MinDepth +X下的一切(对我来说,MinDepth = 800)。
但有时还是很疯狂的:
Skeleton: 2,898029 Depth1: 2898 Depth2: 3528 Min: 800
Skeleton: 2,901603 Depth1: 2902 Depth2: 3565 Min: 800
Skeleton: 2,902839 Depth1: 2903 Depth2: 3528 Min: 800https://stackoverflow.com/questions/18288111
复制相似问题