Recommended GUI for OpenCV and Python

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.

3 Likes