当前位置:网站首页>[opencv learning problems] 1 Namedwindow() and imshow() show two windows in the picture

[opencv learning problems] 1 Namedwindow() and imshow() show two windows in the picture

2022-06-11 05:05:00 Skill code brother

1、 Environment configuration

Win10 Family Chinese
VS2017 Community2017
OpenCV 3.4.4

2、 Problem description

Running with the following code will bring up two windows , A non interactive window with pictures , A gray interactive window

int showImage(int argc, char** argv)
{
    
	// display picture 
	cv::Mat img = cv::imread(argv[1], -1);
	if (img.empty())return -1;
	cv::namedWindow("Example1", cv::WINDOW_AUTOSIZE);
	cv::imshow("Example1", img);
	cv::waitKey(0);
	cv::destroyWindow("Example1");
	return 0;
}

The source code is very simple and can be run , No problem

3. Solution

project 》 attribute 》 The linker 》 Input 》 Additional dependency
Will configure opencv Delete a dependency added when
opencv_worldxxx.lib
opencv_worldxxxd.lib

Reprinted from :
https://blog.csdn.net/u014284965/article/details/88172045

原网站

版权声明
本文为[Skill code brother]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020543216720.html