488
社区成员
发帖
与我相关
我的任务
分享
//打开摄像头样例
#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;
}