View Single Post
  #2   Spotlight this post!  
Unread 29-01-2017, 22:57
beijing_strbow beijing_strbow is offline
Registered User
FRC #5968 (Cyborg Indians)
Team Role: Programmer
 
Join Date: Aug 2016
Rookie Year: 2016
Location: Kansas
Posts: 51
beijing_strbow is an unknown quantity at this point
Re: Setting FPS and resolution of USB camera server

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.
Reply With Quote