Search code examples
opencvcameravideo-capture

Opencv cant access camera connected through video capture device


I have a analog camera connected to EasyCap video capture device. When I run a basic code which opens webcam video using OPENCV, I can access my in-built webcam but not the other analog camera.

How would you connect any other camera (FPV, IR, etc) to the PC such that OPENCV can access it.

Thanks.


Solution

  • i struggled with the same problem and hope it helps!

    the original thread + ANSWER

    also relevant XKCD

    one more observation: from your description it looks like you already have a webcam running on the laptop (in-built webcam maybe?) you might want to disable it in system manager so as to guarantee that your analog camera cam_index is zero for certain. Otherwise if you leave the webcam enabled as a device, then your analog cam will most likely be incremented to cam_index=1 which amusingly enough seems to be confirmed by it crashing on cam_index=1. Arguable not a great method to find your camera's index but there you have it!