Go to Post I think with 1114 & 217 as our partners we could have won with my refrigerator on the field. - JVN [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-03-2013, 05:28
sretter's Avatar
sretter sretter is offline
Registered User
AKA: Shaked
FRC #2231 (OnyxTronix)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Shoham
Posts: 33
sretter is on a distinguished road
Camera resolution might be too much for bandwidth?

Hi everyone,
My team is using the Axis M1011 camera with a resolution of 640X480,20 fps,(I think 30% compression)
Could there be a problem with the band width limit or it it ok?
If too much could it be enough to lower fps and increase compression?(We really want to use the current resolution)

Thanks!
  #2   Spotlight this post!  
Unread 06-03-2013, 06:46
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera resolution might be too much for bandwidth?

If you are using the default or LV dashboard, it includes an indication of the bandwidth being used and an LED that will be green, yellow, or red based on the value.

I thought there was a screensteps that showed how to display the bandwidth usage printed on the image, but I couldn't find it this morning.

I suspect that your camera settings are over the limit and will need to be either more compressed, lower the framerate, or both.

The bandwidth is proportional to the framerate, and pixels, so using the next lower size will cut usage by 4x. Compression is not a linear scale, so is harder to predict.

Greg McKaskle
  #3   Spotlight this post!  
Unread 06-03-2013, 07:40
JesseK's Avatar
JesseK JesseK is offline
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,661
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: Camera resolution might be too much for bandwidth?

I'm not sure what compression we're using, but we can get 640x480@10fps using roughly 1.5 Megabits. We've verified it via Wireshark and our own counter in our Java display. It spikes to 2.2Megabits every so often though, thus we'll give it plenty of overhead.
__________________

Drive Coach, 1885 (2007-present)
CAD Library Updated 5/1/16 - 2016 Curie/Carver Industrial Design Winner
GitHub
  #4   Spotlight this post!  
Unread 06-03-2013, 07:46
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera resolution might be too much for bandwidth?

That is a good benchmark. 20fps would double the bandwidth at the same compression, which I'm guessing is more than 30.

I know the bandwidth numbers for the field were largely based on camera usage. The intent was to leave enough bandwidth for multiple lower resolutions cameras per robot or a single 640x480.

Greg McKaskle
  #5   Spotlight this post!  
Unread 06-03-2013, 11:16
sretter's Avatar
sretter sretter is offline
Registered User
AKA: Shaked
FRC #2231 (OnyxTronix)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Shoham
Posts: 33
sretter is on a distinguished road
Re: Camera resolution might be too much for bandwidth?

Thanks guys!

I'll lower the fps and check.

Quote:
Originally Posted by JesseK View Post
I'm not sure what compression we're using, but we can get 640x480@10fps using roughly 1.5 Megabits. We've verified it via Wireshark and our own counter in our Java display. It spikes to 2.2Megabits every so often though, thus we'll give it plenty of overhead.
From your experience was 10 fps good enough for the drivers to use?(Our camera is mainly used for vision but assisting the drivers could be nice as well)
  #6   Spotlight this post!  
Unread 06-03-2013, 11:38
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,356
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: Camera resolution might be too much for bandwidth?

Just to use for comparison, we use the following settings.
320 by 240, 15 FPS, 30 compression.
Our bandwidth utilization is around 1.5 megabits.

This image is sufficient for on board image processing and Driver utilization.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #7   Spotlight this post!  
Unread 07-03-2013, 03:00
sretter's Avatar
sretter sretter is offline
Registered User
AKA: Shaked
FRC #2231 (OnyxTronix)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Shoham
Posts: 33
sretter is on a distinguished road
Smile Re: Camera resolution might be too much for bandwidth?

Results after changing:
640x480 Resolution,10 fps,30% compression
Takes up 3 mb/s(according to the dashboard),
Changed settings don't seriously affect the vision proccessiong or drivers
  #8   Spotlight this post!  
Unread 07-03-2013, 10:43
sdaustin sdaustin is offline
Registered User
FRC #3667 (The Mecanum Knights)
Team Role: Engineer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Port Huron, MI
Posts: 17
sdaustin is an unknown quantity at this point
Re: Camera resolution might be too much for bandwidth?

I believe the default encoding for the M1011 camera is MJPEG. The camera also supports H.264 and MPEG4, which use dramatically less bandwidth.

Does anyone know if it's possible to configure the stream from the camera to the DS to use MPEG4? Doing so directly on the camera via its web config interface doesn't have any effect on the stream used by the DS - it appears the DS is over-riding the on-camera settings, probably via VAPIX or ONVIF.
  #9   Spotlight this post!  
Unread 07-03-2013, 11:03
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Camera resolution might be too much for bandwidth?

At present, I've only found MJPEG support in the driver station. MJPEG is basically just a stream of standalone JPEG images (I-Frame Only) so the driver station just provides a JPEG decoding function.

H.264 is more complex and would also induce some delay in the picture (amount depends on specific usage). I'm not sure you would want that it even if you could get it.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
  #10   Spotlight this post!  
Unread 07-03-2013, 11:06
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Re: Camera resolution might be too much for bandwidth?

Quote:
Originally Posted by sdaustin View Post
I believe the default encoding for the M1011 camera is MJPEG. The camera also supports H.264 and MPEG4, which use dramatically less bandwidth.

Does anyone know if it's possible to configure the stream from the camera to the DS to use MPEG4? Doing so directly on the camera via its web config interface doesn't have any effect on the stream used by the DS - it appears the DS is over-riding the on-camera settings, probably via VAPIX or ONVIF.
No, we can only use MJPEG. The reason for that is that H.264 and the other format are pure video formats, whereas with MJPEG each frame is an individual picture that can be pulled out of the video feed and be processed immediately. H.264 and other formats only encode the changes between frames (which is why they use less bandwidth), meaning that if you wanted to process a frame with those formats you would need to process a dozen other frames to get one frame.
__________________
Research is what I’m doing when I don’t know what I’m doing.
- Wernher von Braun
Attending: Raleigh NC Regional
  #11   Spotlight this post!  
Unread 07-03-2013, 11:34
sdaustin sdaustin is offline
Registered User
FRC #3667 (The Mecanum Knights)
Team Role: Engineer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Port Huron, MI
Posts: 17
sdaustin is an unknown quantity at this point
Re: Camera resolution might be too much for bandwidth?

In our case, the DS isn't doing any processing. It's just displaying the stream. We have a simple crosshairs overlay configured on the camera via its web interface that is used for manual aiming by the driver/shooter.

Does anyone know what implementation the DS uses to render the stream? Is it Windows Media, the Axis Media Control (AMC), QuickTime, something else?
  #12   Spotlight this post!  
Unread 07-03-2013, 13:25
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Camera resolution might be too much for bandwidth?

The FIRST LabView updates have a Sub-VI in the getcamera VI to decode the JPEG to BMP. It then uses LabView to render the BMP on the DS. How Labview does it is a question for NI. I would assume the C++ & Java versions have a similar function.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
  #13   Spotlight this post!  
Unread 07-03-2013, 15:32
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera resolution might be too much for bandwidth?

The LV Dashboard decodes using NI-IMAQ. It takes in the JPEG stream and an allocated image. If the buffer contains a valid JPEG, it updates the image. The display is the built-in LV display that is specific to NI IMAQ image format, supports ROI and overlays, etc.

I believe the Java smart dashboard uses a media control, but that is a guess.

The NI-IMAQ doesn't include a codec for H.264 and other formats since they are rarely used in industrial settings. If you are going to use the H.264 with LV, delete the IMAQ display and use an ActiveX media control instead, update the camera CGI request and glue the two together.

Greg McKaskle
  #14   Spotlight this post!  
Unread 07-03-2013, 17:11
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
no team (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: New England -> Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Re: Camera resolution might be too much for bandwidth?

There is a ScreenSteps page at WPI on Measuring Bandwidth Use which you might find useful.

The FMS Whitepaper Rev.A also includes a table of expected camera use which I've reproduced below for convenience.

The FMS table suggests peak use of 4.3Mbs for the 640x480; 10fps; compression 30 configuration described below, somewhat more than the 3Mbs seen on the dashboard.

Unsurprisingly we found that the actual bandwidth used varies by about 20-30% depending on the specific image sequence being compressed. However counter-intuitively (at least to me) we noticed that bandwidth was higher for steady images and lower while the camera was moving quickly.

Edit: Daniel's explanation of MJPEG above supports this observation. In a moving image each frame is blurry so has less detail and can therefore be compressed more. But there is no compression gain from the frame-to-frame similarity of a steady image if each frame is compressed independently.
Attached Thumbnails
Click image for larger version

Name:	cameradata.png
Views:	27
Size:	49.1 KB
ID:	14285  

Last edited by MikeE : 07-03-2013 at 17:23. Reason: Learned something :)
  #15   Spotlight this post!  
Unread 07-03-2013, 17:39
sdaustin sdaustin is offline
Registered User
FRC #3667 (The Mecanum Knights)
Team Role: Engineer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Port Huron, MI
Posts: 17
sdaustin is an unknown quantity at this point
Re: Camera resolution might be too much for bandwidth?

Quote:
Originally Posted by Greg McKaskle View Post
The LV Dashboard decodes using NI-IMAQ. It takes in the JPEG stream and an allocated image. If the buffer contains a valid JPEG, it updates the image. The display is the built-in LV display that is specific to NI IMAQ image format, supports ROI and overlays, etc.

I believe the Java smart dashboard uses a media control, but that is a guess.

The NI-IMAQ doesn't include a codec for H.264 and other formats since they are rarely used in industrial settings. If you are going to use the H.264 with LV, delete the IMAQ display and use an ActiveX media control instead, update the camera CGI request and glue the two together.

Greg McKaskle
Thanks Greg. That's exactly what I wanted to know, for future reference.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:07.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi