def run(self):
video_capture = cv2.VideoCapture(0)
while True:
got_a_frame, image = video_capture.read()
grayimage = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow('camera',grayimage)
key = cv2.waitKey(50)
if key == 27:
break
cv2.destroyWindow('camera')
# Create new threads
评论列表
文章目录