public void DisplayBitmapImage(object sender, EventArgsLibrary.BitmapImageArgs e) { string descriptor = e.Descriptor; switch (descriptor) { case "FishEyeImageFromCamera": Dispatcher.Invoke(new Action(delegate() { imageCamera1.Source = ImageSourceFromBitmap(e.Bitmap); })); break; case "PanoramaImageFromCamera": sw.Restart(); Dispatcher.Invoke(new Action(delegate() { imageCamera2.Source = ImageSourceFromBitmap(e.Bitmap); })); sw.Stop(); //Console.WriteLine("BitmapToImageSource: " + sw.ElapsedMilliseconds); break; case "ImageDebug2": Dispatcher.Invoke(new Action(delegate() { imageCamera2.Source = ImageSourceFromBitmap(e.Bitmap); })); break; case "ImageDebug3": Dispatcher.Invoke(new Action(delegate() { imageCamera3.Source = ImageSourceFromBitmap(e.Bitmap); })); break; case "ImageDebug4": //imageCamera4.Source = ImageSourceFromBitmap(image); break; default: imageCamera4.Source = ImageSourceFromBitmap(e.Bitmap); break; } }
public void SetNewYoloImageToProcess(object sender, EventArgsLibrary.BitmapImageArgs e) { currentImage = e.Bitmap; currentImageDescriptor = e.Descriptor; }