0

I want to open webcam in c++ using Opencv in Linux OS.

int main()
{
    VideoCapture video(0);

    // ..
}

But there is small problem:

VIDEOIO ERROR: V4L2: setting property #0 is not supported

I am only sure that webcam works. Because cheese works.

Thanks.

Khalil Khalaf
  • 9,259
  • 11
  • 62
  • 104
  • 2
    we don't look at pictures of problems. code is text... you can trivially paste the text into your question. – Marc B Aug 12 '16 at 21:07

1 Answers1

1

The parameter in this context is the camera index and the index 0 in Windows is either the first available camera or the one which is not plugged via USB (not exactly sure).

In Linux on the other hand, you just remove the parameter since it works by default on any available camera.

VideoCapture video(); should work. And you can find more information in the Documentation.

Khalil Khalaf
  • 9,259
  • 11
  • 62
  • 104