Recommended GUI for OpenCV and Python


I am building an application that could have multiple frame outputs that I use to show by applying “cv2.imshow” function, but I would like to know what are the best GUI frameworks to start developing a simple application that show 2 images, one from webcam stream, some buttons like EXIT, PAUSE, etc. and Test field to add info.

There are so many, one more complex than others, PyQT5, Tkinter, PySimpleGUI, PyGUI, PySimpleGUI…

What do you recommend in terms of simplicity and performance?


depends on which you’re familiar with.

you can stick with OpenCV’s imshow and handle your own mouse events. with multiple imshow windows I’ve noticed some issues (on win32) where only the focused window receives enough event loop attention to keep updating at 60 fps (all others start stuttering).

Tkinter comes with Python, which is an advantage. disadvantage: it’s cruddy. Image data is internally serialized to ASCII formats because of how tcl/tk works. don’t expect too much of it.

Qt seems popular. I don’t like it for various reasons and I seem to be in good company with that position.

wxWidgets seems to enjoy some popularity, partially due to its kinda rich ecosystem of solid base widgets. it comes with a “property grid”, which is a fairly complex widget. you don’t get that with Qt (they have it but it’s not documented and not supported, which is dumb).

or go with whatever’s popular in the C# world, and use C# with “opencvsharp” or whatever’s the most popular wrapper these days. with that approach you’ll get to choose between WinForms and WPF, which are solid technologies with solid tool support.

All the pygui/pysimplegui stuff is just going to be a headache, so don’t even bother. also don’t bother with anything that uses “web” technologies bolted onto Python. that’ll never perform well, if you want to display live video.


Thanks for the feedback! they are some good advises :slight_smile:

A post was split to a new topic: Silhouette plugin

I used GTK3 (now in version4 “GTK4”) that has resources on the web and works with OPENCV.