MapToColorImagePoint和MapDepthToColorImagePoint瓶颈 [英] MapToColorImagePoint and MapDepthToColorImagePoint bottleneck

查看:125
本文介绍了MapToColorImagePoint和MapDepthToColorImagePoint瓶颈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用kinect开发一个小应用程序并切换到新的kinect sdk v1.0并调整了我的代码。我所做的只是背景分离,我正在使用MapToColorImagePoint函数,但似乎有一些错误,因为
它太慢了。我描述了我的应用程序,下面附有图片。

I'm developing a small application with kinect and switched to the new kinect sdk v1.0 and adapted my code and all. What i do is just background separation and i'm using MapToColorImagePoint function, but there seems to be a bug of some sorts because it's so slow. I profiled my application, attached image below.

 

每个帧都调用深度数据到图像数据,我没有当我使用上一版本中的等效函数时出现的任何问题。我也试过了MapDepthToColorImagePoint,但失败并得到了类似的结果。

It's called every frame to map depth data to image data and i didn't have any problems when i was using the equivalent function in the previous release. I also tried MapDepthToColorImagePoint, failed with similar results.

推荐答案

尝试使用新的 KinectSensor.MapDepthFrameToColorFrame 方法。它更快,因为它一次完成整个图像并避免与每个像素的本机代码互操作。
Try using the new KinectSensor.MapDepthFrameToColorFrame method. It's much faster since it does the entire image at once and avoids interop with native code for every single pixel.


这篇关于MapToColorImagePoint和MapDepthToColorImagePoint瓶颈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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