mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
samples: don't call twice of VideoCapture::open()
This commit is contained in:
parent
8c4e0dfd13
commit
aef16d51ec
@ -20,7 +20,7 @@ int main(int, char**)
|
|||||||
//--- INITIALIZE VIDEOCAPTURE
|
//--- INITIALIZE VIDEOCAPTURE
|
||||||
VideoCapture cap;
|
VideoCapture cap;
|
||||||
// open the default camera using default API
|
// open the default camera using default API
|
||||||
cap.open(0);
|
// cap.open(0);
|
||||||
// OR advance usage: select any API backend
|
// OR advance usage: select any API backend
|
||||||
int deviceID = 0; // 0 = open default camera
|
int deviceID = 0; // 0 = open default camera
|
||||||
int apiID = cv::CAP_ANY; // 0 = autodetect default API
|
int apiID = cv::CAP_ANY; // 0 = autodetect default API
|
||||||
|
Loading…
Reference in New Issue
Block a user