예제 #1
0
파일: PtGreyCamera.cs 프로젝트: wpiyong/n3
        public void StopVideo()
        {
            try
            {
                if (managedCamera != null)
                {
                    // End acquisition
                    managedCamera.EndAcquisition();

                    managedCamera.UnregisterEvent(imageEventListener);

                    //clear queue
                    PtGreyCameraImage item;
                    while (imageQueue.TryDequeue(out item))
                    {
                        // do nothing
                    }

                    _videoMode = false;
                }
            }
            catch (SpinnakerException ex)
            {
                Debug.WriteLine("Error: {0}", ex.Message);
            }
        }
예제 #2
0
 public override void DisConnect()
 {
     try
     {
         if (camera != null)
         {
             StopCapture();
             camera.UnregisterEvent(imageEventListener);
             camera.DeInit();
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine("PtGrey Disconnect : " + ex.Message);
     }
 }