private void buttonRepairLast_Click(object sender, EventArgs e) { var last = Shots.Last(); Mat frame = new Mat(); if (string.IsNullOrWhiteSpace(last.WarpedFileName)) { return; } string filePath = bidaSiusSettings.ImagesFolderPath + last.WarpedFileName; if (!File.Exists(filePath)) { return; } Image <Bgr, Byte> ff; using (ff = new Image <Bgr, byte>(filePath))//.Resize(400, 400, Emgu.CV.CvEnum.Inter.Linear, true); { frame = ff.Mat; int czteryIpolmmR_int = CaptureHelper.GetCzteryIpolmmR_int(bidaSiusSettings); //odpal manualne pozycjonowanie ManualShotPositioning msp = new ManualShotPositioning(); msp.SetTargetAndShot(frame, czteryIpolmmR_int, bidaSiusSettings); DialogResult dr = msp.ShowDialog(); var newShot = CaptureHelper.WyliczWartoscPrzestrzeliny(msp.SelectedPoint, bidaSiusSettings); last.Update(newShot); RefreshTarget(); } }
public static int GetCzteryIpolmmR_int(TargetDetails settings) { var pix = CaptureHelper.Pix(settings.BlackR); return(Convert.ToInt32(CaptureHelper.FourNHalfR(pix))); }
private string GetShotValue() { var przestrz = CaptureHelper.WyliczWartoscPrzestrzeliny(SelectedPoint, TargetDet); return(przestrz.ToString()); }