Raspberry Pi - Camera Module
What will be the output of this code snippet when motion is detected?
import cv2 cap = cv2.VideoCapture(0) ret, frame1 = cap.read() ret, frame2 = cap.read() diff = cv2.absdiff(frame1, frame2) gray = cv2.cvtColor(diff, cv2.COLOR_BGR2GRAY) _, thresh = cv2.threshold(gray, 30, 255, cv2.THRESH_BINARY) print(thresh.sum() > 10000)
