コード例 #1
0
        void Imager_CameraEvent(object sender, CameraEventArgs e)
        {
            //MessageBox.Show(e.Message, "Camera: ", MessageBoxButton.OK, MessageBoxImage.Error);

            VM.IsImaging = e.CameraImaging;

            if (VM.IsImaging)
            {
                Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(
                                           delegate()
                {
                    StopPB.Visibility     = Visibility.Visible;
                    SnapShotPB.Visibility = Visibility.Collapsed;
                    VideoPB.Visibility    = Visibility.Collapsed;
                }
                                           ));
            }
            else
            {
                Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(
                                           delegate()
                {
                    StopPB.Visibility     = Visibility.Collapsed;
                    SnapShotPB.Visibility = Visibility.Visible;
                    VideoPB.Visibility    = Visibility.Visible;
                }
                                           ));
            }
        }
コード例 #2
0
        private void HandleCameraSelect(object sender, CameraEventArgs e)
        {
            IPhotoModel photoModel = transform.GetComponent <PhotoController>().GETPhotoModel();

            model.ChangeVisibility(false);
            photoModel.ChangeVisibility(true);
        }
コード例 #3
0
 private void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     if (_viewModel.TakePhotoCommand.CanExecute(null))
     {
         _viewModel.TakePhotoCommand.Execute(null);
     }
 }
コード例 #4
0
 private void OnCameraChanged(CameraEventArgs obj)
 {
     if (obj.MapView == MappingModule.ActiveMapView)
     {
         Camera = obj.CurrentCamera;
     }
 }
コード例 #5
0
 private void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     if (_viewModel.TakePhotoCommand.CanExecute(null))
     {
         _viewModel.TakePhotoCommand.Execute(null);
     }
 }
コード例 #6
0
 /// <summary>
 /// 内部公开方法
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnImageCaptured(CameraEventArgs e)
 {
     if (ImageCaptured != null)
     {
         ImageCaptured(this, e);
     }
 }
コード例 #7
0
 public void ProcessImage(CameraEventArgs args, Point formLocation, Point mouseLocation)
 {
     FormLocation  = formLocation;
     MouseLocation = mouseLocation;
     CheckForMotion(args);
     ProcessBitmap(args);
 }
コード例 #8
0
        // On new frame
        private void video_NewFrame(object sender, CameraEventArgs e)
        {
            try
            {
                // lock
                Monitor.Enter(this);
                lastFrame = e.Bitmap;

                // notify client
                if (NewFrame != null)
                {
                    evt = new EventArgs();
                    NewFrame(this, evt);

                    frames++;
                }
            }
            catch (Exception)
            {
            }
            finally
            {
                // unlock
                Monitor.Exit(this);
            }
        }
コード例 #9
0
 private async void HardwareButtonsOnCameraHalfPressed(object sender, CameraEventArgs cameraEventArgs)
 {
     if (mediaCapture.VideoDeviceController.FocusControl.Supported)
     {
         await mediaCapture.VideoDeviceController.FocusControl.FocusAsync();
     }
 }
コード例 #10
0
ファイル: Camera.cs プロジェクト: NET201X/KangShuoTech
 private void video_NewFrame(object sender, CameraEventArgs e)
 {
     try
     {
         Monitor.Enter(this);
         if (this.lastFrame != null)
         {
             this.lastFrame.Dispose();
         }
         this.lastFrame = (Bitmap)e.Bitmap.Clone();
         this.width     = this.lastFrame.Width;
         this.height    = this.lastFrame.Height;
     }
     catch (Exception)
     {
     }
     finally
     {
         Monitor.Exit(this);
     }
     if (this.NewFrame != null)
     {
         this.NewFrame(this, new EventArgs());
     }
 }
