Lightweight GUI integration with keyboard callback and buttons
Hi,
The GUI elements built into OpenCV are fairly limited, and don't have features like true keyboard callbacks (waitKey stalls the program) or buttons. I realise Qt is supported but that is a huge library and I don't need to make full use of all of its features. I also need something which will not slow down my programs as I will be running them on NVidia Tegras and Raspberry Pis.
So my question: has anyone found any lightweight C++ GUI libraries which they have managed to integrate into their OpenCV programs (notably reading in a cv::Mat and displaying it in the GUI)? I have looked at FLTK but the license is GPL and I am looking for something with a BSD license or similar where I do not have to open source my code.
Thanks
Wait ... lightweight piecies like tegras and pis, combined with a GUI? That is in my opinion a non compatible option...
The GUI would be used more for debugging than for running the programs in release mode.
I want to use a GUI for things like moving backwards and forwards in a video, pausing, toggling various features and views, recording, taking a screenshot etc. which is definitely realistic on these devices.
My main gripe with the HighGui module is the lack of buttons and the fact that cv::waitKey() is not a true callback function.
I don't think Qt is too heavy. The Raspberry Pi runs Qt apps without problem, and the Tegra is much more powerful. The Raspberry Pi 2 can do some pretty amazing processing with a full Qt interface. More, Qt can do the display using hardware acceleration (opengl, egl), and even without an X server.
A very fast solution for embedded systems would be to use directly the OpenGL. You can display your image as a texture and use the mouse and keyboard callbacks from GLUT for interaction.
However if you need something for debugging that's fast easy to implement, you can use Highgui and write your own keyboard callback (some ideas here). Then use keystrokes instead of buttons.
You should consider wxWidgets GUI. I know it works on Raspberry too but I never tested
It works on raspberry but I haven't test with opencv