make stationary_threshold configurable

This commit is contained in:
Blake Blackshear
2022-02-08 07:40:45 -06:00
parent 5cff849e59
commit 3e90f3032c
4 changed files with 13 additions and 6 deletions

View File

@@ -507,8 +507,8 @@ def process_frames(
stationary_object_ids = [
obj["id"]
for obj in object_tracker.tracked_objects.values()
# if there hasn't been motion for 10 frames
if obj["motionless_count"] >= 10
# if there hasn't been motion for N frames
if obj["motionless_count"] >= detect_config.stationary_threshold
# and it isn't due for a periodic check
and (
detect_config.stationary_interval == 0