OpenCv error can't open camera through video capture

后端 未结 6 1986
太阳男子
太阳男子 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:46

    Most likely a permission issue on /dev/video0.

    Check if you are part of "video" group.
    id -a

    if you don't see video in your group list add sudo usermod -a -G video

    for Ubuntu users:(20.04)
    sudo usermod -a -G video $LOGNAME

    Logout and log back in and try it.

提交回复
热议问题