mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
blur with radius instead
This commit is contained in:
parent
959aa6cc22
commit
eac3df98b2
@ -17,6 +17,7 @@ class ImprovedMotionDetector(MotionDetector):
|
|||||||
threshold,
|
threshold,
|
||||||
contour_area,
|
contour_area,
|
||||||
name="improved",
|
name="improved",
|
||||||
|
blur_radius=1,
|
||||||
):
|
):
|
||||||
self.name = name
|
self.name = name
|
||||||
self.config = config
|
self.config = config
|
||||||
@ -40,6 +41,7 @@ class ImprovedMotionDetector(MotionDetector):
|
|||||||
self.improve_contrast = improve_contrast
|
self.improve_contrast = improve_contrast
|
||||||
self.threshold = threshold
|
self.threshold = threshold
|
||||||
self.contour_area = contour_area
|
self.contour_area = contour_area
|
||||||
|
self.blur_radius = blur_radius
|
||||||
|
|
||||||
def detect(self, frame):
|
def detect(self, frame):
|
||||||
motion_boxes = []
|
motion_boxes = []
|
||||||
@ -59,7 +61,7 @@ class ImprovedMotionDetector(MotionDetector):
|
|||||||
if self.save_images:
|
if self.save_images:
|
||||||
resized_saved = resized_frame.copy()
|
resized_saved = resized_frame.copy()
|
||||||
|
|
||||||
resized_frame = gaussian_filter(resized_frame, sigma=1, truncate=1.0)
|
resized_frame = gaussian_filter(resized_frame, sigma=1, radius=self.blur_radius)
|
||||||
|
|
||||||
if self.save_images:
|
if self.save_images:
|
||||||
blurred_saved = resized_frame.copy()
|
blurred_saved = resized_frame.copy()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user