|
I got the openCV libraries from the svn repositories and built them. I used the latest_tested_snapshot on 7 march 2009. Compile and build and install went fine as did building of the samples and running the tests as explained in the wiki. I did not change any of the build settings.
However I can't seem to get any of the samples, which require a webcam, working. The samples work with .avi files or .jpg files. I made a C project in eclipse and started debugging and I find that the pointer returned from cvCaptureFromCAM returns a NULL. I tried passing -1 and 0 as parameter to cvCaptureFromCAM. My video camera is accessible from /dev/video0/ I also tried a python example found at http://linux.softpedia.com/progDownload/WebcamDemo-Download-42417.html with the same results, the equivalent of cvCaptureFromCAM returns a null. If I run gstreamer-properties and I choose v4lv2 in the Video tab and I test it, it works correctly visually but gives an error code libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff Also cheese and xawtv work. I am using ubuntu 8.10. uname -a says: Linux rala 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux Any clues/things to try/search terms for google would be greatly appreciated? |
|
On Tue, Mar 17, 2009 at 1:00 PM, miasmaktoday <[hidden email]> wrote:
> However I can't seem to get any of the samples, which require a webcam, working. The samples work with .avi files or .jpg files. Check these bugs: https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/321358 https://bugs.launchpad.net/opencvlib/+bug/260918 http://sourceforge.net/tracker/index.php?func=detail&aid=2653321&group_id=22870&atid=376677 Alejandro. |
|
In reply to this post by miasmaktoday
It seems there is a regression bug on Ubuntu that involves the v4l libraries. I can now get the sample code to work using something like
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so ./facedetect Here is the bug listing for OpenCV: http://sourceforge.net/tracker/index.php?func=detail&aid=2653321&group_id=22870&atid=376677 Here is the bug tracked in launchpad: https://bugs.launchpad.net/ubuntu/+source/libv4l/+bug/260918 So I am up and running! In Eclipse I just configured the debug configuration to have an environment variable LD_PRELOAD with value /usr/lib/libv4l/v4l1compat.so --- In [hidden email], "miasmaktoday" <maiatoday@...> wrote: > However I can't seem to get any of the samples, which require a webcam, working. The samples work with .avi files or .jpg files. > > I made a C project in eclipse and started debugging and I find that the pointer returned from cvCaptureFromCAM returns a NULL. I tried passing -1 and 0 as parameter to cvCaptureFromCAM. My video camera is accessible from /dev/video0/ > > I also tried a python example found at http://linux.softpedia.com/progDownload/WebcamDemo-Download-42417.html > with the same results, the equivalent of cvCaptureFromCAM returns a null. > > If I run gstreamer-properties and I choose v4lv2 in the Video tab and I test it, it works correctly visually but gives an error code libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff > > Also cheese and xawtv work. > > I am using ubuntu 8.10. |
|
Hi,
I couldn't find /usr/lib/libv4l/v4l1compat.so. In fact, I couldn't find any v4lcompat.so file anywhere. I do find /lib/modules/2.6.24-16-generic/kernel/drivers/media/video/v4l1-compat.ko in my ubuntu. Did I do anything wrong with the setup? Can anyone help, please? Thanks. Ang --- In [hidden email], "miasmaktoday" <maiatoday@...> wrote: > > It seems there is a regression bug on Ubuntu that involves the v4l libraries. I can now get the sample code to work using something like > LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so ./facedetect > > Here is the bug listing for OpenCV: > http://sourceforge.net/tracker/index.php?func=detail&aid=2653321&group_id=22870&atid=376677 > > Here is the bug tracked in launchpad: > https://bugs.launchpad.net/ubuntu/+source/libv4l/+bug/260918 > > So I am up and running! > > In Eclipse I just configured the debug configuration to have an environment variable LD_PRELOAD with value /usr/lib/libv4l/v4l1compat.so > > --- In [hidden email], "miasmaktoday" <maiatoday@> wrote: > > > However I can't seem to get any of the samples, which require a webcam, working. The samples work with .avi files or .jpg files. > > > > I made a C project in eclipse and started debugging and I find that the pointer returned from cvCaptureFromCAM returns a NULL. I tried passing -1 and 0 as parameter to cvCaptureFromCAM. My video camera is accessible from /dev/video0/ > > > > I also tried a python example found at http://linux.softpedia.com/progDownload/WebcamDemo-Download-42417.html > > with the same results, the equivalent of cvCaptureFromCAM returns a null. > > > > If I run gstreamer-properties and I choose v4lv2 in the Video tab and I test it, it works correctly visually but gives an error code libv4lconvert: Error decompressing JPEG: unknown huffman code: 0000ffff > > > > Also cheese and xawtv work. > > > > I am using ubuntu 8.10. > |
|
In reply to this post by miasmaktoday
> It seems there is a regression bug on Ubuntu that involves the v4l libraries. I can now get the sample code to work using something like > LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so ./facedetect I'm experiencing problems with my camera too. While Cheese and xwatv work perfectly, camorama and opencv don't. If I preload v4l like you, I only see some kind of corrupted image (that's with a Logitech Orbicam and a Logitech Quickcam Chat). In gstreamer-properties, I get the same corrupted image if I test video4linux 1. But it works perfectly with video4linux 2! I tried preloading v4l2convert.so without success. Does anyone know how to force OpenCv to work with whatever Chesse uses, or video4linux2? |
|
This post has NOT been accepted by the mailing list yet.
In reply to this post by miasmaktoday
Hi I am doing project in wireless sensor networks using python coding language and in that process I need to access a webcam using v4l2 and I am need of that code as I need to submit it by tomarrow.I would be thankful if you help me in this.
Thanks Naveen _____________________________________ |
| Powered by Nabble | Edit this page |