コード例 #11
0
        public void OnCameraUpdate(object sender, CameraEventArgs e)
        {
            if (Hidden)
            {
                return;
            }
            this.scale = e.Camera.CreateScale(origin, 0.5f, pixelSize: 30);
            var scaleMatrix = Matrix4.CreateScale(scale, scale, scale);

            var rotationMatrix = Mode == TransformMode.Local ? Matrix4.CreateFromQuaternion(this.rotation) : Matrix4.Identity;

            this.origin  = this.position + Vector3.Transform(new Vector3(0, 0, 0), scaleMatrix * rotationMatrix);
            this.right   = Vector3.Transform(new Vector3(1, 0, 0), scaleMatrix * rotationMatrix);
            this.forward = Vector3.Transform(new Vector3(0, 1, 0), scaleMatrix * rotationMatrix);
            this.up      = Vector3.Transform(new Vector3(0, 0, 1), scaleMatrix * rotationMatrix);

            var contactSize = 0.2f * scale;

            rightContact.CollisionShape   = new BulletSharp.SphereShape(contactSize);
            forwardContact.CollisionShape = new BulletSharp.SphereShape(contactSize);
            upContact.CollisionShape      = new BulletSharp.SphereShape(contactSize);

            rightContact.WorldTransform   = Matrix4.CreateTranslation(this.origin + right);
            forwardContact.WorldTransform = Matrix4.CreateTranslation(this.origin + forward);
            upContact.WorldTransform      = Matrix4.CreateTranslation(this.origin + up);

            this.Dispose(false);
            BufferData(e.Camera);
        }
コード例 #12
0
ファイル: Camera.cs プロジェクト: ewin66/intvideosurv
        // On new frame
        private void video_NewFrame(object sender, CameraEventArgs e)
        {
            // lock
            Monitor.Enter(this);

            // dispose old frame
            if (lastFrame != null)
            {
                lastFrame.Dispose();
            }

            lastFrame = (Bitmap)e.Bitmap.Clone();

            // image dimension
            width  = lastFrame.Width;
            height = lastFrame.Height;

            // unlock
            Monitor.Exit(this);

            // notify client
            if (NewFrame != null)
            {
                NewFrame(this, new EventArgs());
            }
        }
コード例 #13
0
ファイル: CCamera.cs プロジェクト: siayou/active-shape-model
        // On new frame
        private void video_NewFrame(object sender, CameraEventArgs e)
        {
            try
            {
                // lock
                Monitor.Enter(this);

                // dispose old frame
                if (_lastFrame != null)
                {
                    _lastFrame.Dispose();
                }

                _lastFrame = (Bitmap)e.Bitmap.Clone();
                // kalo ada prerendering event, panggil pointer to functionnya
                if (preRenderingEvent != null)
                {
                    preRenderingEvent(ref _lastFrame);
                }

                _width  = _lastFrame.Width;
                _height = _lastFrame.Height;
            } catch (Exception) {
            } finally {
                // unlock
                Monitor.Exit(this);
            }

            // notify client
            if (NewFrame != null)
            {
                NewFrame(this, new EventArgs());
            }
        }
コード例 #14
0
 private void HardwareButtons_CameraHalfPressed(object sender, CameraEventArgs e)
 {
     if (!target?.Api?.Capability?.IsAvailable("actHalfPressShutter") ?? true)
     {
         return;
     }
     target?.Api?.Camera?.ActHalfPressShutterAsync().IgnoreExceptions();
 }
コード例 #15
0
 void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     if (!pressed)
     {
         CaptureImage_Click(this, null);
         pressed = true;
     }
 }
コード例 #16
0
 private void C_OnImageCaptured(object sender, CameraEventArgs e)
 {
     if (button1.Enabled && uploadclicked == false)
     {
         b = e.Image;
         pictureBox1.Invalidate();
     }
 }
コード例 #17
0
 /// <summary>
 /// Update picture box with the latest frame from video camera
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void CurrentCamera_OnImageCaptured(object sender, CameraEventArgs e)
 {
     if (MANAGER != null)
     {
         Bitmap imagePreview = MANAGER.CurrentCamera.GetCurrentImage();
         // resize image into 320x240 and set to the preview
         pictureVideoPreview.Image = ResizeImage(imagePreview, 320, 240);
     }
 }
コード例 #18
0
ファイル: MainForm.cs プロジェクト: holenzh/CSharpProjAtYC
        /// <summary>
        /// Event handler from the active camera
        /// </summary>
        public void OnImageCaptured(object sender, CameraEventArgs args)
        {
            if (!_fAddingMarker)
            {
                _latestFrame = args.Image;

                pictureBoxDisplay.Invalidate();
            }
        }
