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;