summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FaceTrackNoIR.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2011-03-21 21:32:13 +0000
committerWim Vriend <facetracknoir@gmail.com>2011-03-21 21:32:13 +0000
commit7eeb8dfaede7bb54b37b8ea538135914a43ab011 (patch)
tree890f04508697583a3d3e1b849181122278096701 /FaceTrackNoIR/FaceTrackNoIR.cpp
parent09b4c95b8036b9466ca89acbe0b1f3d810499863 (diff)
New effort to embrace faceAPI 3.2.6
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@54 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceTrackNoIR.cpp')
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp34
1 files changed, 11 insertions, 23 deletions
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index 2acf8ec0..029ed5b7 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -34,9 +34,6 @@
#include "FGServer.h"
#include "FTNServer.h"
-using namespace sm::faceapi;
-using namespace sm::faceapi::qt;
-
//
// Setup the Main Dialog
//
@@ -56,7 +53,7 @@ QMainWindow(parent, flags)
_curve_config = 0;
tracker = 0;
- _display = 0;
+// _display = 0;
l = 0;
trayIcon = 0;
@@ -204,6 +201,13 @@ void FaceTrackNoIR::updateSettings() {
}
}
+//
+// Get a pointer to the video-widget, to use in the DLL
+//
+QFrame *FaceTrackNoIR::getVideoWidget() {
+ return ui.video_frame;
+}
+
/** read the name of the first video-capturing device at start up **/
/** FaceAPI can only use this first one... **/
void FaceTrackNoIR::GetCameraNameDX() {
@@ -488,21 +492,13 @@ void FaceTrackNoIR::startTracker( ) {
//
// Create the Tracker and setup
//
- tracker = new Tracker ( ui.iconcomboBox->currentIndex(), ui.iconcomboTrackerSource->currentIndex() );
-
- // Show the video widget
- //ui.video_frame->show();
- //_display = new VideoDisplayWidget( tracker->getEngine(), ui.video_frame, 0 );
- //l = new QVBoxLayout(ui.video_frame);
- //l->setMargin(0);
- //l->setSpacing(0);
- //l->addWidget(_display);
+ tracker = new Tracker ( ui.iconcomboBox->currentIndex(), ui.iconcomboTrackerSource->currentIndex(), this );
//
// Setup the Tracker and send the settings.
// This is necessary, because the events are only triggered 'on change'
//
- tracker->setup( ui.headPoseWidget , this);
+ tracker->setup();
tracker->setSmoothing ( ui.slideSmoothing->value() );
tracker->setUseFilter (ui.chkUseEWMA->isChecked() );
@@ -574,15 +570,7 @@ void FaceTrackNoIR::stopTracker( ) {
//
// Delete the video-display.
//
- if ( _display ) {
- _display->disconnect();
- delete _display;
- _display = 0;
- delete l;
- l = 0;
- qDebug() << "stopTracker says: display deleted";
- }
- ui.video_frame->hide();
+// ui.video_frame->hide();
if ( tracker ) {
qDebug() << "stopTracker says: Deleting tracker!";