コード例 #19
0
        private void OnCameraMoved(CameraEventArgs e)
        {
            EventHandler <CameraEventArgs> handler = CameraMoved;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #20
0
        /// <summary>
        /// Event handler from the active camera
        /// </summary>
        public void OnImageCaptured(object sender, CameraEventArgs args)
        {
            if (!_fAddingMarker)
            {
                _latestFrame = args.Image;

                pictureBoxDisplay.Invalidate();
            }
        }
コード例 #21
0
    private CameraEventArgs GetCameraState()
    {
        var p = new CameraEventArgs();

        p.beingDragged    = wasDragged;
        p.currentPosition = m_cameraPosition.position;
        p.currentRotation = m_localRotation;

        return(p);
    }
コード例 #22
0
        private void OnImageCaptured(object sender, CameraEventArgs args)
        {
            Bitmap bitmap = args.Image;

            this.Invoke((MethodInvoker) delegate
            {
                webCamBox.Image = bitmap;
                ReadBarcode(bitmap);
            });
        }
コード例 #23
0
 void CurrentCamera_OnImageCaptured(object sender, CameraEventArgs e)
 {
     //Giving the feed of the camera to the picturepox
     variables.Image           = manager.CurrentCamera.GetCurrentImage();
     pictureBox_Original.Image = variables.Image;
     //System.Timers.Timer moveTimer = new System.Timers.Timer();
     //moveTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimedEvent);
     //moveTimer.Interval = 500;
     //moveTimer.Enabled = true;
 }
コード例 #24
0
 void Imager_CameraEvent(object sender, CameraEventArgs e)
 {
     if (this.Dispatcher.CheckAccess())
     {
         PostMessage(e.Message);
     }
     else
     {
         this.Dispatcher.BeginInvoke(new Action(() => PostMessage(e.Message)));
     }
 }
コード例 #25
0
        protected virtual void OnNewImageEvent(CameraEventArgs e)
        {
            EventHandler <CameraEventArgs> handler = this.NewImageEvent;

            if (handler != null)
            {
                AsyncCallback nn = new AsyncCallback(eventCallback);
                handler.BeginInvoke(handler, e, nn, e);
                //handler(this, e);
            }
        }
コード例 #26
0
 private async void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     if (CameraStatusUtility.IsContinuousShootingMode(target))
     {
         await StartContShooting();
     }
     else
     {
         ShutterButtonPressed();
     }
 }
コード例 #27
0
        private void OnImageCaptured(object sender, CameraEventArgs args)
        {
            // Get the bitmap
            Bitmap bitmap = args.Image;

            // Read barcode and show results in UI thread
            this.Invoke((MethodInvoker) delegate
            {
                pictureBox1.Image = bitmap;
                ReadBarcode(bitmap);
            });
        }
コード例 #28
0
        // On new frame
        private void video_NewFrame(object sender, CameraEventArgs e)
        {
            try
            {
                // lock
                Monitor.Enter(this);

                // dispose old frame
                if (lastFrame != null)
                {
                    lastFrame.Dispose( );
                }

                lastFrame = (Bitmap)e.Bitmap.Clone( );

                /*
                 *              // apply motion detector
                 *              if ( motionDetecotor != null )
                 *              {
                 *                      motionDetecotor.ProcessFrame( ref lastFrame );
                 *
                 *                      // check motion level
                 *                      if (
                 *                              ( motionDetecotor.MotionLevel >= alarmLevel ) &&
                 *                              ( Alarm != null )
                 *                              )
                 *                      {
                 *                              Alarm( this, new EventArgs( ) );
                 *                      }
                 *              }//*/

                // image dimension
                width  = lastFrame.Width;
                height = lastFrame.Height;
            }
            catch (Exception)
            {
            }
            finally
            {
                // unlock
                Monitor.Exit(this);
            }

            // notify client
            if (NewFrame != null)
            {
                NewFrame(this, new EventArgs( ));
            }
        }
