mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 04:27:42 +03:00
Save average image when saving debug frames.
This commit is contained in:
parent
6bb1a5dfd2
commit
001a0ce1b2
@ -131,7 +131,7 @@ class ImprovedMotionDetector(MotionDetector):
|
|||||||
if self.save_images:
|
if self.save_images:
|
||||||
blurred_saved = resized_frame.copy()
|
blurred_saved = resized_frame.copy()
|
||||||
|
|
||||||
if self.save_images or self.calibrating:
|
if self.save_images:
|
||||||
self.frame_counter += 1
|
self.frame_counter += 1
|
||||||
# compare to average
|
# compare to average
|
||||||
frameDelta = cv2.absdiff(resized_frame, cv2.convertScaleAbs(self.avg_frame))
|
frameDelta = cv2.absdiff(resized_frame, cv2.convertScaleAbs(self.avg_frame))
|
||||||
@ -211,6 +211,7 @@ class ImprovedMotionDetector(MotionDetector):
|
|||||||
cv2.cvtColor(resized_saved, cv2.COLOR_GRAY2BGR),
|
cv2.cvtColor(resized_saved, cv2.COLOR_GRAY2BGR),
|
||||||
cv2.cvtColor(contrasted_saved, cv2.COLOR_GRAY2BGR),
|
cv2.cvtColor(contrasted_saved, cv2.COLOR_GRAY2BGR),
|
||||||
cv2.cvtColor(blurred_saved, cv2.COLOR_GRAY2BGR),
|
cv2.cvtColor(blurred_saved, cv2.COLOR_GRAY2BGR),
|
||||||
|
cv2.cvtColor(cv2.convertScaleAbs(self.avg_frame), cv2.COLOR_GRAY2BGR),
|
||||||
cv2.cvtColor(frameDelta, cv2.COLOR_GRAY2BGR),
|
cv2.cvtColor(frameDelta, cv2.COLOR_GRAY2BGR),
|
||||||
cv2.cvtColor(thresh, cv2.COLOR_GRAY2BGR),
|
cv2.cvtColor(thresh, cv2.COLOR_GRAY2BGR),
|
||||||
thresh_dilated,
|
thresh_dilated,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user