I'm making an application running multiple webcams/cameras. I cannot manage to detect the number of webcams I have with OpenCV to arrage a big display window with multiple sub webcams in it.
Someone can help me this?
I've searched openCV willowgarage but failed
thanks
I don't think OpenCV provides any function to tell how many cameras are detected. An easy and cross-platform way is to call VideoCapture::open() in a loop with say 0 to 10, and in each iteration check if VideoCapture::isOpened() returns true. This way you know the index of the cameras and how many of them you've got.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With