opencv video capture of USB device without drivers

asked 2017-10-18 09:26:20 -0600

sheepsheep gravatar image

Alright. So I've got a camera without working windows drivers. I'd like to use VideoCapture to access the camera and see if I can access it with opencv. However, the camera is not identified as camera from Windows. It is listed as "usb composite device".

The hardware id is something like USB\VID_XXXX&PID_YYYY.

The "default" way to access a camera stream in opencv is not working.

int main(int argc, char** argv)
{
    VideoCapture cap(0);

    if (!cap.isOpened()) {
        cerr << "ERROR! Unable to open camera\n";
        return -1;
    }
}

Is there any way to try to get opencv access the cam? I can also install winusb drivers for the camera if that helps.

edit retag flag offensive close merge delete

Comments

2

you need drivers, that work with directshow.

berak gravatar imageberak ( 2017-10-18 09:28:11 -0600 )edit

There surely must be a way to access it without on low-level using opencv?

sheepsheep gravatar imagesheepsheep ( 2017-10-18 09:39:46 -0600 )edit
2

given, you can buy a cam with working drivers for < 10€, you must value your time spent on that very low ;(

berak gravatar imageberak ( 2017-10-18 09:42:55 -0600 )edit

Many USB cameras will operate using the generic USB Video Class device driver - in a generic way, with no unique/proprietary/optimized feature support. Since OpenCV requires and expects camera drivers, this isn't actually an opencv question. HTH.

opalmirror gravatar imageopalmirror ( 2017-10-18 13:04:12 -0600 )edit