initial conversion to pydantic

This commit is contained in:
Jason Hunter
2021-06-24 01:45:27 -04:00
committed by Blake Blackshear
parent dada764d2c
commit c664bd63f6
9 changed files with 714 additions and 1054 deletions

View File

@@ -2,6 +2,7 @@ import cv2
import imutils
import numpy as np
from frigate.config import MotionConfig
from frigate.util import create_mask
class MotionDetector:
@@ -18,7 +19,7 @@ class MotionDetector:
self.motion_frame_count = 0
self.frame_counter = 0
resized_mask = cv2.resize(
config.mask,
create_mask(frame_shape, config.mask),
dsize=(self.motion_frame_size[1], self.motion_frame_size[0]),
interpolation=cv2.INTER_LINEAR,
)