优化测试图片时候的显示窗口,可以调节窗口大小

main
Jeffrey_Li 1 year ago
parent 4728a58767
commit 6cc6ed3e76

@ -767,7 +767,9 @@ void Cigarette::TestImg()
std::vector<std::pair<int, cv::Rect> > 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<std::pair<int, cv::Rect> > 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

Loading…
Cancel
Save