Beispiel #1
0
        public PerPixelColorStore GetLowBitMap()
        {
            var bitmap = new PerPixelColorStore(width, height);

            ColorMapping colors = new ColorMapping();

            foreach (var(x, y) in bitmap.GetPixelsCords())
            {
                int range = max - min;
                int depth = DepthData[x, y];
                bitmap.SetPixel(x, y, colors.GetRed(depth), colors.GetGreen(depth), colors.GetBlue(depth));

                //bitmap.SetPixel(x, y,
                //    (byte)((DepthData[x, y] / ((double)max)) * 255), 0, 0);

                //bitmap.SetPixel(x,y,
                //    (byte)(((DepthData[x,y]-min)/((double)max-min))*255),0,0);

                //bitmap.SetPixel(x,y,
                //    (byte)(DepthData[x,y]%255),0,0);
            }
            return(bitmap);
        }
Beispiel #2
0
 public void ResetStores()
 {
     ResetPerPixelDepthMap();
     PerPixelColorStore = new PerPixelColorStore(pixelWidth, pixelHeigth);
 }