简体   繁体   English

如何对处理3中绘制的EEG数据应用带通滤波器?

[英]How can I apply BandPass filter to EEG data being plotted in Processing 3?

I am trying to apply a 4-35Hz BandPass filter in processing. 我正在尝试在处理中应用4-35Hz带通滤波器。 I explored the Sound library but I think it is strictly limited to audio files. 我浏览了声音库,但我认为它严格限于音频文件。

Is there any library for fast implementation of signal filtering in Processing? 是否有用于在处理中快速实现信号过滤的库? I found this-- https://github.com/berndporr/iirj -- but since this is an external library for Java -- importing steps are not very clear. 我发现了这个-https ://github.com/berndporr/iirj-但是由于这是Java的外部库-导入步骤不是很清楚。 Please share your insights. 请分享您的见解。

Appreciate your time. 感谢您的时间。 Many thanks. 非常感谢。

I'm surprised the Sound library doesn't expose the data arrays easily. 我很惊讶,声音库无法轻松公开数据数组。

I recommend using the Minim library in Processing. 我建议在处理中使用Minim库 It should be simpler and come with plenty of examples. 它应该更简单,并附带大量示例。 What you're after is Minim's BandPass filter and there's already a BandPass example . 您所追求的是Minim的BandPass滤波器,并且已经有一个BandPass示例

You can access it via Processing > Examples > Contributed Libraries > Minim > Synthesis > BandPassFilter once you install the library (if it's not already there). 安装库后,您可以通过“ 处理”>“示例”>“ Contributed Libraries”>“ Minim”>“ Synthesis”>“ BandPassFilter”来访问它(如果尚不存在)。

The demo is audio focus, but you should be able to pass a float[] signal to one of the available UGens and pass that to the BandPass filter. 该演示是音频焦点,但是您应该能够将float []信号传递到可用的UGens之一,并将其​​传递给BandPass滤波器。

Regarding the IIRJ library, as you can see in the readme, there's a link to the MavenCentral repo where you can download the compiled jar library 关于IIRJ库,你可以在自述看,有向链接MavenCentral回购在这里你可以下载编译的jar库

Drag and drop that .jar file into your Processing Java sketch and you should be able to test importing the library: 将该.jar文件拖放到您的Processing Java草图中,您应该可以测试导入该库了:

import uk.me.berndporr.iirj.*;
Butterworth butterworth = new Butterworth();

Next up you'll need to download an unzip the javadocs and see how this library expects the 1D signal coming in 接下来,您需要下载一个解压缩javadocs的文件,并查看该库如何期望1D信号进入

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

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