这是默认 cv2.imshow()
窗口图标:
我正在完成一个基本项目,但想通过更改显示的窗口图标使其看起来更干净。我知道这可以用 Tkinter windows 来完成,但我想看看是否有更直接的方法可以只用 OpenCV 库来完成。
最佳答案
你不能只使用 OpenCV 来做到这一点。其High-level GUI仅支持最少的功能,参见。详细说明:
While OpenCV was designed for use in full-scale applications and can be used within functionally rich UI frameworks (such as Qt*, WinForms*, or Cocoa*) or without any UI at all, sometimes there it is required to try functionality quickly and visualize the results. This is what the HighGUI module has been designed for.
It provides easy interface to:
- Create and manipulate windows that can display images and "remember" their content (no need to handle repaint events from OS).
- Add trackbars to the windows, handle simple mouse events as well as keyboard commands.
“操纵”窗口仅限于命名、移动、调整它们的大小。
(从我个人的角度来看,OpenCV 窗口只是用于原型(prototype)设计,你不会在生产中使用。)
希望有帮助!
关于python - 有什么方法可以更改 imshow() 窗口的图标吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60259324/