ubuntu 10.04 camera problems

I can’t seem to get a logitech quickcam pro 9000 to work with OF on ubuntu linux 10.04.
This same camera works on mac osx, with the occasional bug, but it works.
OF_v0061pre gives a segmentation fault when I try to run the movieGrabber example.
That’s cool, I have another linux comp that had the same problem. Installed the gstreamer videograbber found in this forum. Completely borked ofxOpenCv, but it worked before with an integrated webcam, why not?
Finds the device okay, but then I am welcomed to error central:

  
GStreamer-CRITICAL trying to dispose element (ie. ,capsfilter) but it is in READY instead of NULL state  
OF_ERROR: ofVideoGrabber: couldn't init  
  

Alright, I’ll try the newest git version, since everyone here says that there are problems with linux and video in v0061pre.
Same problem. Here’s the error I keep getting:

  
OF_ERROR: Gstreamer: unable to set pipeline to paused  
OF_ERROR: ofVideoGrabber: couldn't init  

Oh, and this camera works with Cheese just fine.

Anyone have any advice or possible solutions? Help is greatly appreciated.

Even working with the latest image from git any video capture is really messed up in OF.
I’ve been trying to show people how cool linux can be, but I’m really frustrated by this problem.
The one laptop I can get to work with the gstreamer additions still only works intermittently.

Seriously, is there anything I can do to help? Just point me in a direction . . .

With the Git fixes for 10.04 the GStreamer based video capture works fine. If you are having trouble, then either you have not followed the installation steps correctly, or there are issues with your camera driver under Linux. Open source developers do their best to suport hardware, but without the backing of the proprietary hardware manufacturers this is sometimes difficult. Generally I buy a webcam for linux only after I have done research on the web to make sure it is supported. Having said that, these days most webcams do work.

If your camera is working with Cheese in theory it should work with OF as cheese is GStreamer based.

Otherwise, find out what driver (kernel module) your camera is using, and see if there is a more recent stable version of it on the web. A quick google search turn up this:
http://www.ideasonboard.org/uvc/
Not sure if is better than whatever driver you are using at the moment.

If this still doesn’t work, write to Logitech and get them to release a native linux driver.

hi,

I have the logitech 9000 too and can’t get it working under linux.

by the way I’ve started a hardware table in the of wiki --> http://wiki.openframeworks.cc/index.php?title=Hardware

maybe this helps a bit.

ben

if your camera works with cheese, it should work in OF without problem.

are you having problems with the camera or with video in general?

can you post a screenshot of the image you’re getting in case you’re getting any

Ooops. Maybe I accidentally grabbed an older version through the web interface or something. Just rebuilt from git and everything works fine. My apologies. Thanks for the help.

@benben - I’ve had no problems using this camera under linux with multiple computers. The uvc driver works great for me, excepting problems with human error, like this one.

I guess I spoke too soon. The same problem is showing up again and now OF won’t read from the camera again. The example worked fine at first, but now after coding for a bit I have the same error:

  
OF_ERROR: Gstreamer: unable to set pipeline to paused  
OF_ERROR: ofVideoGrabber: couldn't init  

I am confused as to how my dealings in one experiment could even effect the examples.
Is there a way to reset settings or something else I could try?
FYI, still works fine in cheese at varying resolutions.

can you post the code you’re using to init the camera and read from it. perhaps there’s something wrong in your code.

I literally just copy and pasted the example movieGrabber code. The only difference is that I changed the resolution to 1280x720. The more I try to debug this, the more I think it’s a problem with this specific camera and OF. Possibly because this resolution is non-native.

In setup:

  
vidGrabber.initGrabber(WIDTH,HEIGHT);  

In update:

  
vidGrabber.grabFrame();  
movieImage.setFromPixels(vidGrabber.getPixels(), WIDTH, HEIGHT, OF_IMAGE_COLOR);  

movieImage is allocated properly. I’ve used the same code on other machines and it works fine.

I have a laptop with an integrated webcam that I have been testing on as well. On both computers I installed OF from git. The one that I consistently use the quickcam on now has the error posted above. The laptop which I have only used the integrated cam has no problems so far. Still, it is strange that quickcam will work with cheese and guvcview after it fails on OF.

I’ve now also built a few programs with just the openCV library. They all compile fine with the same problematic setup.

I have used this camera with OF on a mac too. The only problem I’ve ever had is that sometimes I would get an error applying stored settings. Just restart the app and it would work, though.

Comparing the output on a mac is not so useful unfortunately because it will be using a completely different driver and the OF videograbber is not the same (uses quicktime on mac).

Have you tried at different resolutions? What are the supposed working resolutions for that camera? Does it work at 1280x720 with cheese?

The camera has a native resolution of 1600x1200. Cheese only lets you select that resolution and any lower resolution with the same aspect ratio.

I have tried many different resolutions with this camera. As soon as I try to force it into another aspect ratio, the camera won’t work at all with any resolution.

Anyone know where exactly OF’s stored settings are located?

if you add

  
  
ofSetLogLevel(OF_LOG_VERBOSE);  
  

in your setup function before opening the device, you can see all the supported resolutions. OF should work with any resolution since it resizes the image to make it always work, but it’s recommended that you use one of the native resolutions of your camera, anything different will be resized and that will make your program slower.

Yes, I am using a proper resolution and frame rate.

On linux, where (and how) are OF’s settings stored?

On a Mac it is:
/User/YourName/Library/Preferences -> com.yourcompany.openFrameworks.plist

there’s no such thing in linux, what do you want to configure?

I was searching for any other angle to debug.

I guess that I’m just going to have to accept that a logitech quickcam pro 9000 and OF on ubuntu 10.04 is a non-viable hardware setup.