I say it's not as bad as I thought. It turns out that part of the reason it seemed so slow was because the Processing app's Capture class uses lots of CPU, and this in turn seems to slow everything down - my serial pings went over 100ms, and the latency seemed terrible. But when I ran the video stream separately in Firefox, and ran the app, the serial ping was back to normal 17-35ms, and I could actually navigate! However, Firefox's CPU usage was still very high - this may be a problem with the HTTP server implementation if it doesn't state the image size in the MJPEG stream, it has to examine the stream to find the end of each JPEG.
15 FPS is still too slow, but the image quality is much better than a captured analog PAL source. So I wonder if I could plug in another webcam which does better? Probably not, as it would have a very limited driver support. I would have to significantly hack on it, and it's not an ideal platform, so I'd probably want to develop my own ARM board which is getting quite complicated. There are ARM development boards at 60 MHz though which aren't too expensive, about $60, ie about the same as an Arduino Mega with a whole lot more flexibility. I don't know what CPU speed the wifi cam runs at. Just add a USB wifi adapter, much the same as the wifi cam, which is cheaper than an ethernet shield.
So in case I do end up going down this (convoluted, yak-shaving) path, I looked at what decent webcams are available, with the following requirements in order:
- frame rate - at least 30FPS at 640x480.
- USB 2.0 - it's not going to be able to do high resolutions or frame rates limited to USB 1.1 12 MB/s. Needs 480MB/s.
- image size - as stated, at least 640x480, ideally 720p, which means also 16:9
- field of view - all the cheap stuff is really narrow view. if I want widescreen, and gaming style, it should be high FOV like 80 degrees hopefully.
- onboard JPEG compression, so a device can simply take those JPEGs and put them in an MJPEG stream with minimal CPU overhead. Most do this anyway.
- good visibility in low light, or I could just put headlights on the car. So then, quick white balance.
Note that due to the USB 2.0 probably no camera can really do 720p at 30fps.
I found the following cameras which are actually all quite decent, and less than $100:
- Logitech Webcam Pro 9000 - 720p at 24 fps, or 30fps at a bit lower resolution, limited by USB bus.
- Logitech HD Pro Webcam c910 - full 1080p, though I'd never use it, apparently better low-light performance, and quite wide FOV.
- PlayStation Eye - 640x480 at 60 Hz is max res, also 320x200 at 120 Hz. I like the high res, would like to play with one and see. But may be better for machine vision or UI stuff (which is its intention).
- Microsoft HD 5000 - 720p, not sure about FOV, but this got me - auto focus! Which is also tunable.
No comments:
Post a Comment