summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_ht
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-30 10:02:21 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-30 10:02:21 +0100
commita49a146b1a9bb68b763a09684bdae8cc7dd16d65 (patch)
treee91b76c991eec3b7e7eba1da8c799fa4f92223f4 /ftnoir_tracker_ht
parent90d5ffb413bdaa05bc84ff8403ac0399d9ea117a (diff)
remove dist coeffs, no one uses them
Diffstat (limited to 'ftnoir_tracker_ht')
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp18
-rw-r--r--ftnoir_tracker_ht/ht-trackercontrols.ui591
2 files changed, 186 insertions, 423 deletions
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index f9f03fae..a1fed131 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -131,7 +131,7 @@ static void load_settings(ht_config_t* config, Tracker* tracker)
}
for (int i = 0; i < 5; i++)
- config->dist_coeffs[i] = iniFile.value(QString("dc%1").arg(i), 0).toDouble();
+ config->dist_coeffs[i] = 0;
iniFile.endGroup();
}
@@ -285,8 +285,8 @@ TrackerControls::TrackerControls()
connect(ui.tx, SIGNAL(clicked()), this, SLOT(settingChanged()));
connect(ui.ty, SIGNAL(clicked()), this, SLOT(settingChanged()));
connect(ui.tz, SIGNAL(clicked()), this, SLOT(settingChanged()));
- connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
- connect(ui.buttonOK, SIGNAL(clicked()), this, SLOT(doOK()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
//connect(ui.buttonSettings, SIGNAL(clicked()), this, SLOT(cameraSettings()));
loadSettings();
settingsDirty = false;
@@ -344,12 +344,6 @@ void TrackerControls::loadSettings()
ui.tz->setCheckState(iniFile.value("enable-tz", true).toBool() ? Qt::Checked : Qt::Unchecked);
ui.resolution->setCurrentIndex(iniFile.value("resolution", 0).toInt());
- 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;
}
@@ -389,12 +383,6 @@ void TrackerControls::save()
iniFile.setValue("enable-tz", ui.tz->checkState() != Qt::Unchecked ? true : false);
iniFile.setValue("resolution", ui.resolution->currentIndex());
- 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-trackercontrols.ui b/ftnoir_tracker_ht/ht-trackercontrols.ui
index 6153637a..198cca7f 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>593</width>
- <height>280</height>
+ <width>527</width>
+ <height>144</height>
</rect>
</property>
<property name="sizePolicy">
@@ -28,420 +28,195 @@
<property name="windowTitle">
<string>HT tracker settings</string>
</property>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>141</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Horizontal FOV</string>
- </property>
- </widget>
- <widget class="QDoubleSpinBox" name="cameraFOV">
- <property name="geometry">
- <rect>
- <x>130</x>
- <y>10</y>
- <width>251</width>
- <height>22</height>
- </rect>
- </property>
- <property name="locale">
- <locale language="English" country="UnitedStates"/>
- </property>
- <property name="minimum">
- <double>35.000000000000000</double>
- </property>
- <property name="maximum">
- <double>180.000000000000000</double>
- </property>
- <property name="value">
- <double>52.000000000000000</double>
- </property>
- </widget>
- <widget class="QLabel" name="label_2">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>40</y>
- <width>137</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Frames per second</string>
- </property>
- </widget>
- <widget class="QComboBox" name="cameraFPS">
- <property name="geometry">
- <rect>
- <x>130</x>
- <y>40</y>
- <width>251</width>
- <height>22</height>
- </rect>
- </property>
- <item>
- <property name="text">
- <string notr="true">Default</string>
- </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="1">
+ <widget class="QDoubleSpinBox" name="cameraFOV">
+ <property name="locale">
+ <locale language="English" country="UnitedStates"/>
+ </property>
+ <property name="minimum">
+ <double>35.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>180.000000000000000</double>
+ </property>
+ <property name="value">
+ <double>52.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Horizontal FOV</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2" rowspan="3">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Enable axes</string>
+ </property>
+ <widget class="QCheckBox" name="rx">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>70</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>RX</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="ry">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>70</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>RY</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="rz">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>70</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>RZ</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="tx">
+ <property name="geometry">
+ <rect>
+ <x>60</x>
+ <y>20</y>
+ <width>70</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>TX</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="ty">
+ <property name="geometry">
+ <rect>
+ <x>60</x>
+ <y>40</y>
+ <width>70</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>TY</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="tz">
+ <property name="geometry">
+ <rect>
+ <x>60</x>
+ <y>60</y>
+ <width>70</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>TZ</string>
+ </property>
+ </widget>
+ </widget>
</item>
- <item>
- <property name="text">
- <string>30</string>
- </property>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Frames per second</string>
+ </property>
+ </widget>
</item>
- <item>
- <property name="text">
- <string>60</string>
- </property>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="cameraFPS">
+ <item>
+ <property name="text">
+ <string notr="true">Default</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>30</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>60</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>120</string>
+ </property>
+ </item>
+ </widget>
</item>
- <item>
- <property name="text">
- <string>120</string>
- </property>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Camera name</string>
+ </property>
+ </widget>
</item>
- </widget>
- <widget class="QLabel" name="label_3">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>70</y>
- <width>133</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Camera name</string>
- </property>
- </widget>
- <widget class="QPushButton" name="buttonOK">
- <property name="geometry">
- <rect>
- <x>430</x>
- <y>250</y>
- <width>75</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- <widget class="QPushButton" name="buttonCancel">
- <property name="geometry">
- <rect>
- <x>510</x>
- <y>250</y>
- <width>75</width>
- <height>23</height>
- </rect>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- <widget class="QGroupBox" name="groupBox">
- <property name="geometry">
- <rect>
- <x>390</x>
- <y>10</y>
- <width>101</width>
- <height>81</height>
- </rect>
- </property>
- <property name="title">
- <string>Enable axes</string>
- </property>
- <widget class="QCheckBox" name="rx">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>RX</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="ry">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>40</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>RY</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="rz">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>RZ</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="tx">
- <property name="geometry">
- <rect>
- <x>60</x>
- <y>20</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>TX</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="ty">
- <property name="geometry">
- <rect>
- <x>60</x>
- <y>40</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>TY</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="tz">
- <property name="geometry">
- <rect>
- <x>60</x>
- <y>60</y>
- <width>70</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>TZ</string>
- </property>
- </widget>
- </widget>
- <widget class="QComboBox" name="cameraName">
- <property name="geometry">
- <rect>
- <x>130</x>
- <y>70</y>
- <width>251</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="label_4">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>100</y>
- <width>128</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>Resolution</string>
- </property>
- </widget>
- <widget class="QComboBox" name="resolution">
- <property name="geometry">
- <rect>
- <x>130</x>
- <y>100</y>
- <width>251</width>
- <height>22</height>
- </rect>
- </property>
- <item>
- <property name="text">
- <string>640x480</string>
- </property>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="cameraName"/>
</item>
- <item>
- <property name="text">
- <string>320x240</string>
- </property>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Resolution</string>
+ </property>
+ </widget>
</item>
- <item>
- <property name="text">
- <string>320x200</string>
- </property>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="resolution">
+ <item>
+ <property name="text">
+ <string>640x480</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>320x240</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>320x200</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Default (not recommended!)</string>
+ </property>
+ </item>
+ </widget>
</item>
- <item>
- <property name="text">
- <string>Default (not recommended!)</string>
- </property>
+ <item row="4" column="2">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
</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>
+ </layout>
</widget>
<resources/>
<connections/>