From b7e833bbc4f33d375dc2c0731244abda1dbde931 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 18 Sep 2016 08:25:19 +0000 Subject: [PATCH] - skip first 5 seconds (due to camera warm up) git-svn-id: http://moon:8086/svn/software/trunk/projects/opencv@317 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- beadDetect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()