opencv打开USB摄像头
代码说明:
#include #include #include #include using namespace cv; int main() { VideoCapture capture(1); //namedWindow("a", CV_WINDOW_NORMAL); //setWindowProperty("a", CV_WND_PROP_FULLSCREEN); //capture.set(CV_CAP_PROP_FRAME_WIDTH, 1920.0); //capture.set(CV_CAP_PROP_FRAME_HEIGHT, 1920.0); while (1) { Mat frame; capture >> frame; imshow("a", frame); waitKey(30); } return 0; }
下载说明:请别用迅雷下载,失败请重下,重下不扣分!


