- 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
This commit is contained in:
2016-09-18 08:25:19 +00:00
parent fb4f01a641
commit b7e833bbc4
+4 -1
View File
@@ -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()