How to count cameras in OpenCV 2.3?

后端 未结 6 1169
难免孤独
难免孤独 2020-12-01 14:36

I want to get the number of available cameras.

I tried to count cameras like this:

for(int device = 0; device<10; device++) 
{
    VideoCapture ca         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 14:54

    I have also faced similar kind of issue. I solved the problem by using videoInput.h library instead of Opencv for enumerating the cameras and passed the index to Videocapture object. It solved my problem.

提交回复
热议问题