public VideoController(Context kinectContext, ITextureController textureController) { this.Context = kinectContext; this.TextureController = textureController; _ImageGenerator = Context.FindExistingNode(NodeType.Image) as ImageGenerator; if (_ImageGenerator == null) { throw new Exception("Viewer must have an image node!"); } _Bitmap = new Bitmap((int)_ImageGenerator.MapOutputMode.XRes, (int)_ImageGenerator.MapOutputMode.YRes, System.Drawing.Imaging.PixelFormat.Format24bppRgb); }
public DepthVideoController(Context kinectContext, ITextureController textureController) { this.Context = kinectContext; this.TextureController = textureController; _DepthGenerator = Context.FindExistingNode(NodeType.Depth) as DepthGenerator; if (_DepthGenerator == null) { throw new Exception("Viewer must have a depth node!"); } _Histogram = new int[_DepthGenerator.DeviceMaxDepth]; _Bitmap = new Bitmap((int)_DepthGenerator.MapOutputMode.XRes, (int)_DepthGenerator.MapOutputMode.YRes/*, System.Drawing.Imaging.PixelFormat.Format24bppRgb*/); }