Browse Source

fixed bug

windowsdev
Nicole Weber 2 years ago
parent
commit
9a08c137d1

+ 6
- 0
Masterarbeit/Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/cfg/p300-spatial-filter.cfg View File

@@ -0,0 +1,6 @@
<OpenViBE-SettingsOverride>
<SettingValue>-9.854506e-03 4.490459e-02 -2.235728e-02 3.564301e-02 -7.770992e-03 6.771856e-02 -1.015223e-02 1.494322e-03 6.786301e-02 1.430098e-01 5.039326e-02 -4.353548e-01 -5.419809e-01 2.169224e-01 3.499630e-01 -3.175689e-03 1.135831e-01 -2.099687e-01 2.703752e-01 -1.665248e-01 2.137575e-01 1.187045e-01 -1.959052e-01 -5.080815e-02 1.121617e-02 -2.612318e-01 -7.263354e-01 6.296948e-01 -3.519859e-01 -4.575292e-02 5.313071e-01 -2.527051e-02 </SettingValue>
<SettingValue>2</SettingValue>
<SettingValue>16</SettingValue>
<SettingValue></SettingValue>
</OpenViBE-SettingsOverride>

+ 17
- 8
Masterarbeit/UIModellTaktil.py View File

@@ -42,7 +42,7 @@ class Modell(Thread):
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
stdout=PIPE,
universal_newlines=True)
self.openVibeAktiv = True
self.openVibeAktiv = True
while True:
output = process.stdout.readline()
print(output.strip())
@@ -62,6 +62,7 @@ class Modell(Thread):
process.terminate()
self.controller.stop()
break

self.controller.stop()
#self.killProzess()
@@ -72,6 +73,7 @@ class Modell(Thread):
self.infoText = self.infoText + 'start training XDawn -- '
self.controller.setInfos(self.infoText)
path = self.PATH_FILES + 'p300-visual-2-train-xDAWN.xml'
#path = 'Projekte/test.xml'
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
stdout=PIPE,
universal_newlines=True)
@@ -110,24 +112,31 @@ class Modell(Thread):
process = Popen(['bash', self.PATH_OV, '--play', path, '--no-gui'],
stdout=PIPE,
universal_newlines=True)
self.openVibeAktiv = True
self.openVibeAktiv = True
counter = 0
while True:
output = process.stdout.readline()
print(output.strip())
x = output.find("schlagwort?")
x = output.find("aka Classifier trainer")
accuracy = output.find("Training set accuracy is")
y = output.find("Error")
if(x != -1):
print("Training finished")
self.infoText = self.infoText + 'finished Training\n'
self.controller.setInfos(self.infoText)
process.terminate()
break
counter = counter +1
#counter = 18
if(counter >= 17):
print("Training finished")
self.infoText = self.infoText + 'finished Training\n'
self.controller.setInfos(self.infoText)
process.terminate()
break
elif(y != -1 ):
print("Error occured")
self.controller.changeScreen("StartPage")
self.controller.setInfos(self.infoText + "Fehler beim Classifier Training aufgetaucht\n")
process.terminate()
break
elif(accuracy != -1):
print("ACCURACY" + output)

self.controller.changeScreen("StartPage")
self.controller.stop()

BIN
Masterarbeit/UIModellTaktil.pyc View File


Loading…
Cancel
Save