USB webcam support

On my Test with the examples, it is very slow. Only picture after picture, no real video.

What could be the reason ?

Cu
Andreas

maybe the camera is slow?

How slow? Where is the code?

I remembered that I had decommissioned a video camera so I decided to see if I could be it running.

It is a Logitech PRO 9000 camera.

To test the camera, I used the sample program in the Webcam class.

I determined that the camera was UVC compatible and worked with the Webcam class.

I found that there were two formats supported: 120x160 and 144x176. I believe that the camera supports bigger frames, but these may be associated with the four or five USB devices that were signaled but were not of the Webcam type.

I ran my tests on a Cobra.

The frame rates obtained were interesting. For both formats, the peak rates was 15 frames/second. I did not do a lot of testing, but it appears that if the camera is not moved, and the image does not change, the rate went down to about 5 frames a second. Moving the camera cause the rate to increase.

Now is this slow? Given the processor size, I think 15 frames/sec is very good. It would be interesting to see if the rate changes on a ChipWorks processor, or is it camera limited. I will wait for the FEZ Black Mamba to test.

My next task will be to see if I can stream the images over a TCP connection to a PC.

Black mamba? I want one of those.

Note that this is USB 1.1 that is 12mhz so what you see is normal and what was expected. Try you camera on a pc with USB 1.1

Gus:

I assume you mean that the Cobra USB interface is 1.1?

The code is the example code from here. I have made no modifications.
If i made any moves in front of the camera, the picture can’t follow them.
I think, the Camera can’t be slow, so what could be the issue ?

Cu
Andreas

please modify your code to calculate the frame rate from the camera.

you keep saying it is slow but offer no quantitative information.

at 15 frames per second the image is blurry and jumpy when responding to rapid movements.

it would also be helpful to post your code.

Cobra and ChipworkX are full speed USB. PC is high speed USB. What you see should be normal for full speed USB.

Will the current webcam support allow for more than one camera?

You can connect multiple cameras but only one camera can stream video at one time. This is stated in docs.

I have tested three cameras…

Speedlink camera, working but slow, not usefull.
Creative Modell vf0520, driverless but not working.
Creative live!cam, working, good Speed.

The working cameras have poor colors and some colors are completly wrong.
And there is another mistery, always i See a matrix of black or white pixel, nearly every 50’th pixel,
in the camera picture.
Anyone have seen this too ?

cu
Andreas

Image quality can’t be degraded as the image is transferred digitally. So what you see on our boards should exactly match what you would see on a PC. Note that you need to use USB1.1 HUB on your PC in order to bring the USB speed to 12mhz when you compare. Like said before, current devices are full speed (12mhz) where PCs are high speed (480mz) … and soon USB3 which is even faster!

Don’t misunderstand me. I will not critizise anything!
I like the ghi way, great products and top support. The USB Host is amazing!

The performance with the right camera is good, but the color quality is something that can be fixed.
Can’t believe that it is normal what i see on my display, maybe something on my side is wrong.
My tests will go on :wink:

cu
Andreas

No no, sorry I wasn’t clear in my answer. I answer a lot of posts so I try to keep them short :slight_smile:

What I meant to say is the image quality is not degraded when it is transferred digitally so this can’t be teh reason.

But now that I think about it more, we do in fact convert the color format from its original form to RGB (which uses a lot of calculations) so there is this very little chance that the math needs a little tweaking.

Please convert the image to BMP (we have class for this) then save to an SD card. Then upload the image here so we can take a look at it please. We may need to borrow your camera or but the exact same one.

So yes, got my webcam yesterday :slight_smile:
So far it works. I had some troubles at the start where I would get some “shattered” image (with nothing to see).

I changed the video mode to a lower resolution and I got a nice and fast image.

If I find the time I will have a look which the full screen does not show a proper image ???

@ Gus
Thanks! Here are 2 sample bitmaps. taken from a creative live!cam. you can see on the second bitmap that the colors of the power drink isn’t blue and red :smiley: colors seems to be often violet.
320 x 240 i get no image but this format is listed in the availeble formats.
Maybe it will help you.

cu
Andreas

Ups, how ca i upload a zip here ??
try to rename it to gif…

not able to attach the file here…

You can’t attach zip but you can attach one image per post. You can convert to JPG