python opencv webcam "Window system doesn't support OpenGL"

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
ocpaul20
Posts: 260
Joined: Thu 31 Jan 2008, 08:00
Location: PRC

python opencv webcam "Window system doesn't support OpenGL"

#1 Post by ocpaul20 »

I was just writing a few little test programs to try out some opencv stuff, so I copied a program from the web and I get a strange error on imshow() line.

Code: Select all

import numpy as np
import cv2

cap = cv2.VideoCapture(0)

while(True):
	# Capture frame-by-frame
	ret, frame = cap.read()

	# Our operations on the frame come here
	gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

	# Display the resulting frame
	cv2.imshow('frame',gray)
	if cv2.waitKey(1) & 0xFF == ord('q'):
		break

# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
The message I get on the imshow() statement is this:

Code: Select all

 GdkGLExt-WARNING **: Window system doesn't support OpenGL.
I must have looked at at least 25 different web pages about this error message and it seems like it is something to do with /etc/X11/xorg.conf - which I dont have anywhere on my system.

Does anyone have a clue what I can do next please? I am using DebianDog Jessie
Dont know if this is relevant except that other people have been asked for it.

Code: Select all

# lspci |grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
/dev/video0 is this old Vimicro webcam

Code: Select all

# lsusb
Bus 003 Device 004: ID 0ac8:303b Z-Star Microelectronics Corp. ZC0303 Webcam
Thanks.
==================
Running DebianDog Jessie Frugal with /live and maybe with changes or savefile or.., who knows?

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#2 Post by 666philb »

works here in tahrpup.... try glxgears in a terminal although not sure if glxgears is in debiandog

you might get more of an answer in the debian dog thread
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: python opencv webcam "Window system doesn't support OpenGL"

#3 Post by mcewanw »

ocpaul20 wrote: The message I get on the imshow() statement is this:

Code: Select all

 GdkGLExt-WARNING **: Window system doesn't support OpenGL.
...
Does anyone have a clue what I can do next please? I am using DebianDog Jessie

Thanks.

Hi ocpaul20

DebianDog doesn't come with OpenGL support by default, but it is a simple installation. I believe you will just need to install libgl1-mesa-dri. You can do that at the commandline using:

Code: Select all

apt-get update
apt-get install libgl1-mesa-dri
If your webcam is non-standard or very old it is possible you might also need a driver for it. But most webcams just work out of the box. If it turns out you have driver problems just let us know, but yes, it is best to post on DebianDog Jessie thread for support rather than in separate thread like this - though only in this case because the needed info was DebianDog Jessie specific (i.e. the requirement to install mesa).

As for glxgears, if you want that, it is in the Debian package mesa-utils, which you can just download with:

Code: Select all

apt-get install mesa-utils
Great thing about DebianDog is that it is a Debian system so any of the thousands of Debian packages are all available for use in it.

Cheers, William
github mcewanw

Post Reply