private void buttonShowPointCloud_Click(object sender, RoutedEventArgs e) { SaveAll(); ScannerClose(); this.OpenSavedDepthData(); //for image viewing - rotate by 180 degrees //this.DepthMetaData.FrameData = DepthMetaData.RotateDepthFrame(this.DepthMetaData.FrameData, DepthMetaData.XResDefault, DepthMetaData.YResDefault); ShowDepthScreenshot(); PointCloud pc = MetaDataBase.ToPointCloud(this.ColorMetaData, this.DepthMetaData, this.BodyMetaData, this.coordinateMapper); TestForm fOTK = new TestForm(); fOTK.Show(); fOTK.ShowPointCloud(pc); }
private void SaveDepthAndColor_DataAndImage() { try { //byte[] myColorPixels = MetaDataBase.CreateColorInfoForDepth(this.ColorMetaData, this.DepthMetaData, this.coordinateMapper); PointCloud pc = MetaDataBase.ToPointCloud(this.ColorMetaData, this.DepthMetaData, this.BodyMetaData, this.coordinateMapper); //List<Point3D> newList = DepthMetaData.CreateListPoint3D_Depth(this.DepthMetaData.FrameData, DepthMetaData.XResDefault, DepthMetaData.YResDefault); SavePointCloudColor(pc); WriteableBitmap bitmapCustom = WriteableBitmapUtils.FromPointCloud_ToColor(pc, DepthMetaData.XDepthMaxKinect, DepthMetaData.YDepthMaxKinect); WriteableBitmapUtils.SaveImage(pathModels, "ColorDepthSpace_", bitmapCustom, true); } catch (Exception err) { System.Diagnostics.Debug.WriteLine("Error " + err.Message); } }
private void buttonShowColorizedPointCloud_Click(object sender, RoutedEventArgs e) { SaveAll(); ScannerClose(); OpenSavedColorDataWithDepth(); ShowDepthScreenshot(); ShowColorWithDepthScreenshot(); TestForm fOTK = new TestForm(); fOTK.Show(); PointCloud pc = MetaDataBase.ToPointCloud(this.ColorMetaData, this.DepthMetaData, this.BodyMetaData, this.coordinateMapper); fOTK.ShowPointCloud(pc); }