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); }
public void UpdateColorPixelBitMap() { for (int x = 0; x < pixelWidth; x++) { for (int y = 0; y < pixelHeigth; y++) { int depth = this.PerPixelDepthStore[x, y]; PerPixelColorStore.SetPixel(x, y, colors.GetRed(depth), colors.GetGreen(depth), colors.GetBlue(depth)); } } }