Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
        private void SaveDepthBitmap()
        {
            WriteableBitmap depthBitmap = WriteableBitmapUtils.FromByteArray_ToGray(DepthMetaData.Pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);

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