public DataCollectionCamera(ref WriteableBitmap colorReference, DataCollectionViewModel main) { _main = main; // Open the default device this.kinect = Device.Open(); // Configure camera this.kinect.StartCameras(new DeviceConfiguration { ColorFormat = Microsoft.Azure.Kinect.Sensor.ImageFormat.ColorBGRA32, ColorResolution = ColorResolution.R720p , DepthMode = DepthMode.NFOV_Unbinned, SynchronizedImagesOnly = true, CameraFPS = FPS.FPS30 }); // get transform this.transform = this.kinect.GetCalibration().CreateTransformation(); // get color camera dimensions this.colorWidth = this.kinect.GetCalibration().ColorCameraCalibration.ResolutionWidth; this.colorHeight = this.kinect.GetCalibration().ColorCameraCalibration.ResolutionHeight; this.bitmapColorCamera = new WriteableBitmap(colorWidth, colorHeight, 96.0, 96.0, PixelFormats.Bgra32, null); // this.bitmapFinal = new WriteableBitmap(); colorReference = bitmapColorCamera; StartCamera(); }
public DataCollectionView() { InitializeComponent(); _viewModel = new DataCollectionViewModel(); DataContext = _viewModel; }