Go to Post Why did they get rid of the headphone jack though? =p - sportzkrazzy [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-02-2017, 17:46
Acheron-X Acheron-X is offline
Registered User
AKA: Bryan Li
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2016
Location: Maryland
Posts: 3
Acheron-X is an unknown quantity at this point
Delay in source switching and high latency for cameras

This is an follow-up to the thread I posted earlier here. The code I am working on is, as before, on Github at this link.

From the previous thread, I was able to get the MjpegServer working along with the camera switching. The code sends the image from the cameras connected to the RoboRIO to SmartDashboard. With the help of the reply in the previous thread to set the URL in SmartDashboard to the correct setting, the camera does display the images from the cameras. However, I am unable to achieve a relatively low latency nor a particularly good FPS.

I am using 160x120 for the camera sizes, with pixels very clear on the screen, and yet the FPS is unable to go above approximately 20. There is also a clear delay, with about .2 or more seconds of latency (e.g., when a hand is waved in front of the cameras, it takes around that time to register). Additionally, I have tried setting the FPS to 30 along with the camera size setting, and simply setting the FPS and not touching the size settings. None of the attempts have worked.

My code also uses
Code:
MjpegServer.setsource();
in order to switch between cameras on button press, and when this is attempted there can be up to several seconds of delay before the image from the other camera appears.

It is most likely not the problem with the cameras (they are HD streaming cameras and work when directly connected to computer), and it is also not the problem with the computer (~20% CPU used, ~50% memory, very low (<5-10%) for the rest) so I was wondering if there was a way to optimize the latency, FPS, and setSource camera switching delay.

The main things that our team wants optimized is the latency and FPS. Help would be appreciated.

Thanks in advance!

- Bryan Li
Team 449 Programmer
Reply With Quote
 


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 15:31.

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