Ask Your Question

Revision history [back]

VideoCapture issue on windows

Hello, I wrote a little program in c++ that uses opencv`s VideoCapture class to read an image from my webcam and writes it to a file.

It is working great on my windows 7 laptop and another windows 10 machine. Unfortunately it fails on the computer where it has to work on(win10, same camera). I always get a popup window that is asking me to choose the capture source. So I think that there is an issue with the VFW-API on Windows

In my code I have something like this: VideoCapture cap(id);

I tried different values for id (according to cv::VideoCaptureAPIs enum values) like -1,0,200, 300,... but none worked. I either get a popup window or cap.isOpened() fails.

I use opencv 3.0.0 (prebuild binaries).

Can someone please tell me what I forgot?

Thank You