0% found this document useful (0 votes)
278 views101 pages

OpenViBE Basics Tutorial PDF

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
278 views101 pages

OpenViBE Basics Tutorial PDF

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 101













May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies




May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


• Acquisition Server TCP
IP

Designer

EEG

TCP
IP
External Application
May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
or Main applications :
Acquisition Server or Designer

Sample scenarios :
Basic tutorials (box-tutorials) and advanced scenarios
(bci-examples ), plus signal files and format conversion scenarios

2D/3D Demo applications for advanced scenarios :


Handball, tie-fighter, ssvep shooter

Developers and contributors tools

Start the Designer :


• From Start menu (Start  OpenViBE  OpenViBE designer)
• From the file explorer, directly execute openvibe-designer.cmd in the OpenViBE folder

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Player
controls

Create new
scenario, open
existing scenario,
etc…

Available
OpenViBE boxes
Edition area for the sorted by
current scenario categories for
convenience

Status bar

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies 7


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
File reading
and writing
boxes

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Basic
visualisation
boxes

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Drag & Drop the
GDF File Reader
and Signal Display
boxes in the
edition area

You can also look for a


specific box from the
search bar if you know its
name and do not
remember the category

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Boxes outputs

Boxes inputs

I/O types are organized in a hierarchy and


coded with specific colors as follows :

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Connect the inputs of the signal display
box to the outputs of the GDF file reader
box by clicking an input and dragging /
releasing on the corresponding output

- Inputs can receive connections from any outputs with


compatible type (same type or derived type)

- You can connect an output to multiple inputs but you can’t


connect multiple outputs to a single input.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Double click on the
GDF file reader box to
open its configuration
dialog

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Select a GDF file

Then click on Apply

This file contains 9


minutes of signal
sampled at 512 Hz. The
box will split these signals
in blocks of 32 samples,
which represents a 16th
of second per block

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Start the scenario
clicking the Play
button

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Current time

The file is read and


displayed in real-
time: signal and
stimulations (event).

Processor load

Options and information


are available when
clicking on the signal
display toolbar (scales,
channel selection, color
codes, etc.)

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Stop the
scenario by
clicking the Stop
button

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


You can save the
scenario on the disk
for later use

Good practice: save your


scenarios on a regular
basis

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Categories
> signal processing
> Filtering

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Drag & Drop a
Temporal Filter box

You can access online


documentation of
individual boxes by
selecting box of interest
and pressing F1.
This requires a
connection to the
Internet.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Copy / Paste a new
Signal Display box

Copy / Paste can be


done through three
different pathways :
- Edit Menu
- Right click
- Ctrl-c/Ctrl-x/Ctrl-v

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Connect the input of
the Temporal Filter
box to the output of
the GDF file reader
box
Connect the output of
the Temporal Filter
box to the input of the
Signal Display box

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Configure the
Temporal Filter box:
- Band-pass
- Low-cut : 8 Hz
- High-cut : 12 Hz

The signal is filtered in


the alpha band (8 to
12 Hz)

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The raw signal
(unfiltered) is still
displayed

The filtered signal is


displayed in a new
window

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The windows have
the same title…

Their (automatic)
placement is not
very convenient…

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Stop the scenario by
clicking the Stop
button

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Right click on the
visualisation box that
receives raw signals
and rename it to
“unfiltered” using the
rename box option

Rename the other


visualisation box to
“alpha ”

You can rename a


selected box by
pressing F2

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


We now have
« unfiltered » and
« alpha » visualisation
boxes

The original name of


the box is still visible
on top of the new
name

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Now open the
« Window Manager »

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Widget arrangement
area

List of unconfigured
widgets

Treeview of configured
widgets

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Drag & Drop the
widgets in the
arrangement area to
place the alpha widget
under the unfiltered
widget

Close the Window


Manager to apply
changes.

You can create tabs and


windows and name them
at will. Just right click on
the tree view for more
actions.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Start the scenario…

The widgets are now


arranged in a more
convenient way !

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies







May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies



Chunk 1 Chunk 2 Chunk 3 Chunk 4 Chunk 5 Chunk 6

