import cv2 cv2.namedWindow("POLARALIGN") vc = cv2.VideoCapture(1) if vc.isOpened(): # try to get the first frame rval, frame = vc.read() else: rval = False while rval: cv2.imshow("POLARALIGN", frame) rval, frame = vc.read() key = cv2.waitKey(20) if key == 27: # exit on ESC break else: cv2.circle(img=frame, center=(320, 210), radius=110, color=(0, 0, 255), thickness=3, lineType=8, shift=0) cv2.circle(img=frame, center=(320, 210), radius=120, color=(0, 0, 255), thickness=3, lineType=8, shift=0) cv2.line(img=frame, pt1=(320, 60), pt2=(320, 360), color=(255, 0, 0), thickness=2, lineType=8, shift=0) cv2.line(img=frame, pt1=(180, 210), pt2=(460, 210), color=(255, 0, 0), thickness=2, lineType=8, shift=0) cv2.line(img=frame, pt1=(220, 100), pt2=(420, 320), color=(0, 255, 255), thickness=2, lineType=8, shift=0) cv2.line(img=frame, pt1=(220, 320), pt2=(420, 100), color=(0, 255, 255), thickness=2, lineType=8, shift=0) vc.release() cv2.destroyWindow("POLARALIGN")