python opencv读取摄像头

python opencv读取摄像头

camera = cv2.VideoCapture(2)
    flag2 = camera.open(2)
    #for path, img, im0s, vid_cap in dataset:
    while flag2:
        flag, image = camera.read()
                cv2.imshow("win1", im0)

 

 

#################

posted @ 2022-03-29 15:44  西北逍遥  阅读(341)  评论(0编辑  收藏  举报