Time

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies



Chunk 1 Chunk 2 Chunk 3 Chunk 4 Chunk 5 Chunk 6

Chunk 1 Chunk 2 Chunk 3

Time

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies




Chunk 1 Chunk 2 Chunk 3 Chunk 4 Chunk 5 Chunk 6

Chunk 1 Chunk 2 Chunk 3

Time

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies





Chunk 1 Chunk 2 Chunk 3 Chunk 4 Chunk 5 Chunk 6

Chunk 1 Chunk 4
Chunk 2
Chunk 3

Time

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies






Chunk 1 Chunk 2 Chunk 3 Chunk 4 Chunk 5 Chunk 6

Chunk 1 Chunk 2

Event of interest such as P300


T1 T2
Time

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Category
signal processing,
epoching

TheTime based epoching


box allows to resize the
epochs of the
datastream.

The Stimulation based


epoching box allows to
select signal around an
event of interest (also
called Stimulation in
OpenViBE).

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Drag & drop a Time
based epoching box
and a new Signal
Display box. Then
rename the Signal
Display box in a
convenient way.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Configure the Time
based epoching box
to build epochs of
half a second every
half a second.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The refresh rate is
now lower in the new
widget than in the first
because the epochs
cover a bigger amount
of time. The content
however is visually
identical.

With a sampling rate


of 512 Hz, half a
second represents 256
samples, thus exactly
8 chunks of 32
samples each, as we
configured in the file
reading box.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Edit theTime Based
Epoching box
settings to generate
epochs of 1 second
every 16th of
second (0.0625sec)

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The epoched signal
appears to to
have16 times more
samples with
duplicated samples.
Visualisation of this
is not very useful…

… however, we can
now process these
epochs to grab
interesting
information !

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Remove the unfiltered
pipeline then drag &
drop a Simple DSP box
and a Signal Average
box (found in Signal
Processing / Basic and
Signal Processing /
Averaging respectively).

Connect them to
theTemporal Filter box
and add a new Signal
Display box.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Configure the
Simple DSP box so
that it computes the
square of each
sample.

The power of a signal in a


given frequency band can
be computed as the
average of the square of
the samples in the given
frequency band. The
Simple DSP box computes
the square of the
samples and the Signal
Average box computes
the average of the values
for each chunk.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Open the Window
Manager

Arrange the widgets


so that the Alpha
widget is on top of
the Alpha Power
widget.
Then close the
Window Manager.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The bottom widget
shows the alpha
band power

A burst of activity in
the alpha band
translates into a
peak in the alpha
power that can be
easily visualized.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Add a Time Based
Epoching box before
the Simple DSP box.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Edit theTime Based
Epoching box
settings to generate
epochs of 1 second
every 16th of
second (that is
0.0625 sec)

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Configure the Alpha
visualization box so
that it shows 160
seconds of signal.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The power in the
alpha band is
extracted from
larger epochs, thus
is smoother than
the previous one.

As soon as non
continuous epochs are
concerned, the Signal
Display is usually
unable to display time
scales correctly.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Remove the Alpha
visualization box.
Then copy & paste
the entire signal
processing pipeline
3 times.

Configure the
Temporal Filter
boxes as follows :
- Alpha : [8,12] Hz
- Beta : [12,24] Hz
- Delta : [1,4] Hz
- Theta : [4,8] Hz

Rename the Signal


Display boxes
accordingly.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Arrange the widgets
in a convenient way
using the Window
Manager.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The 4 powers are
computed and
displayed in real
time

These frequency bands


are related to specific
brain activity. Alpha is
involved in attention and
relaxation for instance.
Beta is involved in sensori
motor processes (as for
instance real or imagined
hand or foot movements)

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Add a newSimple
DSP box.

Right click on the


box and add a new
Input of type Signal.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Connect the Simple
DSP as follows :
- Input A to alpha
- Input B to theta

Configure the box


settings with the
following equation
A/B.
This will compute
Alpha / Theta power
ratio

Then add a new


Signal Display box

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Different band powers
can be used at the same
time. For example, most
of the neurofeedback
protocols are based on
band powers and ratios.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Now save the
scenario.

