- 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:
+4
-1
@@ -123,9 +123,12 @@ if videoFile == "piCamera":
|
|||||||
from picamera.array import PiRGBArray
|
from picamera.array import PiRGBArray
|
||||||
from picamera import PiCamera
|
from picamera import PiCamera
|
||||||
vs = PiVideoStream(resolution=(width,height), framerate=framerate).start()
|
vs = PiVideoStream(resolution=(width,height), framerate=framerate).start()
|
||||||
time.sleep(2.0)
|
time.sleep(5.0)
|
||||||
else:
|
else:
|
||||||
vs = cv2.VideoCapture(videoFile)
|
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")
|
print("[INFO] sampling THREADED frames from `" + videoFile + "` at " + str(framerate) + " frame/s")
|
||||||
fps = FPS().start()
|
fps = FPS().start()
|
||||||
|
|||||||
Reference in New Issue
Block a user