C++ OpenCV 2.4.11: List all cameras
问题 I want to list all connected webcams (USB-webcams and internal webcams), using C++, OpenCV 2.4.11, Windows 8.1 and Qt Creator 3.4.2. For me it is enough to get the number of accessible webcams in the following way: VideoCapture videoCapture(0); // Will access my internal laptop webcam. VideoCapture videoCapture(1); // Will access the first connected usb webcam. Here is my code: // Following procedure detects, how many webcams are accessible from 0 on upwards. numberOfDevices = 0; bool noError