Posts: 5,317 Threads: 672 Likes Received: 3,155 in 1,743 posts Likes Given: 2,031 Joined: Jan 2016 Reputation: 139 27-May-2017, 08:48 PM (This post was last modified: 27-May-2017, 08:55 PM by Oscar.) 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. Posts: 1,070 Threads: 70 Likes Received: 742 in 378 posts Likes Given: 577 Joined: Jan 2016 Reputation: 44 28-May-2017, 06:23 AM (This post was last modified: 28-May-2017, 06:54 AM by KonradS.) Hehe I have made a similar contraption. Just didn't get to the testing yet 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 Posts: 5,317 Threads: 672 Likes Received: 3,155 in 1,743 posts Likes Given: 2,031 Joined: Jan 2016 Reputation: 139 28-May-2017, 11:05 AM (This post was last modified: 28-May-2017, 12:02 PM by Oscar.) That's neat 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 is your gadget for testing the moving speed of the light source? • Posts: 1,070 Threads: 70 Likes Received: 742 in 378 posts Likes Given: 577 Joined: Jan 2016 Reputation: 44 Haha, currently I use it to check my agility lol. Actually photodiodes latency is measured in picoseconds 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 ). Anyway, I hope to get on it soon and compare some of those results with mine Posts: 5,317 Threads: 672 Likes Received: 3,155 in 1,743 posts Likes Given: 2,031 Joined: Jan 2016 Reputation: 139 • Posts: 2,286 Threads: 38 Likes Received: 1,527 in 995 posts Likes Given: 1,881 Joined: Apr 2016 Reputation: 72 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. Posts: 5,317 Threads: 672 Likes Received: 3,155 in 1,743 posts Likes Given: 2,031 Joined: Jan 2016 Reputation: 139 29-May-2017, 10:00 AM (This post was last modified: 29-May-2017, 12:29 PM by Oscar.) (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 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 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. Posts: 5 Threads: 0 Likes Received: 5 in 3 posts Likes Given: 1 Joined: Jun 2017 Reputation: 0 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 Posts: 42 Threads: 2 Likes Received: 8 in 7 posts Likes Given: 7 Joined: Dec 2016 Reputation: 0 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... • Posts: 5 Threads: 0 Likes Received: 5 in 3 posts Likes Given: 1 Joined: Jun 2017 Reputation: 0 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 Posts: 5,317 Threads: 672 Likes Received: 3,155 in 1,743 posts Likes Given: 2,031 Joined: Jan 2016 Reputation: 139 25-Jun-2017, 02:54 PM (This post was last modified: 31-Jul-2017, 12:03 PM by Oscar.) (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 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 My results are good enough as a relative comparison between different cameras. • Posts: 7 Threads: 0 Likes Received: 1 in 1 posts Likes Given: 0 Joined: Nov 2016 Reputation: 0 (25-Jun-2017, 02:54 PM)Oscar Wrote: that's a great setup 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 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. • Posts: 1,070 Threads: 70 Likes Received: 742 in 378 posts Likes Given: 577 Joined: Jan 2016 Reputation: 44 11-Sep-2017, 05:54 PM (This post was last modified: 11-Sep-2017, 05:55 PM by KonradS.) (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 • Posts: 7 Threads: 0 Likes Received: 1 in 1 posts Likes Given: 0 Joined: Nov 2016 Reputation: 0 (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 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. |