opencv highgui error [closed]

asked 2013-03-09 02:52:37 -0600

mrpiccolo gravatar image

updated 2014-01-28 17:15:36 -0600

ngrennan gravatar image

Hi
I wrote a ros node that takes a video from a webcam and publish its frame and it works.
Yesterday I installed the driver for video capture "media_build" to take a video from a video grabber, but the same program doesn't work, while if I open "video for linux 2" on VLC it works.

This is the error:

libv4l2: error set_fmt gave us a different result then try_fmt! HIGHGUI ERROR: libv4l unable convert to requested pixfmt
HIGHGUI ERROR: V4L: device /dev/video0: Unable to query number of channels
ERROR: capture is NULL

The instruction is:

CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY );
if ( !capture ) {
fprintf( stderr, "ERROR: capture is NULL \n" );
getchar();
return -1;
}

any suggestion? (P.S. I have ros fuerte in my ubuntu pc)
thanks

edit retag flag offensive reopen merge delete

Closed for the following reason OpenCV Question: THe OpenCV community prefers to answer questions at: http://answers.opencv.org/questions/ by tfoote
close date 2015-10-30 17:57:42.079221