From bff1826bf5b2b94c0d95532b23e1551398a93233 Mon Sep 17 00:00:00 2001 From: blakeblackshear Date: Wed, 20 Feb 2019 17:44:51 -0600 Subject: [PATCH] only write the first motion frame --- detect_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect_objects.py b/detect_objects.py index 90a89663b..7823b597f 100644 --- a/detect_objects.py +++ b/detect_objects.py @@ -539,7 +539,7 @@ def detect_motion(shared_arr, shared_frame_time, frame_lock, frame_ready, motion with motion_changed: motion_changed.notify_all() - if debug and motion_frames >= 3: + if debug and motion_frames == 3: cv2.imwrite("/lab/debug/motion-{}-{}-{}.jpg".format(region_x_offset, region_y_offset, datetime.datetime.now().timestamp()), cropped_frame) cv2.imwrite("/lab/debug/avg_delta-{}-{}-{}.jpg".format(region_x_offset, region_y_offset, datetime.datetime.now().timestamp()), avg_delta_image)