Link to home
Start Free TrialLog in
Avatar of viki2000
viki2000Flag for Germany

asked on

Frequency/Signal of the pulsating light in a video

I have a video with an LED pulsating on/off.
Just by looking with the naked eye I estimate the frequency somewhere in a visible spectrum 2-10Hz.
I would like to know with a higher precision the frequency.

Do you know any software for Windows or a trick/procedure how to find that frequency?
If I would be able to extract the signal on/off as a curve (rectangular signal) vs. time, that would be even better. It would be perfect.

What crossed to my mind up to now is only to split the videos in frames and to look how many frames are with LED on and how many with the LED off. Then knowing the frame rate I could calculate the frequency of the LED light or even to draw the signal. But that seems a Sisyphus work.
The problem is that frequency is not even constant.
There is also „flicker tester” software (http://www.visosystems.com/products/flicker-tester/ ). But I do not know if I can point that to my monitor, because the monitor has its own flicker frequency. I do not have access to the original light source. I have only a recorded video.
https://goo.gl/HLFPE9
Flickering-LEDs.zip
ASKER CERTIFIED SOLUTION
Avatar of d-glitch
d-glitch
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of viki2000

ASKER

Do you see the video in the link above and as well in the attached zip?
It is around 4s.
I do not know the original frame rate, neither the compression, but I can try to find out.


I do not have access to Matlab and I am not use with it.
The LED light intensity is proportional with the current in LEDs. I only suppose the current is sinusoidal. I would like ti find that from the video.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Test Gear 2.5 pulgin  from Synthetic Aperture for After Effects lets you see the waveform of luminance, but I have no idea about timing.
What you see below is from one frame.
User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You are way ahead of me.  I managed to read the video into Matlab then got stuck on the learning curve.
The VLC program said the frame rate was 25 per second.  I don't know if this is embedded info or a default.
I could easily believe you have a sinusoidal signal with some saturation and rectification.
I want to conclude few things:
- forget for a moment about the current waveform in the LED and consider only on/off, meaning max. brightness of the LED in the center of LED when is ON and the gray level when is OFF. That is enough to find the pulsating frequency.
- I find the result and entire analysis irrelevant now. The reason comes from DSO way of working or general from a DAQ. In order to see/acquire correctly a signal we must have the sampling rate higher than the signal. There is a theorem saying that must be at least 2 times higher, but in reality that makes from a sine a triangle, so we need in fact at least 10 times higher to reconstruct the initial signal with a good/acceptable approximation. Higher is even better. This applies also to our case. If the LED flashes with low frequency in reality, let's say 400ms period, as I calculated, and the frame rate is 25 frame/s, meaning 1 frame each 40ms, that is acceptable because the sampling rate is 10 times higher. But how do I know that for sure? I do not have access to original video. If the frequency of the LED is higher, multiple of 40ms, then the frame rate, sampling rate of the digital camera catches only some of the pulses, missing some, and everything is then wrong. On the other hand that is less probable because it needs a synchronization between camera frame rate and pulsing moments.
It is a strange and difficult to analyze problem if we do not know more info about original video.
But was also interesting.

Thank you for your suggestions and your time. Sometimes brainstorming or only another person to speak with is enough for me. It just make me going further. I think I will close the question now.

P.S. If you want to play further in Matlab it would be interesting to see the outcome. The 25 fps is defined in video, inside. I can see that with any video editing software that I used. That's why when I extracted all the frames, it was clear how many I have, because is the length of the video multiplied with the frame rate.
I tried FFT and I got around 4.5Hz for the slowest blinking and around 20.5Hz for highest rate blinking.
I used Excel, Analysis Pack as explained here:
http://www.stem2.org/je/Excel_FFT_Instructions.pdf
Data-LED.xlsx
User generated image
Then I tried Sigview trial software. The units on the axis are not proper.
http://www.sigview.com/
User generated imageUser generated imageUser generated image
I tried also DaDisp free student, but I could not get the FFT proper, I miss a setting somewhere.
http://www.dadisp.com/dlindex.htm
https://www.youtube.com/watch?v=ddRdXcSE7KA