OpenCV imshow toolbar missing in noetic
I've been using OpenCV with ROS kinetic for years, and have come to rely on the functions toolbar that comes with cv::imshow for debugging.
We've successfully transitioned to noetic under Ubuntu 20.04, but now the toolbars in my OpenCV cv::imshow windows are gone, and I can't pan, zoom, or inspect pixel values. The images themselves show up just fine. I just can't do anything with them anymore.
Digging in,
- it appears that I only get the toolbar with OpenCV installations that are built with the WITH_QT=ON CMake option. Is this correct? Is there another way to get the toolbar/pan/zoom/inspect functionality that I am missing?
- Noetic appears to use a standard OpenCV 4.2 package installed as a ubuntu 20.04 package instead of using the built-in-to-ROS version of OpenCV 3.3.1 that kinetic under 16.04 used
- I guess the standard Ubuntu 20.04 OpenCV 4.2 package is built without WITH_QT=ON?
Do I really have strip out the standard openCV from my installation and build my own version of OpenCV from source to get back the functionality I've had for the last 5 years out of the box with kinetic? Is there some other path that I am missing?
If I do have to build my own version of OpenCV from source to get the toolbars, any advice on how to do that for a Docker overlay without rebuilding OpenCV every time? Do I have to build my own .deb and install that as part of the docker overlay creation process, or does a version of OpenCV 4.2 that does what I want exist out there in a repository somewhere? Perhaps I just have to rebuild/load the individual libopencv-highgui4.2 package instead of the whole openCV system? Any advice or pointers on exactly how to do this before I just start flailing at things I only partially understand would be most helpful.
Note, I did try to explicitly create a cv::namedWindow with the WINDOW_AUTOSIZE | WINDOW_KEEPRATIO | WINDOW_GUI_EXPANDED flags. No dice. The documentation for namedWindow on https://docs.opencv.org/3.4/d7/dfc/gr... does confirm that with the Qt backend these should be the defaults anyway, so more evidence that the default noetic openCV highgui debian package is not built with the Qt backend enabled.