def test_subtractBackground(): cap = cv2.VideoCapture(0) handGestureRecognizer = HandGestureRecognizer(cap) while(1): cv2.imshow('frame',handGestureRecognizer.subtractBackground()) k = cv2.waitKey(30) & 0xff if k == 27: break
def test_track(): colors = [[220, 160, 92], [215, 152, 59], [199, 148, 79], [184, 143, 85], [188, 136, 56], [208, 158, 93], [204, 152, 51], [153, 126, 66], [188, 135, 51], [183, 137, 67], [169, 127, 65], [166, 128, 74], [185, 136, 68], [177, 141, 95], [192, 146, 82]] cap = cv2.VideoCapture(0) handGestureRecognizer = HandGestureRecognizer(cap) handGestureRecognizer._trackHand(colors)