private void DrawBPPointCloudToSurface() { List <LMData> tempListModeData = new List <LMData>(); if (LACC_Control_Static.ListedLMData.Count == 0) { return; } try { tempListModeData = (from LM in LACC_Control_Static.ListedLMData where LM != null && LM.MeasurementTime > DateTime.Now - TimeSpan.FromSeconds(MLPETime) select LM).ToList(); } catch (NullReferenceException e) { Debug.WriteLine(e.ToString()); return; } if (tempListModeData.Count == 0) { return; } //Trace.WriteLine("LM Data count " + tempListModeData.Count()); var tempVector3s = SurfaceImageVector3; var tempUVs = SurfaceImageUVs; var(v3, c4, bitmap) = ImageRecon.BPtoPointCloudBitmap(tempVector3s, tempUVs, tempListModeData, ReconRGBPixelHeight, ReconRGBPixelWidth, false, 5, 0.8); ReconBitmapImage = Bitmap2BitmapImage(bitmap); //RealtimeReconPointCloud = new PointGeometry3D() { Positions = v3, Colors = c4 }; }
private void DrawBPPointCloudToRealTimePointCloud() { List <LMData> tempListModeData = new List <LMData>(); if (RealtimeVector3s == null || RealtimeVector3s.Count() == 0) { return; } if (LACC_Control_Static.ListedLMData.Count == 0) { return; } try { tempListModeData = (from LM in LACC_Control_Static.ListedLMData where LM != null && LM.MeasurementTime > DateTime.Now - TimeSpan.FromSeconds(MLPETime) select LM).ToList(); } catch (NullReferenceException e) { Debug.WriteLine(e.ToString()); return; } if (tempListModeData.Count == 0) { return; } //Trace.WriteLine("LM Data count " + tempListModeData.Count()); var(v3, c4) = ImageRecon.BPtoPointCloud(RealtimeVector3s, tempListModeData, false, 1, 0.8); // RealtimeReconPointCloud = new PointGeometry3D() { Positions = v3, Colors = c4 }; }
private void DrawBP() { VMStatus = "Drawing BP"; Task.Run(() => { var bpData = ImageRecon.BPtoPointCloud(ImageSpace, binaryToLMData.LACC.ListedLMData, BPAngleThreshold, BPMinCountPercent); var bpVectors = bpData.Item1; var bpColor4s = bpData.Item2; ReconPoint = new PointGeometry3D() { Positions = bpVectors, Colors = bpColor4s }; VMStatus = "Drawing BP Done"; }); }
private void RealTimeImageRecon() { if (RealtimeRGB != null) { ReconRGBPixelWidth = RealtimeRGB.PixelWidth / 10; ReconRGBPixelHeight = RealtimeRGB.PixelHeight / 10; } if (!IsRealsenseOn) { return; } (SurfaceImageVector3, SurfaceImageUVs) = ImageRecon.GetImageSpaceBySurfaceFOV(ReconRGBPixelWidth, ReconRGBPixelHeight, 90, 65, 10); while (IsRealTimeImageReconOn) { //Stopwatch sw = new Stopwatch(); //sw.Start(); ////DrawBPPointCloudToRealTimePointCloud(); switch (RealtimeReconMode) { case RTReconMode.RTRECONMODE_FAR: DrawBPPointCloudToSurface(); break; case RTReconMode.RTRECONMODE_NEAR: DrawBPPointCloudToRealTimePointCloudRGB(); break; } //sw.Stop(); //Debug.WriteLine("BP Draw Image tooks " + sw.ElapsedMilliseconds + " ms."); } //DrawBPPointCloudToRealTimePointCloudRGB(); }
private void SetImageSpace() { VMStatus = "Image Space is Reset"; ImageSpace = ImageRecon.GetImageSpaceByVoxel(MinX, MaxX, MinY, MaxY, MinZ, MaxZ, VoxelSize); VMStatus = "Image Space is Reset. Voxel Count: " + ImageSpace.Count; }