OpenCV:如何强制图像窗口出现在其他窗口的顶部? [英] OpenCV: how to force the image window to appear on top of other windows?

查看:232
本文介绍了OpenCV:如何强制图像窗口出现在其他窗口的顶部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用cvShowImage,可以轻松地在OpenCV中显示图像.但是,您如何告诉OpenCV在其他所有窗口之上显示该窗口?

Using cvShowImage, one can easily show an image in OpenCV. However, how do you tell OpenCV to show the window on top of every other window?

我在显示图像时运行全屏OpenGL应用程序.第一次在我的应用程序窗口顶部弹出OpenCV窗口,但是如果我单击我的应用程序窗口(即将焦点放回它),那么我将无法使OpenCV回到顶部. OpenGL窗口,即使销毁并重新创建窗口也是如此.

I run a full screen OpenGL application while showing images. The first time the OpenCV window pops up on top of my application window, but if I click on the window of my application (i.e. give focus back to it), then I can't manage to have the OpenCV come back on top of the OpenGL window, even when destroying and recreating the window.

我想每次都重命名窗口,但是还有另一种方法吗?

I thought of renaming the window each time, but is there another way to do it?

推荐答案

OpenCV没有本地方法可以做到这一点(据我所知).

答案取决于平台.如果您的目标是Windows,请检查此答案,然后选择肯定会有用.

The answer is platform dependent. If your target is Windows, check this answer and then this and this will certainly be useful.

如果您使用的是Linux,则需要查看OpenCV的编译方式,并检查其基于什么系统(可能是GTK + 2.x).然后,做一些自己的研究.

If you are on Linux, you need to take a look at how OpenCV was compiled and check what system its built on (probably GTK+ 2.x). Then, do some research of your own.

这篇关于OpenCV:如何强制图像窗口出现在其他窗口的顶部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