1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#include <opencv2/opencv.hpp> using namespace cv; int main() { VideoCapture capture(0); Mat frame; while (capture.isOpened()) { capture >> frame; imshow("capture", frame); if (cvWaitKey(10) == 27) //cvWaitKey的参数相当于多少ms一帧,现在是40ms一帧,1s25帧 break; //按ESC就退出 } return 0; } |
本文最后更新于2019年5月21日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!