这种亮度信号的傅立叶分析正确吗? (安卓) [英] Is this Fourier Analysis of Luminance Signals Correct? (Android)

查看:107
本文介绍了这种亮度信号的傅立叶分析正确吗? (安卓)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Android应用程序,该程序可以测量一段时间内相机帧的亮度,并使用傅立叶分析法计算出心跳的频率,以找到波动的频率.问题是我的光谱分析看起来像这样:

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:

几乎与频谱分析的外观(如正态分布)相反.我可以准确地评估此值以找到最大幅度的指标,还是此频谱表明我的数据太吵了?

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?

这是我的相机数据的样子(我正在对此执行FFT):

Here's what my camera data looks like (I'm performing FFT on this):

推荐答案

看来您在这里遇到了两个问题:

It looks like you have two problems going on here:

1)FFT输出通常将负频率的值放在正频率的右边,在这里似乎是这种情况.因此,您需要将FFT的右半部分移到左侧,并在中间放置freq=0.

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)在注释中,您说的是绘制幅度,但事实并非如此(幅度应大于0且对称).相反,您可能只是在绘制真正的部分.相反,取幅度或Re*Re + Im*Im,其中ReIm分别是实部和虚部. (取决于您的电话号码形式,例如Math.sqrt(Math.pow(a.re, 2) + Math.pow(a.im, 2)).)

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)).)

这篇关于这种亮度信号的傅立叶分析正确吗? (安卓)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