我试图保存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);
}
}
}
如何从中创建视频?