summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_ht
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2013-04-12 13:26:44 +0200
committerWim Vriend <facetracknoir@gmail.com>2013-04-12 13:26:44 +0200
commitbcbdd10779d86d491060c6010e4ac927964f3c32 (patch)
treea5a719b836b7c862e059900ca27a3188da892fa9 /ftnoir_tracker_ht
parentb78ac5d6535794967d5104bbc265b5079d0ac6b2 (diff)
parent4ff08e52cc4d10491d7676ece8c52792e9e89d82 (diff)
Merge branch 'posix' of ssh://git.code.sf.net/p/facetracknoir/codegit into posix
Diffstat (limited to 'ftnoir_tracker_ht')
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp32
-rw-r--r--ftnoir_tracker_ht/ht-api.h1
-rw-r--r--ftnoir_tracker_ht/ht-trackercontrols.ui308
3 files changed, 27 insertions, 314 deletions
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index c5e860ee..59af6991 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -109,28 +109,30 @@ static void load_settings(ht_config_t* config, Tracker* tracker)
config->field_of_view = iniFile.value("fov", 52).toFloat();
config->pyrlk_pyramids = 3;
config->pyrlk_win_size_w = config->pyrlk_win_size_h = 21;
- config->max_keypoints = 100;
- config->keypoint_quality = 7;
- config->keypoint_distance = 1.5;
- config->keypoint_3distance = 5.0;
+ config->max_keypoints = 200;
+ config->keypoint_quality = 2;
+ config->keypoint_distance = 1;
+ config->keypoint_3distance = 4;
//config->force_width = 640;
//config->force_height = 480;
config->force_fps = iniFile.value("fps", 0).toInt();
config->camera_index = iniFile.value("camera-index", -1).toInt();
config->ransac_num_iters = 100;
- config->ransac_max_reprojection_error = 3.75;
- config->ransac_max_inlier_error = 3.8;
- config->ransac_max_mean_error = 4;
- config->ransac_abs_max_mean_error = 10;
- config->debug = 0;
- config->ransac_min_features = 0.85;
+ config->ransac_max_reprojection_error = 3.05;
+ config->ransac_max_inlier_error = 3.14;
+ config->ransac_max_mean_error = 3;
+ config->ransac_abs_max_mean_error = 12;
+ config->debug = 1;
+ config->ransac_min_features = 0.86;
int res = iniFile.value("resolution", 0).toInt();
if (res < 0 || res >= (int)(sizeof(*resolution_choices) / sizeof(resolution_tuple)))
res = 0;
resolution_tuple r = resolution_choices[res];
config->force_width = r.width;
config->force_height = r.height;
- config->user_landmarks = iniFile.value("use-bashed-coords").toBool();
+ config->user_landmarks = false; //iniFile.value("use-bashed-coords").toBool();
+ config->flandmark_delay = 150;
+#if 0
if (config->user_landmarks)
{
config->user_landmark_locations[0][0] = iniFile.value("b1").toDouble();
@@ -146,6 +148,7 @@ static void load_settings(ht_config_t* config, Tracker* tracker)
config->user_landmark_locations[1][3] = iniFile.value("b11").toDouble();
config->user_landmark_locations[2][3] = iniFile.value("b12").toDouble();
}
+#endif
qDebug() << "width" << r.width << "height" << r.height;
if (tracker)
{
@@ -225,6 +228,7 @@ bool Tracker::GiveHeadPoseData(THeadPoseData* data)
videoWidget->updateImage(shm->frame.frame, shm->frame.width, shm->frame.height);
//memcpy(foo, shm->frame.frame, shm->frame.width * shm->frame.height * 3);
fresh = true;
+ shm->frame.width = 0;
}
if (shm->result.filled) {
if (enableRX)
@@ -330,7 +334,7 @@ TrackerControls::TrackerControls()
connect(ui.tz, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int)));
connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
connect(ui.buttonOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.buttonSettings, SIGNAL(clicked()), this, SLOT(cameraSettings()));
+ //connect(ui.buttonSettings, SIGNAL(clicked()), this, SLOT(cameraSettings()));
loadSettings();
settingsDirty = false;
}
@@ -386,6 +390,7 @@ void TrackerControls::loadSettings()
ui.ty->setCheckState(iniFile.value("enable-ty", true).toBool() ? Qt::Checked : Qt::Unchecked);
ui.tz->setCheckState(iniFile.value("enable-tz", true).toBool() ? Qt::Checked : Qt::Unchecked);
ui.resolution->setCurrentIndex(iniFile.value("resolution", 0).toInt());
+#if 0
ui.groupBox_2->setChecked(iniFile.value("use-bashed-coords").toBool());
ui.doubleSpinBox_1->setValue(iniFile.value("b1", 0).toDouble());
ui.doubleSpinBox_2->setValue(iniFile.value("b2", 0).toDouble());
@@ -399,6 +404,7 @@ void TrackerControls::loadSettings()
ui.doubleSpinBox_10->setValue(iniFile.value("b10", 0).toDouble());
ui.doubleSpinBox_11->setValue(iniFile.value("b11", 0).toDouble());
ui.doubleSpinBox_12->setValue(iniFile.value("b12", 0).toDouble());
+#endif
iniFile.endGroup();
settingsDirty = false;
}
@@ -437,6 +443,7 @@ void TrackerControls::save()
iniFile.setValue("enable-ty", ui.ty->checkState() != Qt::Unchecked ? true : false);
iniFile.setValue("enable-tz", ui.tz->checkState() != Qt::Unchecked ? true : false);
iniFile.setValue("resolution", ui.resolution->currentIndex());
+#if 0
iniFile.setValue("b1", ui.doubleSpinBox_1->value());
iniFile.setValue("b2", ui.doubleSpinBox_2->value());
iniFile.setValue("b3", ui.doubleSpinBox_3->value());
@@ -450,6 +457,7 @@ void TrackerControls::save()
iniFile.setValue("b11", ui.doubleSpinBox_11->value());
iniFile.setValue("b12", ui.doubleSpinBox_12->value());
iniFile.setValue("use-bashed-coords", ui.groupBox_2->isChecked());
+#endif
iniFile.endGroup();
settingsDirty = false;
}
diff --git a/ftnoir_tracker_ht/ht-api.h b/ftnoir_tracker_ht/ht-api.h
index 81caf16f..c09dbf55 100644
--- a/ftnoir_tracker_ht/ht-api.h
+++ b/ftnoir_tracker_ht/ht-api.h
@@ -41,6 +41,7 @@ typedef struct ht_config {
float ransac_abs_max_mean_error;
bool user_landmarks;
float user_landmark_locations[3][4];
+ float flandmark_delay;
} ht_config_t;
typedef struct {
diff --git a/ftnoir_tracker_ht/ht-trackercontrols.ui b/ftnoir_tracker_ht/ht-trackercontrols.ui
index 968b7dc7..5f414fc2 100644
--- a/ftnoir_tracker_ht/ht-trackercontrols.ui
+++ b/ftnoir_tracker_ht/ht-trackercontrols.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>724</width>
- <height>160</height>
+ <width>549</width>
+ <height>131</height>
</rect>
</property>
<property name="sizePolicy">
@@ -122,8 +122,8 @@
<widget class="QPushButton" name="buttonOK">
<property name="geometry">
<rect>
- <x>220</x>
- <y>130</y>
+ <x>390</x>
+ <y>100</y>
<width>75</width>
<height>23</height>
</rect>
@@ -135,8 +135,8 @@
<widget class="QPushButton" name="buttonCancel">
<property name="geometry">
<rect>
- <x>300</x>
- <y>130</y>
+ <x>470</x>
+ <y>100</y>
<width>75</width>
<height>23</height>
</rect>
@@ -289,302 +289,6 @@
</property>
</item>
</widget>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="geometry">
- <rect>
- <x>500</x>
- <y>10</y>
- <width>221</width>
- <height>141</height>
- </rect>
- </property>
- <property name="title">
- <string>Bashed coordinates</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_1">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_2">
- <property name="geometry">
- <rect>
- <x>80</x>
- <y>20</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_3">
- <property name="geometry">
- <rect>
- <x>150</x>
- <y>20</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_6">
- <property name="geometry">
- <rect>
- <x>150</x>
- <y>50</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_4">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>50</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_5">
- <property name="geometry">
- <rect>
- <x>80</x>
- <y>50</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_9">
- <property name="geometry">
- <rect>
- <x>150</x>
- <y>80</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_7">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>80</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_8">
- <property name="geometry">
- <rect>
- <x>80</x>
- <y>80</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_12">
- <property name="geometry">
- <rect>
- <x>150</x>
- <y>110</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_11">
- <property name="geometry">
- <rect>
- <x>80</x>
- <y>110</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="doubleSpinBox_10">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>110</y>
- <width>61</width>
- <height>22</height>
- </rect>
- </property>
- <property name="frame">
- <bool>true</bool>
- </property>
- <property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>-99.000000000000000</double>
- </property>
- </widget>
- </widget>
- <widget class="QPushButton" name="buttonSettings">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>130</y>
- <width>101</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text">
- <string>Camera settings</string>
- </property>
- </widget>
</widget>
<resources/>
<connections/>