From 4172bccfc7c809ef9528e382ffa99de29bdc1de9 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Fri, 23 Jun 2023 02:26:20 +0300 Subject: [PATCH] Change interpolation method from cv2.INTER_LINEAR to cv2.INTER_NEAREST in motion detection classes --- frigate/motion/frigate_motion.py | 2 +- frigate/motion/improved_motion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/motion/frigate_motion.py b/frigate/motion/frigate_motion.py index 71fb35981..0f9e3abdb 100644 --- a/frigate/motion/frigate_motion.py +++ b/frigate/motion/frigate_motion.py @@ -30,7 +30,7 @@ class FrigateMotionDetector(MotionDetector): resized_mask = cv2.resize( config.mask, dsize=(self.motion_frame_size[1], self.motion_frame_size[0]), - interpolation=cv2.INTER_LINEAR, + interpolation=cv2.INTER_NEAREST, ) self.mask = np.where(resized_mask == [0]) self.save_images = False diff --git a/frigate/motion/improved_motion.py b/frigate/motion/improved_motion.py index 525854b82..c3683bd76 100644 --- a/frigate/motion/improved_motion.py +++ b/frigate/motion/improved_motion.py @@ -34,7 +34,7 @@ class ImprovedMotionDetector(MotionDetector): resized_mask = cv2.resize( config.mask, dsize=(self.motion_frame_size[1], self.motion_frame_size[0]), - interpolation=cv2.INTER_LINEAR, + interpolation=cv2.INTER_NEAREST, ) self.mask = np.where(resized_mask == [0]) self.save_images = False