View Full Version : USB Camera using too much bandwidth
Were using the Microsoft life cam camera with java and the smartdashboard. Were at the nc regionals and the fms crew is telling us the camera is using too much bandwidth. It spikes to 17mb/s when the camera first turns on and takes down the fms system for a few seconds then settles down to 3-4 mb/s but we still get a lot of dropped packets. Here is the code we are using on the robot.
CameraServer camera = CameraServer.getInstance();
camera.setQuality(25);
camera.setSize(1);
camera.startAutomaticCapture("cam0");
jvriezen
20-03-2015, 11:16
Were using the Microsoft life cam camera with java and the smartdashboard. Were at the nc regionals and the fms crew is telling us the camera is using too much bandwidth. It spikes to 17mb/s when the camera first turns on and takes down the fms system for a few seconds then settles down to 3-4 mb/s but we still get a lot of dropped packets. Here is the code we are using on the robot.
CameraServer camera = CameraServer.getInstance();
camera.setQuality(25);
camera.setSize(1);
camera.startAutomaticCapture("cam0");
Is it possible to configure the camera so that its power on state is low bandwidth settings?
anthonyttu
20-03-2015, 12:21
We had this issue at Dallas. No settings in our Java code affected the amount of data. We had to switch to the Default Dashboard and use the pull down options to turn down the resolution, down the frame rate, and turn up the compression.
Joe Ross
21-03-2015, 00:53
The SmartDashboard will override the size setting in your code, and defaults to 640x480. You can change it in the properties, although it appears it doesn't save the setting.
makahn64
02-04-2015, 20:32
We just got told we weren't allowed to use the Microsoft camera at all over the network @ SVR. Maybe would have been nice to discover this problem before it was given out in the kit of parts...
Levansic
02-04-2015, 22:58
We just got told we weren't allowed to use the Microsoft camera at all over the network @ SVR. Maybe would have been nice to discover this problem before it was given out in the kit of parts...
What was the specific reason given?
makahn64
03-04-2015, 13:30
What was the specific reason given?
It was taking down the field control system because of using too much bandwidth. I don't believe we were given the option of experimenting with lower resolutions, though our programmer thinks it was already on the lowest. Honestly, with the tight schedules of these events, banning it outright was the right move.
I did find out it was not in the KOP, just a recommended product. But we cannot recommend it at all for a driving feed. We ended up borrowing an Axis camera.
tomasuciu
09-04-2015, 18:14
A team at LI regional appeared the have the same problem, although they had their visual settings down to a point where it was unbearable. Not sure if this plausible, but different wireless cards on different laptops might be the issue (I'm thinking the way they intercept and process packets and data is different in terns of bandwidth usage?). Another explanation is that background tasks could be consuming bandwidth.
Greg McKaskle
10-04-2015, 05:46
The amount of data that a compressed image will take is not dependent on the wifi card. The dashboard and field monitor report megabits of data usage. What were the numbers? Or what were the camera settings?
Greg McKaskle
One team at Northeastern had a similar issue, so there is some anecdotal evidence that the Microsoft LifeCam does not play as nicely as the Axis camera in the competition environment.
virtuald
12-04-2015, 11:33
One team at Northeastern had a similar issue, so there is some anecdotal evidence that the Microsoft LifeCam does not play as nicely as the Axis camera in the competition environment.
No, that means the WPILib code to stream camera data is not as reliable/bandwidth friendly as the Axis camera streaming code.
My evidence? We used mjpg-streamer (http://www.chiefdelphi.com/forums/showthread.php?t=135737) to stream *2* simulataneous Lifecam camera feeds (each was 160x120, 10fps, 30% compression -- but we resized the images to a much larger resolution so our drivers could see it, works surprisingly well) from our robot to our dashboard at our regional, and to my knowledge did not receive any bandwidth complaints from the field.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.