I am developing simple gui app for a client on Raspberry pi running Ubuntu(Mate) 16.04 using Qt 5.5.1 and OpenCV for some face recognition (all C++) using 5MP pi camera.
The framerate/CPU usage through Qt+OpenCV via v4l2 was poor { 5-7 fps and hogged 50-70% cpu. } So I integrated the raspicam/raspistill code so I can show a HW driven preview window (>30fps, 1-2% CPU).
Unfortunately Qt clashing with GL/GLES as used from userland code at startup and I get the following error at Qt/GL init phase. Code: Select all
Unable to find an X11 visual which matches EGL config 20 Could not initialize OpenGL for RasterGLSurface, reverting to RasterSurface
Here are the libraries used to link the exe... in case they show any conflicts
QT link libs :
-L/usr/local/qt551/lib -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Multimedia
-lQt5MultimediaWidgets -lQt5Network
userland link libs :
-Wl,-rpath,../userland/lib ../userland/lib/libbrcmGLESv2.so ../userland/lib/libbrcmEGL.so
../userland/lib/libmmal_core.so ../userland/lib/libmmal_util.so
../userland/lib/libmmal_vc_client.so ../userland/lib/libvcsm.so ../userland/lib/libbcm_host.so
../userland/lib/libvchostif.a ../userland/lib/libvcfiled_check.a ../userland/lib/libvchiq_arm.so
../userland/lib/libvcos.so ../userland/lib/libkhrn_client.a
Code: Select all
opencv link libs :
-L/usr/local/ocv3/lib -lopencv_calib3d -lopencv_core -lopencv_features2d -lopencv_flann
-lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect
-lopencv_photo -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_video
-lopencv_videoio -lopencv_videostab
mmal link libs :
-lmmal -lmmal_core -lmmal_util -lmmal_vc_client -lmmal_components -lcontainers -lvcos
-lvcsm -lvchiq_arm
Quick search shows this could have a Qt based solution/workaround from these posts
- Question to Hardkernel (mainly) about my buggy mali
- Workaround EGL initialization failure due visual mismatch
Will those odroid solution/workaround apply for integrating Qt UI with other GL/GLES code? Just checking before I attempt recompiling Qt-base on Raspberry Pi - Ubuntu Mate as suggested there with a patch.
OR If anyone has integrated Qt with userland or other 3rd party GL/GLES C++ code successfully please share your approach.