only update tracked obj position when ptz stopped

This commit is contained in:
Josh Hawkins 2023-07-08 13:03:59 -05:00
parent 093900ab00
commit 60adcbc8e6

View File

@ -234,7 +234,10 @@ class PtzAutoTracker:
def autotrack_object(self, camera, obj): def autotrack_object(self, camera, obj):
camera_config = self.config.cameras[camera] camera_config = self.config.cameras[camera]
if camera_config.onvif.autotracking.enabled: if (
camera_config.onvif.autotracking.enabled
and self.camera_metrics[camera]["ptz_stopped"].is_set()
):
# either this is a brand new object that's on our camera, has our label, entered the zone, is not a false positive, # either this is a brand new object that's on our camera, has our label, entered the zone, is not a false positive,
# and is not initially motionless - or one we're already tracking, which assumes all those things are already true # and is not initially motionless - or one we're already tracking, which assumes all those things are already true
if ( if (