046d:08d9 Logitech, Inc. QuickCam IM/Connect in OpenCV

Hi,

My (046d:08d9) Logitech, Inc. QuickCam IM/Connect works with xawtv and cheese, but when I write my own opencv code (see below), cvGrabFrame fails. Any thoughts?

  
  
CvCapture* capture = cvCaptureFromCAM(0);  
IplImage* img = 0;  
  
cvNamedWindow("image", 1);  
  
while (1) {  
  
  if (!cvGrabFrame(capture)) { // capture a frame                 
    printf("Could not grab a frame\n");  
    exit(0);  
  }  
    
  img = cvRetrieveFrame(capture); // retrieve the captured frame    
    
  cvShowImage("image", img);  
  
  cvWaitKey(10);  
  
}  
  
cvReleaseCapture(&capture)  
  

FYI /dev/video0 exists and
navi:~> dmesg | tail
[1116439.008028] usb 4-1: new full speed USB device using uhci_hcd and address 13
[1116439.196324] usb 4-1: configuration #1 chosen from 1 choice
[1116439.203433] gspca: probing 046d:08d9
[1116440.843350] zc3xx: probe 2wr ov vga 0x0000
[1116440.887352] zc3xx: probe sensor -> 11
[1116440.887360] zc3xx: Find Sensor HV7131R©
[1116440.897656] gspca: probe ok
[1116440.897742] gspca: probing 046d:08d9

on a ubuntu intrepid 2.6.27-9-generic system

BUT it WORKS on a ubuntu hardy 2.6.24-2.6.24 system

spam:~> dmesg | tail
[36697.686383] usb 2-1: new full speed USB device using uhci_hcd and
address 2
[36697.873923] usb 2-1: configuration #1 chosen from 1 choice
[14675.314779] Linux video capture interface: v2.00
[15728.203782]
/build/buildd/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-generic/media/gspcav1/gspca_core.c:
USB GSPCA camera found.(ZC3XX)
[36699.858975] usbcore: registered new interface driver gspca
[36699.858992]
/build/buildd/linux-ubuntu-modules-2.6.24-2.6.24/debian/build/build-generic/media/gspcav1/gspca_core.c:
gspca driver 01.00.20 registered
[18350.237800] usbcore: registered new interface driver snd-usb-audio