1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

Update videocapture_basic.cpp

I believe you are using the wrong version of open() on line 28 - adding deviceID + appId together. It's better to use the new version of .open() taking two integers as parameter.
This commit is contained in:
HowardsPlayPen
2020-04-19 12:51:27 +01:00
committed by Alexander Smorkalov
parent e74075c689
commit cbcdbde29d
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ int main(int, char**)
int deviceID = 0; // 0 = open default camera
int apiID = cv::CAP_ANY; // 0 = autodetect default API
// open selected camera using selected API
cap.open(deviceID + apiID);
cap.open(deviceID, apiID);
// check if we succeeded
if (!cap.isOpened()) {
cerr << "ERROR! Unable to open camera\n";