Kinect彩色流到AVI视频

时间:2014-07-02 11:12:36

标签: c# kinect avi

我试图保存Kinect的视频。

我有WriteableBitMap:

   //Color frame ready
    private void SensorColorFrameReady(object sender, ColorImageFrameReadyEventArgs e)
    {
        //Get Color Frame
        using (ColorImageFrame colorFrame = e.OpenColorImageFrame())
        {
            if (colorFrame != null)
            {
                colorFrame.CopyPixelDataTo(this.colorPixels);
                this.colorBitmap = new WriteableBitmap(App.KinectHelper.sensor.ColorStream.FrameWidth, App.KinectHelper.sensor.ColorStream.FrameHeight, 96.0, 96.0, PixelFormats.Bgr32, null);
                this.colorBitmap.WritePixels(
          new Int32Rect(0, 0, this.colorBitmap.PixelWidth, this.colorBitmap.PixelHeight),
          this.colorPixels,
          this.colorBitmap.PixelWidth * sizeof(int),
          0);
            }
        }
    }

如何从中创建视频?

1 个答案:

答案 0 :(得分:1)

你应该尝试使用Emgu CV,它提供了一些DLL来将你的RGB流转换为AVI