From 96c0db50184461ba9caf3683e77f29b63f792314 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 24 Oct 2023 07:44:34 -0500 Subject: [PATCH] remove debugging --- frigate/motion/improved_motion.py | 22 +--------------------- frigate/video.py | 6 +----- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/frigate/motion/improved_motion.py b/frigate/motion/improved_motion.py index 081d955e9..603d8fda4 100644 --- a/frigate/motion/improved_motion.py +++ b/frigate/motion/improved_motion.py @@ -42,7 +42,7 @@ class ImprovedMotionDetector(MotionDetector): interpolation=cv2.INTER_AREA, ) self.mask = np.where(resized_mask == [0]) - self.save_images = True + self.save_images = False self.calibrating = True self.improve_contrast = improve_contrast self.threshold = threshold @@ -128,9 +128,6 @@ class ImprovedMotionDetector(MotionDetector): contour_area = cv2.contourArea(c) total_contour_area += contour_area if contour_area > self.contour_area.value: - logger.info( - f"FRAME #{self.frame_counter} - counted contour area {contour_area}" - ) x, y, w, h = cv2.boundingRect(c) motion_boxes.append( ( @@ -153,10 +150,6 @@ class ImprovedMotionDetector(MotionDetector): if self.calibrating or pct_motion > self.config.lightning_threshold: self.calibrating = True - logger.info( - f"FRAME #{self.frame_counter} - pct_motion: {pct_motion}, number of motion boxes: {len(motion_boxes)}, calibrating: {self.calibrating}" - ) - if self.save_images: thresh_dilated = cv2.cvtColor(thresh_dilated, cv2.COLOR_GRAY2BGR) for b in motion_boxes: @@ -167,19 +160,6 @@ class ImprovedMotionDetector(MotionDetector): (0, 0, 255), 2, ) - display_text = "{}, {}, {}".format( - round(pct_motion, 2), len(motion_boxes), self.calibrating - ) - cv2.rectangle(thresh_dilated, (8, 8), (130, 22), (0, 128, 255), cv2.FILLED) - cv2.putText( - thresh_dilated, - display_text, - (10, 20), - cv2.FONT_HERSHEY_SIMPLEX, - fontScale=0.5, - color=(0, 0, 0), - thickness=2, - ) frames = [ cv2.cvtColor(resized_saved, cv2.COLOR_GRAY2BGR), cv2.cvtColor(contrasted_saved, cv2.COLOR_GRAY2BGR), diff --git a/frigate/video.py b/frigate/video.py index 3b5bba3eb..d570da4d0 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -576,10 +576,6 @@ def process_frames( # look for motion if enabled motion_boxes = motion_detector.detect(frame) if motion_enabled.value else [] - logger.info( - f'{camera_name}: calibrating: {motion_detector.is_calibrating()}, frame time: {frame_time}' - ) - regions = [] consolidated_detections = [] @@ -632,7 +628,7 @@ def process_frames( ) ] - # only add in the motion boxes when not calibrating + # only add in the motion boxes when not calibrating and a ptz is not moving via autotracking if not motion_detector.is_calibrating() and not ptz_moving_at_frame_time( frame_time, ptz_metrics["ptz_start_time"].value,