seb seb - 1 year ago 134
C Question

OpenCV: how to force the image window to appear on top of other windows?


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

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?

Answer Source

OpenCV has no native way to do this (that I'm aware of).

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

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download