mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 11:45:24 +03:00
try to zoom when object isn't moving
This commit is contained in:
parent
2057296da9
commit
515ad5e004
@ -782,12 +782,9 @@ class PtzAutoTracker:
|
|||||||
self._enqueue_move(camera, obj.obj_data["frame_time"], pan, tilt, zoom)
|
self._enqueue_move(camera, obj.obj_data["frame_time"], pan, tilt, zoom)
|
||||||
|
|
||||||
def _autotrack_move_zoom_only(self, camera, obj):
|
def _autotrack_move_zoom_only(self, camera, obj):
|
||||||
camera_config = self.config.cameras[camera]
|
zoom = self._get_zoom_amount(camera, obj, obj.obj_data["box"])
|
||||||
|
if zoom != 0:
|
||||||
if camera_config.onvif.autotracking.zooming == ZoomingModeEnum.absolute:
|
self._enqueue_move(camera, obj.obj_data["frame_time"], 0, 0, zoom)
|
||||||
zoom = self._get_zoom_amount(camera, obj, obj.obj_data["box"])
|
|
||||||
if zoom != 0:
|
|
||||||
self._enqueue_move(camera, obj.obj_data["frame_time"], 0, 0, zoom)
|
|
||||||
|
|
||||||
def _get_zoom_amount(self, camera, obj, predicted_box):
|
def _get_zoom_amount(self, camera, obj, predicted_box):
|
||||||
camera_config = self.config.cameras[camera]
|
camera_config = self.config.cameras[camera]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user