人脸识别-调用摄像头

源代码:

#include <opencv2/highgui/highgui.hpp>  
#include <opencv2/imgproc/imgproc.hpp>  
#include <opencv2/core/core.hpp>  
using namespace cv;
//调用摄像头
int main()
{
	VideoCapture cap(0);
	Mat frame;
	while (1)
	{
		cap >> frame;
		imshow("调用摄像头", frame);
		waitKey(30);
	}
	return 0;
}

 

posted @ 2017-10-31 21:14  栗染  阅读(2186)  评论(0编辑  收藏  举报