diff options
author | Alexander Alekhin <alexander.alekhin@intel.com> | 2018-07-03 15:44:53 +0300 |
---|---|---|
committer | Alexander Alekhin <alexander.alekhin@intel.com> | 2018-07-03 15:44:53 +0300 |
commit | 203f95d3be6a490cc24ffe2933b3723d3ea718e9 (patch) | |
tree | 384d342934695d39811f3bd1dcf594136af66af0 | |
parent | 117e97adac3d14f1aab935e82c257694b520bd5b (diff) | |
download | opencv-203f95d3be6a490cc24ffe2933b3723d3ea718e9.tar.gz opencv-203f95d3be6a490cc24ffe2933b3723d3ea718e9.tar.bz2 opencv-203f95d3be6a490cc24ffe2933b3723d3ea718e9.zip |
samples: videocapture_camera use VideoCapture with 0 index
Not all backends support -1 index.
-rw-r--r-- | samples/cpp/videocapture_camera.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/cpp/videocapture_camera.cpp b/samples/cpp/videocapture_camera.cpp index 4d5a341657..ca39b2093b 100644 --- a/samples/cpp/videocapture_camera.cpp +++ b/samples/cpp/videocapture_camera.cpp @@ -11,7 +11,7 @@ int main(int, char**) { Mat frame; cout << "Opening camera..." << endl; - VideoCapture capture(-1); // open the first available camera + VideoCapture capture(0); // open the first camera if (!capture.isOpened()) { cerr << "ERROR: Can't initialize camera capture" << endl; |