#include <opencv2\core\core.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
char c;
VideoCapture inputVideo(1); //1为外部摄像头的ID,1为笔记本内置摄像头的ID
Mat src;
while(1)
{
inputVideo >> src;
imshow("摄像头输入",src);
c = waitKey(10);
if (c == 27) break;
}
return 0;
}