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.
if(leftStick->GetRawButton(1))
[LEFT]{
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;
}[/LEFT]
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