int main() {
VideoCapture cap(0);
if (!cap.isOpened()) {
return -1;
}
while (1) {
Mat frame;
cap >> frame;
if (frame.empty())
break;
imshow("Frame", frame);
char c = (char)waitKey(25);// wait up to 25 milliseconds
if (c == 27)
break;
} // while
cap.release();
destroyAllWindows();
return 0;
}
标签:25,Qt,frame,cap,char,OpenCV,源码 From: https://www.cnblogs.com/zdt168/p/17075900.html