Hi Suneel,
On Friday 06 July 2007, Suneel Suresh wrote:
> hi there
> after 2 days i was able to finally get my logitech
> quickcam fusion (046d:08c1) to work in ekiga. But the real reason i
> want to use this is for a project using intel's openCV API. I get a
> segmentation fault when making one of the API calls. And no the
> segmentation fault is not due to an error in my program. Below are a
> few lines of code
> /*********************************************************/
> _captureVideo = cvCaptureFromCAM(0); // specify a capture device
> if(_captureVideo==NULL) // check if camera is registered in system
> {
> cout<<"Camera was not detected in the system"<<endl;
> exit(-1);
> }
>
> IplImage* img = NULL;
> char *imgData = NULL;
> char *pixData = NULL;
>
> if(cvGrabFrame(_captureVideo)) // capture a frame . API returns 1
> here, so its ok
> {
> cout<<"["<<endl;
> cout<<"{"<<_captureVideo<<"}"<<endl; // mem address is not null
> img = cvRetrieveFrame(_captureVideo); // retrieve the captured frame
> // the above api call cvRetrieveFrame causes segmentation fault !!
> cout<<"]"<<endl;
> }
> /*********************************************************/
> Output of program
> [
> {0x52bee0}
> Segmentation fault
>
> please developers of uvc help!
First of all, look at the kernel log (using the dmesg command) after the
segmentation fault. If you get a kernel crash report, the driver is at fault.
If you don't, the crash comes from the application, either in your code or in
the OpenCV code. I suggest rebuilding OpenCV in debug mode and getting a gdb
backtrace.
Regards,
Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel