#include <stdio.h>
#include<opencv2/opencv.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include<iostream>
#include<thread>
using namespace cv;
using namespace std;
VideoCapture capture;
int main()
{
CvCapture *camera = cvCaptureFromCAM(0);
if (NULL == camera)
{
cout << "打开摄像头失败" << endl;
}
cvSetCaptureProperty(camera, CV_CAP_PROP_FRAME_WIDTH, 3264);
cvSetCaptureProperty(camera, CV_CAP_PROP_FRAME_HEIGHT, 2448);
namedWindow("aratek", 0);
while (1)
{
IplImage * img = cvQueryFrame(camera);
//cvSaveImage("1.jpg", img);
cvShowImage("aratek", img);
waitKey(20);
}
cvReleaseCapture(&camera);
return 0;
}