private void Ekran_MouseUp(object sender, MouseEventArgs e) { if (measure == false) { return; } cetvel.AddPoint(new Point(e.X, e.Y)); cetvel.Draw(Ekran); if (kalibration == true) { KalibrationDlg k = new KalibrationDlg(); int l = (int)cetvel.Measure(); k.LengthAtImage.Text = l.ToString(); if (k.ShowDialog() == DialogResult.OK) { double lr = Convert.ToDouble(k.LengthAtReal.Text); kFaktor = lr / l; kalibration = false; } else { MessageBox.Show("Geçerli bir Kalibrasyon ölçümü yapmadınız Tekrar deneyin", "Uyarı"); } } else { listMeasurement.Items.Add(cetvel.Sonuc(kFaktor)); } selection = false; }
public async Task <ImageMetaData> ExtractMetadataFromImage(byte[] imgBytes) { var taskDescription = visionService.MetaDataFromImageAsync(imgBytes); var taskLength = measurementService.Measure(imgBytes); await Task.WhenAll(taskDescription, taskLength); return(new ImageMetaData() { Description = taskDescription.Result, Length = taskLength.Result.Length, ImageStream = taskLength.Result.ImageStream, }); }
public void takeMeasurement() { measurement.Measure(); Console.WriteLine("meusurement taken"); }