diff --git a/beadDetect.py b/beadDetect.py index 4bfda16..e88368a 100755 --- a/beadDetect.py +++ b/beadDetect.py @@ -123,9 +123,12 @@ if videoFile == "piCamera": from picamera.array import PiRGBArray from picamera import PiCamera vs = PiVideoStream(resolution=(width,height), framerate=framerate).start() - time.sleep(2.0) + time.sleep(5.0) else: vs = cv2.VideoCapture(videoFile) + # skip first 5 seconds + for i in range(0, 5*framerate): + ret, frame = vs.read() print("[INFO] sampling THREADED frames from `" + videoFile + "` at " + str(framerate) + " frame/s") fps = FPS().start()