提高实时深度视图+彩色实体的性能 [英] Improve performance of live depth view + colored bodies

查看:78
本文介绍了提高实时深度视图+彩色实体的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MonoGame 3.2上获得深度贴图+有色身体的实时视图时遇到问题。

I'm having problems getting a live view of the depth map + colored bodies performant on MonoGame 3.2.

我采取的方法如下(使用被动反应)扩展,但这不重要):

The approach I've takes is as follows (using reactive extensions but that should not matter):


  • MultiSourceFrameReader
  • 获取深度框架+车身框架
  • 传递到事件循环
  • 将深度数组+主体索引数组转换为颜色数组(在CPU上)

  • 将颜色数组复制到纹理

这在我的开发PC上运行得很好,这是第三代i7和NVidia GTX 660.不幸的是,这会降低我们的目标机器上的整个系统,第4代i5与英特尔高清显卡4600(我认为..)。放弃
帧的明显解决方案,我不太高兴。

This works quite okay on my development PC which is a 3rd generation i7 with an NVidia GTX 660. Unfortunately this slows down the entire system on our target machine, a 4th generation i5 with Intel HD Graphics 4600 (I think..). The obvious solution to drop frames, which I'm not too happy about.

如何使实时视图更流畅?

Any ideas how to make the live view more fluent?

推荐答案

正在处理MultiSourceFrameReader(MSFR)的已知性问题,但您应该能够获得类似于WPF示例的内容。 MonoGame是否使用.Net框架或是否有COM apis的包装?这个
取决于系统能够处理的内容(请参阅基础知识,你获得30fps),并在此基础上添加你的应用程序的要求。

There are known perf issues with MultiSourceFrameReader(MSFR) which are being worked on, but you should be able to get something similar to the WPF sample. Does MonoGame use the .Net framework or is there a wrapper around the COM apis? This is going to be dependent on what the system is capable of handling (see basics are you getting 30fps) and add on top of that, the requirements for your app.

我对游戏或任何与帧速率相关的平台的建议是使用轮询模型而不是MSFR。在设置时创建读者和每次更新:

My recommendation for a game or any platform that is frame rate dependent, would be to use the polling model instead of MSFR. On setup create the readers and on each update:


  • 检查颜色框(获取最新),如果没有,退出并等待下一帧
  • 获取深度/正文,如果没有等待下一帧
  • 复制深度/正文数据,然后复制颜色框
  • 释放所有获取的Kinect框架对象
  • 处理复制的数据


这篇关于提高实时深度视图+彩色实体的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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