コード例 #29
0
        // On new frame
        private void video_NewFrame(object sender, CameraEventArgs e)
        {
            // lock
            Monitor.Enter(this);

            // dispose old frame
            if (lastFrame != null)
            {
                lastFrame.Dispose();
            }

            lastFrame = (Bitmap)e.Bitmap.Clone();

            ////Fernando:
            DateTime now       = DateTime.Now;
            string   timeStamp = now.ToString("yyyyMMddHHmmssfff");
            string   fileName  = "image_" + timeStamp + ".jpg";

            lastFrame.Save(@"F:\Development\CPP\RTMP\projects\ffmpeg\bin\img\" + fileName);



            string filePath = @"F:\Development\CPP\RTMP\projects\ffmpeg\bin\img\images.txt";
            //TextWriter tw = new StreamWriter(@"F:\Development\CPP\RTMP\projects\ffmpeg\bin\img\images.txt", true, );
            FileStream fileStream = new FileStream(filePath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite);
            TextWriter textWriter = new StreamWriter(fileStream);

            textWriter.WriteLine("0|" + timeStamp + "|" + fileName);
            textWriter.Flush();
            textWriter.Close();
            fileStream.Close();


            //Fernando: FIN



            // image dimension
            width  = lastFrame.Width;
            height = lastFrame.Height;

            // unlock
            Monitor.Exit(this);

            // notify client
            if (NewFrame != null)
            {
                NewFrame(this, new EventArgs());
            }
        }
コード例 #30
0
ファイル: Form1.cs プロジェクト: gieroj/dyplom2
        /// <summary>
        /// Event handler from the active camera
        /// </summary>
        public void OnImageCaptured(object sender, CameraEventArgs args)
        {
            // Calculate FPS (only update the display once every second)
            _nFrameCount++;
            double milliseconds = (DateTime.Now.Ticks - _dtFrameLast.Ticks) / TimeSpan.TicksPerMillisecond;


            // Save the latest image for drawing
            if (!_fAddingMarker)
            {
                // Cause display update
                _latestFrame = args.Image;
                pictureBoxDisplay.Invalidate();
            }
        }
コード例 #31
0
ファイル: Form1.cs プロジェクト: tqlong1609/AppFirmManager
        private void OnImageCaptured(object sender, CameraEventArgs args)
        {
            Bitmap bitmap = args.Image;

            try
            {
                this.Invoke((MethodInvoker) delegate
                {
                    pictureBox1.Image = bitmap;
                    ReadBarcode(bitmap);
                });
            }
            catch {
                return;
            }
        }
コード例 #32
0
 private async void HardwareButtons_CameraReleased(object sender, CameraEventArgs e)
 {
     if (target == null || target.Api == null)
     {
         return;
     }
     if (target.Api.Capability.IsAvailable("cancelHalfPressShutter"))
     {
         try
         {
             await target?.Api?.Camera?.CancelHalfPressShutterAsync();
         }
         catch (RemoteApiException) { }
     }
     await StopContShooting();
 }
コード例 #33
0
 private async void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     await TakePhotoAsync();
 }
コード例 #34
0
ファイル: XnaWindow.xaml.cs プロジェクト: forkbomb/pikto
 private void displayFrame(object sender, CameraEventArgs e)
 {
     img = e.Image;
 }
コード例 #35
0
 private void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     _adaptiveCodeStatusTextBlock.Text = "CAM CAM CAM CAM CAM CAM CAM CAM CAM CAM CAM CAM CAM CAM!";
 }
コード例 #36
0
 void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     CameraButtonPressCount++;
     rootPage.NotifyUser($"Camera button press #{CameraButtonPressCount}", NotifyType.StatusMessage);
 }
コード例 #37
0
 async void OnHardwareCameraButtonPressed(object sender, CameraEventArgs e)
 {
     await TakePhotoAsync();
 }
コード例 #38
0
ファイル: VideoTexture.cs プロジェクト: Wiladams/NewTOAPIA
 void ReceivedNewFrame(object sender, CameraEventArgs e)
 {
     fPixelPtr = e.fData;
     fPixelLength = e.fSize;
     fSampleTime = e.fTimeStamp;
 }
