Go to Post Another lesson is don't post on Chief Delphi disappointed, stop and evaluate first. Emotions suck sometimes. :-) - sircedric4 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 25-01-2010, 23:23
tutkows1's Avatar
tutkows1 tutkows1 is offline
Registered User
FRC #2077
 
Join Date: Jan 2010
Location: wisconsin
Posts: 44
tutkows1 is an unknown quantity at this point
Question Camera Lag

I'm having a hard time reducing the amount of lag i get from live camera feed. I have tried messing with compression and resolution but i still have like a 5 secound lag.

The following code, writen in Java, is the example dashboard code with camera feed added, i put my additions, camera feed code, in blue.
Quote:
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.AnalogModule;
import edu.wpi.first.wpilibj.Dashboard;
import edu.wpi.first.wpilibj.DigitalModule;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStationLCD;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Watchdog;
import edu.wpi.first.wpilibj.camera.AxisCamera;

/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/

/*This Dashboard example has been modified to
* output camera feed on the driver station
* --Mark Tutkowski--
*/
public class DashBoardExample extends IterativeRobot {
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
AxisCamera.getInstance().writeResolution(AxisCamer a.ResolutionT.k160x120);
AxisCamera.getInstance().writeBrightness(0);

Watchdog.getInstance().setEnabled(false);
}

/**
* This function is called periodically during autonomous
*/
public void autonomousPeriodic() {
//Update Camera Feed
DriverStationLCD.getInstance().updateLCD();

}


/**
* This function is called periodically during operator control
*/
public void teleopPeriodic() {
//Update Camera Feed
DriverStationLCD.getInstance().updateLCD();

updateDashboard();

}
Theres a little bit more code but the rest of it is not related to the camera.

Is there anyway to reduce the lag.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
2010 FRC Camera Live Feed Lag ideasrule Programming 23 11-02-2010 02:33
Camera Lag jmanela NI LabVIEW 6 25-12-2009 08:48
Teleop Lag Xavier Brandall Programming 14 17-03-2009 18:21
Lag Much? Caldwell_D Technical Discussion 2 09-11-2008 11:46
Lag Issue bizarospooky Programming 7 08-02-2008 17:31


All times are GMT -5. The time now is 09:41.

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