Exemplo n.º 1
0
 void StartPanoCam()
 {
     panoCam          = new CamRetriever(CamRetriever.getPanoCamIndex());
     panoCam.CropArea = new RectangleF(Properties.Settings.Default.Pano_Crop_Left,
                                       Properties.Settings.Default.Pano_Crop_Top,
                                       Properties.Settings.Default.Pano_Crop_Width,
                                       Properties.Settings.Default.Pano_Crop_Height);
     panoCam.NewFrameAvailableEvent += NewFrameAvailableEvent;
     panoCam.Start();
 }
Exemplo n.º 2
0
 private void NewFrameAvailableEvent(int camIndex, Bitmap frameBmp)
 {
     if (camIndex == CamRetriever.getPanoCamIndex())
     {
         Action displayaction = delegate
         {
             BitmapImage imgSrc = Utilities.ToBitmapImage(frameBmp, ImageFormat.Jpeg);
             panoDisplayer.Source = imgSrc;
         };
         panoDisplayer.Dispatcher.Invoke(displayaction);
     }
     else
     {
         frameBmp.RotateFlip(RotateFlipType.Rotate270FlipNone);
         Action displayaction = delegate
         {
             BitmapImage imgSrc = Utilities.ToBitmapImage(frameBmp, ImageFormat.Jpeg);
             tableDisplayer.Source = imgSrc;
         };
         tableDisplayer.Dispatcher.Invoke(displayaction);
     }
 }