If you enjoy our forum, why not join us? :) Login removes all the ads too! Click here to register in a few simple steps

Login to remove this ad | Register Here
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testing FPV Camera Latency
#1
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.
Don't be a LOS'er, be a FPV'er :) -- Blog - Facebook - Instagram - Twitter - Google Plus
[-] The following 2 users Like Oscar's post:
  • KonradS, sloscotty
#2
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
Find me on Youtube and Instagram. I currently fly: NOX5, NOX5RAirblade Assault 130 and drive a scrap RC car
[-] The following 1 user Likes KonradS's post:
  • sloscotty
Reply
#3
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
Don't be a LOS'er, be a FPV'er :) -- Blog - Facebook - Instagram - Twitter - Google Plus
Reply
Login to remove this ad | Register Here
#4
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
Find me on Youtube and Instagram. I currently fly: NOX5, NOX5RAirblade Assault 130 and drive a scrap RC car
[-] The following 1 user Likes KonradS's post:
  • Oscar
Reply
#5
(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
Don't be a LOS'er, be a FPV'er :) -- Blog - Facebook - Instagram - Twitter - Google Plus
Reply
#6
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.
[-] The following 1 user Likes unseen's post:
  • Tom BD Bad
Reply
Login to remove this ad | Register Here
#7
(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.
Don't be a LOS'er, be a FPV'er :) -- Blog - Facebook - Instagram - Twitter - Google Plus
[-] The following 3 users Like Oscar's post:
  • Drone0fPrey, Tom BD Bad, unseen
Reply
#8
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
[-] The following 2 users Like rcschim's post:
  • Tom BD Bad, unseen
Reply
#9
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...
Reply
Login to remove this ad | Register Here
#10
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/mo...-test.html

Hope this link is ok for you here - but I also link back to this forum from my blog...
greets,
RCSchim
[-] The following 1 user Likes rcschim's post:
  • Tom BD Bad
Reply
#11
(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.
Don't be a LOS'er, be a FPV'er :) -- Blog - Facebook - Instagram - Twitter - Google Plus
Reply
#12
(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.
Reply
Login to remove this ad | Register Here
#13
(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
Find me on Youtube and Instagram. I currently fly: NOX5, NOX5RAirblade Assault 130 and drive a scrap RC car
Reply
#14
(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.
[-] The following 1 user Likes Dutch RC's post:
  • Tom BD Bad
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Help Camera Switcher with betaflight flightmode0 6 88 5 hours ago
Last Post: voodoo614
  Discussion What could possibly go wrong? (Powering FPV Camera & VTX from radio RX battery) surfimp 4 135 19-Sep-2017, 09:53 AM
Last Post: unseen
  Discussion Best FPV Camera Settings Oscar 3 1,069 12-Aug-2017, 04:00 PM
Last Post: Drz73
  Camera for spacial recognition or 3D scanning? Nazty 1 167 03-Jul-2017, 02:15 AM
Last Post: RENOV8R
  Discussion The Go-To FPV camera? TomP7715 4 218 26-Jun-2017, 10:38 AM
Last Post: Carl.Vegas