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,
|
self,
|
||||||
frame_shape: Tuple[int, int, int],
|
frame_shape: Tuple[int, int, int],
|
||||||
config: MotionConfig,
|
config: MotionConfig,
|
||||||
|
fps: int,
|
||||||
improve_contrast,
|
improve_contrast,
|
||||||
threshold,
|
threshold,
|
||||||
contour_area,
|
contour_area,
|
||||||
|
|||||||
@ -13,6 +13,7 @@ class CNTMotionDetector(MotionDetector):
|
|||||||
self,
|
self,
|
||||||
frame_shape: Tuple[int, int, int],
|
frame_shape: Tuple[int, int, int],
|
||||||
config: MotionConfig,
|
config: MotionConfig,
|
||||||
|
fps: int,
|
||||||
improve_contrast,
|
improve_contrast,
|
||||||
threshold,
|
threshold,
|
||||||
contour_area,
|
contour_area,
|
||||||
@ -41,7 +42,9 @@ class CNTMotionDetector(MotionDetector):
|
|||||||
# bool useHistory = true,
|
# bool useHistory = true,
|
||||||
# int maxPixelStability = 15*60,
|
# int maxPixelStability = 15*60,
|
||||||
# bool isParallel = true);
|
# 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.save_images = False
|
||||||
self.frame_counter = 0
|
self.frame_counter = 0
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,7 @@ class FrigateMotionDetector(MotionDetector):
|
|||||||
self,
|
self,
|
||||||
frame_shape,
|
frame_shape,
|
||||||
config: MotionConfig,
|
config: MotionConfig,
|
||||||
|
fps: int,
|
||||||
improve_contrast_enabled,
|
improve_contrast_enabled,
|
||||||
motion_threshold,
|
motion_threshold,
|
||||||
motion_contour_area,
|
motion_contour_area,
|
||||||
|
|||||||
@ -466,6 +466,7 @@ def track_camera(
|
|||||||
motion_detector = CNTMotionDetector(
|
motion_detector = CNTMotionDetector(
|
||||||
frame_shape,
|
frame_shape,
|
||||||
config.motion,
|
config.motion,
|
||||||
|
config.detect.fps,
|
||||||
improve_contrast_enabled,
|
improve_contrast_enabled,
|
||||||
motion_threshold,
|
motion_threshold,
|
||||||
motion_contour_area,
|
motion_contour_area,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user