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
Most likely a permission issue on /dev/video0.
/dev/video0
Check if you are part of "video" group. id -a
id -a
if you don't see video in your group list add sudo usermod -a -G video
sudo usermod -a -G video
for Ubuntu users:(20.04) sudo usermod -a -G video $LOGNAME
sudo usermod -a -G video $LOGNAME
Logout and log back in and try it.