OpenViBE saves the


scenarios in a dedicated
XML file format
describing the boxes
involved, their graphical
location, their settings
and connections etc…

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Create a new scenario
(this creates a new
tab)

Copy and paste the


GDF File Reader, a
Temporal Filter and a
Time Based Epoching
from the previous
scenario. Then add a
Spectral Analysis box
and a Power Spectrum
Display box and
connect them to the
rest of the pipeline

Configure the filter :


- Type : High-pass
- Low-cut : 1 Hz

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The power spectrum is
computed in real time.
The amplitude of each
band between 0 and
40 Hz is shown
independently

Default settings of the


Power Spectrum Display
automatically update the
datascale to fit the
widget height. This is
sometimes not
convenient and can be
changed.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Click on the title bar
of the Power
Spectrum Display
widget to configure
the visualisation
settings

Change the vertical


scale to custom and
set the scale to
1000

You can also change the


Min and Max frequencies
to display in this toolbar

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
In order to start the acquisition server, proceed as follows :
In the Windows shortcut list :
(Start  OpenViBE  OpenViBE Acquisition Server)

Directly start the openvibe-acquisition-server.cmd script


in the OpenViBE installation folder

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Drop down list with Configuration of the Configuration of the
all supported driver for a specific acquisition server
acquisition devices acquisition device itself

TCP port to use so that Sample count per Control buttons to connect /
other applications can chunk of data disconnect the device and start /
receive the acquired data stop the acquisition process

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Let’s configure the
Generic Oscillator

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Id information about
the acquisition. These
information will be sent
to the client application
and can be stored in
files

Configuration of the
signal that will be
generated: number
of channels,
sampling rate

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Let’s change the
channel names

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Select a channel in
Select a name in the
the right panel
left panel

Click on the green


arrow to apply the
chosen name to the
corresponding
channel.

Now apply
the changes

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The international10-20 system normalizes the electrode
names and locations.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The data stream can be read
Click on Connect then by an acquisition client from
Play to start reading the address hostname:1024
data. on the same computer, it
would be localhost:1024

The acquisition reflects in realtime the device drift. The drift is the difference between
the number of samples the driver sent to the acquistion server as compared to the
number of samples it should have sent based on the elapsed time.

If the drift is too important, this can cause some timing and tagging issues, most
particularly when it comes to ERPs such as P300, which requires a perfect match
between the EEG stream and the event tagging. In this case, the server will apply a
correction by removing or adding samples.
May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Create a new
scenario

Drag & drop an


Acquisition Client
box and a Signal
Display box.

Default settings will look


for the acquisition server
at localhost:1024

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Press the Play
button to see what’s
in the Acquisition
Server stream

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
or Main applications :
Acquisition Server or Designer

Sample scenarios :
Basic tutorials (box-tutorials) and advanced scenarios
(bci-examples ), plus signal files and format conversion scenarios

2D/3D Demo applications for advanced scenarios :


Handball, tie-fighter, ssvep shooter

Developers and contributors tools

Start the Designer :


• From Start menu (Start  OpenViBE  OpenViBE designer)
• From the file explorer, directly execute openvibe-designer.cmd in the OpenViBE folder

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The OpenViBE file format
(.ov) is simply the binary
data stream written in a
file, same format as what
goes between boxes

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
A very useful box to
select or exclude specific
channels based on their
name or index

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Can display feedback,
rewards, or instructions
for example.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


This box is able to run
any system command, as
you would do in a
command prompt on
Windows or Linux. For
example, you can
automatically start an
external application that
will connect to OpenViBE
to display feedback

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


A very versatile box for
basic mathematical
operations on signals.
See the box
documentation for the
complete syntax of the
equation to set

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Can be used to detect if a
signal is above a specific
threshold for example

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


The Sound Player is
based on the OpenAL
library and can read files
in .ogg and .wav formats

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


Can be used to redirect
an input signal to one or
another processing
pipeline depending on
the context.

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies


May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies
Real time, quantitative EEG solutions

May-June 2016, Asilomar OpenViBE workshop © Mensia Technologies

You might also like