Reputation: 23
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.
Upvotes: 0
Views: 1972
Reputation: 9407
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.
Upvotes: 1