I am using OpenCV2.2 with videoInput. I want to upgrade to OpenCV2.3.1 where videoInput has apparently been merged into OpenCV2.3.
My problem is that there doesn't appear to be a listdevices() function to return all the video sources available.
Does anybody know the new equivalent?
As you said videoinput has been merged in OpenCV since 2.3rc.
Looking at the relevant source videoinput appears to be in highgui as the OpenCV changelog specifies. Though whether your OpenCV is built with it enabled is a configurable option in Cmake (The option is WITH_VIDEOINPUT
and also requires it be a WIN32 build, see here).
OpenCV calls listdevices internally as VI.listDevices()
in the implementation of CvCaptureCAM_DShow::open
and the videoInput Class is a protected member of CvCaptureCAM_DShow.
You can get access listdevices function using
CvCapture* capture = cvCaptureFromCAM( CV_CAP_DSHOW );
capture->VI.listDevices();
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