Exemple #1
0
        public static WriteableBitmap FromUShort(ushort[] myDepthFrame)
        {
            byte[]          pixels      = ImageExtensions.ConvertUshortToByte(myDepthFrame);
            WriteableBitmap depthBitmap = WriteableBitmapUtils.FromByteArray_ToGray(pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);

            return(depthBitmap);
        }
Exemple #2
0
 public DepthMetaData(PointCloud pc, bool createBitmap)
 {
     this.FrameData = FromPointCloud(pc);
     if (createBitmap)
     {
         this.pixels = ImageExtensions.ConvertUshortToByte(this.FrameData);
         //depthBitmap = WriteableBitmapUtils.FromByteArray_ToGray(pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);
     }
 }
Exemple #3
0
 public DepthMetaData(List <OpenTK.Vector3> vectors, bool createBitmap)
 {
     this.FrameData = FromVector3List(vectors);
     if (createBitmap)
     {
         this.pixels = ImageExtensions.ConvertUshortToByte(this.FrameData);
         depthBitmap = WriteableBitmapUtils.FromByteArray_ToGray(pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);
     }
 }
Exemple #4
0
        public static WriteableBitmap ToWriteableBitmap(List <Vector3> listOfPoints)
        {
            ushort[] myDepthFrame = FromVector3List(listOfPoints);

            byte[]          pixels      = ImageExtensions.ConvertUshortToByte(myDepthFrame);
            WriteableBitmap depthBitmap = WriteableBitmapUtils.FromByteArray_ToGray(pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);

            return(depthBitmap);
        }
Exemple #5
0
        public static System.Drawing.Image ToImage(List <Vector3> listOfPoints)
        {
            ushort[] myDepthFrame = FromVector3List(listOfPoints);

            byte[] pixels = ImageExtensions.ConvertUshortToByte(myDepthFrame);


            System.Drawing.Image depthImage = BitmapExtensions.FromByteArray_Gray(pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);
            return(depthImage);
        }
Exemple #6
0
        public DepthMetaData(DepthFrame myframeDepth, bool createBitmap)
        {
            this.frameDepth = myframeDepth;

            this.FrameData = AssignDepthFrameData(myframeDepth);

            if (createBitmap)
            {
                this.pixels = ImageExtensions.ConvertUshortToByte(this.FrameData);
                //depthBitmap = WriteableBitmapUtils.FromByteArray_ToGray(pixels, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect);
            }
        }
Exemple #7
0
        public IRMetaData(InfraredFrame myframeIR, bool createBitmap)
        {
            this.frameInfrared = myframeIR;

            this.FrameData = AssignIRFrameData(myframeIR);


            if (createBitmap)
            {
                this.pixels = ImageExtensions.ConvertUshortToByte(this.FrameData);
                irBitmap    = WriteableBitmapUtils.FromByteArray_ToGray(pixels, MetaDataBase.XDepthMaxKinect, MetaDataBase.YDepthMaxKinect);
            }
        }
Exemple #8
0
 public System.Drawing.Bitmap UpdateDepthImage(System.Drawing.Bitmap bm)
 {
     this.pixels = ImageExtensions.ConvertUshortToByte(this.FrameData);
     bm          = bm.Update_Gray(pixels);
     return(bm);
 }