Is this Fourier Analysis of Luminance Signals Corr

2019-09-11 08:37发布

I'm writing an Android app that measures the luminance of camera frames over a period of time and calculates a heart beat using Fourier Analysis to find the wave's frequency. The problem is that my spectral analysis looks like this:

Spectral analysis (y-axis is magnitude, x-axis is index)

which is pretty much the inverse of what a spectral analysis should look like (like a normal distribution). Can I accurately assess this to find the index of the maximum magnitude, or does this spectrum reveal that my data is too noisy?

EDIT: Here's what my camera data looks like (I'm performing FFT on this): Luminance of Current Frame vs. Time

1条回答
祖国的老花朵
2楼-- · 2019-09-11 09:06

It looks like you have two problems going on here:

1) The FFT output often places the value for negative frequencies to the right of the positive frequencies, which seems to be the case here. Therefore, you need to move the right half of the FFT to the left, and put freq=0 in the middle.

2) In the comments you say that you're plotting the magnitude but that's clearly not the case (the magnitude should be greater than 0 and symmetric). Instead you're probably just plotting the really part. Instead, take the magnitude, or Re*Re + Im*Im, where Re and Im are the real and imaginary parts respectively. (Depending on the form of your numbers, something like Math.sqrt(Math.pow(a.re, 2) + Math.pow(a.im, 2)).)

查看更多
登录 后发表回答