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.

		tna = true;
		startTime = t->Get();
		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;
	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.


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.


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

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

The resolution was 620x480 and 0 compression.

It was his idea to calculate for the speed of light :P.

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