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?
I run a ful
My solution for OSX was to modify my OpenCV code (version 2.4.8), specifically the file windows_cocoa.mm in the highgui/src directory.
If you want to just bring the new window to the front without making it active, add the following line just before the end of the function cvNamedWindow() in windows_cocoa.mm:
[window orderFrontRegardless];
To force the new window to always be made active, add the following line instead:
[application activateIgnoringOtherApps:YES];
It's probably not the best idea for all windows but works in my situation. I got tired of always having to bring them to the front by clicking on them to make them active.