录制 Kinect 流以供以后播放的最可靠方法是什么?
我一直在使用Processing 和Cinder 来动态修改Kinect 输入。但是,我还想记录完整的流(深度+颜色+加速度计值,以及其中的其他内容)。我正在录音,这样我就可以在同一材料上尝试不同的效果/处理。
因为我还在学习 Cinder,而且Processing 非常慢/滞后,所以我很难找到有关捕获流的策略的建议 - 任何东西(最好是在 Cinder、oF 或Processing 中)都会非常有帮助。
I have been working with Processing and Cinder to modify Kinect input on the fly. However, I would also like to record the full stream (depth+color+accelerometer values, and whatever else is in there). I'm recording so I can try out different effects/treatments on the same material.
Because I am still just learning Cinder and Processing is quite slow/laggy, I have had trouble finding advice on a strategy for capturing the stream - anything (preferably in Cinder, oF, or Processing) would be really helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我尝试过Processing 和OpenFrameworks。显示两个图像(深度和颜色)时处理速度较慢。 OpenFrameworks 在将数据写入磁盘时会变慢一点,但基本方法如下:
在这个基本设置中,我创建了几个 ofImage 实例和一个用于切换保存的布尔值。在示例中,深度和 RGB 缓冲区保存到 ofxCvGrayscaleImage 实例中,但我还没有充分使用 OF 和 OpenCV,不知道如何执行像将图像保存到磁盘这样简单的操作,这就是为什么我使用了两个 ofImage 实例。
我不知道您对Processing、OF、Cinder 的适应程度如何,因此,为了论证起见,我假设您知道自己已经掌握了Processing,但您仍在处理C++。
OF 与Processing 非常相似,但有一些区别:
还有更多差异,我不会在这里详细说明。请查看 wiki 上的 OF for Processing Users
回到 exampleKinect 示例,请参见此处我的基本设置:
.h 文件:
和 .cpp 文件:
这是一个非常基本的设置。随意修改(在保存的数据中添加倾斜角度等)
我很确定有方法可以提高这种速度(例如,不要更新 ofxCvGrayscaleImage 实例,并且在保存时不要将图像绘制到屏幕上,或者堆叠几帧并按间隔写入它们,而不是在每一帧上写入,等等。 )
祝你好运
I've tried both Processing and OpenFrameworks. Processing is slower when displaying both images (depth and colour). OpenFrameworks slows a bit while writing the data to disk, but here's the basic approach:
In this basic setup, I've created a couple of ofImage instances and a boolean to toggle saving. In the example the depth and RGB buffers are saved into ofxCvGrayscaleImage instances, but I haven't used OF and OpenCV enough to know how to do something as simple as saving an image to disk, which is why I've used two ofImage instances.
I don't know how comfortable you are with Processing, OF, Cinder, so, for arguments' sake I'll assume you know you're way around Processing, but you're still tackling C++.
OF is pretty similar to Processing, but there are a few differences:
There's more differences that I won'te detail here. Do check out OF for Processing Users on the wiki
Back to the exampleKinect example, here my basic setup:
.h file:
and the .cpp file:
This is a very basic setup. Feel free to modify (add tilt angle to the saved data, etc.)
I'm pretty sure there are ways to improve this speedwise (e.g. don't update ofxCvGrayscaleImage instances and don't draw images to screen while saving, or stack a few frames and write them at interval as opposed to on every frame, etc.)
Goodluck