Update 2014-04-16 Afternoon

Ok after eating lunch and troubleshooting out loud in the shout box I figured it out and made it WORKY!!!

debian@udoo-debian-hfp:~/mrl$ ls /dev/video*
/dev/video0  /dev/video1  /dev/video16  /dev/video17  /dev/video18  /dev/video19  /dev/video2  /dev/video20
debian@udoo-debian-hfp:~/mrl$ ls /dev/video*
/dev/video0  /dev/video16  /dev/video18  /dev/video2   /dev/video3
/dev/video1  /dev/video17  /dev/video19  /dev/video20
debian@udoo-debian-hfp:~/opencv/OpenCV/opencv-2.4.6.1/build/bin$ ./cpp-example-lkdemo 3

This is a demo of Lukas-Kanade optical flow lkdemo(),
Using OpenCV version 2.4.6.1

It uses camera by default, but you can provide a path to video as an argument.

Hot keys:
    ESC - quit the program
    r - auto-initialize tracking
    c - delete all the points
    n - switch the "night" mode on/off
To add/remove a feature point click it

VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
VIDIOC_QUERYMENU: Invalid argument
init done
opengl support available
 

The trick was doing an ls of /dev/video* before and after I plugged the webcam in so that I could see that /dev/video3 was new.  Then I told the opencv lkdemo to use index 3 and it works.  I fired MRL back up and started an OpenCV service, added a pyramiddown filter, set the camera index to 3, and clicked Capture.

-----------------------------------------------------------------------

Update 2014-04-16

WORKY!!!

Last night using a script I found here (https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/ope…) I was able to compile OpenCV 2.4.6.1 on the Udoo in just a couple hours (some of that time was spent waiting for me to type in the sudo password again).  Today I tried getting the compiled examples to work with a webcam but I'm having problems getting anything, even outside opencv, to work with the camera so it might be an issue with not having the camera plugged into a powered hub.  I rebuilt the opencv jar file with the newly compiled libraries and lkdemo example and swapped it in place of the opencv jar that was downloaded from the MRL repo.  Fired up MRL, started an OpenCV service called "ocv" and pointed it at a public webcam from a RecRoom at the University of Oregon (http://151cam.uoregon.edu/mjpg/video.mjpg) which seemed appropriate since Grog is in Oregon, clicked the Capture button and it WORKY!!!  I've attached the jar file to this post but had to name it with a .zip extension to be able to upload it. If you download it just rename it with a .jar extension (jar files are actually just zip files anyway).  When I copied the file into my mrl/libraries/jar/ I overwrote the opencv-2.4.6.1-linux-arm.jar file that was there from the repo.

-----------------------------------------------------------------------------

I installed the Debian Wheezy armhf OS on an 32GB microSD card (had to expand the 8GB image with gparted), installed openjdk-7-jdk (OS came with 6 which no-worky), edited myrobotlab.sh to point to java 7, and started it up.  I tried to use OpenCV but since the repo pushes the RasPi jar it didn't work. I tried to swap in an arm7 jar but then I got a null pointer exception so that was even more no worky.  My next step is to compile and install OpenCV 2.4.6.1 myself and see if I can make that worky.

GroG

10 years ago

Ahahah..  appropriate video stream too :) 

Thanks for bundling it all up and putting a bow on it !  Christmas for me :D o/

Where are you going to go with it now ?

GAH .. tried to look at the stream - but firewall here prolly blocks it.

0 FPS ? mjpg is bad .. but shouldn't be that bad :)

Not sure why it said 0fps.  Well I guess the frames in MRL were <1fps but in the browser running at the same time on the web page I was getting more than that.  Not sure what the source fps is capped at.  I know some of these public cams I've see like traffic cameras are capped at 1fps. 

I'll put a video on the filesystem next and try seeing how that performance is.

My next goal is to figure out why the webcam doesn't work. I think it's more than an opencv problem because I can't get other webcam packages to work with it.  So far I've tried "cheese" and "fswebcam".  I think "cheese" might be just plain broken on the system because trying to start i from a terminal shows a ton of errors and then just quits.  Trying "fswebcam" from the command line gives nicer looking errors before bailing. It doesn't look like a permissions problem because even trying fswebcam as root didn't help and the debian user is in the video group which should give it access to /dev/video*. 

I saw something on the udoo site that mentioned that the USB ports don't put out much power so it might be enough for HID devices and just enough to poll the camera for detecting what it is but not enough to fully power it up.  That seems strange though since I doubt the camera is really pulling >500mA. Some googling might be in order after lunch.

I'm still holding out hope that it's a bad choice of webcam. Tonight I'll try a handful of other webcams I have at home until I find one that isn't spewing V4L errors. Udoo is also supposedly releasing a hardfp version of Ubuntu soon which might be a little better than Debian Wheezy even though Ubuntu is based on Debian.