1
我正在用Kinect進行開發,我需要在AllFramesReady事件中執行任務。 該任務包含大量使用BinaryWriter
的書寫。如何平行化Kinect AllFramesReady事件
我知道幀(顏色,深度,骨架)在短時間內存在。
using (var imageFrame = e.OpenColorImageFrame())
{
// Do the heavy task writing tons of bits do a `BinaryWriter`
} // The frame is no longer available :(
有沒有辦法將它並行化?或者一些技巧來改善我的代碼的性能?
在1.6 SDK示例中,KinectWpfViewers項目中的KinectDepthViewer在並行過程中進行深度着色。這可能是一個開始的好地方。當我在我的計算機上訪問代碼時,我會進一步調查。 –
謝謝,我也會調查一下。 – Ewerton