Пример #1
0
 private void SaveColorBitmap()
 {
     //write color Bitmap
     if (this.ColorMetaData != null)
     {
         //ImageSource imSource = ImageSourceUtils.CreateImageSource(ColorMetaData.Pixels, ColorMetaData.XResDefault, ColorMetaData.YResDefault);
         WriteableBitmap bitmap = WriteableBitmapUtils.FromByteArray_ToColor(ColorMetaData.Pixels, ColorMetaData.XColorMaxKinect, ColorMetaData.YColorMaxKinect);
         WriteableBitmapUtils.SaveImage(pathModels, "Color_", bitmap, true);
     }
 }
Пример #2
0
        private void SaveImageInterpolated()
        {
            if (listPointsInterpolated == null)
            {
                return;
            }
            //-----------------------------------------------
            //now interpolate last 10 frames to one frame and save


            //ushort[] rotatedPoints = DepthMetaData.RotateDepthFrame(this.DepthMetaData.DepthFrameData, DepthMetaData.XResDefault, DepthMetaData.YResDefault);

            WriteableBitmap depthInterpolated = DepthMetaData.ToWriteableBitmap(listPointsInterpolated);

            WriteableBitmapUtils.SaveImage(pathModels, "DepthInterpolated", depthInterpolated, true);
        }
Пример #3
0
        private void SaveDepthAndColor_DataAndImage()
        {
            try
            {
                //byte[] myColorPixels = MetaDataBase.CreateColorInfoForDepth(this.ColorMetaData, this.DepthMetaData, this.coordinateMapper);
                PointCloud pc = MetaDataBase.ToPointCloud(this.ColorMetaData, this.DepthMetaData, this.BodyMetaData, this.coordinateMapper);

                //List<Point3D> newList = DepthMetaData.CreateListPoint3D_Depth(this.DepthMetaData.FrameData, DepthMetaData.XResDefault, DepthMetaData.YResDefault);
                SavePointCloudColor(pc);

                WriteableBitmap bitmapCustom = WriteableBitmapUtils.FromPointCloud_ToColor(pc, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);
                WriteableBitmapUtils.SaveImage(pathModels, "ColorDepthSpace_", bitmapCustom, true);
            }
            catch (Exception err)
            {
                System.Diagnostics.Debug.WriteLine("Error " + err.Message);
            }
        }
Пример #4
0
        private void SaveDepthBitmap()
        {
            WriteableBitmap depthBitmap = WriteableBitmapUtils.FromByteArray_ToGray(DepthMetaData.Pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);

            WriteableBitmapUtils.SaveImage(pathModels, "Depth", depthBitmap, true);
        }