设置Kinect for Windows v2颜色帧率 [英] Set Kinect for Windows v2 color framerate
问题描述
我创建了一个基于ColorBasics-WPF和FaceBasics-WPF示例的应用程序,以便裁剪用户面部并在不同的视图框中显示此流。我想知道是否可以设置面部流的帧速率,以便为我的目的进一步调查
。事实上,我需要一个稳定的fps(approssimaimative介于10-15 fps之间),但我的应用程序以30 fps运行有时会降低到18/20 fps几秒钟,这种行为对我来说是不可接受的。我尝试DispatcherTimer在帧之间设置一个间隔
以获得稳定的帧速率,但它对我没有帮助。有没有其他解决方案?
提前致谢!
彩色帧率固定在30fps,或在低光照下15fps。如果你降到18/20,通常得到30fps,这将是你如何处理帧的问题。如果你对颜色或面部的回调进行任何处理,这个
将影响你释放帧的速度。 Kinect积极确保数据的客户遵守这一点。
您应该遵循从框架中复制数据并在另一个线程上处理数据的模式。
I create an application based on ColorBasics-WPF and FaceBasics-WPF examples in order to crop user face and show this stream in a different viewbox. I want to know if it's possible to set the framerate of the face stream in order to make further investigation for my purposes. In fact, I need a stable fps (approssimatively between 10-15 fps), but my application while runs at 30 fps sometimes drops to 18/20 fps for few seconds, and this behaviour is not acceptable for me. I try DispatcherTimer to set an interval between frames to obtain a stable framerate, but it doesn't help me. Has anyone another solution?
Thanks in advance!
Color frame rate are fixed at 30fps, or 15fps in low light. If you are dropping to 18/20, when typically getting 30fps, this is going to be an issue with how you are processing frames. If you are doing any processing on the callback for color or face, this is going to affect how quickly you are releasing the frame back. Kinect is aggressive with ensuring clients of the data adhere to this.
You should follow the pattern of copying the data from the frame and processing that on another thread.
这篇关于设置Kinect for Windows v2颜色帧率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!