mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Removed pointless variables
This commit is contained in:
parent
eb53733b87
commit
9616d9a524
@ -55,9 +55,6 @@ class PtzMotionEstimator:
|
|||||||
self.camera_config = config
|
self.camera_config = config
|
||||||
self.coord_transformations = None
|
self.coord_transformations = None
|
||||||
self.ptz_metrics = ptz_metrics
|
self.ptz_metrics = ptz_metrics
|
||||||
self.ptz_start_time = self.ptz_metrics.start_time
|
|
||||||
self.ptz_stop_time = self.ptz_metrics.stop_time
|
|
||||||
|
|
||||||
self.ptz_metrics.reset.set()
|
self.ptz_metrics.reset.set()
|
||||||
logger.debug(f"{config.name}: Motion estimator init")
|
logger.debug(f"{config.name}: Motion estimator init")
|
||||||
|
|
||||||
@ -86,7 +83,9 @@ class PtzMotionEstimator:
|
|||||||
self.coord_transformations = None
|
self.coord_transformations = None
|
||||||
|
|
||||||
if ptz_moving_at_frame_time(
|
if ptz_moving_at_frame_time(
|
||||||
frame_time, self.ptz_start_time.value, self.ptz_stop_time.value
|
frame_time,
|
||||||
|
self.ptz_metrics.start_time.value,
|
||||||
|
self.ptz_metrics.stop_time.value,
|
||||||
):
|
):
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f"{camera}: Motion estimator running - frame time: {frame_time}"
|
f"{camera}: Motion estimator running - frame time: {frame_time}"
|
||||||
|
|||||||
@ -85,7 +85,6 @@ class NorfairTracker(ObjectTracker):
|
|||||||
self.camera_config = config
|
self.camera_config = config
|
||||||
self.detect_config = config.detect
|
self.detect_config = config.detect
|
||||||
self.ptz_metrics = ptz_metrics
|
self.ptz_metrics = ptz_metrics
|
||||||
self.ptz_autotracker_enabled = ptz_metrics.autotracker_enabled
|
|
||||||
self.ptz_motion_estimator = {}
|
self.ptz_motion_estimator = {}
|
||||||
self.camera_name = config.name
|
self.camera_name = config.name
|
||||||
self.track_id_map = {}
|
self.track_id_map = {}
|
||||||
@ -104,7 +103,7 @@ class NorfairTracker(ObjectTracker):
|
|||||||
# the different tracker per object class
|
# the different tracker per object class
|
||||||
filter_factory=OptimizedKalmanFilterFactory(R=3.4),
|
filter_factory=OptimizedKalmanFilterFactory(R=3.4),
|
||||||
)
|
)
|
||||||
if self.ptz_autotracker_enabled.value:
|
if self.ptz_metrics.autotracker_enabled.value:
|
||||||
self.ptz_motion_estimator = PtzMotionEstimator(
|
self.ptz_motion_estimator = PtzMotionEstimator(
|
||||||
self.camera_config, self.ptz_metrics
|
self.camera_config, self.ptz_metrics
|
||||||
)
|
)
|
||||||
@ -315,7 +314,7 @@ class NorfairTracker(ObjectTracker):
|
|||||||
|
|
||||||
coord_transformations = None
|
coord_transformations = None
|
||||||
|
|
||||||
if self.ptz_autotracker_enabled.value:
|
if self.ptz_metrics.autotracker_enabled.value:
|
||||||
# we must have been enabled by mqtt, so set up the estimator
|
# we must have been enabled by mqtt, so set up the estimator
|
||||||
if not self.ptz_motion_estimator:
|
if not self.ptz_motion_estimator:
|
||||||
self.ptz_motion_estimator = PtzMotionEstimator(
|
self.ptz_motion_estimator = PtzMotionEstimator(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user