(Not a homework problem.)
I’m making a video using a drone with a camera capturing a 29.97 frames per second. When I fly near a flashing train crossing gate, the alternating lights (LED) appear to work normally in the video, but they go dark for a short interval about every 9 seconds. Only the red lights are affected. They do not appear to go dark to my naked eye.
I believe that the video camera is capturing the interval where the LEDs are off. This “dark” interval is periodic and out of synch with the electronic shutter of the camera, so it repeats on a regular cycle.
Why do I think this? Well, the days were bright and I expect that the electronic shutter speed of the cameras was pretty fast. The crossing lights are probably powered by a 12 volt tap off a transformer in the crossing control box that is run through a simple full-wave bridge rectifier. If so, it should have 120 “dark” intervals each second, +/- the 0.5% frequency control most utilities adhere to.
In summary, I’ve got a video image being captured once every 0.0333667 seconds. I have a “dark” point (0 volts) about every 0.008333 seconds (+/- 0.5%). How can I make an estimate of the intervals between the camera shutter and the “off” point coinciding? I know they repeat, but I can’t seem to get my head around estimating the intervals where they coincide. (Yes, I know there will be a range of values for this, since there is a +/- range for the utility frequency.)
Thanks in advance. This is why I didn’t go into engineering.
And I do apologize for so many decimal places. They are simply representations of the camera frame rate (29.97 fps) and the frequency of the utility power (59.7 to 60.3 Hz). The shutter time of the video camera is probably between 0.005 and 0.010 seconds.
You can’t.
The time bases are not synchronized, so there’s no way to know when the “dark” periods will occur.
Professional equipment uses ‘Time base correctors” to sync all the gear to the same 60Hz signal (to prevent screen rolling), but there’s no (practical) way to do this with battery-powered drone.
I understand that I can’t synchronize them. What I want to know is the interval between “dark” frames. In other words, how do I estimate when the 5-10 ms global shutter coincides with the “off” interval of the LEDs? If both the video camera and the flashing LEDs continue at a steady rate, there should be a periodic and predictable interval between “dark” frames. Based on the video, it appears to be around 9 seconds.
This is like one of those story problems in school where I just can’t conceptualize what’s needed. I imagine it’s relatively easy to solve…like the question about where a descending truck and an ascending truck pass each other on the mountain road.
Allow me to add a description that might help in picturing the situation. This is NOT what is happening, but it is a similar set-up.
Imagine I’m shooting a video at 30 FPS. I have an LED that is turning on and off 120 times per second. (I’m powering it from 60 Hz current through a full-wave rectifier.) Depending on exactly when the camera starts recording, I could have a video that shows the LED is on in every frame OR I could have a video that shows the LED is off in every frame. (Yes, it could also be brighter or dimmer, but that’s not important.)
In the case that I described above, the camera is recording at a different rate (29.97 FPS) and the LED is turning on and off around 120 times per second. Since they are different, they will sometimes coincide and sometimes they won’t. The camera shutter stays open for about 0.005 seconds, which means that there is some wiggle room. How can I calculate when they will coincide?
We can assume for simplicity sake that the first frame coincides with the beginning of the “on” cycle for the LED. If I know how to calculate the interval for an LED at 120 Hz, then I can also do it for +/- 0.5% of that and get a reasonable range of intervals.
You need to calculate the “beat” frequency - the frequency difference between the two signals. But, I think it’s quite a bit more complicated then the simple audio case, which would be f1 +/- f2.
There’s probably a “modulo” required, since the black frames will occur at any multiple of the lowest frequency.
Sorry, but I’m too busy to work on this right now.
Thank you for your input. I will give this a bit more thought. I’m assuming there is a well-known approach to the problem.
I wish they did, or that it worked.
I watch NHRA drag racing. The “pre-staged” and “staged” lights flash on camera but in a roilling pattern, while the yellow-green-red start lights don’t. It’s weird and annoying.
In super slow motion, I you can also see the general track illumination lights flashing on and off.
OK, I think I have a handle on this. In brief:
Since the LEDs turn on and off 120 times per second (every 0.008333 seconds), if they are off at 0.000 seconds, they will be off at 1.000 seconds. But the video frame rate is 29.97 FPS, which means that an image is taken at 1.001 seconds. The interval for frames NEAR each succeeding second will shift by the same 0.001 seconds. In other words, there will be image frames at 0.000, 1.001, 2.002, 3.003, and so forth. (Obviously, there are frames captured in between, but the shift adds up to a uniform 0.001 seconds per for each second elapsed.)
This means that the shift in frames captured will cycle from completely off to complete on and then back to completely off every 8.333 seconds…which is pretty close to the 9 seconds I was estimating from watching the video.
Problem solved!