#include<opencv2/opencv.hpp>
#include<iostream>
#include<math.h>
using namespace cv;
using namespace std; //千篇一律的开头
int main(int argc, char* argv)
{
VideoCapture capture(0); //最最主要的一个调用函数,opencv真的很强大
Mat frame;
while (capture.read(frame))
{
imshow("camera demo", frame); //在窗口显示
char c = waitKey(50);
if (c == 27)
{
break;
} //按esc退出
}
waitKey(0);
return 0;
}
#include<iostream>
#include<math.h>
using namespace cv;
using namespace std; //千篇一律的开头
int main(int argc, char* argv)
{
VideoCapture capture(0); //最最主要的一个调用函数,opencv真的很强大
Mat frame;
while (capture.read(frame))
{
imshow("camera demo", frame); //在窗口显示
char c = waitKey(50);
if (c == 27)
{
break;
} //按esc退出
}
waitKey(0);
return 0;
}