import cv2
def diffres(t0, t1, t2):
d1 = cv2.absdiff(t2, t1)
d2 = cv2.absdiff(t1, t0)
return cv2.bitwise_and(d1, d2)
cam = cv2.VideoCapture(0)
winName = "Sensor:)"
cv2.namedWindow(winName)
a = cv2.cvtColor(cam.read()[1], cv2.COLOR_RGB2GRAY)
b = cv2.cvtColor(cam.read()[1]...