First time here? Check out the FAQ!
answered 2018-06-30 00:16:56 -0600
you have to specify a camera index, like:
VideoCapture cap(0);
or :
bool ok = cap.open(0);
have a look at the docs