-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
highgui GTK plugin should prefer GTK3 #20821
Copy link
Copy link
Closed
Labels
Milestone
Description
System information (version)
- OpenCV => 4.5.3 / master https://github.com/opencv/opencv/tree/13c6eb42e9788172c10132a35badacdb23de034b
- Operating System / Platform => openSUSE Tumbleweed
- Compiler => gcc 11.2
Detailed description
Enable Qt backend and all highgui plugins. OpenCV will use GTK2 plugin libopencv_highgui_gtk2.so by default currently. But GTK3 should be preferred.
Steps to reproduce
Build OpenCV with:
cmake .. -DWITH_GTK=ON -DWITH_QT=ON -DHIGHGUI_PLUGIN_LIST=allThere are two plugins produced:
libopencv_highgui_gtk2.so
libopencv_highgui_gtk3.so
At runtime:
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/backend.cpp (120) createDefaultUIBackend UI: Initializing backend...
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/registry.impl.hpp (87) UIBackendRegistry UI: Builtin backends(3): GTK(1000); GTK3(990); GTK2(980) + BUILTIN(QT5)
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/registry.impl.hpp (112) UIBackendRegistry UI: Available backends(3): GTK(1000); GTK3(990); GTK2(980) + BUILTIN(QT5)
[ INFO:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/registry.impl.hpp (114) UIBackendRegistry UI: Enabled backends(3, sorted by priority): GTK(1000); GTK3(990); GTK2(980) + BUILTIN(QT5)
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/backend.cpp (78) createUIBackend UI: trying backend: GTK (priority=1000)
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/plugin_wrapper.impl.hpp (220) getPluginCandidates UI: GTK plugin's glob is 'libopencv_highgui_gtk*.so', 1 location(s)
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/plugin_wrapper.impl.hpp (227) getPluginCandidates - /usr/local/lib64: 2
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/plugin_wrapper.impl.hpp (231) getPluginCandidates Found 2 plugin(s) for GTK
[ INFO:0] global /home/huangqinjin/Projects/opencv/modules/core/src/utils/plugin_loader.impl.hpp (67) libraryLoad load /usr/local/lib64/libopencv_highgui_gtk2.so => OK
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/plugin_wrapper.impl.hpp (31) initPluginAPI Found entry: 'opencv_ui_plugin_init_v0'
[DEBUG:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/plugin_wrapper.impl.hpp (76) checkCompatibility UI: initialized 'GTK(2) OpenCV UI plugin': built with OpenCV 4.5 (ABI/API = 0/0), current OpenCV version is '4.5.3' (ABI/API = 0/0)
[ INFO:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/plugin_wrapper.impl.hpp (49) initPluginAPI UI: plugin is ready to use 'GTK(2) OpenCV UI plugin'
[ INFO:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/backend.cpp (90) createUIBackend UI: using backend: GTK (priority=1000)
[ INFO:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/window_gtk.cpp (2356) createWindow OpenCV/UI: Creating GTK window: img (4097)
[ INFO:0] global /home/huangqinjin/Projects/opencv/modules/highgui/src/window_gtk.cpp (573) CvWindow OpenCV/UI: creating GTK window: img
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable