简体   繁体   English

在MATLAB中过滤眼睛跟踪数据

[英]Filter eye tracking data in MATLAB

I have eye tracking data sampled at 2000Hz with 45000 samples of xy pixel coordinates on a 1920x1080 plane. 我有一个以2000Hz采样的眼动数据,在1920x1080平面上有45000个xy像素坐标样本。

The velocity (saccade) of the eye is shown in the plot below and contains high frequency noise. 下图显示了眼睛的速度(扫视),其中包含高频噪声。 x-axis contains the time and y-axis is the velocity/saccade (I forgot the labels) x轴包含时间,y轴包含速度/扫视(我忘记了标签)

扫视

I want to filter out the noise in such a way that the values between the peaks are 0 and the peaks do not contain noise nor do they lose amplitude. 我想过滤掉噪声,使峰之间的值为0,并且峰不包含噪声,也不会丢失振幅。

The latter I could probably do by locating the peaks and simply interpolating between its start position and end position since I just need the peaks and their width. 后者我可能可以通过定位峰并在其起始位置和结束位置之间进行插值来实现,因为我只需要峰及其宽度。 However, this is not really an elegant option. 但是,这并不是一个好的选择。

I was curious if there is a smart or elegant way of doing this. 我很好奇是否有一种聪明优雅的方法。 I tried a butterworth filter but that reduces peak amplitude. 我尝试了巴特沃斯滤波器,但可降低峰值幅度。

It will be imposible to leave the peak amplitudes unchanged because they are also corrupted by high frequency noise. 保持峰值幅度不变是不可能的,因为它们也会被高频噪声破坏。 I think that you have two options to filter out the noise 我认为您有两种选择可以滤除噪音

  1. Using a low pass filter 使用低通滤波器
  2. Using the smooth function 使用smooth功能

You would have to play around with both methods to determine which better suites your needs, and leave the saccade velocity amplitudes mostly unchanged. 您将不得不同时使用两种方法来确定哪种方法更适合您的需求,并且使扫视速度幅度基本保持不变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM