Page 1 of 1

Categorize human emotions using Enobio3G

Posted: 29 Aug 2013, 11:16
by aasedeeq
Hi all,
I'm trying to categorize human emotions (i.e. fear, anger,...etc) in real-time using Enobio3G and BCI2000.
I wonder if anyone can help me integrate the device's driver found here:
http_nospam_www.neuroelectrics.com/support/download
with BCI2000? and I will be grateful.
Thank you in advance.
Regards

Re: Categorize human emotions using Enobio3G

Posted: 30 Aug 2013, 01:02
by boulay
On the right of that page is a link to download BCI2000 drivers and examples. Download that Enobio3G_BCI2000.rar file.
Extract the contents of the rar file somewhere.
Copy ENOBIO3G.exe and the 3 dll files from the extracted Enobio3G\bin directory to your BCI2000\prog directory.
In BCI2000\batch, make a copy of CursorTask_gUSBamp.bat and name it CursorTask_Enobio3G.bat
Edit that file.
Change the line

Code: Select all

Start executable gUSBAmpSource--local
to

Code: Select all

Start executable ENOBIO3G --local
.
Also delete the last line for loading the gUSBamp.prm file.

Run the batch file. Click on Config, then the Source tab, and setup the BluetoothMAC.
I can't help you beyond that since I don't have an Enobio device to test.

Re: Categorize human emotions using Enobio3G

Posted: 30 Aug 2013, 01:04
by boulay
By the way, the Enobio3G module source code is included in the BCI2000 source repository. If you built BCI2000 from source then you might already have the Enobio3G module.

Re: Categorize human emotions using Enobio3G

Posted: 30 Aug 2013, 05:33
by aasedeeq
Thanks, I have already done that and did the cursor example but the problem is that the Enobio3G.exe is like a black box that doesn't show whats the output? and what kind of filters applied in that?
Another thing is that the ARSignalProcessing.exe also look like a black box too since its source code doesn't explain a lot regarding the output? and whether is the right Signal processing filter?

Re: Categorize human emotions using Enobio3G

Posted: 30 Aug 2013, 06:38
by boulay
You can use SpectralSignalProcessing instead of ARSignalProcessing. SpectralSignalProcessing has everything in ARSignalProcessing and more, I believe.

I don't know about the Enobio module, but I couldn't disagree more that the other modules are like a block box. They are all documented pretty thoroughly on the wiki:
http://www.bci2000.org/wiki/index.php/U ... ce:Filters

The source code does tell you exactly what's happening, though I agree they could be commented more heavily.

I'm assuming you're using Visual Studio. Open the BCI2000.sln and on the left click on SpectralSignalProcessing>Source>Project>PipeDefinition.cpp

Code: Select all

Filter( SpatialFilter, 2.B );
Filter( SpectralEstimator, 2.C );
Filter( LinearClassifier, 2.D );
Filter( LPFilter, 2.D1 );
Filter( ExpressionFilter, 2.D2 );
Filter( Normalizer, 2.E );
This tells you which filters are used by SpectralSignalProcessing. To find out what each filter does, you have to look at their respective source code. For example, you can open "SpectralEstimator.h". That's a bit of a trick because it doesn't do much. It just combines several different filters:

Code: Select all

#include "IdentityFilter.h"
#include "WindowingFilter.h"
#include "ARSpectrum.h"
#include "FFTSpectrum.h"
Oopen the .cpp files associated with each of those and look at the Process or OnProcess implementations. This is what's happening to your signal on each block. With something that uses a library, like FFT, you will probably have to dive further into the code to figure out exactly what it's doing.

Re: Categorize human emotions using Enobio3G

Posted: 30 Aug 2013, 06:41
by boulay
aasedeeq wrote:and whether is the right Signal processing filter?
That depends on what features you want to extract. If you want a frequency-domain feature (e.g. alpha amplitude) then SpectralSignalProcessing will work for you. If you want a time-domain feature then you need something else. If you want a custom feature then you may have to make your own filter and there is plenty of information on how to do that on the wiki.

Re: Categorize human emotions using Enobio3G

Posted: 14 Oct 2013, 08:46
by mellinger
Hi Chad,

thanks for your friendly comments.
The source code does tell you exactly what's happening, though I agree they could be commented more heavily.
The general problem with comments is that they consist of natural language, and thus cannot be checked for consistency and correctness by an automated procedure. In BCI2000, the policy is therefore to avoid comments as far as possible, and to try making the source code speaking for itself as much as possible.

In the future, we plan to better integrate wiki content with the source code, using doxygen or a similar software approach. In any case, we think it is more important to understand basic concepts, which are not bound to certain locations source code, rather than any detail in a certain source code file, which may change rapidly as BCI2000 evolves.

Best regards,
Juergen