From 6cc6ed3e7693b3e4586ed0cd6d0d1a75c763295f Mon Sep 17 00:00:00 2001 From: Jeffrey_Li <412100639@qq.com> Date: Tue, 24 Oct 2023 22:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=97=B6=E5=80=99=E7=9A=84=E6=98=BE=E7=A4=BA=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=8F=AF=E4=BB=A5=E8=B0=83=E8=8A=82=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cigarette/cigarette.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Cigarette/cigarette.cpp b/Cigarette/cigarette.cpp index 38a1907..6f6c7ef 100644 --- a/Cigarette/cigarette.cpp +++ b/Cigarette/cigarette.cpp @@ -767,7 +767,9 @@ void Cigarette::TestImg() std::vector > results; cv::Mat output; alg_test.detect(imagein, output,results); - cv::imshow("TestImg", output); + std::string WindowName = "TestImg"; + cv::namedWindow(WindowName, cv::WINDOW_NORMAL); + cv::imshow(WindowName, output); cv::waitKeyEx(1); #ifdef __ExportData alg_test.analyse(imagein, results); @@ -802,7 +804,9 @@ void Cigarette::TestImgs() cv::Mat output; std::vector > results; alg_test.detect(imagein, output,results); - cv::imshow("TestImg", output); + std::string WindowName = "TestImg"; + cv::namedWindow(WindowName, cv::WINDOW_NORMAL); + cv::imshow(WindowName, output); int k = cv::waitKeyEx(1); if (k == 27)break;//ESC¼ü #ifdef __ExportData