Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Change this:

VideoCapture cap;

to:

VideoCapture cap(0);

Also this too:

if (!cap.open(0)) return 0;

to:

if (!cap.open(0)) return -1;