You are on page 1of 1

#include <opencv2\opencv.

hpp>

using namespace cv;

int main()
{
VideoCapture cap(0);

if(!cap.isOpened())
return -1;

namedWindow("webcam");

for(;;)
{
Mat frame;

cap >> frame;


imshow("webcam", frame);

if(waitKey(50) >= 0) break;


}

return 0;
}

You might also like