且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在没有控制台窗口的情况下运行OpenCV应用程序

更新时间:2022-11-03 14:03:21

您将获得一个控制台窗口,因为您创建的程序是一个控制台程序,与OpenCV无关.您需要将程序类型从控制台更改为标准(窗口式)Windows.

You get a console window because the program you created is a console program, this has nothing to do with OpenCV. You need to change the type of your program from console to standard (windowed) Windows.

此SO帖子列出了可以使用不同的解决方案,但是最简单的方法是将您的main()函数名称更改为WinMain().

This SO post lists the different solutions to do this, but the easiest is to change your main() function name to WinMain().