Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you could change line 160,

VideoCapture cap;                     // instantiate VideoCapture
cap.open(video_read_path);            // open a recorded video

to:

VideoCapture cap;                     // instantiate VideoCapture
if (video_read_path == "0")
    cap.open(0);                      // webcam
else
    cap.open(video_read_path);        // video from file