OpenCv error can't open camera through video capture

后端 未结 6 2028
太阳男子
太阳男子 2021-01-17 20:01

I was using my cam through opencv and suddenly after restarting I ran my code it shows below error:

[ WARN:0] global /io/opencv/modules/videoio/src/cap_v4l.c         


        
6条回答
  •  抹茶落季
    2021-01-17 20:35

    I got the same error. Try changing 0 to -1

    cap = cv2.VideoCapture(-1)
    

    This solved the issue.

提交回复
热议问题