mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	remove unneeded changes
This commit is contained in:
		
							parent
							
								
									c664bd63f6
								
							
						
					
					
						commit
						1e21a62851
					
				| @ -2,7 +2,6 @@ import cv2 | |||||||
| import imutils | import imutils | ||||||
| import numpy as np | import numpy as np | ||||||
| from frigate.config import MotionConfig | from frigate.config import MotionConfig | ||||||
| from frigate.util import create_mask |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class MotionDetector: | class MotionDetector: | ||||||
| @ -19,7 +18,7 @@ class MotionDetector: | |||||||
|         self.motion_frame_count = 0 |         self.motion_frame_count = 0 | ||||||
|         self.frame_counter = 0 |         self.frame_counter = 0 | ||||||
|         resized_mask = cv2.resize( |         resized_mask = cv2.resize( | ||||||
|             create_mask(frame_shape, 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_LINEAR, | ||||||
|         ) |         ) | ||||||
|  | |||||||
| @ -319,7 +319,7 @@ class CameraState: | |||||||
|     def __init__(self, name, config, frame_manager): |     def __init__(self, name, config, frame_manager): | ||||||
|         self.name = name |         self.name = name | ||||||
|         self.config = config |         self.config = config | ||||||
|         self.camera_config: CameraConfig = config.cameras[name] |         self.camera_config = config.cameras[name] | ||||||
|         self.frame_manager = frame_manager |         self.frame_manager = frame_manager | ||||||
|         self.best_objects: Dict[str, TrackedObject] = {} |         self.best_objects: Dict[str, TrackedObject] = {} | ||||||
|         self.object_counts = defaultdict(int) |         self.object_counts = defaultdict(int) | ||||||
| @ -329,7 +329,6 @@ class CameraState: | |||||||
|         self._current_frame = np.zeros(self.camera_config.frame_shape_yuv, np.uint8) |         self._current_frame = np.zeros(self.camera_config.frame_shape_yuv, np.uint8) | ||||||
|         self.current_frame_lock = threading.Lock() |         self.current_frame_lock = threading.Lock() | ||||||
|         self.current_frame_time = 0.0 |         self.current_frame_time = 0.0 | ||||||
|         self.motion_mask = self.camera_config.motion.mask |  | ||||||
|         self.motion_boxes = [] |         self.motion_boxes = [] | ||||||
|         self.regions = [] |         self.regions = [] | ||||||
|         self.previous_frame_id = None |         self.previous_frame_id = None | ||||||
| @ -391,7 +390,7 @@ class CameraState: | |||||||
|                 cv2.drawContours(frame_copy, [zone.contour], -1, zone.color, thickness) |                 cv2.drawContours(frame_copy, [zone.contour], -1, zone.color, thickness) | ||||||
| 
 | 
 | ||||||
|         if draw_options.get("mask"): |         if draw_options.get("mask"): | ||||||
|             mask_overlay = np.where(self.motion_mask == [0]) |             mask_overlay = np.where(self.camera_config.motion_mask == [0]) | ||||||
|             frame_copy[mask_overlay] = [0, 0, 0] |             frame_copy[mask_overlay] = [0, 0, 0] | ||||||
| 
 | 
 | ||||||
|         if draw_options.get("motion_boxes"): |         if draw_options.get("motion_boxes"): | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user