mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
increase alpha during calibration
This commit is contained in:
parent
cfa8a39720
commit
c061ff14ee
@ -127,12 +127,16 @@ class ImprovedMotionDetector(MotionDetector):
|
||||
if self.motion_frame_count >= 10:
|
||||
# only average in the current frame if the difference persists for a bit
|
||||
cv2.accumulateWeighted(
|
||||
resized_frame, self.avg_frame, self.config.frame_alpha
|
||||
resized_frame,
|
||||
self.avg_frame,
|
||||
0.2 if self.calibrating else self.config.frame_alpha,
|
||||
)
|
||||
else:
|
||||
# when no motion, just keep averaging the frames together
|
||||
cv2.accumulateWeighted(
|
||||
resized_frame, self.avg_frame, self.config.frame_alpha
|
||||
resized_frame,
|
||||
self.avg_frame,
|
||||
0.2 if self.calibrating else self.config.frame_alpha,
|
||||
)
|
||||
self.motion_frame_count = 0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user