OpenViBE forum

The OpenViBE community
It is currently Thu Oct 19, 2017 10:46 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 05, 2017 11:38 pm 
Offline

Joined: Tue Apr 18, 2017 5:44 am
Posts: 10
Hello,

I am working on revising graz visualization box to show accuracy bar for 4 class(Left,Right,Down and Up)

Looking at the source code, i found following areas with notes:

// @fixme for >2 classes
void CGrazVisualization::updateConfusionMatrix(float64 f64VoteAggregate)
{
if(m_eCurrentDirection == EArrowDirection_Left || m_eCurrentDirection == EArrowDirection_Right)
{
const uint32 l_ui32TrueDirection = m_eCurrentDirection - 1;

const uint32 l_ui32ThisVote = (f64VoteAggregate < 0 ? 0 : 1);

(m_oConfusion.getBuffer())[l_ui32TrueDirection*2 + l_ui32ThisVote]++;


void CGrazVisualization::drawBar()
{
const gint l_iWindowWidth = m_pDrawingArea->allocation.width;
const gint l_iWindowHeight = m_pDrawingArea->allocation.height;

float64 l_f64UsedScale = m_f64BarScale;
if(m_bPositiveFeedbackOnly)
{
// @fixme for multiclass
const uint32 l_ui32TrueDirection = m_eCurrentDirection - 1;
const uint32 l_ui32ThisVote = (m_f64BarScale < 0 ? 0 : 1);
if(l_ui32TrueDirection != l_ui32ThisVote)
{
l_f64UsedScale = 0;
}
}

gint l_iRectangleWidth = static_cast<gint>(fabs(l_iWindowWidth * fabs(l_f64UsedScale) / 2));

l_iRectangleWidth = (l_iRectangleWidth>(l_iWindowWidth/2)) ? (l_iWindowWidth/2) : l_iRectangleWidth;

void CGrazVisualization::drawArrow(EArrowDirection eDirection)
{
gint l_iWindowWidth = m_pDrawingArea->allocation.width;
gint l_iWindowHeight = m_pDrawingArea->allocation.height;

gint l_iX = 0;
gint l_iY = 0;

switch(eDirection)
{
case EArrowDirection_None:
this->drawArrow(EArrowDirection_Left);
this->drawArrow(EArrowDirection_Right);
// this->drawArrow(EArrowDirection_Up);
// this->drawArrow(EArrowDirection_Down);
break;

I don't know c++. Can anybody help me with that?

Thanks.


Attachments:
ovpCGrazVisualization.cpp [25.59 KiB]
Downloaded 4 times
Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 14, 2017 8:02 pm 
Offline

Joined: Wed Aug 30, 2017 7:14 pm
Posts: 2
Hello,

I need to have a scenario on openvibe similar to "mi-csp-1-acquisition", but with 4 classes (both hands and both feet).

How can I'm modification the "Graz Motor Imagery BCI Stimulator" box or write the script .lua on "Lua Stimulator" box?

Thanks!!!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 16, 2017 8:09 am 
Offline

Joined: Thu Feb 09, 2017 10:17 am
Posts: 51
Hello,

I took the liberty of merging the 2 post, are they are asking for more or less the same thing.
Currently if you want to have more than 2 classes with a graz visualisation, you'll have to do some coding.
hkn1304 is correct; this is the file that should be modified for 4 classes Graz visualization.

This feature is not in the Inria's immediate timeline. However, if anybody wishes to contribute a 4-class graz components and/or scenarios, we are happy to consider including them.

Cheers,


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maƫl Soucaze.