public void DownCameraReset() { SetDownCameraFunctionSet(""); downVideoProcessing.Reset(); downVideoCapture.UnlockExposure(); downVideoCapture.UnlockBrightness(); }
public void UpCameraReset() { SetUpCameraFunctionSet(""); upVideoProcessing.Reset(); upVideoCapture.UnlockExposure(); upVideoCapture.UnlockBrightness(); }
public static void DoNeedleErrorMeasurement(VideoProcessing vp) { var cnc = Global.Instance.cnc; var originalLocation = cnc.XYALocation; PartLocation testLocation = Global.GoTo("Up Camera"); cnc.Zdown(Properties.Settings.Default.focus_height, true); // setup camera vp.SetFunctionsList("Needle"); vp.s.FindCircles = true; vp.s.Draw1mmGrid = true; var Needle = Global.Instance.needle; List <PartLocation> offsetError = new List <PartLocation>(); for (int i = 0; i <= 360; i += 45) { testLocation.A = i; var pp = testLocation - Needle.NeedleOffset; Needle.Move_m(pp); // move to target // mark erro var circle = VideoDetection.GetClosestCircle(vp, 10); if (circle != null) { vp.MarkA.Add(circle.ToScreenResolution().ToPartLocation().ToPointF()); circle.ToMMResolution(); offsetError.Add(circle.ToPartLocation()); } Thread.Sleep(500); //wait 1 second } Global.Instance.mainForm.ShowSimpleMessageBox("Upcamera offset Error is " + PartLocation.Average(offsetError) + "\nMax Error is " + PartLocation.MaxValues(offsetError)); cnc.Zup(); cnc.CNC_XYA(originalLocation); //revert to previous state vp.Reset(); }
public static void DoNeedleErrorMeasurement(VideoProcessing vp) { var cnc = Global.Instance.cnc; var originalLocation = cnc.XYALocation; PartLocation testLocation = Global.GoTo("Up Camera"); cnc.Zdown(Properties.Settings.Default.focus_height, true); // setup camera vp.SetFunctionsList("Needle"); vp.s.FindCircles = true; vp.s.Draw1mmGrid = true; var Needle = Global.Instance.needle; List<PartLocation> offsetError = new List<PartLocation>(); for (int i = 0; i <= 360; i += 45) { testLocation.A = i; var pp = testLocation - Needle.NeedleOffset; Needle.Move_m(pp); // move to target // mark erro var circle = VideoDetection.GetClosestCircle(vp, 10); if (circle != null) { vp.MarkA.Add(circle.ToScreenResolution().ToPartLocation().ToPointF()); circle.ToMMResolution(); offsetError.Add(circle.ToPartLocation()); } Thread.Sleep(500); //wait 1 second } Global.Instance.mainForm.ShowSimpleMessageBox("Upcamera offset Error is " + PartLocation.Average(offsetError) + "\nMax Error is " + PartLocation.MaxValues(offsetError)); cnc.Zup(); cnc.CNC_XYA(originalLocation); //revert to previous state vp.Reset(); }
public void SetUpCameraDefaults() { upVideoProcessing.Reset(); }
public void SetDownCameraDefaults() { downVideoProcessing.Reset(); }