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

后端 未结 7 1465
迷失自我
迷失自我 2020-12-10 12:09

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

7条回答
  •  有刺的猬
    2020-12-10 12:34

    import os os.system('''/usr/bin/osascript -e 'tell app "Finder" to set frontmost of process "Python" to true' ''')

    Adding this before any of my code worked for me. Python 3.6.6 & macOS Mojave 10.14.2

    Be careful though, the image is gonna pop up on one of your "Desktops" and not in any Maximized Window App screen (when you press the green button in the top left of your app)

提交回复
热议问题