I have a project which uses the raspberry pi camera and openCV (also: ROS) to do some movement analysis. However, when I want to display the image (with the openCV API or a ROS node), there's an error saying
window system doesn't support opengl
And that happens although the openGL test-programs as well as raspistill work perfectly. I already tried installing openCV 2.7 from source and getting the ros-desktop packages, but nothing worked until now.
I'm using C++ to program everything, not python.
Thanks in advance
-
This worked for me raspberrypi.stackexchange.com/a/53911/10501fiat– fiat2016年10月17日 19:39:16 +00:00Commented Oct 17, 2016 at 19:39
2 Answers 2
Raspberry Pi doesn't come with OpenGL support by default, but it's a simple installation. I believe you will just need to install libgl1-mesa-dri
. You can do that at the command line using:
Code:
apt-get update
apt-get install libgl1-mesa-dri
-
Raspberry Pi doesn't come with OpenGL support - but it does have the version for embedded systems, i.e. OpenGL ES 2.0 which is similar but not the same... Also, according to Debian that says about the
libgl1-mesa-dri package
: "This [...] provides GLX and DRI capabilities: it is capable of both direct and indirect rendering. For direct rendering, it can use DRI modules from the libgl1-mesa-dri package to accelerate drawing. This package does not include the OpenGL library itself, only the DRI modules for accelerating direct rendering. "SlySven– SlySven2016年01月24日 05:38:58 +00:00Commented Jan 24, 2016 at 5:38 -
this didn't work for me - even after reboot (Jessie)fiat– fiat2016年10月17日 10:45:32 +00:00Commented Oct 17, 2016 at 10:45
Please try
sudo apt-get install libgl1-mesa-dri
and reboot
-
Why? Your answer doesn't give any context, and while I know enough to check what it does, we can't assume that the user does, especially when the command contains
sudo
. Please elaborate.Jacobm001– Jacobm0012016年01月14日 18:47:19 +00:00Commented Jan 14, 2016 at 18:47