@@ -621,10 +621,10 @@ def motion_capture(self, motion_frame="last", motion_threshold=25, motion_area=5
621621
622622 # Different OpenCV versions (docker vs native)
623623 try :
624- ( cnts , _ ) = cv2 .findContours (threshold .copy (), cv2 .RETR_EXTERNAL , cv2 .CHAIN_APPROX_SIMPLE )
624+ cnts , _ = cv2 .findContours (threshold .copy (), cv2 .RETR_EXTERNAL , cv2 .CHAIN_APPROX_SIMPLE )
625625 except Exception as ex :
626626 logger .debug (f"Wrong CV2 version. Retry: { ex } " )
627- ( _ , cnts , _ ) = cv2 .findContours (threshold .copy (), cv2 .RETR_EXTERNAL , cv2 .CHAIN_APPROX_SIMPLE )
627+ _ , cnts , _ = cv2 .findContours (threshold .copy (), cv2 .RETR_EXTERNAL , cv2 .CHAIN_APPROX_SIMPLE )
628628
629629 # don't draw if motion boxes is disabled
630630 # Color Red and Blue are swapped... very strange...
@@ -648,7 +648,7 @@ def motion_capture(self, motion_frame="last", motion_threshold=25, motion_area=5
648648 motion_detected = True
649649 # compute the bounding box for the contour, draw it on the frame with the selected color,
650650 if box_color is not None :
651- ( x , y , w , h ) = cv2 .boundingRect (c )
651+ x , y , w , h = cv2 .boundingRect (c )
652652 cv2 .rectangle (raw_image , (x , y ), (x + w , y + h ), box_color , 2 )
653653
654654 if motion_detected :
0 commit comments