Go to Post I am a FRC Coach/Mentor I don't know the meaning of the words "days off" or "rest". At least not from January to May. - Bob Steele [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 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
  #2   Spotlight this post!  
Unread 28-01-2010, 22:13
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,753
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 Latency Test

You don't mention the camera resolution. That will have a large impact on the processing time, perhaps a bit more than the speed of light.

I've measured latency numbers before for LV and they were presented last year at nationals. I can look them up for comparison if you like.

Greg McKaskle
  #3   Spotlight this post!  
Unread 29-01-2010, 20:56
Bigcheese Bigcheese is offline
C++0x FTW!
AKA: Michael Spencer
FRC #1771
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: GA
Posts: 36
Bigcheese is a jewel in the roughBigcheese is a jewel in the roughBigcheese is a jewel in the roughBigcheese is a jewel in the rough
Re: Camera Latency Test

The resolution was 620x480 and 0 compression.

It was his idea to calculate for the speed of light .
  #4   Spotlight this post!  
Unread 29-01-2010, 22:36
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,753
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 Latency Test

Ah. You may want to test with other compression values. In particular, I've seen odd timings when set to zero and to one hundred.

Greg McKaskle
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

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 21: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