summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-16 10:05:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-16 10:05:44 +0200
commitfab2afe75c7ab809d810ab6a7b263801a0dc1f1a (patch)
treef902dddd34d3610dc65702867f620085170f4d1e /facetracknoir
parente4e564d4b8c43986e925996aca8cf10c6b30136e (diff)
trackhat: more stubs
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/images/trackhat-cap.pngbin0 -> 50018 bytes
-rw-r--r--facetracknoir/images/trackhat-clip.pngbin0 -> 61942 bytes
-rw-r--r--facetracknoir/options-dialog.cpp24
-rw-r--r--facetracknoir/options-dialog.hpp2
-rw-r--r--facetracknoir/settings.ui447
-rw-r--r--facetracknoir/ui-res.qrc2
6 files changed, 343 insertions, 132 deletions
diff --git a/facetracknoir/images/trackhat-cap.png b/facetracknoir/images/trackhat-cap.png
new file mode 100644
index 00000000..7ce4bd1a
--- /dev/null
+++ b/facetracknoir/images/trackhat-cap.png
Binary files differ
diff --git a/facetracknoir/images/trackhat-clip.png b/facetracknoir/images/trackhat-clip.png
new file mode 100644
index 00000000..3320f831
--- /dev/null
+++ b/facetracknoir/images/trackhat-clip.png
Binary files differ
diff --git a/facetracknoir/options-dialog.cpp b/facetracknoir/options-dialog.cpp
index 4489e502..9afeba7c 100644
--- a/facetracknoir/options-dialog.cpp
+++ b/facetracknoir/options-dialog.cpp
@@ -35,13 +35,6 @@ OptionsDialog::OptionsDialog()
tie_setting(s.s_main.tcomp_p, ui.tcomp_enable);
tie_setting(s.s_main.tcomp_tz, ui.tcomp_rz);
- tie_setting(s.s_main.a_x.zero, ui.pos_tx);
- tie_setting(s.s_main.a_y.zero, ui.pos_ty);
- tie_setting(s.s_main.a_z.zero, ui.pos_tz);
- tie_setting(s.s_main.a_yaw.zero, ui.pos_rx);
- tie_setting(s.s_main.a_pitch.zero, ui.pos_ry);
- tie_setting(s.s_main.a_roll.zero, ui.pos_rz);
-
tie_setting(s.s_main.a_yaw.invert, ui.invert_yaw);
tie_setting(s.s_main.a_pitch.invert, ui.invert_pitch);
tie_setting(s.s_main.a_roll.invert, ui.invert_roll);
@@ -59,10 +52,26 @@ OptionsDialog::OptionsDialog()
tie_setting(s.s_main.camera_yaw, ui.camera_yaw);
tie_setting(s.s_main.camera_pitch, ui.camera_pitch);
tie_setting(s.s_main.camera_roll, ui.camera_roll);
+
+ tie_setting(pt.camera_mode, ui.camera_mode);
+
+ tie_setting(pt.threshold, ui.threshold_slider);
+
+ tie_setting(pt.min_point_size, ui.mindiam_spin);
+ tie_setting(pt.max_point_size, ui.maxdiam_spin);
+
+ tie_setting(pt.t_MH_x, ui.tx_spin);
+ tie_setting(pt.t_MH_y, ui.ty_spin);
+ tie_setting(pt.t_MH_z, ui.tz_spin);
+
+ tie_setting(pt.fov, ui.camera_fov);
+
+ tie_setting(pt.is_cap, ui.model_cap);
}
void OptionsDialog::doOK() {
s.b->save();
+ pt.b->save();
s.s_main.b->save();
ui.game_detector->save();
this->close();
@@ -71,6 +80,7 @@ void OptionsDialog::doOK() {
void OptionsDialog::doCancel() {
s.b->reload();
+ pt.b->reload();
s.s_main.b->reload();
ui.game_detector->revert();
close();
diff --git a/facetracknoir/options-dialog.hpp b/facetracknoir/options-dialog.hpp
index 71a3acda..33ae1810 100644
--- a/facetracknoir/options-dialog.hpp
+++ b/facetracknoir/options-dialog.hpp
@@ -4,6 +4,7 @@
#include <QWidget>
#include "ui_settings.h"
#include "opentrack/shortcuts.h"
+#include "ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h"
class OptionsDialog: public QWidget
{
@@ -15,6 +16,7 @@ public:
private:
Ui::UI_Settings ui;
Shortcuts::settings s;
+ settings_pt pt;
private slots:
void doOK();
void doCancel();
diff --git a/facetracknoir/settings.ui b/facetracknoir/settings.ui
index 34b15b47..240ed522 100644
--- a/facetracknoir/settings.ui
+++ b/facetracknoir/settings.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>348</width>
- <height>548</height>
+ <width>462</width>
+ <height>522</height>
</rect>
</property>
<property name="windowTitle">
@@ -296,7 +296,7 @@
<attribute name="title">
<string>Camera</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
@@ -404,201 +404,402 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_6">
+ <widget class="QGroupBox" name="groupBox_9">
<property name="title">
- <string>Center pose offset</string>
+ <string>Device</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_6">
- <item>
- <widget class="QLabel" name="label_22">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_25">
<property name="text">
- <string>Alter the centered position sent to games by a fixed amount.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
+ <string>Mode</string>
</property>
- <property name="margin">
- <number>2</number>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="camera_mode">
+ <item>
+ <property name="text">
+ <string>640x480, 75 Hz</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>640x480, 60 Hz</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>320x240, 189 Hz</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>320x240, 120 Hz</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Field of view</string>
</property>
</widget>
</item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="camera_fov">
+ <item>
+ <property name="text">
+ <string>56°</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>75°</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_6">
+ <property name="title">
+ <string>Point extraction</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QGroupBox" name="groupBox_7">
- <property name="styleSheet">
- <string notr="true">QGroupBox {
- border: 0;
-}</string>
- </property>
- <property name="title">
- <string/>
+ <widget class="QFrame" name="frame_2">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
</property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- <property name="checkable">
- <bool>false</bool>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
</property>
- <layout class="QGridLayout" name="gridLayout_3">
- <item row="2" column="1">
- <widget class="QDoubleSpinBox" name="pos_rz">
- <property name="suffix">
- <string> deg.</string>
+ <layout class="QGridLayout" name="gridLayout_10">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Threshold</string>
</property>
- <property name="decimals">
- <number>3</number>
+ <property name="buddy">
+ <cstring>threshold_slider</cstring>
</property>
- <property name="minimum">
- <double>-180.000000000000000</double>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSlider" name="threshold_slider">
+ <property name="toolTip">
+ <string>Intensity threshold for point extraction</string>
</property>
<property name="maximum">
- <double>180.000000000000000</double>
+ <number>255</number>
+ </property>
+ <property name="pageStep">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>127</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::TicksBothSides</enum>
+ </property>
+ <property name="tickInterval">
+ <number>25</number>
</property>
</widget>
</item>
- <item row="2" column="3">
- <widget class="QDoubleSpinBox" name="pos_tz">
- <property name="suffix">
- <string> cm</string>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_29">
+ <property name="text">
+ <string>Min size</string>
</property>
- <property name="decimals">
- <number>3</number>
+ <property name="buddy">
+ <cstring>mindiam_spin</cstring>
</property>
- <property name="minimum">
- <double>-100.000000000000000</double>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="mindiam_spin">
+ <property name="toolTip">
+ <string>Minimum point diameter</string>
+ </property>
+ <property name="suffix">
+ <string> px</string>
</property>
<property name="maximum">
- <double>100.000000000000000</double>
+ <number>1024</number>
</property>
</widget>
</item>
<item row="0" column="2">
- <widget class="QLabel" name="label_4">
+ <widget class="QLabel" name="label_22">
<property name="text">
- <string>TX</string>
+ <string>Max size</string>
+ </property>
+ <property name="buddy">
+ <cstring>maxdiam_spin</cstring>
</property>
</widget>
</item>
<item row="0" column="3">
- <widget class="QDoubleSpinBox" name="pos_tx">
- <property name="suffix">
- <string> cm</string>
- </property>
- <property name="decimals">
- <number>3</number>
+ <widget class="QSpinBox" name="maxdiam_spin">
+ <property name="toolTip">
+ <string>Maximum point diameter</string>
</property>
- <property name="minimum">
- <double>-100.000000000000000</double>
+ <property name="suffix">
+ <string> px</string>
</property>
<property name="maximum">
- <double>100.000000000000000</double>
+ <number>1024</number>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>RY</string>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_2">
+ <attribute name="title">
+ <string>Model</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_6">
+ <item>
+ <widget class="QGroupBox" name="groupBox_7">
+ <property name="styleSheet">
+ <string notr="true">QGroupBox { border: 0; }</string>
+ </property>
+ <property name="title">
+ <string/>
+ </property>
+ <widget class="QRadioButton" name="model_cap">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>82</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Cap</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" name="model_clip">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>140</y>
+ <width>82</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Clip</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_3">
+ <property name="geometry">
+ <rect>
+ <x>80</x>
+ <y>0</y>
+ <width>171</width>
+ <height>121</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="ui-res.qrc">:/images/trackhat-cap.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label_4">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>130</y>
+ <width>201</width>
+ <height>161</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="ui-res.qrc">:/images/trackhat-clip.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_10">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Model position</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_11">
+ <item row="0" column="0">
+ <widget class="QFrame" name="frame_3">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_12">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_61">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="label_5">
<property name="text">
- <string>TY</string>
+ <string>x:</string>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QDoubleSpinBox" name="pos_ry">
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="tx_spin">
<property name="suffix">
- <string> deg.</string>
- </property>
- <property name="decimals">
- <number>3</number>
+ <string> mm</string>
</property>
<property name="minimum">
- <double>-180.000000000000000</double>
+ <number>-65535</number>
</property>
<property name="maximum">
- <double>180.000000000000000</double>
+ <number>65536</number>
</property>
</widget>
</item>
- <item row="2" column="2">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>TZ</string>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_62">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_3">
<property name="text">
- <string>RZ</string>
+ <string>y:</string>
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QDoubleSpinBox" name="pos_ty">
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="ty_spin">
<property name="suffix">
- <string> cm</string>
- </property>
- <property name="decimals">
- <number>3</number>
+ <string> mm</string>
</property>
<property name="minimum">
- <double>-100.000000000000000</double>
+ <number>-65535</number>
</property>
<property name="maximum">
- <double>100.000000000000000</double>
+ <number>65536</number>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_2">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_66">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>RX</string>
+ <string>z:</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QDoubleSpinBox" name="pos_rx">
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="tz_spin">
<property name="suffix">
- <string> deg.</string>
- </property>
- <property name="decimals">
- <number>3</number>
+ <string> mm</string>
</property>
<property name="minimum">
- <double>-180.000000000000000</double>
+ <number>-65535</number>
</property>
<property name="maximum">
- <double>180.000000000000000</double>
+ <number>65536</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_59">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Only pitch and yaw during calibration.&lt;/p&gt;&lt;p&gt;Don't roll and don't translate.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QPushButton" name="tcalib_button">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Toggle calibration</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
@@ -1170,12 +1371,6 @@
<tabstop>camera_yaw</tabstop>
<tabstop>camera_pitch</tabstop>
<tabstop>camera_roll</tabstop>
- <tabstop>pos_rx</tabstop>
- <tabstop>pos_ry</tabstop>
- <tabstop>pos_rz</tabstop>
- <tabstop>pos_tx</tabstop>
- <tabstop>pos_ty</tabstop>
- <tabstop>pos_tz</tabstop>
<tabstop>tcomp_enable</tabstop>
<tabstop>tcomp_rz</tabstop>
<tabstop>src_yaw</tabstop>
@@ -1191,7 +1386,9 @@
<tabstop>src_z</tabstop>
<tabstop>invert_z</tabstop>
</tabstops>
- <resources/>
+ <resources>
+ <include location="ui-res.qrc"/>
+ </resources>
<connections/>
<slots>
<slot>startEngineClicked()</slot>
diff --git a/facetracknoir/ui-res.qrc b/facetracknoir/ui-res.qrc
index 030a6153..b251ab8f 100644
--- a/facetracknoir/ui-res.qrc
+++ b/facetracknoir/ui-res.qrc
@@ -6,5 +6,7 @@
<file>images/facetracknoir.png</file>
<file>images/no-feed.png</file>
<file>images/filter-16.png</file>
+ <file>images/trackhat-cap.png</file>
+ <file>images/trackhat-clip.png</file>
</qresource>
</RCC>