本文介绍了在没有控制台窗口的情况下运行OpenCV应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在后台没有控制台窗口的情况下启动OpenCV应用程序?我有一个使用网络摄像头的应用程序,我只想看到网络摄像头窗口.
How can i start a OpenCV application without the console window in background? I have a app that uses the webcam and i would like to see only the webcam window.
谢谢.
推荐答案
您将获得一个控制台窗口,因为您创建的程序是一个控制台程序,与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()
.
这篇关于在没有控制台窗口的情况下运行OpenCV应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!