From 31e719d2cb46149d21796f815d4d2fa67be7a275 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 5 Oct 2023 09:48:42 -0500 Subject: [PATCH] fix velocity threshold variable --- docs/docs/configuration/autotracking.md | 2 +- frigate/ptz/autotrack.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/autotracking.md b/docs/docs/configuration/autotracking.md index a08df4626..37d877bde 100644 --- a/docs/docs/configuration/autotracking.md +++ b/docs/docs/configuration/autotracking.md @@ -131,7 +131,7 @@ Relative zooming attempts to make a zoom movement concurrently with any pan/tilt You can optionally adjust the `zoom_factor` for your camera in your configuration file. Lower values will leave more space from the scene around the tracked object while higher values will cause your camera to zoom in more on the object. However, keep in mind that Frigate needs a fair amount of pixels and scene details outside of the bounding box of the tracked object to estimate the motion of your camera. If the object is taking up too much of the frame, Frigate will not be able to track the motion of the camera and your object will be lost. -The range of this option is from 0.1 to 0.75. The default value of 0.3 should be sufficient for most users. If you have a powerful zoom lens on your PTZ or you find your autotracked objects are often lost, you may want to lower this value. Because every PTZ and scene is different, you should experiment to determine what works best for you. +The range of this option is from 0.1 to 0.75. The default value of 0.5 should be sufficient for most users. If you have a powerful zoom lens on your PTZ or you find your autotracked objects are often lost, you may want to change this value. Because every PTZ and scene is different, you should experiment to determine what works best for you. ## Usage applications diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index 58a897f94..aa99df82d 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -591,7 +591,7 @@ class PtzAutoTracker: camera_width / predicted_movement_time / camera_fps * 0.7 ) velocity_threshold_y = ( - camera_width / predicted_movement_time / camera_fps * 0.7 + camera_height / predicted_movement_time / camera_fps * 0.7 ) else: # use a generic velocity threshold