コード例 #39
0
ファイル: WUW.cs プロジェクト: Clonedpirate1/ProjectDigitus
        public void OnImageCaptured(object sender, CameraEventArgs args)
        {
            // Calculate FPS (only update the display once every second)
            _nFrameCount++;
            double milliseconds = (DateTime.Now.Ticks - _dtFrameLast.Ticks) / TimeSpan.TicksPerMillisecond;
            if (milliseconds >= 1000)
            {
                this.BeginInvoke(new Action<double>(UpdateFPSInUI), new object[] { _nFrameCount * 1000.0 / milliseconds });
                _nFrameCount = 0;
                _dtFrameLast = DateTime.Now;
            }

            double markerWait = (DateTime.Now.Ticks - _latestFrameTime.Ticks) / TimeSpan.TicksPerMillisecond;

            // Save the latest image for drawing
            if (!_fAddingMarker)
            {
                // Cause display update
                _latestFrame = args.Image;
                pictureBoxDisplay.Invalidate();
                //set time
                _latestFrameTime = DateTime.Now;
            }
            else if (_fAddingMarker && markerWait <= 5000)
            {
                // Cause display update
                _latestFrame = args.Image;
                pictureBoxDisplay.Invalidate();
                //start timer by not setting time.

                if (markerWait % 1000 < 250)
                {
                    _latestFrameTimeSegment = true;
                }
                else
                {
                    _latestFrameTimeSegment = false;
                }
            }
        }
コード例 #40
0
ファイル: MainPage.xaml.cs プロジェクト: Benjin/Selfie
 private async void CameraFullPressed(object sender, CameraEventArgs args)
 {
     await capturePhoto();
 }
コード例 #41
0
 private async void OnHardwareButtonsCameraPressed(object sender, CameraEventArgs e)
 {
     await CaptureImageAsync();
 }
コード例 #42
0
 private async void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     MessageDialog dialog = new MessageDialog("Hello from the camera button!");
     await dialog.ShowAsync();
 }
コード例 #43
0
        private void displayImage(object s, CameraEventArgs e)
        {
            LifeImage = Camera.ToBitmapSource(e.Image);
            OnPropertyChanged("LifeImage");

            md.findMarkers(e.Image.Convert<Gray, Byte>());
            if (md.isMarker())
            {
                CutImage = Camera.ToBitmapSource(md.threshold(md.markers[0].getSymbolImage(), 150, 255));
                pictoRecognized = true;
            }
            else if (!pictoRecognized)
            {
                CutImage = Camera.ToBitmapSource(Properties.Resources.noImage);
            }
            OnPropertyChanged("CutImage");
        }
コード例 #44
0
        private void c_OnImageCaptured(object sender, CameraEventArgs e)
        {
            // Calculate FPS (only update the display once every second)
            ++this.tMgr._nFrameCount;
            double milliseconds = (DateTime.Now.Ticks - this.tMgr._dtFrameLast.Ticks) / TimeSpan.TicksPerMillisecond;
            if (milliseconds >= 1000)
            {
                //this.BeginInvoke(new Action<double>(UpdateFPSInUI), new object[] { this.tMgr._nFrameCount * 1000.0 / milliseconds });
                this.tMgr._nFrameCount = 0;
                this.tMgr._dtFrameLast = DateTime.Now;
            }

            // Save the latest image for drawing
            if (!this.tMgr._addingMarker)
            {
                // Cause display update
                this.tMgr._latestFrame = e.Image;
                pictureBoxCamera.Invalidate();
            }
        }
コード例 #45
0
ファイル: MainPage.xaml.cs プロジェクト: Benjin/Selfie
 private async void CameraHalfPressed(object sender, CameraEventArgs args)
 {
     await camera.VideoDeviceController.FocusControl.FocusAsync();
 }
コード例 #46
0
		void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
		{
			CapturePhoto();
		}
コード例 #47
0
 private void CameraChanged(CameraEventArgs args)
 {
   Camera = args.CurrentCamera;
   SetHeading();
 }
コード例 #48
0
ファイル: Camera.cs プロジェクト: vitaly-kobzev/WindowsGSM1
 private void OnCameraMoved(CameraEventArgs e)
 {
     EventHandler<CameraEventArgs> handler = CameraMoved;
     if (handler != null) handler(this, e);
 }
コード例 #49
0
		private void OnHardwareButtons_CameraPressed(object sender, CameraEventArgs e)
		{
			Task stop = TakePhotoAndStopAsync();
		}
コード例 #50
0
 void HardwareButtons_CameraPressed(object sender, CameraEventArgs e) {
     if (!pressed) {
         CaptureImage_Click(this, null);
         pressed = true;
     }
 }
コード例 #51
0
 void HardwareButtons_DisableCameraButton(object sender, CameraEventArgs e)
 {
 }
