summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_ht
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-05-28 10:51:40 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-05-28 10:51:40 +0200
commitdfd2dcdab74aaaf7109159468b597883358f104f (patch)
treec08900f8ece396c6bf92c0e1aa1f51d62675cd2a /ftnoir_tracker_ht
parent9fcb82ad0da705b505777d0e804e1410cee8c2ba (diff)
HT bump
Diffstat (limited to 'ftnoir_tracker_ht')
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp64
-rw-r--r--ftnoir_tracker_ht/ht-api.h1
-rw-r--r--ftnoir_tracker_ht/ht-trackercontrols.ui167
3 files changed, 187 insertions, 45 deletions
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index 6abf8058..d3b90c67 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -108,26 +108,26 @@ 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 = 150;
- config->keypoint_distance = 3.6;
+ config->max_keypoints = 200;
+ config->keypoint_distance = 3.2;
//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.35;
- config->ransac_max_inlier_error = 3.4;
- config->ransac_abs_max_mean_error = 5;
- config->ransac_max_mean_error = 3.1;
+ config->ransac_max_reprojection_error = 3.8;
+ config->ransac_max_inlier_error = 3.8;
+ config->ransac_abs_max_mean_error = 8;
+ config->ransac_max_mean_error = 3.4;
config->debug = 0;
- config->ransac_min_features = 0.85;
+ config->ransac_min_features = 0.9;
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->flandmark_delay = 250;
+ config->flandmark_delay = 200;
qDebug() << "width" << r.width << "height" << r.height;
if (tracker)
{
@@ -138,6 +138,10 @@ static void load_settings(ht_config_t* config, Tracker* tracker)
tracker->enableTY = iniFile.value("enable-ty", true).toBool();
tracker->enableTZ = iniFile.value("enable-tz", true).toBool();
}
+
+ for (int i = 0; i < 5; i++)
+ config->dist_coeffs[i] = iniFile.value(QString("dc%1").arg(i), 0).toDouble();
+
iniFile.endGroup();
}
@@ -363,21 +367,13 @@ 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());
- ui.doubleSpinBox_3->setValue(iniFile.value("b3", 0).toDouble());
- ui.doubleSpinBox_4->setValue(iniFile.value("b4", 0).toDouble());
- ui.doubleSpinBox_5->setValue(iniFile.value("b5", 0).toDouble());
- ui.doubleSpinBox_6->setValue(iniFile.value("b6", 0).toDouble());
- ui.doubleSpinBox_7->setValue(iniFile.value("b7", 0).toDouble());
- ui.doubleSpinBox_8->setValue(iniFile.value("b8", 0).toDouble());
- ui.doubleSpinBox_9->setValue(iniFile.value("b9", 0).toDouble());
- 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
+
+ ui.doubleSpinBox->setValue(iniFile.value("dc0").toDouble());
+ ui.doubleSpinBox_2->setValue(iniFile.value("dc1").toDouble());
+ ui.doubleSpinBox_3->setValue(iniFile.value("dc2").toDouble());
+ ui.doubleSpinBox_4->setValue(iniFile.value("dc3").toDouble());
+ ui.doubleSpinBox_5->setValue(iniFile.value("dc4").toDouble());
+
iniFile.endGroup();
settingsDirty = false;
}
@@ -416,21 +412,13 @@ 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());
- iniFile.setValue("b4", ui.doubleSpinBox_4->value());
- iniFile.setValue("b5", ui.doubleSpinBox_5->value());
- iniFile.setValue("b6", ui.doubleSpinBox_6->value());
- iniFile.setValue("b7", ui.doubleSpinBox_7->value());
- iniFile.setValue("b8", ui.doubleSpinBox_8->value());
- iniFile.setValue("b9", ui.doubleSpinBox_9->value());
- iniFile.setValue("b10", ui.doubleSpinBox_10->value());
- 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.setValue("dc0", ui.doubleSpinBox->value());
+ iniFile.setValue("dc1", ui.doubleSpinBox_2->value());
+ iniFile.setValue("dc2", ui.doubleSpinBox_3->value());
+ iniFile.setValue("dc3", ui.doubleSpinBox_4->value());
+ iniFile.setValue("dc4", ui.doubleSpinBox_5->value());
+
iniFile.endGroup();
settingsDirty = false;
}
diff --git a/ftnoir_tracker_ht/ht-api.h b/ftnoir_tracker_ht/ht-api.h
index 572a60c6..e6960206 100644
--- a/ftnoir_tracker_ht/ht-api.h
+++ b/ftnoir_tracker_ht/ht-api.h
@@ -38,6 +38,7 @@ typedef struct ht_config {
float ransac_max_mean_error;
float ransac_abs_max_mean_error;
float flandmark_delay;
+ double dist_coeffs[5];
} ht_config_t;
typedef struct {
diff --git a/ftnoir_tracker_ht/ht-trackercontrols.ui b/ftnoir_tracker_ht/ht-trackercontrols.ui
index 5f414fc2..fbe7a41a 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>549</width>
- <height>131</height>
+ <width>593</width>
+ <height>280</height>
</rect>
</property>
<property name="sizePolicy">
@@ -22,7 +22,7 @@
<property name="maximumSize">
<size>
<width>750</width>
- <height>160</height>
+ <height>280</height>
</size>
</property>
<property name="windowTitle">
@@ -122,8 +122,8 @@
<widget class="QPushButton" name="buttonOK">
<property name="geometry">
<rect>
- <x>390</x>
- <y>100</y>
+ <x>430</x>
+ <y>250</y>
<width>75</width>
<height>23</height>
</rect>
@@ -135,8 +135,8 @@
<widget class="QPushButton" name="buttonCancel">
<property name="geometry">
<rect>
- <x>470</x>
- <y>100</y>
+ <x>510</x>
+ <y>250</y>
<width>75</width>
<height>23</height>
</rect>
@@ -289,6 +289,159 @@
</property>
</item>
</widget>
+ <widget class="QDoubleSpinBox" name="doubleSpinBox">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>130</y>
+ <width>171</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>24</number>
+ </property>
+ <property name="minimum">
+ <double>-1000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>1000.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.000000000000000</double>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_5">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>130</y>
+ <width>111</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Distortion coefficients</string>
+ </property>
+ </widget>
+ <widget class="QDoubleSpinBox" name="doubleSpinBox_2">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>160</y>
+ <width>171</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>24</number>
+ </property>
+ <property name="minimum">
+ <double>-1000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>1000.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.000000000000000</double>
+ </property>
+ </widget>
+ <widget class="QDoubleSpinBox" name="doubleSpinBox_3">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>190</y>
+ <width>171</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>24</number>
+ </property>
+ <property name="minimum">
+ <double>-1000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>1000.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.000000000000000</double>
+ </property>
+ </widget>
+ <widget class="QDoubleSpinBox" name="doubleSpinBox_4">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>220</y>
+ <width>171</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>24</number>
+ </property>
+ <property name="minimum">
+ <double>-1000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>1000.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.000000000000000</double>
+ </property>
+ </widget>
+ <widget class="QDoubleSpinBox" name="doubleSpinBox_5">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>250</y>
+ <width>171</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>24</number>
+ </property>
+ <property name="minimum">
+ <double>-1000.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>1000.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.000000000000000</double>
+ </property>
+ </widget>
</widget>
<resources/>
<connections/>