private void selectBtn_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.OK) { pictureBox1.Image = BitmapExtensions.LoadImageFitSize(ofd.FileName); phandler.Detect(ofd.FileName); } }
public void Detect(string filename, EventHandler <PhotoHandlerEventArgs> callback) { lock (detectorLock) { fname = System.IO.Path.GetFileNameWithoutExtension(filename); Logger.WriteLog($"Detect {fname}"); OnFinished = callback; imageToProcess = BitmapExtensions.LoadImageFitSize(filename); detectors.First().Process(imageToProcess); } }
public void Detect(string filename) { imageToProcess = BitmapExtensions.LoadImageFitSize(filename); detecters.First().Process(imageToProcess); }