From f3b5b5ab788529f6dcf97e06dc84f60dcb07b43d Mon Sep 17 00:00:00 2001 From: Claude Pageau Date: Tue, 10 Oct 2023 12:16:27 -0400 Subject: [PATCH] Minor Updates --- plugins/rtsp352.py | 2 +- speed-cam.py | 2 +- strmusbipcam.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/rtsp352.py b/plugins/rtsp352.py index 00dba8f..d01cbe7 100644 --- a/plugins/rtsp352.py +++ b/plugins/rtsp352.py @@ -36,7 +36,7 @@ MO_MAX_X_DIFF_PX = 26 # Default= 20 Exclude if max px away >= last motion event x position MO_MIN_X_DIFF_PX = 1 # Default= 1 Exclude if min px away <= last event x position MO_X_LR_SIDE_BUFF_PX = 10 # Default= 10 Divides motion Rect x for L&R Buffer Space to Ensure contours are in -MO_TRACK_TIMEOUT_SEC = 2.0 # Default= 0.5 Optional seconds to wait after track End (Avoids dual tracking) +MO_TRACK_TIMEOUT_SEC = 0.5 # Default= 0.5 Optional seconds to wait after track End (Avoids dual tracking) MO_EVENT_TIMEOUT_SEC = 0.3 # Default= 0.3 seconds to wait for next motion event before starting new track MO_MAX_SPEED_OVER = 0 # Exclude track if Speed less than or equal to value specified 0=All # Can be useful to exclude pedestrians and/or bikes, Etc or track only fast objects diff --git a/speed-cam.py b/speed-cam.py index 1f0cc5d..e792caa 100644 --- a/speed-cam.py +++ b/speed-cam.py @@ -1732,7 +1732,7 @@ def speed_camera(): print(HORIZ_LINE) if MO_TRACK_TIMEOUT_SEC > 0: logging.info( - "MO_TRACK_TIMEOUT_SEC %0.2f sec Sleep to Avoid Tracking Same Object Multiple Times." + "MO_TRACK_TIMEOUT_SEC %0.2f sec Delay to Avoid Tracking Same Object Multiple Times." % MO_TRACK_TIMEOUT_SEC ) first_event = True # Reset Track diff --git a/strmusbipcam.py b/strmusbipcam.py index 2e9380b..fa209be 100644 --- a/strmusbipcam.py +++ b/strmusbipcam.py @@ -14,8 +14,8 @@ def __init__(self, self.stream = cv2.VideoCapture(src) self.stream.set(3, size[0]) self.stream.set(4, size[1]) - self.framerate = 25 # set ip csm to CBR (constant bitrate) - self.cam_delay = int(1 / self.framerate) + self.framerate = 25.0 # set ip csm to CBR (constant bitrate) + self.cam_delay = float(1.0 / self.framerate) (self.grabbed, self.frame) = self.stream.read() # initialize the thread name