在 WPF 上流式传输从 Kinect RGB 摄像头接收到的连续图像?
我通过下面的代码从 Kinect 的 RGB 摄像头收集连续图像;
PlanarImage Image = e.ImageFrame.Image;
video.Source = BitmapSource.Create(
Image.Width, Image.Height, 96, 96, PixelFormats.Bgr32, null, Image.Bits, Image.Width * Image.BytesPerPixel);
我想将从 Kinect 获得的一系列图像作为实时流传输到我的 WPF 应用程序上,但我不知道如何操作。原因是我希望能够使用 Kinect 作为网络摄像头,但其他解决方案(编码 directshow 过滤器,或仅使用一个可用的解决方案)对我来说无法解决问题,或者我对 C++ 问题缺乏了解。对于像我这样的 C++ 水平的人来说,为 Kinect 编写一个直接显示过滤器来充当虚拟摄像头是极具挑战性的。
总而言之,问题在于 Kinect 的输出,它给了我一系列图像,我真的不知道如何将其转换为可以从其他应用程序显示的实时流。
任何帮助表示感谢!
I'm gathering consecutive images from Kinect's RGB camera from the code below;
PlanarImage Image = e.ImageFrame.Image;
video.Source = BitmapSource.Create(
Image.Width, Image.Height, 96, 96, PixelFormats.Bgr32, null, Image.Bits, Image.Width * Image.BytesPerPixel);
And i want to stream the series of images that i get from Kinect as a real time stream on my WPF application, but I don't know how to. The reason is that i want to be able to use the Kinect as a webcam, but the other solutions (coding a directshow filter, or using only one available one) didn't worked for me for resolution or my lack of knowledge in C++ issues. Writing a direct show filter for Kinect to act as a virtual cam is extremely challenging for someone on my level with C++.
To sum up, problem lies within the output of Kinect, it gives me a series of images which i don't really know how to turn it to a real time stream that I can display from other applications.
Any help is appreciated thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果可以选择商业库,请查看 http://www.visioforge。 com/video-capture-sdk-net2.html - 它可以捕获并以 WMV 格式进行流传输...
另一个商业选项是 Leadtools Videostreaming SDK - 请参阅 http://www.leadtools.com/sdk/video-streaming.htm
IF a commercial library is an option take a look at http://www.visioforge.com/video-capture-sdk-net2.html - it can capture and also stream in WMV...
Another commercial option would be Leadtools Videostreaming SDK - see http://www.leadtools.com/sdk/video-streaming.htm
DirectShow 确实是您最好的选择。 WPF 中没有任何内容可用于将视频流式传输到其他应用程序。
DirectShow is indeed your best bet. There is nothing in WPF for streaming video to other apps.
正如上面评论中提到的,Kinect 生成一系列图像而不是生成流视频。
在 Microsoft Kinect SDK 中从 Kinect 提取深度数据时,此页面将很有帮助:
http://www.i-programmer.info/programming/hardware/2714-getting-started-with-microsoft-kinect-sdk-depth.html
如果您正在使用处理,则可以导入 SimpleOpenNI 库(https://code.google.com/p/simple-openni/< /a>) 支持视频捕获(您可以在库中找到示例)。
该视频流采用 .ONI 格式,可以通过以下库转换为 AVI:
http:// kirilllykov.github.io/blog/2013/03/19/convert-openni-star-dot-oni-files-into-avi/
一切顺利,如果您发现任何其他内容,请告诉我们 方法。
As mentioned in the comments above the Kinect produces a series of Images instead of generating a streaming video.
This page is going to be helpful while extracting depth data from the Kinect in Microsoft Kinect SDK:
http://www.i-programmer.info/programming/hardware/2714-getting-started-with-microsoft-kinect-sdk-depth.html
If you are using processing you can import the SimpleOpenNI library(https://code.google.com/p/simple-openni/) which supports video capture (you can find examples within the library).
This video stream comes in .ONI format, which can be converted into AVI via the following library:
http://kirilllykov.github.io/blog/2013/03/19/convert-openni-star-dot-oni-files-into-avi/
All the best, let us know if you find any other method.