level 3
修改昵称01☞
楼主
#include "stdafx.h"
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char**argv)
{
VideoCapture capture(0);
if (!capture.isOpened())
{
printf("not opened ....\n");
return -1;
}
Size S = Size((int)capture.get(CV_CAP_PROP_FRAME_WIDTH),(int)capture.get(CV_CAP_PROP_FRAME_HEIGHT));
int fps = capture.get(CV_CAP_PROP_FPS);
Mat frame;
namedWindow("camfa", CV_WINDOW_AUTOSIZE);
while (capture.read(frame))
{
flip(frame, frame, 1);
imshow("camfa", 1);
char c = waitKey(100);
if (c == 27)
{
break;
}
}
capture.release();
waitKey(0);
return 0;
}
打不开摄像头
2018年01月10日 05点01分
1
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char**argv)
{
VideoCapture capture(0);
if (!capture.isOpened())
{
printf("not opened ....\n");
return -1;
}
Size S = Size((int)capture.get(CV_CAP_PROP_FRAME_WIDTH),(int)capture.get(CV_CAP_PROP_FRAME_HEIGHT));
int fps = capture.get(CV_CAP_PROP_FPS);
Mat frame;
namedWindow("camfa", CV_WINDOW_AUTOSIZE);
while (capture.read(frame))
{
flip(frame, frame, 1);
imshow("camfa", 1);
char c = waitKey(100);
if (c == 27)
{
break;
}
}
capture.release();
waitKey(0);
return 0;
}
打不开摄像头
