コード例 #1
0
 public void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
 {
     _latestFrame = frame.Image;
     //ProcessFrame();
     pictureBoxDisplay.Invalidate();
     //pictureBox1.Invalidate();
 }
コード例 #2
0
ファイル: WebCam.cs プロジェクト: splateaux/OutOfOffice
 /// <summary>
 /// Handler for new image captured from WebCam device.
 /// </summary>
 /// <param name="frameSource"></param>
 /// <param name="frame"></param>
 /// <param name="fps"></param>
 public void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource,
                             Touchless.Vision.Contracts.Frame frame,
                             double fps)
 {
     _latestFrame = frame.Image;
     _renderViewControl.Invalidate();
 }
コード例 #3
0
ファイル: WebCam.cs プロジェクト: abdojobs/medipro
 public void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
 {
     //Image img = frame.Image.Clone(new RectangleF(0, 0, this.ImgControl.Width, this.ImgControl.Height), System.Drawing.Imaging.PixelFormat.Undefined);
     //_latestFrame = img as Bitmap;
     _latestFrame = frame.Image;
     ImgControl.Invalidate();
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: barld/FSharpWebCamProject
 private void OnNewFrame(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
 {
     this.frameNR++;
     frames.Add(frame.Image);
     if (frameNR > 60)
     {
         StopCamera();
     }
 }
コード例 #5
0
ファイル: WCVision.cs プロジェクト: ricksam/Framework
        protected void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
        {
            _latestFrame = frame.Image;

            if (WebCamVisionCapture != null)
            {
                WebCamVisionCapture(_latestFrame);
            }

            Control.Invalidate();
        }
コード例 #6
0
        public void OnImageCapturedCamera1(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
        {
            _latestFrame = frame.Image;

            Action action = delegate()
            {
                camera1.Source = BitmapToImageSource(_latestFrame);
            };

            Dispatcher.Invoke(action);
        }
コード例 #7
0
        private void Cfs_NewFrame(Touchless.Vision.Contracts.IFrameSource arg1, Touchless.Vision.Contracts.Frame arg2, double arg3)
        {
            if (stopWatch.ElapsedMilliseconds > frameDelay)
            {
                stopWatch.Stop();
                stopWatch.Reset();

                theBitmap = StreamDeckSharp.Extensions.StreamDeckFullScreenDrawingExtension.ResizeToKeyStreamDeckImage(arg2.Image);

                if (enabled)
                {
                    imgData = StreamDeckSharp.Extensions.StreamDeckFullScreenDrawingExtension.GetFullScreenBitmap(arg2.Image);
                }
                stopWatch.Start();
            }
        }
        private void NewFrame(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
        {
            //We want to ignore frames we can't render fast enough
            lock (_frameSync)
            {
                if (!_frameWaiting)
                {
                    _frameWaiting = true;
                    Action workAction = delegate
                    {
                        this.labelCameraFPSValue.Content = fps.ToString();
                        this.imgPreview.Source           = frame.OriginalImage.ToBitmapSource();

                        lock (_frameSync)
                        {
                            _frameWaiting = false;
                        }
                    };
                    Dispatcher.BeginInvoke(workAction);
                }
            }
        }
コード例 #9
0
 public void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
 {
     _latestFrame = frame.Image;
 }
コード例 #10
0
 public void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
 {
     _latestFrame = frame.Image;
     ptbhinhhoivien.Invalidate();
 }
コード例 #11
0
ファイル: Form1.cs プロジェクト: Raniita/videochat-qos
 private void OnImageCaptured(Touchless.Vision.Contracts.IFrameSource frameSource, Touchless.Vision.Contracts.Frame frame, double fps)
 {
     _latestFrame = frame.Image;
     pictureBox1.Invalidate();
 }