mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
pass fps to motion detector
This commit is contained in:
parent
3b74c79919
commit
3c58d44f91
@ -10,6 +10,7 @@ class MotionDetector(ABC):
|
||||
self,
|
||||
frame_shape: Tuple[int, int, int],
|
||||
config: MotionConfig,
|
||||
fps: int,
|
||||
improve_contrast,
|
||||
threshold,
|
||||
contour_area,
|
||||
|
||||
@ -13,6 +13,7 @@ class CNTMotionDetector(MotionDetector):
|
||||
self,
|
||||
frame_shape: Tuple[int, int, int],
|
||||
config: MotionConfig,
|
||||
fps: int,
|
||||
improve_contrast,
|
||||
threshold,
|
||||
contour_area,
|
||||
@ -41,7 +42,9 @@ class CNTMotionDetector(MotionDetector):
|
||||
# bool useHistory = true,
|
||||
# int maxPixelStability = 15*60,
|
||||
# bool isParallel = true);
|
||||
self.bg_subtractor = cv2.bgsegm.createBackgroundSubtractorCNT()
|
||||
self.bg_subtractor = cv2.bgsegm.createBackgroundSubtractorCNT(
|
||||
fps, True, fps * 60, True
|
||||
)
|
||||
self.save_images = False
|
||||
self.frame_counter = 0
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ class FrigateMotionDetector(MotionDetector):
|
||||
self,
|
||||
frame_shape,
|
||||
config: MotionConfig,
|
||||
fps: int,
|
||||
improve_contrast_enabled,
|
||||
motion_threshold,
|
||||
motion_contour_area,
|
||||
|
||||
@ -466,6 +466,7 @@ def track_camera(
|
||||
motion_detector = CNTMotionDetector(
|
||||
frame_shape,
|
||||
config.motion,
|
||||
config.detect.fps,
|
||||
improve_contrast_enabled,
|
||||
motion_threshold,
|
||||
motion_contour_area,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user