0

I have been working on this code where I am using cap = cv2.VideoCapture(0) command for capturing live image from webcam. Due to some reason, this command doesn't open my systems webcam. It looks like it could be linked to "device id" argument that is being passed to VideoCapture() command.

Any ideas how we can find the device id of our laptop's webcam. I have found product id from the drivers properties information, which is 707F - but need some help with device id.

Thanks Sani

Sani
  • 1
  • 1
    Welcome to SO! please read [mcve] and [tour] then edit your post accordingly. – Dev Apr 24 '21 at 18:58
  • @Sani Start by Google searching: *Locating webcam device ID for VideoCapture()*. Check [here](https://stackoverflow.com/questions/41298588/opencv-videocapture-device-index-device-number) for example. – Rotem Apr 24 '21 at 20:26
  • in linux there are video device entries in the file system. In Windows according to google there are tools like PyGrabber to list available video devices. – Micka Apr 25 '21 at 08:51

1 Answers1

0

I used the following page to get USB devices: https://python-forum.io/thread-25574.html lines containing VID_ probably relate to webcam device

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/31854885) – Emi OB May 27 '22 at 12:40