This is how you do it in Java.
Quote:
UsbCamera camera = new UsbCamera("cam0",0);
camera.setFPS(15);
camera.setResolution(320, 240) //320 = width, 240 = height
CameraServer.getInstance().startAutomaticCapture(c amera);
|
Accessing the stream from the Pi is a bit more difficult though, and I'm not entirely sure how to do that.
We use separate cameras for streaming and vision processing, because it works much better for processing if you turn the brightness and exposure way down so you can only see the really bright stuff. LifeCams are pretty cheap, so it may be worth looking into.