remove area scale

This commit is contained in:
Josh Hawkins 2023-09-24 18:41:08 -05:00
parent 0d827ce7a4
commit 4683b96d8d

View File

@ -528,10 +528,7 @@ class PtzAutoTracker:
if camera_config.onvif.autotracking.zooming == ZoomingModeEnum.relative: if camera_config.onvif.autotracking.zooming == ZoomingModeEnum.relative:
# relative zooming concurrently with pan/tilt # relative zooming concurrently with pan/tilt
# double the object area so we leave some room around the object zoom = obj.obj_data["area"] / (camera_width * camera_height)
# perhaps make this a configurable value?
area_scale = 2
zoom = (obj.obj_data["area"] * area_scale) / (camera_width * camera_height)
# test if we need to zoom out # test if we need to zoom out
if not self._should_zoom_in( if not self._should_zoom_in(