summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR
diff options
context:
space:
mode:
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp108
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.h6
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.ui233
-rw-r--r--FaceTrackNoIR/tracker.cpp2
-rw-r--r--FaceTrackNoIR/tracker.h4
5 files changed, 266 insertions, 87 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index d9fffdff..e4907284 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -23,6 +23,7 @@
*********************************************************************************/
/*
Modifications (last one on top):
+ 20121014 - WVR: Added second Tracker Source for Arduino solution. The two will be mutually exclusive.
20120929 - WVR: Disable button Filter-settings when StartTracker.
20120918 - WVR: When AutoStart is TRUE, the program is not directly minimized any more.
This now depends on the AutoMinimize time. Fixed the 'not showing' of the MIB.
@@ -53,6 +54,7 @@
FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WFlags flags) :
QMainWindow(parent, flags),
pTrackerDialog(NULL),
+pSecondTrackerDialog(NULL),
pProtocolDialog(NULL),
pFilterDialog(NULL)
{
@@ -129,7 +131,8 @@ void FaceTrackNoIR::setupFaceTrackNoIR() {
connect(ui.actionVideoWidget, SIGNAL(triggered()), this, SLOT(showVideoWidget()));
connect(ui.actionHeadPoseWidget, SIGNAL(triggered()), this, SLOT(showHeadPoseWidget()));
- connect(ui.btnShowEngineControls, SIGNAL(clicked()), this, SLOT(showEngineControls()));
+ connect(ui.btnShowEngineControls, SIGNAL(clicked()), this, SLOT(showTrackerSettings()));
+ connect(ui.btnShowSecondTrackerSettings, SIGNAL(clicked()), this, SLOT(showSecondTrackerSettings()));
connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showServerControls()));
connect(ui.btnShowFilterControls, SIGNAL(clicked()), this, SLOT(showFilterControls()));
@@ -261,6 +264,19 @@ QString FaceTrackNoIR::getCurrentTrackerName()
return trackerFileList.at(ui.iconcomboTrackerSource->currentIndex());
}
+//
+// Return the name of the second Tracker-DLL
+//
+QString FaceTrackNoIR::getSecondTrackerName()
+{
+ if (ui.cbxSecondTrackerSource->currentIndex() <= 0) {
+ return QString("None");
+ }
+ else {
+ return trackerFileList.at(ui.cbxSecondTrackerSource->currentIndex() - 1 );
+ }
+}
+
/** read the name of the first video-capturing device at start up **/
/** FaceAPI can only use this first one... **/
void FaceTrackNoIR::GetCameraNameDX() {
@@ -381,6 +397,7 @@ void FaceTrackNoIR::save() {
iniFile.beginGroup ( "TrackerSource" );
iniFile.setValue ( "Selection", ui.iconcomboTrackerSource->currentIndex() );
iniFile.setValue ( "DLL", getCurrentTrackerName() );
+ iniFile.setValue ( "2ndDLL", getSecondTrackerName() );
iniFile.endGroup ();
//
@@ -461,7 +478,7 @@ void FaceTrackNoIR::loadSettings() {
// Put the filename in the window-title.
//
QFileInfo pathInfo ( currentFile );
- setWindowTitle ( "FaceTrackNoIR (1.7 alpha 4) - " + pathInfo.fileName() );
+ setWindowTitle ( "FaceTrackNoIR (1.7 alpha 5) - " + pathInfo.fileName() );
//
// Get a List of all the INI-files in the (currently active) Settings-folder.
@@ -581,15 +598,23 @@ void FaceTrackNoIR::loadSettings() {
break;
}
}
+ QString secondTrackerName = iniFile.value ( "2ndDLL", "None" ).toString();
+ qDebug() << "loadSettings says: secondTrackerName = " << secondTrackerName;
+
iniFile.endGroup ();
disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ disconnect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
for ( int i = 0; i < trackerFileList.size(); i++) {
if (trackerFileList.at(i) == selectedTrackerName) {
ui.iconcomboTrackerSource->setCurrentIndex( i );
}
+ if (trackerFileList.at(i) == secondTrackerName) {
+ ui.cbxSecondTrackerSource->setCurrentIndex( i + 1 ); // The first value = "None", so add 1
+ }
}
connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ connect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
//
// Read the currently selected Filter from the INI-file.
@@ -688,6 +713,7 @@ void FaceTrackNoIR::startTracker( ) {
// Enable/disable Protocol-server Settings
ui.iconcomboTrackerSource->setEnabled ( false );
+ ui.cbxSecondTrackerSource->setEnabled ( false );
ui.iconcomboProtocol->setEnabled ( false );
ui.btnShowServerControls->setEnabled ( false );
ui.iconcomboFilter->setEnabled ( false );
@@ -785,6 +811,7 @@ void FaceTrackNoIR::stopTracker( ) {
// ui.btnShowEngineControls->setEnabled ( false );
ui.iconcomboProtocol->setEnabled ( true );
ui.iconcomboTrackerSource->setEnabled ( true );
+ ui.cbxSecondTrackerSource->setEnabled ( true );
ui.iconcomboFilter->setEnabled ( true );
// Enable/disable Protocol-server Settings
@@ -941,12 +968,12 @@ void FaceTrackNoIR::showHeadPoseWidget() {
}
/** toggles Engine Controls Dialog **/
-void FaceTrackNoIR::showEngineControls() {
+void FaceTrackNoIR::showTrackerSettings() {
importGetTrackerDialog getIT;
QLibrary *trackerLib;
QString libName;
- qDebug() << "FaceTrackNoIR::showEngineControls started.";
+ qDebug() << "FaceTrackNoIR::showTrackerSettings started.";
//
// Delete the existing QDialog
@@ -966,22 +993,74 @@ QString libName;
if (!libName.isEmpty()) {
trackerLib = new QLibrary(libName);
-// qDebug() << "FaceTrackNoIR::showEngineControls Loaded trackerLib." << trackerLib;
+// qDebug() << "FaceTrackNoIR::showTrackerSettings Loaded trackerLib." << trackerLib;
getIT = (importGetTrackerDialog) trackerLib->resolve("GetTrackerDialog");
-// qDebug() << "FaceTrackNoIR::showEngineControls resolved." << getIT;
+// qDebug() << "FaceTrackNoIR::showTrackerSettings resolved." << getIT;
if (getIT) {
ITrackerDialog *ptrXyz(getIT());
if (ptrXyz)
{
pTrackerDialog = ptrXyz;
- pTrackerDialog->Initialize( this );
-// qDebug() << "FaceTrackNoIR::showEngineControls GetTrackerDialog Function Resolved!";
+ pTrackerDialog->Initialize( this, 1 );
+// qDebug() << "FaceTrackNoIR::showTrackerSettings GetTrackerDialog Function Resolved!";
if (tracker) {
pTrackerDialog->registerTracker( tracker->getTrackerPtr() );
-// qDebug() << "FaceTrackNoIR::showEngineControls RegisterTracker Function Executed";
+// qDebug() << "FaceTrackNoIR::showTrackerSettings RegisterTracker Function Executed";
+ }
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+ }
+
+}
+
+// Show the Settings dialog for the secondary Tracker
+void FaceTrackNoIR::showSecondTrackerSettings() {
+importGetTrackerDialog getIT;
+QLibrary *trackerLib;
+QString libName;
+
+ qDebug() << "FaceTrackNoIR::showSecondTrackerSettings started.";
+
+ //
+ // Delete the existing QDialog
+ //
+ if (pSecondTrackerDialog) {
+ delete pSecondTrackerDialog;
+ pSecondTrackerDialog = NULL;
+ }
+
+ // Show the appropriate Tracker Settings
+ libName.clear();
+ libName = getSecondTrackerName();
+
+ //
+ // Load the Server-settings dialog (if any) and show it.
+ //
+ if ((!libName.isEmpty()) && (libName != "None")) {
+ trackerLib = new QLibrary(libName);
+
+// qDebug() << "FaceTrackNoIR::showTrackerSettings Loaded trackerLib." << trackerLib;
+
+ getIT = (importGetTrackerDialog) trackerLib->resolve("GetTrackerDialog");
+
+// qDebug() << "FaceTrackNoIR::showTrackerSettings resolved." << getIT;
+
+ if (getIT) {
+ ITrackerDialog *ptrXyz(getIT());
+ if (ptrXyz)
+ {
+ pSecondTrackerDialog = ptrXyz;
+ pSecondTrackerDialog->Initialize( this, 2 );
+// qDebug() << "FaceTrackNoIR::showTrackerSettings GetTrackerDialog Function Resolved!";
+ if (tracker) {
+ pSecondTrackerDialog->registerTracker( tracker->getSecondTrackerPtr() );
+// qDebug() << "FaceTrackNoIR::showTrackerSettings RegisterTracker Function Executed";
}
}
}
@@ -1259,10 +1338,15 @@ ITrackerDll *pTrackerDll; // Pointer to Tracker info instance (in DLL)
trackerFileList = settingsDir.entryList( filters, QDir::Files, QDir::Name );
//
- // Add strings to the Listbox.
+ // Add strings to the Listbox(es).
//
disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
ui.iconcomboTrackerSource->clear();
+
+ disconnect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ ui.cbxSecondTrackerSource->clear();
+ ui.cbxSecondTrackerSource->addItem("None");
+
for ( int i = 0; i < trackerFileList.size(); i++) {
// qDebug() << "createIconGroupBox says: TrackerName = " << trackerFileList.at(i);
@@ -1291,10 +1375,10 @@ ITrackerDll *pTrackerDll; // Pointer to Tracker info instance (in DLL)
}
ui.iconcomboTrackerSource->addItem(*trackerIcon, *trackerName );
+ ui.cbxSecondTrackerSource->addItem(*trackerIcon, *trackerName );
}
connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
-
-
+ connect(ui.cbxSecondTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
}
//
diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h
index a7992bbb..52ea8418 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.h
+++ b/FaceTrackNoIR/FaceTrackNoIR.h
@@ -72,6 +72,7 @@ public:
QString getCurrentProtocolName(); // Get the name of the selected protocol
QString getCurrentFilterName(); // Get the name of the selected filter
QString getCurrentTrackerName(); // Get the name of the selected face-tracker
+ QString getSecondTrackerName(); // Get the name of the second face-tracker ("None" if no selection)
private:
Ui::FaceTrackNoIRClass ui;
@@ -84,6 +85,7 @@ private:
QStringList trackerFileList; // List of Tracker-DLL-files, that are present in the program-folder
ITrackerDialogPtr pTrackerDialog; // Pointer to Tracker dialog instance (in DLL)
+ ITrackerDialogPtr pSecondTrackerDialog; // Pointer to the second Tracker dialog instance (in DLL)
IProtocolDialogPtr pProtocolDialog; // Pointer to Protocol dialog instance (in DLL)
IFilterDialogPtr pFilterDialog; // Pointer to Filter dialog instance (in DLL)
@@ -139,7 +141,9 @@ private:
void showVideoWidget();
void showHeadPoseWidget();
- void showEngineControls();
+ void showTrackerSettings();
+ void showSecondTrackerSettings();
+
void showServerControls();
void showFilterControls();
void showPreferences();
diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui
index bd4356c3..eec447bc 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.ui
+++ b/FaceTrackNoIR/FaceTrackNoIR.ui
@@ -11,7 +11,7 @@
<x>0</x>
<y>0</y>
<width>925</width>
- <height>428</height>
+ <height>411</height>
</rect>
</property>
<property name="sizePolicy">
@@ -1173,7 +1173,7 @@ color: rgb(0, 255, 0);</string>
<widget class="QGroupBox" name="groupGlobalSettings">
<property name="minimumSize">
<size>
- <width>206</width>
+ <width>420</width>
<height>120</height>
</size>
</property>
@@ -1591,6 +1591,19 @@ background:none;</string>
</widget>
</widget>
</item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
<item row="0" column="0">
@@ -1739,33 +1752,30 @@ background:none;</string>
</item>
</layout>
</item>
- <item row="3" column="0">
- <layout class="QHBoxLayout" name="horizontalLayout_7">
- <property name="leftMargin">
- <number>10</number>
- </property>
- <property name="rightMargin">
- <number>10</number>
+ <item row="4" column="0">
+ <layout class="QGridLayout" name="gridLayout_5">
+ <property name="verticalSpacing">
+ <number>1</number>
</property>
- <item>
+ <item row="0" column="0">
<widget class="QGroupBox" name="groupTrackerSource">
<property name="minimumSize">
<size>
<width>200</width>
- <height>120</height>
+ <height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>16777215</width>
- <height>120</height>
+ <width>200</width>
+ <height>80</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
- <string>Tracker Source</string>
+ <string>Tracker Source(1st)</string>
</property>
<widget class="QComboBox" name="iconcomboTrackerSource">
<property name="geometry">
@@ -1793,7 +1803,7 @@ background:none;</string>
<property name="geometry">
<rect>
<x>10</x>
- <y>80</y>
+ <y>50</y>
<width>180</width>
<height>23</height>
</rect>
@@ -1808,70 +1818,92 @@ background:none;</string>
<string>Settings</string>
</property>
</widget>
- <widget class="QPushButton" name="btnStartTracker">
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="groupFilter">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="title">
+ <string>Filter</string>
+ </property>
+ <widget class="QComboBox" name="iconcomboFilter">
<property name="geometry">
<rect>
<x>10</x>
- <y>50</y>
- <width>81</width>
- <height>23</height>
+ <y>20</y>
+ <width>180</width>
+ <height>22</height>
</rect>
</property>
- <property name="toolTip">
- <string>Start the Tracker</string>
- </property>
<property name="styleSheet">
<string notr="true"/>
</property>
- <property name="text">
- <string>Start</string>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>7</number>
</property>
</widget>
- <widget class="QPushButton" name="btnStopTracker">
+ <widget class="QPushButton" name="btnShowFilterControls">
<property name="enabled">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="geometry">
<rect>
- <x>109</x>
+ <x>10</x>
<y>50</y>
- <width>81</width>
+ <width>180</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
- <string>Stop the Tracker</string>
+ <string>Change game protocol settings</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
- <string>Stop</string>
+ <string>Settings</string>
</property>
</widget>
</widget>
</item>
- <item>
- <widget class="QGroupBox" name="groupFilter">
+ <item row="0" column="2">
+ <widget class="QGroupBox" name="groupGameProtocol">
<property name="minimumSize">
<size>
- <width>190</width>
- <height>120</height>
+ <width>200</width>
+ <height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>16777215</width>
- <height>120</height>
+ <width>200</width>
+ <height>80</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
- <string>Filter</string>
+ <string>Game protocol</string>
</property>
- <widget class="QComboBox" name="iconcomboFilter">
+ <widget class="QComboBox" name="iconcomboProtocol">
<property name="geometry">
<rect>
<x>10</x>
@@ -1890,14 +1922,14 @@ background:none;</string>
<number>7</number>
</property>
</widget>
- <widget class="QPushButton" name="btnShowFilterControls">
+ <widget class="QPushButton" name="btnShowServerControls">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
- <y>80</y>
+ <y>50</y>
<width>180</width>
<height>23</height>
</rect>
@@ -1914,59 +1946,97 @@ background:none;</string>
</widget>
</widget>
</item>
- <item>
- <widget class="QGroupBox" name="groupGameProtocol">
+ <item row="1" column="1">
+ <widget class="QGroupBox" name="groupStartStop">
<property name="minimumSize">
<size>
- <width>190</width>
- <height>120</height>
+ <width>200</width>
+ <height>80</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
- <height>120</height>
+ <height>80</height>
</size>
</property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
<property name="title">
- <string>Game protocol</string>
+ <string>GO!</string>
</property>
- <widget class="QComboBox" name="iconcomboProtocol">
+ <widget class="QPushButton" name="btnStartTracker">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
- <width>180</width>
- <height>22</height>
+ <width>81</width>
+ <height>23</height>
</rect>
</property>
+ <property name="toolTip">
+ <string>Start the Tracker</string>
+ </property>
<property name="styleSheet">
<string notr="true"/>
</property>
- <property name="currentIndex">
- <number>-1</number>
+ <property name="text">
+ <string>Start</string>
</property>
- <property name="maxVisibleItems">
- <number>7</number>
+ </widget>
+ <widget class="QPushButton" name="btnStopTracker">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>20</y>
+ <width>81</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string>Stop the Tracker</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Stop</string>
</property>
</widget>
- <widget class="QPushButton" name="btnShowServerControls">
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>200</width>
+ <height>80</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Tracker Source (2nd)</string>
+ </property>
+ <widget class="QPushButton" name="btnShowSecondTrackerSettings">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
- <y>80</y>
+ <y>50</y>
<width>180</width>
<height>23</height>
</rect>
</property>
<property name="toolTip">
- <string>Change game protocol settings</string>
+ <string>Change tracker settings</string>
</property>
<property name="styleSheet">
<string notr="true"/>
@@ -1975,23 +2045,42 @@ background:none;</string>
<string>Settings</string>
</property>
</widget>
+ <widget class="QComboBox" name="cbxSecondTrackerSource">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>180</width>
+ <height>22</height>
+ </rect>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="currentIndex">
+ <number>-1</number>
+ </property>
+ <property name="maxVisibleItems">
+ <number>5</number>
+ </property>
+ </widget>
</widget>
</item>
+ <item row="1" column="2">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
- <item row="4" column="0">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>30</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
</layout>
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index 6153433f..80080df7 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -171,7 +171,7 @@ QFrame *video_frame;
if (ptrXyz)
{
pTracker = ptrXyz;
- pTracker->Initialize( video_frame );
+ pTracker->Initialize( video_frame, 1 );
qDebug() << "Tracker::setup Function Resolved!";
}
}
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h
index 4b52e438..03d517c6 100644
--- a/FaceTrackNoIR/tracker.h
+++ b/FaceTrackNoIR/tracker.h
@@ -173,7 +173,8 @@ private:
static T6DOF new_camera;
static T6DOF output_camera;
- ITrackerPtr pTracker; // Pointer to Tracker instance (in DLL)
+ ITrackerPtr pTracker; // Pointer to Tracker instance (in DLL)
+ ITrackerPtr pSecondTracker; // Pointer to second Tracker instance (in DLL)
static IProtocolPtr pProtocol; // Pointer to Protocol instance (in DLL)
static IFilterPtr pFilter; // Pointer to Filter instance (in DLL)
@@ -254,6 +255,7 @@ public:
static void getOutputHeadPose(THeadPoseData *data); // Return the current (processed) headpose data
static IFilterPtr getFilterPtr() { return pFilter; } // Return the pointer for the active Filter
ITracker *getTrackerPtr() { return pTracker; } // Return the pointer for the active Tracker
+ ITracker *getSecondTrackerPtr() { return pSecondTracker; } // Return the pointer for the secondary Tracker
void doRefreshVideo() { // Call the face-tracker-function RefreshVideo
if (pTracker) {