private void GrabFrame() { DateTime now = DateTime.Now; if (now.TimeOfDay >= StartTime.TimeOfDay && now.TimeOfDay <= StopTime.TimeOfDay) { logInstance.Debug("Trying to Grab Frame"); Frame currentFrame = cam.CaptureFrame(); if (currentFrame != null) { logInstance.Debug("Frame grabbed. Image size: {0} ", currentFrame.ImageBytes.Count().ToString()); FrameReadyEventArgs args = new FrameReadyEventArgs(currentFrame); OnFrameGrabbed(args); } } }
public Frame GrabFromCamera() { Frame thisFrame = camera.CaptureFrame(); return(thisFrame); }