diff --git a/imutils/video/fps.py b/imutils/video/fps.py index cad5b89..215c4b7 100644 --- a/imutils/video/fps.py +++ b/imutils/video/fps.py @@ -12,6 +12,8 @@ def __init__(self): def start(self): # start the timer self._start = datetime.datetime.now() + # Reset frame to zero incase we are 'restarting' the counter + self._numFrames = 0 return self def stop(self): @@ -30,4 +32,4 @@ def elapsed(self): def fps(self): # compute the (approximate) frames per second - return self._numFrames / self.elapsed() \ No newline at end of file + return self._numFrames / self.elapsed()