Change interpolation method from cv2.INTER_LINEAR to cv2.INTER_NEAREST in motion detection classes

This commit is contained in:
Sergey Krashevich 2023-06-23 02:26:20 +03:00
parent 9d06577b8e
commit 4172bccfc7
No known key found for this signature in database
GPG Key ID: 625171324E7D3856
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class FrigateMotionDetector(MotionDetector):
resized_mask = cv2.resize( resized_mask = cv2.resize(
config.mask, config.mask,
dsize=(self.motion_frame_size[1], self.motion_frame_size[0]), 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.mask = np.where(resized_mask == [0])
self.save_images = False self.save_images = False

View File

@ -34,7 +34,7 @@ class ImprovedMotionDetector(MotionDetector):
resized_mask = cv2.resize( resized_mask = cv2.resize(
config.mask, config.mask,
dsize=(self.motion_frame_size[1], self.motion_frame_size[0]), 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.mask = np.where(resized_mask == [0])
self.save_images = False self.save_images = False