コード例 #52
0
 void HardwareButtons_CameraHalfPressed(object sender, CameraEventArgs e) {
 }
コード例 #53
0
 private void HardwareButtons_CameraPressed(object sender, CameraEventArgs e)
 {
     captureElement();
 }
コード例 #54
0
ファイル: UEyeGigE.cs プロジェクト: legendmaker/Apintec
 protected void RaiseOnSnapShotEvent(CameraEventArgs args)
 {
     if (OnSnapShot != null)
     {
         OnSnapShot(this, args);
     }
 }
コード例 #55
0
ファイル: Form1.cs プロジェクト: ayushjha9/Stream
 void CurrentCamera_OnImageCaptured(object sender, CameraEventArgs e)
 {
     //Giving the feed of the camera to the picturepox
     picFeed.Image = manager.CurrentCamera.GetCurrentImage();
 }
コード例 #56
0
ファイル: Podklasy.cs プロジェクト: gieroj/dyplom
 /// <summary>
 /// Przechwycenie ostatniej klatki, odświerzenie Wspolny.w_pictureboxa
 /// </summary>
 private void OnImageCaptured(object sender, CameraEventArgs args)
 {
     // Przeliczanie FPS
     licznikKlatek++;
     double milliseconds = (DateTime.Now.Ticks - czasOstatniejKlatki.Ticks) / TimeSpan.TicksPerMillisecond;
     if (milliseconds >= 1000)
     {
         Fps= Math.Round((licznikKlatek * 1000.0 / milliseconds),2);
         licznikKlatek = 0;
         czasOstatniejKlatki = DateTime.Now;
     }
     if (Wspolny.pauza == false)
     {
         Wspolny.ostatnia_klatka = args.Image;
         Wspolny.w_picturebox.Invalidate();
     }
 }
コード例 #57
0
        public void OnCameraUpdate(object sender, CameraEventArgs e)
        {
            if (Hidden) return;
            this.scale = e.Camera.CreateScale(origin, 0.5f, pixelSize: 30);
            var scaleMatrix = Matrix4.CreateScale(scale, scale, scale);

            var rotationMatrix = Mode == TransformMode.Local ? Matrix4.CreateFromQuaternion(this.rotation) : Matrix4.Identity;

            this.origin = this.position + Vector3.Transform(new Vector3(0, 0, 0), scaleMatrix * rotationMatrix);
            this.right = Vector3.Transform(new Vector3(1, 0, 0), scaleMatrix * rotationMatrix);
            this.forward = Vector3.Transform(new Vector3(0, 1, 0), scaleMatrix * rotationMatrix);
            this.up = Vector3.Transform(new Vector3(0, 0, 1), scaleMatrix * rotationMatrix);

            var contactSize = 0.2f * scale;

            rightContact.CollisionShape = new BulletSharp.SphereShape(contactSize);
            forwardContact.CollisionShape = new BulletSharp.SphereShape(contactSize);
            upContact.CollisionShape = new BulletSharp.SphereShape(contactSize);

            rightContact.WorldTransform = Matrix4.CreateTranslation(this.origin + right);
            forwardContact.WorldTransform = Matrix4.CreateTranslation(this.origin + forward);
            upContact.WorldTransform = Matrix4.CreateTranslation(this.origin + up);

            this.Dispose(false);
            BufferData(e.Camera);
        }
コード例 #58
0
ファイル: frmWebCam.cs プロジェクト: DarkSaito29/X-O-Genesis
 void currentCamera_OnImageCaptured(object sender, CameraEventArgs e)
 {
     pictureBox1.BackgroundImage = currentCamera.GetCurrentImage();
 }
コード例 #59
0
        protected int OnNewBuffer(double SampleTime, IntPtr pBuffer, int BufferLen)
        {
            if ((!stopEvent.WaitOne(0, true)) && (NewFrame != null))
            {
                CameraEventArgs camEvent = new CameraEventArgs(SampleTime, pBuffer, BufferLen, Width, Height);
                NewFrame(this, camEvent);
            }

            return 0;
        }
コード例 #60
0
 void OnImageCaptured(object sender, CameraEventArgs e)
 {
     LatestFrame = e.Image;
     PictureBox.Invalidate();
 }