0

我正在开发一个 Kinect 应用程序。我有两个线程,一个用于读取关节的值(包含 20 个关节的 x、y、z 坐标),另一个用于读取深度值(每帧 76800 个短值)。我从按下开始按钮开始记录这些值,直到按下结束按钮。我希望编写相同数量的关节和深度帧,但我总是以很多关节帧结束。我捕获了 150 个深度帧但 180 个关节帧,我认为这是因为深度写入缓冲区的数据量。联合只在每帧中写入 60 个浮点数,但深度为 76800 短裤。

我怎样才能从每个捕获相同数量的帧?(Kinect 捕捉深度和坐标 25 到 30 FPS)

此日志还显示了每个调用的线程数不相等:

112/11/9 4:19:58: SKELETON

112/11/9 4:19:58: DEPTH

112/11/9 4:19:58: SKELETON

112/11/9 4:19:58: SKELETON

112/11/9 4:19:58: DEPTH

112/11/9 4:19:58: SKELETON

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: SKELETON


112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: SKELETON


112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: DEPTH


112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: DEPTH

112/11/9 4:19:59: SKELETON

112/11/9 4:19:59: SKELETON


112/11/9 4:19:59: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: DEPTH

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:0: SKELETON

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:1: DEPTH

112/11/9 4:20:1: SKELETON

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: DEPTH

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: SKELETON

112/11/9 4:20:2: DEPTH

112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: SKELETON


112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: DEPTH


112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: DEPTH

112/11/9 4:20:3: SKELETON

112/11/9 4:20:3: DEPTH

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: DEPTH

112/11/9 4:20:4: SKELETON

112/11/9 4:20:4: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH


112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH


112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: SKELETON


112/11/9 4:20:5: SKELETON

112/11/9 4:20:5: DEPTH

112/11/9 4:20:5: DEPTH

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: DEPTH

112/11/9 4:20:6: DEPTH

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: DEPTH

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON


112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: DEPTH

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: DEPTH

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: DEPTH

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: SKELETON

112/11/9 4:20:6: DEPTH

112/11/9 4:20:6: DEPTH
N
112/11/9 4:20:7: SKELETON

112/11/9 4:20:7: DEPTH

112/11/9 4:20:7: DEPTH

112/11/9 4:20:7: SKELETON

112/11/9 4:20:7: SKELETON

112/11/9 4:20:7: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: SKELETON

112/11/9 4:20:8: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: DEPTH

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:9: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON


112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:10: DEPTH

112/11/9 4:20:10: SKELETON

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: DEPTH

112/11/9 4:20:11: SKELETON

112/11/9 4:20:11: DEPTH
N
112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: DEPTH

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: SKELETON

112/11/9 4:20:12: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: DEPTH

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: SKELETON

112/11/9 4:20:13: SKELETON

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: SKELETON

112/11/9 4:20:14: DEPTH

112/11/9 4:20:15: SKELETON

112/11/9 4:20:15: DEPTH

112/11/9 4:20:15: SKELETON

112/11/9 4:20:15: DEPTH

112/11/9 4:20:15: SKELETON

112/11/9 4:20:15: DEPTH

112/11/9 4:20:15: DEPTH

112/11/9 4:20:15: SKELETON

112/11/9 4:20:15: SKELETON

112/11/9 4:20:15: DEPTH
4

1 回答 1

0

拥有一个由锁和条件变量保护的共享表,该变量保持对已捕获的每种类型的帧数的计数。如果任一线程发现它捕获的帧比另一个多,则让它阻塞条件变量。当任一线程完成获取帧时,它会增加其类型的计数并广播条件变量。

于 2012-12-09T03:07:43.033 回答