There is a lamp working at 50Hz and I have a camera that can capture 60fps.I am positive that it’s 50Hz because it’s plugged to a 50Hz power source, I am just trying to confirm it with image processing. I already proved it’s 50Hz with a photodiode (instead of camera) because it gives a 1-dimensional output thus performing FFT with numpy is easy. But camera provides 2-dimensional data and it’s a bit more trickier thus involves image-processing.
I wrote “determine the frequency of the light’s amplitude” because I wouldn’t want to confuse people about the frequency as in color, just change of the amplitude. Camera sensor is towards the lamp, what my methodology should be to determine the frequency of light’s amplitude from 60 captured fps ?
You can measure the intensity at each sample (you sample at 60Hz) and from then you can get a plot of intensity vs time. The problem is your sample rate is below the Nyquist Rate for a 50Hz signal. Because of this, you will have aliasing, but if you assume you are near 50Hz you will be able to fit an about 50Hz signal to the data. You will probably have issues though if your light transitions very quickly from off to on and back off again as many of your samples might report zero intensity. The more like a sine wave that the actual light intensity is the better this will work.