Go to Post At the end of the day, every team in FRC has accomplished something amazing in the sculpting of the next generation of leaders. - Elliot191 [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 28-01-2010, 13:06
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Camera Latency Test

Hello Chief Delphi!

Team 1771 ran some tests with our camera, trying to determine latency with the camera.

Goal: To find the latency from when a stimulus is added, to when the camera has captured that stimulus, but NOT including latency of computer-side processing time.

Materials: One axis camera (model 206), a OptiLed (12v 2Watts, model DIMGU5WT001, a white plastic Walmart bag serial number: 01410 1632 (used as a light filter to prevent damage to camera.) a cRIO model NI cRIO FRC, a crossover cable (24AWG), a Gildan Box 3 cardboard box(for a dark setting)

Setup: Set the axis camera on its side. Set the L.E.D. covered with the plastic bag covering the light (to prevent damage to the camera), 4.5 inches apart.


Code: The following code was used for the testing of this.

Code:
if(leftStick->GetRawButton(1))
		
{ GetWatchdog().Feed(); if(!tna) { tna = true; startTime = t->Get(); } s[0]->Set(true); ColorImage *image = camera.GetImage(); finalTime = t->Get(); BinaryImage* thecoolcrap = image->thresholdHSL(0, 255, 0, 255, 202, 255); vector<ParticleAnalysisReport>* report = thecoolcrap->GetOrderedParticleAnalysisReports(); if(report && (report->size() > 0) && report->at(0).particleArea > 9000) { finalfinalTime = finalTime-startTime; std::cout << finalfinalTime << std::endl; } delete image; delete report; }else { tna = false; }

Potential for Error: The code, because it is in a loop, creates a slight deviation in the accuracy due to processing time. However, our results WERE a consistent .13 seconds.

In addition, we were unable to calculate the temperature of the room, in the box, and of the camera.

Neither can we confirm that the testing enviroment was in STP.

Calculations:




speed of light 299 792 458 m/s

1 inch = 2.54 centimeters

distance from camera to light source 4.5 inches = .1143 meters

toSubtract = .1143/speedoflight = 3.81263761e-10 this equals this is the delay from the distance


result .13 seconds

.13 - toSubtract = .1299999996 seconds.




Results:

Our final result, is that immediatley after the light is turned on, it takes .1299999996 (this is calculating the distance and speed of light) for the camera to recognize the light.



If anyone else would like to run these tests, it would be interesting to compare results!

-Team 1771
 


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
paper: Low Latency Interrupt Framework dcbrown Extra Discussion 5 10-02-2008 15:56
Edu Robot Camera Test Bed bear24rw Programming 7 06-08-2006 11:37
How to test if the camera is locked on? DemonYawgmoth Programming 9 23-02-2006 11:51
How to Test the Camera? ShortBang Programming 1 02-02-2006 19:54
Camera test Guido470 Programming 0 11-01-2005 12:36


All times are GMT -5. The time now is 02:04.

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