To solve a issue I created another issue. I read this two code on some forum:
sudo rm /dev/video0 sudo mv /dev/video1 /dev/video0
Now I can't access my web cam plus the python script that I had earlier written is giving problem viz:
from cv2 import * cam = cv2.VideoCapture(0) # some problem over here xx=1 //capture just one picture as soon as web cam gets opened while xx<2: ret, img = cam.read() cv2.imshow('img',img) value=random.randint(1,10000) cv2.imwrite("/home/mukesh/Desktop/recognition/recognition/unknown_pictures/filename"+str(value)+".jpg",img) xx+=1 k = cv2.waitKey(30) & 0xff if k == 27: break cam.release() cv2.destroyAllWindows()
Is there any way that I can recover back my dev/video0 file and get my web cam again. I completely messed up my laptop.