Camera at Realtime Speed

Right now we have a Microsoft Life Camera on our robot, and we are trying to optimize our camera to run through the RoboRio and increase the refresh rate and bandwidth so we can have our camera display a picture at real-time and not freeze up and have a 1 or 2-second delay. Is this an easy fix?

There’s going to be a limited bandwidth to the network connection (and it will almost certainly be tighter at competition than in-house unless you take pains to throttle it at home). While I don’t recall the numbers we finally settled on, we have usually found that streaming video back to the driver station at a frame rate high enough to be useful for driving requires that we reduce the resolution to something MUCH coarser than the lifecam is capable of.

Edit: on the other hand, automated targeting usually works better with slower, finer pictures. This is how we end up with three or more cameras on our robot; some configured coarse and fast for driving, and some fine and stately for targeting.

Without knowing how exactly you are introducing these problems, I can’t really say.

Latencies on the order you’re describing are usually due to camera settings. Auto exposure, white balance, and brightness can add a lot of latency as the camera itself performs additional processing to correct the image. You didn’t say what language you were using, but in Java, these can be set using setBrightness(), setWhiteBalanceManual() (or setWhiteBalanceHoldCurrent()), and setExposureManual() (or setExposureHoldCurrent()).

Reducing the resolution is the easiest way to limit bandwidth, and can also help with latency.

As an example, here’s where we configured a microsoft lifecam from the roboRIO for vision processing this past year. We had some delay, but not a ton.