protected void Dispose(bool disposing) { if (disposing) { // free managed resources if (Device != null) { Device.Stop(); Device.Dispose(); Device = null; } } // free native resources if there are any. }
public void Run() { try { if (numCameras == 0) { MessageBox.Show("Could not find any PS3Eye cameras!"); return; } // Create cameras, set some parameters and start capture if (numCameras >= 1) { // Start rolling m_camLeft.Device.Create(CLEyeCameraDevice.CameraUUID(0), this); m_camLeft.Device.Start(); // Balances the exposure m_camLeft.Device.AutoExposure = true; // Gives the "fish-eye" effect m_camLeft.Device.LensCorrection1 = 100; m_camLeft.Device.LensCorrection2 = 100; m_camLeft.Device.LensCorrection3 = 100; } if (numCameras == 2) { m_camRight.Device.Create(CLEyeCameraDevice.CameraUUID(1), this); m_camRight.Device.Start(); } } catch (Exception e) { // do nothing in case rendering is f****d } }
public CLEyeCameraImage() { Device = new CLEyeCameraDevice(); Device.BitmapReady += OnBitmapReady; }