1 | initial version |
here's a simple videoloop
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
using namespace cv;
int main()
{
VideoCapture cap(0); // get 1st cam. you can also put a string with a videofile here.
while( cap.isOpened() )
{
Mat frame;
if ( ! cap.read(frame) )
break;
// your processing here
imshow("lalala",frame);
int k = waitKey(10);
if ( k==27 ) // esc.
break;
}
return 0;
}