mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 03:35:26 +03:00
don't try to zoom every time
This commit is contained in:
parent
8fb2eac2db
commit
f81f869068
@ -786,12 +786,11 @@ class PtzAutoTracker:
|
|||||||
camera_width = camera_config.frame_shape[1]
|
camera_width = camera_config.frame_shape[1]
|
||||||
camera_height = camera_config.frame_shape[0]
|
camera_height = camera_config.frame_shape[0]
|
||||||
|
|
||||||
if camera_config.onvif.autotracking.zooming == ZoomingModeEnum.absolute:
|
|
||||||
zoom = self._get_zoom_amount(camera, obj, obj.obj_data["box"])
|
|
||||||
|
|
||||||
if camera_config.onvif.autotracking.zooming == ZoomingModeEnum.relative:
|
if camera_config.onvif.autotracking.zooming == ZoomingModeEnum.relative:
|
||||||
target_box = obj.obj_data["area"] / (camera_width * camera_height)
|
target_box = obj.obj_data["area"] / (camera_width * camera_height)
|
||||||
zoom = target_box ** self.zoom_factor[camera]
|
self.previous_target_box[camera] = target_box ** self.zoom_factor[camera]
|
||||||
|
|
||||||
|
zoom = self._get_zoom_amount(camera, obj, obj.obj_data["box"])
|
||||||
|
|
||||||
if zoom != 0:
|
if zoom != 0:
|
||||||
self._enqueue_move(camera, obj.obj_data["frame_time"], 0, 0, zoom)
|
self._enqueue_move(camera, obj.obj_data["frame_time"], 0, 0, zoom)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user