summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Alekhin <alexander.alekhin@intel.com>2018-07-03 15:44:53 +0300
committerAlexander Alekhin <alexander.alekhin@intel.com>2018-07-03 15:44:53 +0300
commit203f95d3be6a490cc24ffe2933b3723d3ea718e9 (patch)
tree384d342934695d39811f3bd1dcf594136af66af0
parent117e97adac3d14f1aab935e82c257694b520bd5b (diff)
downloadopencv-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.cpp2
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;