Easy way to implement spatiospectral filtering on OV ?

About the GUI application to design signal processing pipelines
Post Reply
Jeff_B
Posts: 37
Joined: Wed Apr 11, 2012 1:31 pm
Location: Nice - Alpes Maritimes

Easy way to implement spatiospectral filtering on OV ?

Post by Jeff_B »

Hi Openvibers,
Suppose we are able to produce off line some kind of optimal spatiospectral filters (for subsequent classification), is there an easy way to implement several spatiospectral filters on OV ?
By spatiospectral filter, I mean several specific pass band filters applied to each channel/sensor (and weighted) followed by a CSP filtering (on these filtered sensor signals), thus implementing several (common pattern) spatiospectral filters. I would need to implement several of these spatiospectral filters (a few per class x 2 class) but if you get a high number of channels/sensors, it becomes crazy to cable it as individual (spectral filtering) boxes within OV no ? (in my case it would mean 5x2x16=160 individual spectral filtering boxes and 10 CSP filters).
Take care,
Jeff

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Easy way to implement spatiospectral filtering on OV ?

Post by jtlindgren »

Hi Jeff,

I'm not sure I totally follow what you want to do, but if your spatiospectral filter is the same thing as a spatiotemporal filter, then if you can represent your spatiotemporal filter as a coefficient matrix, then you could try to hack it as follows

1) Use an epoching box + feature extractor to turn a spatiotemporal chunk of signal into a feature vector
2) Use spatial filter to process this 'spatiotemporal' feature vector
3) Do whatever with the result, then extract the features again

that is, you imagine one row of your filter matrix is

[
coeff(filt1, chn1,t), coeff(filt1, chn2, t), coeff(filt1,t), ..., coeff(filt1, chn1, t-1), coeff(filt1, chn2, t-1), ... ;
coeff(filt2, chn1,t), coeff(filt2, chn2, t), coeff(filt2,t), ..., coeff(filt2, chn1, t-1), coeff(filt2, chn2, t-1), ... ;
...
]

I haven't tried it but might work. You might need to put the time the other way around (go from t-k to t), if feature extractor puts the oldest sample first.


Cheers,
Jussi

Jeff_B
Posts: 37
Joined: Wed Apr 11, 2012 1:31 pm
Location: Nice - Alpes Maritimes

Re: Easy way to implement spatiospectral filtering on OV ?

Post by Jeff_B »

jtlindgren wrote:Hi Jeff,

I'm not sure I totally follow what you want to do, but if your spatiospectral filter is the same thing as a spatiotemporal filter, then if you can represent your spatiotemporal filter as a coefficient matrix, then you could try to hack it as follows

1) Use an epoching box + feature extractor to turn a spatiotemporal chunk of signal into a feature vector
2) Use spatial filter to process this 'spatiotemporal' feature vector
3) Do whatever with the result, then extract the features again

that is, you imagine one row of your filter matrix is

[
coeff(filt1, chn1,t), coeff(filt1, chn2, t), coeff(filt1,t), ..., coeff(filt1, chn1, t-1), coeff(filt1, chn2, t-1), ... ;
coeff(filt2, chn1,t), coeff(filt2, chn2, t), coeff(filt2,t), ..., coeff(filt2, chn1, t-1), coeff(filt2, chn2, t-1), ... ;
...
]

I haven't tried it but might work. You might need to put the time the other way around (go from t-k to t), if feature extractor puts the oldest sample first.


Cheers,
Jussi
Hello Jussi,
Thank you for the suggestion. To build one spatiospectral filter, I need to be able to apply different frequency filters (usually not FIR filters) for each channel (on the raw EEG signals, not the features) and to combine these filtered channels via a standard CSP procedure (one spatial filter box). And I need a full bank of these spatiospectral filters. I can also optimize the spatiospectral filters for a given time window (within trials) or also optimize their time windows (thus implementing a kind of space-time-frequency or STF filters)... but this feature is disabled (the search space is already wide enough and this would increase further the number of STF filters). I will try to see if I can use a spatial filter on the raw signals to implement both the spatial filtering and this channel to channel specific frequency or temporal filtering as you suggest.
Jeff
PS) Thank you for OV2mat !

Post Reply