private void GrabLoop() { while (running) { lock (grabLock) { sl.ERROR_CODE e = camera.Grab(ref runtimeParameters); // reset mat index matIndex = 0; // call the listener this.FrameTick(this); Thread.Sleep(10); } } }
public void GrabOnce() { if (running) { lock (grabLock) { sl.ERROR_CODE e = camera.Grab(ref runtimeParameters); // reset mat index matIndex = 0; Thread.Sleep(10); } } else { Console.WriteLine("Not open"); Thread.Sleep(10); } }