OpenCV + USB webcam: painfully slow

Euphrasius
Hello 

Here an owner of a micro2440 + 7" Innolux LCD board. Kernel
2.6.32.2-FriendlyARM

I'm developing a program in Qt 4.6.3 with OpenCV libraries. I have
successfully cross-compiled a sample code that shows webcam frames in a
320x240 window.

Firstly, I plugged a PS2 EyeToy webcam. The frame rate (FPS) was good
enough, however, the colors were shown incorrectly, since red and blue were
swapped.

So I decided to plug a better webcam: Logitech Orbit/Sphere AF. The colors
are shown correctly, however frame rate is painfully slow (it takes ~3 sec.
to refresh the window). Same results with different model (Logitech
QuickCam S5500).

The same program runs flawlessly in PC with any camera; these troubles only
happen in the micro2440 board.

Additionally, the "USB Camera" tool avaiable in Qtopia only works with
EyeToy webcam (though the same color trouble happens). It isn't able to
work with Logitech devices, a black frame appears instead. (Hey, at least
my Qt 4.6.3 based program shows something!)

With v4l2-ctl --list-formats-ext (ran in PC with Ubuntu 12.04) I found out
the following:

ˇThe three cameras support 320x240.
ˇPS2 EyeToy only suports 'JPEG' (MJPEG) pixel format
ˇLogitech cameras support both MJPEG and YUV as pixel format.


With dmesg ran in micro2440 I found out the following:

ˇPS2 EyeToy is not UVC compliant device. It works with GSPCA.
ˇBoth Logitech cameras are UVC compliant devices ("uvcvideo: Found UVC 1.00
device" message is shown). Confirmed at http://www.ideasonboard.org/uvc/

Any ideas?

Regards

bianchi
may I see the code for displaying the camera output to LCD ? thanks