每当imshow
所示的窗口关闭时,如何关闭应用程序主窗口?
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
main()
{
Mat m(1000, 1000, CV_8UC3, Scalar(255, 0, 0));
const string nameWnd = "nameWnd";
namedWindow(nameWnd, WINDOW_NORMAL);
imshow(nameWnd, m);
waitKey(0);
}