From 4ac21e0b26ecb55a648ca46c37fb16ddf55d7183 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 6 Oct 2023 07:55:34 -0500 Subject: [PATCH] include zero --- frigate/ptz/autotrack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index d853f7187..9767dc648 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -521,8 +521,8 @@ class PtzAutoTracker: velocity_distance = np.linalg.norm([x2 - x1, y2 - y1]) if ( - 0 < abs(average_velocity[0]) < (camera_width / camera_fps / 2) - and 0 < abs(average_velocity[1]) < (camera_height / camera_fps / 2) + 0 <= abs(average_velocity[0]) < (camera_width / camera_fps / 2) + and 0 <= abs(average_velocity[1]) < (camera_height / camera_fps / 2) and velocity_distance <= 10 ): return average_velocity, velocity_distance