From b09bfc4d8361e3d2960d7ae12e7b86e4187ad714 Mon Sep 17 00:00:00 2001 From: sjtosco Date: Thu, 13 Oct 2022 19:02:35 -0300 Subject: [PATCH] Update fps.py Add a method to return frames number, so not use a protected variable in demo. --- imutils/video/fps.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/imutils/video/fps.py b/imutils/video/fps.py index cad5b89..0680873 100644 --- a/imutils/video/fps.py +++ b/imutils/video/fps.py @@ -30,4 +30,7 @@ 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() + + def num_frames(self): + return self._numFrames