prevent unnecessary early exit from loop

This commit is contained in:
blakeblackshear
2019-03-02 15:20:53 -06:00
parent 5dc76803d6
commit e597a08a66
2 changed files with 3 additions and 8 deletions

View File

@@ -70,11 +70,6 @@ def detect_motion(shared_arr, shared_frame_time, frame_lock, frame_ready, motion
cnts = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
# if there are no contours, there is no motion
if len(cnts) < 1:
motion_frames = 0
continue
motion_found = False
# loop over the contours