cv2.namedWindow() function is displaying the window

I don’t want it to display it, I only want to create it. I want to display it only when imshow() is executed. any suggestions? is this a bug?

no. you asked to open a window, it did that.

then don’t use namedWindow()
(you only MUST if you need mouse events, trackbars)
stick with imshow() (which will open a window on demand) and destroyWindow()

last, but not least – those gui things are for debug-visualization. if you need more luxury, skip them and learn proper gtk/qt/wx/whatever.

1 Like