IntoFPV Forum
Data Testing FPV Camera Latency - Printable Version

+- IntoFPV Forum (http://intofpv.com)
+-- Forum: Specific Equipment (http://intofpv.com/forum-specific-equipment)
+--- Forum: FPV Gear (http://intofpv.com/forum-fpv-gear)
+--- Thread: Data Testing FPV Camera Latency (/t-testing-fpv-camera-latency)



Testing FPV Camera Latency - Oscar - 27-May-2017

Many people test camera delay with a virtual timer on their tablet or smart phone. It might work but IMO very inaccurate. So here I am trying to build a setup that can measure FPV camera delay with higher precision.

For more detail how it works, and some results I have taken with this setup:
https://oscarliang.com/fpv-camera-latency/




Feel free to comment or ask questions.


RE: Testing FPV Camera Latency - KonradS - 28-May-2017

Hehe I have made a similar contraption. Just didn't get to the testing yet Big Grin



My first setup was using photodiodes (faster than photoresistors) but I've burned a Nano by switching a led strip back and forth for a few minutes. I am using two sensors to remove the latency of the diode lighting up.

I have used those off the shelf sensors instead since they also have a digital output.

OLED screen is there just "for science" as it also outputs info trough the serial Smile


RE: Testing FPV Camera Latency - Oscar - 28-May-2017

That's neat Smile i like the fact that you have a OLED screen showing the result LOL
Yea serial is the way to go for dumping all the data to a spreadsheet though for mass data collection and for further analysis.

I imagine the difference between photodiodes and LDR are only in micro seconds? I guess that shouldn't make any noticeable different in measuring FPV camera latency Smile

is your gadget for testing the moving speed of the light source? Big Grin


RE: Testing FPV Camera Latency - KonradS - 28-May-2017

Haha, currently I use it to check my agility lol.

Actually photodiodes latency is measured in picoseconds Big Grin they are less accurate so are not good at measuring light intensity, but if you just need to check if it is lit or not, they are perfect.
Doesn't really matter in my case since i am measuring time between identical sensors (i hope, you know chinese products Wink ).

Anyway, I hope to get on it soon and compare some of those results with mine Smile


RE: Testing FPV Camera Latency - Oscar - 28-May-2017

(28-May-2017, 11:48 AM)KonradS Wrote: Haha, currently I use it to check my agility lol.

Actually photodiodes latency is measured in picoseconds Big Grin they are less accurate so are not good at measuring light intensity, but if you just need to check if it is lit or not, they are perfect.
Doesn't really matter in my case since i am measuring time between identical sensors (i hope, you know chinese products Wink ).

Anyway, I hope to get on it soon and compare some of those results with mine Smile

looking forward to your testing!  High Five


RE: Testing FPV Camera Latency - unseen - 28-May-2017

I'm not convinced that measuring the appearance of light on a screen is as accurate as you think Oscar.

If you're using the video output from either an FPV camera or a HD camera, you'll either be using a PAL or NTSC formatted video signal.

NTSC and PAL have different frame rates - 25 fps for PAL or 29.97 fps for NTSC. That's not the whole story though, as both formats are interlaced - they send the even lines of the frame first and then the odd lines. The actual field rate is therefore twice the frame rate.

As you're not synchronising when your LED turns on with the moment that the camera hardware starts to read a new frame out of the sensor, you have an uncertainty at the camera which is between 16 - 20 milliseconds (best case, assuming that it samples at the field rate and not the frame rate) or double that in the worst case. Then, you need to add to that the fact that the LED turning on isn't synchronised to the display either, introducing a 16 - 20 millisecond uncertainty at the receiving end as well.

While the averaged latency observed by your test setup will provide a good comparative measure, the tests must all be done using either PAL or NTSC and not a combination. The maximum observed latency should not be attributed to the camera though - most of the variance is down to the fact that your LED isn't synchronised to anything.


RE: Testing FPV Camera Latency - Oscar - 29-May-2017

(28-May-2017, 09:22 PM)unseen Wrote: NTSC and PAL have different frame rates - 25 fps for PAL or 29.97 fps for NTSC. That's not the whole story though, as both formats are interlaced - they send the even lines of the frame first and then the odd lines. The actual field rate is therefore twice the frame rate.

Yes very good point Smile I should have stated that I tested all cameras under PAL settings whenever possible.
In theory, because NTSC is 60fps (interlaced) and PAL is 50fps (interlaced), the delay difference should be about 3.3ms (16.7ms vs 20ms).

I will test the different settings and compare the result, will confirm later

(28-May-2017, 09:22 PM)unseen Wrote: As you're not synchronising when your LED turns on with the moment that the camera hardware starts to read a new frame out of the sensor, you have an uncertainty at the camera which is between 16 - 20 milliseconds (best case, assuming that it samples at the field rate and not the frame rate) or double that in the worst case. Then, you need to add to that the fact that the LED turning on isn't synchronised to the display either, introducing a 16 - 20 millisecond uncertainty at the receiving end as well.

The delay caused by encoding format (NTSC/PAL) applies to real life usage, and we should take that into account in measuring camera delay. That's was originally my point, why I didn't trust tests online where they use virtual timer, and only take 1 sample, as the error can vary between 0 and 16.7ms (assuming fresh rate at 60fps, in reality might be worse).

I am taking so many samples at non-uniform sampling rate to make sure I can capture the max delay which IMO is more representative to the true latency of a FPV camera.

by the way, I don't tink PAL/NTSC doesn't affect sampling rate, the difference is just how video is encoded for output.

(28-May-2017, 09:22 PM)unseen Wrote: While the averaged latency observed by your test setup will provide a good comparative measure, the tests must all be done using either PAL or NTSC and not a combination. The maximum observed latency should not be attributed to the camera though - most of the variance is down to the fact that your LED isn't synchronised to anything.

The risk of sampling at a constant rate is that the data could become correlating to the refresh rate of the equipment, or the sampling frequency.

I am not saying this is the most accurate method, but it gives me more confident than filming virtual timer on an iPad Smile



UPDATE: In my testing, NTSC was not definitely faster than PAL  (test result on my blog post, NTSC/PAL section) I also checked with Runcam, they suggest camera algorithm has a much bigger effect on latency when using different encoding format.


RE: Testing FPV Camera Latency - rcschim - 19-Jun-2017

Hi Oscar, great setup and measurements! I hate the limit of 16.66ms we have in measuring latency of FPV cams!
Please take a look at my video from today. I tried to take out the lcd of that equation using an osciloscope. Like in your setup i use a led with a switch. I probe this as curve A and probe also the video cable as curve B. On the osci I also literally saw the ntsc frame width.

Greets from Austria, Mario


RE: Testing FPV Camera Latency - Mephi - 19-Jun-2017

I would synchronize the switching of the LED to the start of an Frame. Also the brightness/color change should be significant, but not too high to avoid saturation effects...


RE: Testing FPV Camera Latency - rcschim - 22-Jun-2017

I have updated the infos I collected (huge overview of cams and their latency usingn my new method) here:
http://rcschim.blogspot.co.at/2017/06/most-accurate-fpv-cam-latency-test.html

Hope this link is ok for you here - but I also link back to this forum from my blog...
greets,
RCSchim


RE: Testing FPV Camera Latency - Oscar - 25-Jun-2017

(19-Jun-2017, 01:15 PM)rcschim Wrote: Hi Oscar, great setup and measurements! I hate the limit of 16.66ms we have in measuring latency of FPV cams!
Please take a look at my video from today. I tried to take out the lcd of that equation using an osciloscope. Like in your setup i use a led with a switch. I probe this as curve A and probe also the video cable as curve B. On the osci I also literally saw the ntsc frame width.   

Greets from Austria, Mario

that's a great setup Smile
I thought about using an oscilloscope as well, but the only limitation is the number of samples and how long it takes to read the measurements. 
As the latency is always changing you need a lot of samples to get a good sense of the real latency.
If there is a way to make your setup automated that would be the way to go Smile

My results are good enough as a relative comparison between different cameras.


RE: Testing FPV Camera Latency - Dutch RC - 11-Sep-2017

(25-Jun-2017, 02:54 PM)Oscar Wrote: that's a great setup Smile
I thought about using an oscilloscope as well, but the only limitation is the number of samples and how long it takes to read the measurements. 
As the latency is always changing you need a lot of samples to get a good sense of the real latency.
If there is a way to make your setup automated that would be the way to go Smile

My results are good enough as a relative comparison between different cameras.

Hi,

I started testing latency and I used the cheap banggood HS1177 for first test. I think your photo resistor is a bit slow. The camera I tested first has a latency of 4ms and then it starts to light up the screen. My sensor has a latency of 7nS and compared with a hundred dollar sensor with 50uS it did came out as 6nS so pretty accurate.

When I receive my own oscilloscope I'll show you how I measured this.

Total setup latency till a blown out white picture is 18mS including the VTX and goggles.


RE: Testing FPV Camera Latency - KonradS - 11-Sep-2017

(11-Sep-2017, 02:18 PM)Dutch RC Wrote: Hi,

I started testing latency and I used the cheap banggood HS1177 for first test. I think your photo resistor is a bit slow. The camera I tested first has a latency of 4ms and then it starts to light up the screen. My sensor has a latency of 7nS and compared with a hundred dollar sensor with 50uS it did came out as 6nS so pretty accurate.

When I receive my own oscilloscope I'll show you how I measured this.

Total setup latency till a blown out white picture is 18mS including the VTX and goggles.

No need to focus on sensor latency if itself it is measured in a unit that is 1/1000000 of a unit you are actually trying to measure. In that perspective 6ns is accurate enough Smile


RE: Testing FPV Camera Latency - Dutch RC - 15-Sep-2017

(11-Sep-2017, 05:54 PM)KonradS Wrote: No need to focus on sensor latency if itself it is measured in a unit that is 1/1000000 of a unit you are actually trying to measure. In that perspective 6ns is accurate enough Smile

I know 6nS is fast enough, just wanted to make sure that the sensors I'm using are quick and accurate enough for the job, there are also sensors available that are much much slower and maybe even less accurate or not consistent enough.

The numbers I got on the semi professional scope don't match the number I saw on oscarliang.com. I do have to test some more cameras and share the data to be sure about it.

I'm not sure if a arduino is really fast and consistent enough for the job. Time will tell.