summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compat/camera-names.cpp4
-rw-r--r--gui/images/THgriddy.pngbin0 -> 49826 bytes
-rw-r--r--gui/images/griddyNoLogo.pngbin0 -> 29026 bytes
-rw-r--r--gui/images/griddyNoLogoWhite.pngbin0 -> 28763 bytes
-rw-r--r--gui/images/griddyWhite.pngbin0 -> 49577 bytes
-rw-r--r--gui/images/newcogicon.pngbin0 -> 8662 bytes
-rw-r--r--gui/images/newmapicon.pngbin0 -> 6543 bytes
-rw-r--r--gui/images/newsetticon.pngbin0 -> 24315 bytes
-rw-r--r--gui/images/opentrack.pngbin20633 -> 13717 bytes
-rw-r--r--gui/images/trackingshape.pngbin0 -> 172818 bytes
-rw-r--r--gui/init.cpp5
-rw-r--r--gui/opentrack-res.qrc24
-rw-r--r--installer/opentrack-installer.iss10
-rw-r--r--opentrack/defs.hpp17
-rw-r--r--opentrack/lang/nl_NL.ts41
-rw-r--r--opentrack/lang/ru_RU.ts75
-rw-r--r--opentrack/lang/stub.ts41
-rw-r--r--opentrack/lang/zh_CN.ts53
-rw-r--r--opentrack/main-window.hpp7
-rw-r--r--opentrack/main-window.ui1222
-rw-r--r--opentrack/opentrack.icobin67134 -> 3758 bytes
-rw-r--r--opentrack/software-update-dialog.cpp66
-rw-r--r--opentrack/software-update-dialog.hpp34
-rw-r--r--opentrack/software-update.ui118
-rw-r--r--pose-widget/images/grid-dark.pngbin0 -> 26862 bytes
-rw-r--r--pose-widget/images/grid-light.pngbin0 -> 29026 bytes
-rw-r--r--pose-widget/images/side1.pngbin35513 -> 172818 bytes
-rw-r--r--pose-widget/images/side6.pngbin35720 -> 172693 bytes
-rw-r--r--pose-widget/pose-widget.cpp20
-rw-r--r--pose-widget/pose-widget.hpp3
-rw-r--r--pose-widget/posewidget.qrc2
-rw-r--r--proto-ft/ftnoir_protocol_ft.h2
-rw-r--r--proto-ft/lang/nl_NL.ts2
-rw-r--r--proto-ft/lang/ru_RU.ts2
-rw-r--r--proto-ft/lang/stub.ts2
-rw-r--r--proto-ft/lang/zh_CN.ts2
-rw-r--r--todo.md22
-rw-r--r--tracker-neuralnet/ftnoir_tracker_neuralnet.h6
-rw-r--r--tracker-neuralnet/lang/nl_NL.ts46
-rw-r--r--tracker-neuralnet/lang/stub.ts46
-rw-r--r--tracker-neuralnet/lang/zh_CN.ts46
-rw-r--r--tracker-neuralnet/models/head-pose.onnxbin13047683 -> 18370187 bytes
-rw-r--r--tracker-neuralnet/neuralnet-trackercontrols.ui840
-rw-r--r--variant/default/_variant.cmake8
-rw-r--r--video-opencv/impl-camera.cpp33
-rw-r--r--video-opencv/impl.hpp5
-rw-r--r--video-opencv/settings.hpp13
47 files changed, 1050 insertions, 1767 deletions
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp
index b9511037..5813990d 100644
--- a/compat/camera-names.cpp
+++ b/compat/camera-names.cpp
@@ -103,8 +103,8 @@ std::vector<std::tuple<QString, int>> get_camera_names()
{
QString str = prop_to_qstring(pPropBag, L"FriendlyName");
QString path = device_path_from_qstring(prop_to_qstring(pPropBag, L"DevicePath"));
- if (!path.isNull())
- str += QStringLiteral(" [%1]").arg(path);
+ //if (!path.isNull())
+ // str += QStringLiteral(" [%1]").arg(path);
ret.push_back({ str, (int)ret.size() });
}
pPropBag->Release();
diff --git a/gui/images/THgriddy.png b/gui/images/THgriddy.png
new file mode 100644
index 00000000..c69ae632
--- /dev/null
+++ b/gui/images/THgriddy.png
Binary files differ
diff --git a/gui/images/griddyNoLogo.png b/gui/images/griddyNoLogo.png
new file mode 100644
index 00000000..83b844c0
--- /dev/null
+++ b/gui/images/griddyNoLogo.png
Binary files differ
diff --git a/gui/images/griddyNoLogoWhite.png b/gui/images/griddyNoLogoWhite.png
new file mode 100644
index 00000000..897e478f
--- /dev/null
+++ b/gui/images/griddyNoLogoWhite.png
Binary files differ
diff --git a/gui/images/griddyWhite.png b/gui/images/griddyWhite.png
new file mode 100644
index 00000000..6cf4aea1
--- /dev/null
+++ b/gui/images/griddyWhite.png
Binary files differ
diff --git a/gui/images/newcogicon.png b/gui/images/newcogicon.png
new file mode 100644
index 00000000..f8da1a69
--- /dev/null
+++ b/gui/images/newcogicon.png
Binary files differ
diff --git a/gui/images/newmapicon.png b/gui/images/newmapicon.png
new file mode 100644
index 00000000..52163e69
--- /dev/null
+++ b/gui/images/newmapicon.png
Binary files differ
diff --git a/gui/images/newsetticon.png b/gui/images/newsetticon.png
new file mode 100644
index 00000000..935c1143
--- /dev/null
+++ b/gui/images/newsetticon.png
Binary files differ
diff --git a/gui/images/opentrack.png b/gui/images/opentrack.png
index 39359782..48cbe812 100644
--- a/gui/images/opentrack.png
+++ b/gui/images/opentrack.png
Binary files differ
diff --git a/gui/images/trackingshape.png b/gui/images/trackingshape.png
new file mode 100644
index 00000000..f8e5f26a
--- /dev/null
+++ b/gui/images/trackingshape.png
Binary files differ
diff --git a/gui/init.cpp b/gui/init.cpp
index b54a085e..431ad04c 100644
--- a/gui/init.cpp
+++ b/gui/init.cpp
@@ -37,6 +37,9 @@ using namespace options;
extern "C" __declspec(dllimport) unsigned __cdecl _controlfp(unsigned, unsigned);
#endif
+extern "C" OTR_GENERIC_EXPORT bool opentrack_using_dark_theme;
+bool opentrack_using_dark_theme = false;
+
static void set_fp_mask()
{
#if defined OTR_ARCH_DENORM_DAZ
@@ -188,6 +191,7 @@ static void apply_dark_windows_theme_if_needed()
qApp->setPalette(darkPalette);
qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }");
+ opentrack_using_dark_theme = true;
}
}
@@ -345,4 +349,3 @@ int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> co
return ret;
}
-
diff --git a/gui/opentrack-res.qrc b/gui/opentrack-res.qrc
index b4d7b4a5..987c7c55 100644
--- a/gui/opentrack-res.qrc
+++ b/gui/opentrack-res.qrc
@@ -1,12 +1,16 @@
<RCC>
- <qresource prefix="/">
- <file>images/tools.png</file>
- <file>images/settings16.png</file>
- <file>images/curves.png</file>
- <file>images/opentrack.png</file>
- <file>images/no-feed.png</file>
- <file>images/filter-16.png</file>
- <file>images/tracking-not-started.png</file>
- <file>images/english.png</file>
- </qresource>
+ <qresource prefix="/">
+ <file>images/newcogicon.png</file>
+ <file>images/newmapicon.png</file>
+ <file>images/newsetticon.png</file>
+ <file>images/THgriddy.png</file>
+ <file>images/tools.png</file>
+ <file>images/settings16.png</file>
+ <file>images/curves.png</file>
+ <file>images/opentrack.png</file>
+ <file>images/no-feed.png</file>
+ <file>images/filter-16.png</file>
+ <file>images/tracking-not-started.png</file>
+ <file>images/english.png</file>
+ </qresource>
</RCC>
diff --git a/installer/opentrack-installer.iss b/installer/opentrack-installer.iss
index 7bb5ced1..01478557 100644
--- a/installer/opentrack-installer.iss
+++ b/installer/opentrack-installer.iss
@@ -2,17 +2,17 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#include "../build/opentrack-version.hxx"
-#define MyAppName "opentrack"
+#define MyAppName "TrackHat opentrack v3"
#define MyAppVersion OPENTRACK_VERSION
-#define MyAppPublisher "opentrack"
-#define MyAppURL "http://github.com/opentrack/opentrack"
+#define MyAppPublisher "TrackHat"
+#define MyAppURL "https://www.trackhat.org/trackhat-opentrack"
#define MyAppExeName "opentrack.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
-AppId={{63F53541-A29E-4B53-825A-9B6F876A2BD6}
+AppId={{B12AD35E-8D24-4BC3-8F9B-72A19BD41326}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
@@ -49,6 +49,6 @@ Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
-Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}";
+Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}";
[Code]
diff --git a/opentrack/defs.hpp b/opentrack/defs.hpp
index b2f0c467..f7ccc197 100644
--- a/opentrack/defs.hpp
+++ b/opentrack/defs.hpp
@@ -1,16 +1,17 @@
#pragma once
-//#define UI_FORCED_TRACKER "pt"
-//#define UI_FORCED_FILTER "accela"
+#define UI_FORCED_TRACKER "neuralnet"
+#define UI_FORCED_FILTER "accela"
-//#define UI_NO_TRACKER_COMBOBOX
-//#define UI_NO_FILTER_COMBOBOX
+#define UI_NO_TRACKER_COMBOBOX
+#define UI_NO_FILTER_COMBOBOX
-//#define UI_NO_TRACKER_SETTINGS_BUTTON
-//#define UI_NO_FILTER_SETTINGS_BUTTON
+#define UI_NO_TRACKER_SETTINGS_BUTTON
+#define UI_NO_FILTER_SETTINGS_BUTTON
-//#define UI_NO_RAW_DATA
-//#define UI_NO_GAME_DATA
+#define UI_NO_RAW_DATA
+#define UI_NO_GAME_DATA
//#define UI_NO_VIDEO_FEED
+#define UI_COMPACT_VIDEO_FEED
//define UI_ACCELA_OLD_STAIRCASE
diff --git a/opentrack/lang/nl_NL.ts b/opentrack/lang/nl_NL.ts
index 7a465820..aad3532b 100644
--- a/opentrack/lang/nl_NL.ts
+++ b/opentrack/lang/nl_NL.ts
@@ -13,39 +13,34 @@
</message>
</context>
<context>
- <name>main_window</name>
- <message>
- <source>Raw tracker data</source>
- <translation type="unfinished"></translation>
- </message>
+ <name>UpdateDialog</name>
<message>
- <source>Z</source>
+ <source>Dialog</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Pitch</source>
+ <source>Software update released</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Y</source>
+ <source>Current version:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>X</source>
+ <source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Roll</source>
+ <source>Released version:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Yaw</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Game data</source>
+ <source>Don&apos;t remind me again about this version</source>
<translation type="unfinished"></translation>
</message>
+</context>
+<context>
+ <name>main_window</name>
<message>
<source>Profile</source>
<translation type="unfinished"></translation>
@@ -71,22 +66,10 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Input</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>🔨</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Output</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Filter</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Running as root is bad</source>
<translation type="unfinished"></translation>
</message>
@@ -174,6 +157,10 @@ Exiting now.</source>
<source>Don&apos;t run as root to remove these annoying messages.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Preview</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>new_file_dialog</name>
diff --git a/opentrack/lang/ru_RU.ts b/opentrack/lang/ru_RU.ts
index 684a8212..3a0cad0d 100644
--- a/opentrack/lang/ru_RU.ts
+++ b/opentrack/lang/ru_RU.ts
@@ -13,6 +13,33 @@
</message>
</context>
<context>
+ <name>UpdateDialog</name>
+ <message>
+ <source>Dialog</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Software update released</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Current version:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>TextLabel</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Released version:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Don&apos;t remind me again about this version</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>main_window</name>
<message>
<source>Create new empty config</source>
@@ -87,38 +114,6 @@ Exiting now.</source>
<translation> :: </translation>
</message>
<message>
- <source>Raw tracker data</source>
- <translation>Исходные данные</translation>
- </message>
- <message>
- <source>Z</source>
- <translation>Z</translation>
- </message>
- <message>
- <source>Pitch</source>
- <translation>Pitch</translation>
- </message>
- <message>
- <source>Y</source>
- <translation>Y</translation>
- </message>
- <message>
- <source>X</source>
- <translation>X</translation>
- </message>
- <message>
- <source>Roll</source>
- <translation>Roll</translation>
- </message>
- <message>
- <source>Yaw</source>
- <translation>Yaw</translation>
- </message>
- <message>
- <source>Game data</source>
- <translation>Игровые данные</translation>
- </message>
- <message>
<source>Profile</source>
<translation>Профиль</translation>
</message>
@@ -139,22 +134,10 @@ Exiting now.</source>
<translation>Остановить</translation>
</message>
<message>
- <source>Input</source>
- <translation>Источник данных</translation>
- </message>
- <message>
- <source>🔨</source>
- <translation></translation>
- </message>
- <message>
<source>Output</source>
<translation>Выходной интерфейс</translation>
</message>
<message>
- <source>Filter</source>
- <translation>Фильтрация/сглаживание</translation>
- </message>
- <message>
<source>Running as root is bad</source>
<translation type="unfinished"></translation>
</message>
@@ -178,6 +161,10 @@ Exiting now.</source>
<source>Don&apos;t run as root to remove these annoying messages.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Preview</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>new_file_dialog</name>
diff --git a/opentrack/lang/stub.ts b/opentrack/lang/stub.ts
index 04555dd0..de72e075 100644
--- a/opentrack/lang/stub.ts
+++ b/opentrack/lang/stub.ts
@@ -13,39 +13,34 @@
</message>
</context>
<context>
- <name>main_window</name>
- <message>
- <source>Raw tracker data</source>
- <translation type="unfinished"></translation>
- </message>
+ <name>UpdateDialog</name>
<message>
- <source>Z</source>
+ <source>Dialog</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Pitch</source>
+ <source>Software update released</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Y</source>
+ <source>Current version:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>X</source>
+ <source>TextLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Roll</source>
+ <source>Released version:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Yaw</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Game data</source>
+ <source>Don&apos;t remind me again about this version</source>
<translation type="unfinished"></translation>
</message>
+</context>
+<context>
+ <name>main_window</name>
<message>
<source>Profile</source>
<translation type="unfinished"></translation>
@@ -71,22 +66,10 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Input</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>🔨</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Output</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Filter</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Running as root is bad</source>
<translation type="unfinished"></translation>
</message>
@@ -174,6 +157,10 @@ Exiting now.</source>
<source>Don&apos;t run as root to remove these annoying messages.</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>Preview</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>new_file_dialog</name>
diff --git a/opentrack/lang/zh_CN.ts b/opentrack/lang/zh_CN.ts
index 15609d70..bdd69ff8 100644
--- a/opentrack/lang/zh_CN.ts
+++ b/opentrack/lang/zh_CN.ts
@@ -13,39 +13,34 @@
</message>
</context>
<context>
- <name>main_window</name>
- <message>
- <source>Raw tracker data</source>
- <translation>跟踪器原始数据</translation>
- </message>
- <message>
- <source>Z</source>
- <translation></translation>
- </message>
+ <name>UpdateDialog</name>
<message>
- <source>Pitch</source>
- <translation>仰俯</translation>
+ <source>Dialog</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <source>Y</source>
- <translation></translation>
+ <source>Software update released</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <source>X</source>
- <translation></translation>
+ <source>Current version:</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <source>Roll</source>
- <translation>横滚</translation>
+ <source>TextLabel</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <source>Yaw</source>
- <translation>偏航</translation>
+ <source>Released version:</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <source>Game data</source>
- <translation>游戏得到的数据</translation>
+ <source>Don&apos;t remind me again about this version</source>
+ <translation type="unfinished"></translation>
</message>
+</context>
+<context>
+ <name>main_window</name>
<message>
<source>Profile</source>
<translation>配置文件</translation>
@@ -71,22 +66,10 @@
<translation>停止</translation>
</message>
<message>
- <source>Input</source>
- <translation>输入</translation>
- </message>
- <message>
- <source>🔨</source>
- <translation></translation>
- </message>
- <message>
<source>Output</source>
<translation>输出</translation>
</message>
<message>
- <source>Filter</source>
- <translation>过滤器</translation>
- </message>
- <message>
<source>Running as root is bad</source>
<translation>以管理员运行不是什么好主意</translation>
</message>
@@ -178,6 +161,10 @@ Exiting now.</source>
<source> :: </source>
<translation></translation>
</message>
+ <message>
+ <source>Preview</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>new_file_dialog</name>
diff --git a/opentrack/main-window.hpp b/opentrack/main-window.hpp
index 1dcbd0eb..c0724a35 100644
--- a/opentrack/main-window.hpp
+++ b/opentrack/main-window.hpp
@@ -35,6 +35,8 @@
#include "ui_main-window.h"
+class update_query;
+
class main_window final : public QMainWindow, private State
{
Q_DECLARE_TR_FUNCTIONS(main_window)
@@ -84,6 +86,8 @@ class main_window final : public QMainWindow, private State
qt_signal<void> toggle_tracker { this, &main_window::toggle_tracker_, Qt::QueuedConnection };
qt_signal<void> restart_tracker { this, &main_window::restart_tracker_, Qt::QueuedConnection };
+ std::unique_ptr<update_query> updater;
+
public:
void init_dylibs();
void init_tray_menu();
@@ -118,6 +122,9 @@ public:
void show_pose();
void show_pose_(const double* mapped, const double* raw);
void set_title(const QString& game_title = QString());
+#ifdef UI_COMPACT_VIDEO_FEED
+ void toggle_video_preview(bool value);
+#endif
void start_tracker_();
void stop_tracker_();
diff --git a/opentrack/main-window.ui b/opentrack/main-window.ui
index 32c9f57a..2452acd1 100644
--- a/opentrack/main-window.ui
+++ b/opentrack/main-window.ui
@@ -7,8 +7,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>655</width>
- <height>502</height>
+ <width>320</width>
+ <height>416</height>
</rect>
</property>
<property name="sizePolicy">
@@ -17,12 +17,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>500</height>
- </size>
- </property>
<property name="windowIcon">
<iconset resource="../gui/opentrack-res.qrc">
<normaloff>:/images/opentrack.png</normaloff>:/images/opentrack.png</iconset>
@@ -38,7 +32,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <layout class="QGridLayout" name="gridLayout_2">
+ <layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
@@ -46,13 +40,13 @@
<number>0</number>
</property>
<property name="rightMargin">
- <number>9</number>
+ <number>0</number>
</property>
<property name="bottomMargin">
- <number>9</number>
+ <number>0</number>
</property>
- <item row="0" column="0">
- <widget class="QFrame" name="video_feed">
+ <item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
+ <widget class="QWidget" name="frame_parent" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -65,16 +59,7 @@
<height>240</height>
</size>
</property>
- <property name="maximumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <widget class="QFrame" name="video_frame">
+ <widget class="pose_widget" name="pose_display" native="true">
<property name="geometry">
<rect>
<x>0</x>
@@ -89,19 +74,29 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
+ </widget>
+ <widget class="QWidget" name="video_frame_parent" native="true">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
<width>320</width>
<height>240</height>
- </size>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="minimumSize">
<size>
<width>320</width>
<height>240</height>
</size>
</property>
- <widget class="QLabel" name="video_frame_label">
+ <widget class="QFrame" name="video_frame">
<property name="geometry">
<rect>
<x>0</x>
@@ -116,884 +111,246 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <property name="font">
- <font>
- <family>Candara</family>
- <pointsize>37</pointsize>
- <weight>50</weight>
- <bold>false</bold>
- <kerning>true</kerning>
- </font>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../gui/opentrack-res.qrc">:/images/tracking-not-started.png</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
</property>
</widget>
</widget>
+ <widget class="QCheckBox" name="preview_checkbox">
+ <property name="geometry">
+ <rect>
+ <x>250</x>
+ <y>220</y>
+ <width>67</width>
+ <height>18</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Preview</string>
+ </property>
+ </widget>
+ <zorder>video_frame_parent</zorder>
+ <zorder>pose_display</zorder>
+ <zorder>preview_checkbox</zorder>
</widget>
</item>
- <item row="0" column="1">
- <widget class="pose_widget" name="pose_display" native="true">
+ <item>
+ <widget class="QWidget" name="widget" native="true">
<property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QGroupBox" name="box_raw_headpose">
- <property name="minimumSize">
- <size>
- <width>316</width>
- <height>0</height>
- </size>
- </property>
- <property name="title">
- <string>Raw tracker data</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_12">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
+ <layout class="QGridLayout" name="gridLayout">
<property name="bottomMargin">
<number>0</number>
</property>
- <property name="spacing">
- <number>0</number>
+ <property name="horizontalSpacing">
+ <number>9</number>
</property>
- <item row="0" column="3">
- <widget class="QLCDNumber" name="raw_yaw">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblZ_4">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="lblRotY_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLCDNumber" name="raw_pitch">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
<item row="1" column="0">
- <widget class="QLabel" name="lblY_4">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="lblX_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLCDNumber" name="raw_x">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="lblRotZ_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="lblRotX_4">
+ <widget class="QPushButton" name="btnShortcuts">
<property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
<property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLCDNumber" name="raw_y">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLCDNumber" name="raw_roll">
- <property name="enabled">
- <bool>true</bool>
+ <string>Options</string>
</property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLCDNumber" name="raw_z">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QGroupBox" name="box_mapped_headpose">
- <property name="minimumSize">
- <size>
- <width>316</width>
- <height>0</height>
- </size>
- </property>
- <property name="title">
- <string>Game data</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_14">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>0</number>
- </property>
- <item row="1" column="3">
- <widget class="QLCDNumber" name="pose_pitch">
- <property name="enabled">
- <bool>true</bool>
+ <property name="icon">
+ <iconset resource="../gui/opentrack-res.qrc">
+ <normaloff>:/images/newcogicon.png</normaloff>:/images/newcogicon.png</iconset>
</property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLCDNumber" name="pose_yaw">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLCDNumber" name="pose_z">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
+ <property name="iconSize">
+ <size>
+ <width>80</width>
+ <height>24</height>
+ </size>
</property>
</widget>
</item>
<item row="0" column="0">
- <widget class="QLabel" name="lblx">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lblY_2">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLCDNumber" name="pose_x">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="lblRotY_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="lblRotZ_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="lblRotX_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblZ_2">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLCDNumber" name="pose_y">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLCDNumber" name="pose_roll">
- <property name="enabled">
- <bool>true</bool>
- </property>
+ <widget class="QGroupBox" name="groupProto">
<property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="font">
- <font>
- <stylestrategy>NoAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QWidget" name="groupControls" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>4</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>315</width>
- <height>0</height>
- </size>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>4</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QWidget" name="groupProfile" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="title">
+ <string>Output</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
- <property name="spacing">
- <number>0</number>
- </property>
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
- <number>0</number>
+ <number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
- <number>0</number>
+ <number>6</number>
</property>
<item>
- <widget class="QToolButton" name="profile_button">
- <property name="enabled">
- <bool>true</bool>
- </property>
+ <widget class="QComboBox" name="iconcomboProtocol">
<property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="text">
- <string>Profile</string>
- </property>
- <property name="popupMode">
- <enum>QToolButton::InstantPopup</enum>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
+ <enum>Qt::TabFocus</enum>
</property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- <property name="arrowType">
- <enum>Qt::DownArrow</enum>
+ <property name="sizeAdjustPolicy">
+ <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
<item>
- <widget class="QComboBox" name="iconcomboProfile">
+ <widget class="QToolButton" name="btnShowServerControls">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>245</width>
- <height>0</height>
- </size>
+ <property name="font">
+ <font>
+ <family>DejaVu Sans</family>
+ <stylestrategy>PreferAntialias</stylestrategy>
+ <kerning>false</kerning>
+ </font>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
- <property name="maxVisibleItems">
- <number>20</number>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset resource="../gui/opentrack-res.qrc">
+ <normaloff>:/images/newsetticon.png</normaloff>:/images/newsetticon.png</iconset>
+ </property>
+ <property name="flat" stdset="0">
+ <bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
- <item>
- <widget class="QWidget" name="groupOptions" native="true">
- <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="groupProfile">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Profile</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>4</number>
</property>
<property name="topMargin">
- <number>0</number>
+ <number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
- <number>0</number>
+ <number>6</number>
</property>
<item>
- <widget class="QPushButton" name="btnShortcuts">
+ <widget class="QToolButton" name="profile_button">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
<property name="text">
- <string>Options</string>
+ <string/>
</property>
- <property name="icon">
- <iconset resource="../gui/opentrack-res.qrc">
- <normaloff>:/images/tools.png</normaloff>:/images/tools.png</iconset>
+ <property name="popupMode">
+ <enum>QToolButton::InstantPopup</enum>
</property>
- <property name="iconSize">
- <size>
- <width>80</width>
- <height>24</height>
- </size>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonIconOnly</enum>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ <property name="arrowType">
+ <enum>Qt::DownArrow</enum>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="btnEditCurves">
+ <widget class="QComboBox" name="iconcomboProfile">
<property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
- <horstretch>0</horstretch>
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
+ <horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text">
- <string>Mapping</string>
- </property>
- <property name="icon">
- <iconset resource="../gui/opentrack-res.qrc">
- <normaloff>:/images/curves.png</normaloff>:/images/curves.png</iconset>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
</property>
- <property name="iconSize">
- <size>
- <width>80</width>
- <height>24</height>
- </size>
+ <property name="maxVisibleItems">
+ <number>20</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
+ <item row="1" column="1">
+ <widget class="QPushButton" name="btnEditCurves">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Mapping</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../gui/opentrack-res.qrc">
+ <normaloff>:/images/newmapicon.png</normaloff>:/images/newmapicon.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>80</width>
+ <height>24</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" name="widget_2" native="true">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="groupStartStop">
<property name="sizePolicy">
@@ -1002,16 +359,10 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
<property name="title">
<string>Tracking</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>7</number>
</property>
@@ -1019,13 +370,13 @@
<number>4</number>
</property>
<property name="topMargin">
- <number>4</number>
+ <number>3</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
- <number>4</number>
+ <number>0</number>
</property>
<item>
<widget class="QToolButton" name="btnStartTracker">
@@ -1086,246 +437,6 @@
</layout>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QWidget" name="modules" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>310</width>
- <height>0</height>
- </size>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="spacing">
- <number>4</number>
- </property>
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QGroupBox" name="groupTracker">
- <property name="title">
- <string>Input</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>4</number>
- </property>
- <property name="rightMargin">
- <number>4</number>
- </property>
- <property name="bottomMargin">
- <number>4</number>
- </property>
- <property name="horizontalSpacing">
- <number>6</number>
- </property>
- <property name="verticalSpacing">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QComboBox" name="iconcomboTrackerSource">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::TabFocus</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="btnShowEngineControls">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <family>DejaVu Sans</family>
- <stylestrategy>PreferAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="focusPolicy">
- <enum>Qt::ClickFocus</enum>
- </property>
- <property name="text">
- <string>🔨</string>
- </property>
- <property name="flat" stdset="0">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupProto">
- <property name="title">
- <string>Output</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_4">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>4</number>
- </property>
- <property name="rightMargin">
- <number>4</number>
- </property>
- <property name="bottomMargin">
- <number>4</number>
- </property>
- <property name="horizontalSpacing">
- <number>6</number>
- </property>
- <property name="verticalSpacing">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QComboBox" name="iconcomboProtocol">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::TabFocus</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="btnShowServerControls">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <family>DejaVu Sans</family>
- <stylestrategy>PreferAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="focusPolicy">
- <enum>Qt::ClickFocus</enum>
- </property>
- <property name="text">
- <string>🔨</string>
- </property>
- <property name="flat" stdset="0">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupFilter">
- <property name="title">
- <string>Filter</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_3">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>4</number>
- </property>
- <property name="rightMargin">
- <number>4</number>
- </property>
- <property name="bottomMargin">
- <number>4</number>
- </property>
- <property name="horizontalSpacing">
- <number>6</number>
- </property>
- <property name="verticalSpacing">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QComboBox" name="iconcomboFilter">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::TabFocus</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="btnShowFilterControls">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <family>DejaVu Sans</family>
- <stylestrategy>PreferAntialias</stylestrategy>
- <kerning>false</kerning>
- </font>
- </property>
- <property name="focusPolicy">
- <enum>Qt::ClickFocus</enum>
- </property>
- <property name="text">
- <string>🔨</string>
- </property>
- <property name="flat" stdset="0">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
</layout>
</widget>
</widget>
@@ -1336,6 +447,17 @@
<header>pose-widget/pose-widget.hpp</header>
</customwidget>
</customwidgets>
+ <tabstops>
+ <tabstop>btnStartTracker</tabstop>
+ <tabstop>btnStopTracker</tabstop>
+ <tabstop>btnShortcuts</tabstop>
+ <tabstop>btnEditCurves</tabstop>
+ <tabstop>iconcomboProtocol</tabstop>
+ <tabstop>btnShowServerControls</tabstop>
+ <tabstop>profile_button</tabstop>
+ <tabstop>iconcomboProfile</tabstop>
+ <tabstop>preview_checkbox</tabstop>
+ </tabstops>
<resources>
<include location="../gui/opentrack-res.qrc"/>
</resources>
diff --git a/opentrack/opentrack.ico b/opentrack/opentrack.ico
index 5cac8da1..b5f34db3 100644
--- a/opentrack/opentrack.ico
+++ b/opentrack/opentrack.ico
Binary files differ
diff --git a/opentrack/software-update-dialog.cpp b/opentrack/software-update-dialog.cpp
new file mode 100644
index 00000000..778814c3
--- /dev/null
+++ b/opentrack/software-update-dialog.cpp
@@ -0,0 +1,66 @@
+#include "software-update-dialog.hpp"
+#include "opentrack-org.hxx"
+
+update_dialog::update_dialog(QWidget* parent, update_query& q, const QString& new_version)
+ : QDialog(parent), q(q)
+{
+ ui.setupUi(this);
+ ui.ver_current->setText(const_cast<const char*>(opentrack_version));
+ ui.ver_new->setTextFormat(Qt::RichText);
+ ui.ver_new->setText("<a href='https://www.trackhat.org/trackhat-opentrack'>" + new_version + "</a>");
+ ui.ver_new->setOpenExternalLinks(true);
+ connect(ui.buttonBox, &QDialogButtonBox::clicked, this, &update_dialog::close);
+}
+
+void update_query::on_finished()
+{
+ if (!t.isActive())
+ return;
+ t.stop();
+ if (r->error() != QNetworkReply::NoError)
+ {
+ qDebug() << "updater: error" << r->error() << r->errorString();
+ return;
+ }
+ QString str(buf);
+ QRegExp re("SOFTWARE-UPDATE-V3: ([a-zA-Z0-9_.-+]+)");
+ int idx = re.indexIn(str);
+ if (idx != -1)
+ {
+ str = re.cap(1);
+ QSettings s(OPENTRACK_ORG);
+ QString quiet_version = s.value("quiet-update-version").toString();
+
+ if (!str.isEmpty() && str != opentrack_version && str != quiet_version)
+ {
+ qDebug() << "updater: new version" << str;
+ update_dialog dlg(qobject_cast<QWidget*>(parent()), *this, str);
+ dlg.show();
+ dlg.raise();
+ dlg.exec();
+ if (dlg.ui.disable_reminder->isChecked())
+ s.setValue("quiet-update-version", str);
+ }
+ }
+ else
+ {
+ if (buf.isEmpty())
+ qDebug() << "updater: empty response";
+ else
+ qDebug() << "updater: can't parse response";
+ }
+ buf.clear();
+ r->deleteLater();
+}
+
+void update_query::maybe_show_dialog()
+{
+ t.stop();
+ t.setSingleShot(true);
+ t.start(1000 * 10);
+
+ r = qnam.get(QNetworkRequest(QStringLiteral("https://www.trackhat.org/thotv3-version")));
+
+ QObject::connect(r, &QIODevice::readyRead, this, &update_query::on_ready);
+ QObject::connect(r, &QNetworkReply::finished, this, &update_query::on_finished);
+}
diff --git a/opentrack/software-update-dialog.hpp b/opentrack/software-update-dialog.hpp
new file mode 100644
index 00000000..1e150e62
--- /dev/null
+++ b/opentrack/software-update-dialog.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <QtNetwork>
+#include <QDialog>
+#include <QTimer>
+#include "ui_software-update.h"
+
+extern "C" const char* const opentrack_version;
+
+class update_query final : public QObject
+{
+ Q_OBJECT
+public:
+ explicit update_query(QWidget* parent) : QObject{parent} {}
+
+ QNetworkReply* r = nullptr;
+ QNetworkAccessManager qnam{this};
+ QByteArray buf;
+ QTimer t{this};
+
+ void on_finished();
+ void on_ready() { buf.append(r->readAll()); }
+ void maybe_show_dialog();
+};
+
+class update_dialog : QDialog
+{
+ Q_OBJECT
+ friend class update_query;
+private:
+ Ui::UpdateDialog ui;
+ update_query& q;
+ update_dialog(QWidget* parent, update_query& q, const QString& new_version);
+};
diff --git a/opentrack/software-update.ui b/opentrack/software-update.ui
new file mode 100644
index 00000000..07edf66c
--- /dev/null
+++ b/opentrack/software-update.ui
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UpdateDialog</class>
+ <widget class="QDialog" name="UpdateDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>385</width>
+ <height>187</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="font">
+ <font>
+ <pointsize>16</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Software update released</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="topMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
+ <property name="bottomMargin">
+ <number>12</number>
+ </property>
+ <property name="spacing">
+ <number>12</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Current version:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="ver_current">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Released version:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="ver_new">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QCheckBox" name="disable_reminder">
+ <property name="text">
+ <string>Don't remind me again about this version</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/pose-widget/images/grid-dark.png b/pose-widget/images/grid-dark.png
new file mode 100644
index 00000000..8665fc30
--- /dev/null
+++ b/pose-widget/images/grid-dark.png
Binary files differ
diff --git a/pose-widget/images/grid-light.png b/pose-widget/images/grid-light.png
new file mode 100644
index 00000000..83b844c0
--- /dev/null
+++ b/pose-widget/images/grid-light.png
Binary files differ
diff --git a/pose-widget/images/side1.png b/pose-widget/images/side1.png
index 2955bc01..f8e5f26a 100644
--- a/pose-widget/images/side1.png
+++ b/pose-widget/images/side1.png
Binary files differ
diff --git a/pose-widget/images/side6.png b/pose-widget/images/side6.png
index 3bae0e50..d60c4acd 100644
--- a/pose-widget/images/side6.png
+++ b/pose-widget/images/side6.png
Binary files differ
diff --git a/pose-widget/pose-widget.cpp b/pose-widget/pose-widget.cpp
index ac3aa74a..51d86609 100644
--- a/pose-widget/pose-widget.cpp
+++ b/pose-widget/pose-widget.cpp
@@ -8,6 +8,7 @@
#include "pose-widget.hpp"
#include "compat/check-visible.hpp"
#include "compat/math.hpp"
+#include "opentrack/defs.hpp"
#include <QPainter>
#include <QtEvents>
@@ -21,6 +22,7 @@ namespace pose_widget_impl {
pose_widget::pose_widget(QWidget* parent) : QWidget(parent)
{
QPainter p;
+ p.setRenderHint(QPainter::SmoothPixmapTransform);
#ifdef TEST
//draw rectangle frame around of Octopus, only if TEST defined
p.begin(&front);
@@ -38,17 +40,29 @@ pose_widget::pose_widget(QWidget* parent) : QWidget(parent)
shine.fill(QColor(255,255,255));
p.begin(&shine);
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
- p.drawImage(QPointF(0,0), front);
+ p.drawImage(QPointF(0,0), front);
p.end();
//draw Octopus shadow
shadow.fill(QColor(0,0,0));
p.begin(&shadow);
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
- p.drawImage(QPointF(0,0), front);
+ p.drawImage(QPointF(0,0), front);
p.end();
mirror.setFocusPolicy(Qt::NoFocus);
+
+#ifdef UI_COMPACT_VIDEO_FEED
+ mirror.setVisible(false);
+#endif
+}
+
+void pose_widget::set_grid_background(bool dark_theme)
+{
+ if (dark_theme)
+ background = QImage(":/images/grid-dark.png");
+ else
+ background = QImage(":/images/grid-light.png");
}
void pose_widget::present(double yaw, double pitch, double roll, double x, double y, double z)
@@ -89,6 +103,8 @@ void pose_widget::paintEvent(QPaintEvent*)
{
p.fillRect(rect(), palette().brush(backgroundRole()));
+ if (!background.isNull())
+ p.drawImage(rect(), background);
// draw axes
p.save();
p.setPen(QPen(Qt::gray, 1, Qt::SolidLine));
diff --git a/pose-widget/pose-widget.hpp b/pose-widget/pose-widget.hpp
index 9152e960..53ecc644 100644
--- a/pose-widget/pose-widget.hpp
+++ b/pose-widget/pose-widget.hpp
@@ -27,6 +27,7 @@ public:
explicit pose_widget(QWidget *parent = nullptr);
void present(double xAngle, double yAngle, double zAngle, double x, double y, double z);
QCheckBox mirror{"Mirror", this};
+ void set_grid_background(bool dark_theme);
private:
void resizeEvent(QResizeEvent *event) override;
void paintEvent(QPaintEvent*) override;
@@ -35,6 +36,8 @@ private:
QImage front{QImage{":/images/side1.png"}.convertToFormat(QImage::Format_ARGB32)};
QImage back {QImage{":/images/side6.png"}.convertToFormat(QImage::Format_ARGB32)
.mirrored(true,false)};
+ QImage background;
+
QImage shine {QImage{front.width(), front.height(), QImage::Format_ARGB32}};
QImage shadow{QImage{front.width(), front.height(), QImage::Format_ARGB32}};
};
diff --git a/pose-widget/posewidget.qrc b/pose-widget/posewidget.qrc
index e799432f..636151e0 100644
--- a/pose-widget/posewidget.qrc
+++ b/pose-widget/posewidget.qrc
@@ -2,5 +2,7 @@
<qresource prefix="/">
<file>images/side1.png</file>
<file>images/side6.png</file>
+ <file>images/grid-light.png</file>
+ <file>images/grid-dark.png</file>
</qresource>
</RCC>
diff --git a/proto-ft/ftnoir_protocol_ft.h b/proto-ft/ftnoir_protocol_ft.h
index a07747d9..6ac1619f 100644
--- a/proto-ft/ftnoir_protocol_ft.h
+++ b/proto-ft/ftnoir_protocol_ft.h
@@ -86,6 +86,6 @@ class freetrackDll : public Metadata
Q_OBJECT
public:
- QString name() { return tr("freetrack 2.0 Enhanced"); }
+ QString name() { return tr("freetrack"); }
QIcon icon() { return QIcon(":/images/freetrack.png"); }
};
diff --git a/proto-ft/lang/nl_NL.ts b/proto-ft/lang/nl_NL.ts
index c8603973..9128805a 100644
--- a/proto-ft/lang/nl_NL.ts
+++ b/proto-ft/lang/nl_NL.ts
@@ -99,7 +99,7 @@ Starting tracking will again overwrite the DLL locations.</source>
<context>
<name>freetrackDll</name>
<message>
- <source>freetrack 2.0 Enhanced</source>
+ <source>freetrack</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/proto-ft/lang/ru_RU.ts b/proto-ft/lang/ru_RU.ts
index a6433fd5..0a40fc3c 100644
--- a/proto-ft/lang/ru_RU.ts
+++ b/proto-ft/lang/ru_RU.ts
@@ -101,7 +101,7 @@ Starting tracking will again overwrite the DLL locations.</source>
<context>
<name>freetrackDll</name>
<message>
- <source>freetrack 2.0 Enhanced</source>
+ <source>freetrack</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/proto-ft/lang/stub.ts b/proto-ft/lang/stub.ts
index ac88d895..5de7b5bf 100644
--- a/proto-ft/lang/stub.ts
+++ b/proto-ft/lang/stub.ts
@@ -99,7 +99,7 @@ Starting tracking will again overwrite the DLL locations.</source>
<context>
<name>freetrackDll</name>
<message>
- <source>freetrack 2.0 Enhanced</source>
+ <source>freetrack</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/proto-ft/lang/zh_CN.ts b/proto-ft/lang/zh_CN.ts
index 7706d27c..e7db98a1 100644
--- a/proto-ft/lang/zh_CN.ts
+++ b/proto-ft/lang/zh_CN.ts
@@ -99,7 +99,7 @@ Starting tracking will again overwrite the DLL locations.</source>
<context>
<name>freetrackDll</name>
<message>
- <source>freetrack 2.0 Enhanced</source>
+ <source>freetrack</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/todo.md b/todo.md
new file mode 100644
index 00000000..ff82bf04
--- /dev/null
+++ b/todo.md
@@ -0,0 +1,22 @@
+### todo
+
+- [x] set default exposure and gain for the v2 sensor
+- [x] barf on v2 sensor not found
+- [x] add .ini
+- [x] change the logo
+- [x] add the pose widget background
+
+### time
+
+- 32 hours for the v1 sensor
+- 2023-01-05: 2 hours doing the UI
+- 2023-01-16: 1.5 hours adding video preview
+- 2023-01-20: 1 hour fixing the preview bug
+- 2023-01-20: .5 hours doing the last few tweaks
+- 2023-01-23: 1 hour exposure presets
+- 2023-01-26: .5 hours add pose widget grid lines
+- 2023-01-27: .5 hours update exposure while tracking
+- 2023-02-01: 1 hour fixing dumb camera exposure bug
+- 2023-02-27: 1 hour adding back non-trackhat camera support
+- 2023-02-27: .5 hours adding back the updater & git version
+- 2023-02-27: .5 hours expose only a subset of all nn options
diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.h b/tracker-neuralnet/ftnoir_tracker_neuralnet.h
index 3548335e..d44a9953 100644
--- a/tracker-neuralnet/ftnoir_tracker_neuralnet.h
+++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.h
@@ -20,6 +20,7 @@
#include "compat/timer.hpp"
#include "video/camera.hpp"
#include "cv/affine.hpp"
+#include "video-opencv/settings.hpp"
#include <QObject>
#include <QThread>
@@ -31,6 +32,7 @@
#include <memory>
#include <cinttypes>
#include <array>
+#include <optional>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
@@ -151,7 +153,7 @@ private:
QMutex mtx_ = {}; // Protects the pose
std::optional<QuatPose> last_pose_ = {};
- Affine last_pose_affine_ = {};
+ std::optional<Affine> last_pose_affine_ = {};
Preview preview_;
std::unique_ptr<cv_video_widget> video_widget_;
@@ -175,6 +177,8 @@ private:
Ui::Form ui_;
Settings settings_;
+ dshow_camera_settings cs_;
+
// Calibration code mostly taken from point tracker
QTimer calib_timer_;
TranslationCalibrator trans_calib_;
diff --git a/tracker-neuralnet/lang/nl_NL.ts b/tracker-neuralnet/lang/nl_NL.ts
index dbcd3c8c..52a7c174 100644
--- a/tracker-neuralnet/lang/nl_NL.ts
+++ b/tracker-neuralnet/lang/nl_NL.ts
@@ -8,26 +8,10 @@
<translation>Tracker-instellingen</translation>
</message>
<message>
- <source>Frames per second</source>
- <translation>Frames per seconde</translation>
- </message>
- <message>
- <source>Camera name</source>
- <translation>Cameranaam</translation>
- </message>
- <message>
- <source>Diagonal FOV</source>
- <translation>Diagonale FOV</translation>
- </message>
- <message>
<source>Camera settings</source>
<translation>Camera-instellingen</translation>
</message>
<message>
- <source>Camera Configuration</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Head Center Offset</source>
<translation type="unfinished"></translation>
</message>
@@ -57,11 +41,11 @@ Don&apos;t roll or change position.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Show Network Input</source>
+ <source>Exposure preset</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>MJPEG</source>
+ <source>Camera Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -69,47 +53,39 @@ Don&apos;t roll or change position.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>ROI Smoothing Alpha</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>ROI Zoom</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Thread Count</source>
+ <source>Number of threads. Can be used to balance the CPU load between the game and the tracker.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Resolution</source>
+ <source>ROI Smoothing Alpha</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Field of view. Needed to transform the pose to world coordinates.</source>
+ <source>ROI Zoom</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Requested video frame rate. Actual setting may not be supported by the camera.</source>
+ <source>Show the image patch that the pose estimation model sees.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>The requested resolution for cases where the camera delivers maximum frame rate only for a particular resolution. The image may still be downscaled to the internal resolution.</source>
+ <source>Show Network Input</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Number of threads. Can be used to balance the CPU load between the game and the tracker.</source>
+ <source>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Show the image patch that the pose estimation model sees.</source>
+ <source>Thread Count</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</source>
+ <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source>
+ <source>Camera override</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tracker-neuralnet/lang/stub.ts b/tracker-neuralnet/lang/stub.ts
index 4cde86a9..5936d630 100644
--- a/tracker-neuralnet/lang/stub.ts
+++ b/tracker-neuralnet/lang/stub.ts
@@ -8,26 +8,10 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Diagonal FOV</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Camera settings</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Frames per second</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Camera name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Camera Configuration</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Head Center Offset</source>
<translation type="unfinished"></translation>
</message>
@@ -57,11 +41,11 @@ Don&apos;t roll or change position.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Show Network Input</source>
+ <source>Exposure preset</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>MJPEG</source>
+ <source>Camera Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -69,47 +53,39 @@ Don&apos;t roll or change position.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>ROI Smoothing Alpha</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>ROI Zoom</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Thread Count</source>
+ <source>Number of threads. Can be used to balance the CPU load between the game and the tracker.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Resolution</source>
+ <source>ROI Smoothing Alpha</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Field of view. Needed to transform the pose to world coordinates.</source>
+ <source>ROI Zoom</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Requested video frame rate. Actual setting may not be supported by the camera.</source>
+ <source>Show the image patch that the pose estimation model sees.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>The requested resolution for cases where the camera delivers maximum frame rate only for a particular resolution. The image may still be downscaled to the internal resolution.</source>
+ <source>Show Network Input</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Number of threads. Can be used to balance the CPU load between the game and the tracker.</source>
+ <source>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Show the image patch that the pose estimation model sees.</source>
+ <source>Thread Count</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</source>
+ <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source>
+ <source>Camera override</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tracker-neuralnet/lang/zh_CN.ts b/tracker-neuralnet/lang/zh_CN.ts
index c3a91211..13dc34cf 100644
--- a/tracker-neuralnet/lang/zh_CN.ts
+++ b/tracker-neuralnet/lang/zh_CN.ts
@@ -8,26 +8,10 @@
<translation type="unfinished"></translation>
</message>
<message>
- <source>Diagonal FOV</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Camera name</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Frames per second</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Camera settings</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Camera Configuration</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Head Center Offset</source>
<translation type="unfinished"></translation>
</message>
@@ -57,11 +41,11 @@ Don&apos;t roll or change position.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Show Network Input</source>
+ <source>Exposure preset</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>MJPEG</source>
+ <source>Camera Configuration</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -69,47 +53,39 @@ Don&apos;t roll or change position.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>ROI Smoothing Alpha</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>ROI Zoom</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Thread Count</source>
+ <source>Number of threads. Can be used to balance the CPU load between the game and the tracker.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Resolution</source>
+ <source>ROI Smoothing Alpha</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Field of view. Needed to transform the pose to world coordinates.</source>
+ <source>ROI Zoom</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Requested video frame rate. Actual setting may not be supported by the camera.</source>
+ <source>Show the image patch that the pose estimation model sees.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>The requested resolution for cases where the camera delivers maximum frame rate only for a particular resolution. The image may still be downscaled to the internal resolution.</source>
+ <source>Show Network Input</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Number of threads. Can be used to balance the CPU load between the game and the tracker.</source>
+ <source>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Show the image patch that the pose estimation model sees.</source>
+ <source>Thread Count</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Amount of smoothing of the face region coordinates. Can help stabilize the pose.</source>
+ <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <source>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</source>
+ <source>Camera override</source>
<translation type="unfinished"></translation>
</message>
</context>
diff --git a/tracker-neuralnet/models/head-pose.onnx b/tracker-neuralnet/models/head-pose.onnx
index dcb55dcc..d70dfa49 100644
--- a/tracker-neuralnet/models/head-pose.onnx
+++ b/tracker-neuralnet/models/head-pose.onnx
Binary files differ
diff --git a/tracker-neuralnet/neuralnet-trackercontrols.ui b/tracker-neuralnet/neuralnet-trackercontrols.ui
index 750e6ef3..9fa74b32 100644
--- a/tracker-neuralnet/neuralnet-trackercontrols.ui
+++ b/tracker-neuralnet/neuralnet-trackercontrols.ui
@@ -9,223 +9,14 @@
<rect>
<x>0</x>
<y>0</y>
- <width>671</width>
- <height>357</height>
+ <width>654</width>
+ <height>253</height>
</rect>
</property>
<property name="windowTitle">
<string>Tracker settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="2" column="0">
- <widget class="QGroupBox" name="groupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>true</bool>
- </property>
- <property name="title">
- <string>Camera Configuration</string>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- <property name="checkable">
- <bool>false</bool>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="spacing">
- <number>10</number>
- </property>
- <property name="bottomMargin">
- <number>8</number>
- </property>
- <item>
- <layout class="QGridLayout" name="gridLayout_3">
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="horizontalSpacing">
- <number>0</number>
- </property>
- <property name="verticalSpacing">
- <number>2</number>
- </property>
- <item row="0" column="1">
- <widget class="QComboBox" name="cameraName">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Diagonal FOV</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>Camera name</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="cameraFOV">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Field of view. Needed to transform the pose to world coordinates.</string>
- </property>
- <property name="locale">
- <locale language="English" country="UnitedStates"/>
- </property>
- <property name="minimum">
- <number>35</number>
- </property>
- <property name="maximum">
- <number>90</number>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QComboBox" name="resolution">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>The requested resolution for cases where the camera delivers maximum frame rate only for a particular resolution. The image may still be downscaled to the internal resolution.</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="resolution_label">
- <property name="text">
- <string>Resolution</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout_6">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="horizontalSpacing">
- <number>0</number>
- </property>
- <property name="verticalSpacing">
- <number>2</number>
- </property>
- <item row="4" column="1">
- <widget class="QComboBox" name="cameraFPS">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip">
- <string>Requested video frame rate. Actual setting may not be supported by the camera.</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_12">
- <property name="text">
- <string>Frames per second</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="use_mjpeg">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_11">
- <property name="text">
- <string>MJPEG</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QPushButton" name="camera_settings">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Camera settings</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item row="9" column="0">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
<item row="5" column="0">
<widget class="QGroupBox" name="tuningOptionsBox">
<property name="sizePolicy">
@@ -247,8 +38,8 @@
<string>Tuning / Debug</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="10">
- <widget class="Line" name="line_2">
+ <item row="0" column="4">
+ <widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@@ -267,33 +58,6 @@
</property>
</widget>
</item>
- <item row="0" column="4">
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="8">
- <widget class="QLabel" name="roiFilterAlphaLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>ROI Smoothing Alpha</string>
- </property>
- </widget>
- </item>
- <item row="0" column="11">
- <widget class="QLabel" name="roiZoomLabel">
- <property name="text">
- <string>ROI Zoom</string>
- </property>
- </widget>
- </item>
<item row="0" column="2">
<widget class="Line" name="line_3">
<property name="orientation">
@@ -301,19 +65,22 @@
</property>
</widget>
</item>
- <item row="0" column="3">
- <widget class="QCheckBox" name="showNetworkInput">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <item row="0" column="12">
+ <widget class="QDoubleSpinBox" name="roiZoom">
<property name="toolTip">
- <string>Show the image patch that the pose estimation model sees.</string>
+ <string>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</string>
</property>
- <property name="text">
- <string>Show Network Input</string>
+ <property name="minimum">
+ <double>0.100000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>2.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.010000000000000</double>
+ </property>
+ <property name="value">
+ <double>1.000000000000000</double>
</property>
</widget>
</item>
@@ -351,29 +118,53 @@
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="threadCountLabel">
+ <item row="0" column="11">
+ <widget class="QLabel" name="roiZoomLabel">
<property name="text">
- <string>Thread Count</string>
+ <string>ROI Zoom</string>
</property>
</widget>
</item>
- <item row="0" column="12">
- <widget class="QDoubleSpinBox" name="roiZoom">
- <property name="toolTip">
- <string>Zoom factor for the face region. Applied before the patch is fed into the pose estimation model. There is a sweet spot near 1.</string>
+ <item row="0" column="8">
+ <widget class="QLabel" name="roiFilterAlphaLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="minimum">
- <double>0.100000000000000</double>
+ <property name="text">
+ <string>ROI Smoothing Alpha</string>
</property>
- <property name="maximum">
- <double>2.000000000000000</double>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QCheckBox" name="showNetworkInput">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="singleStep">
- <double>0.010000000000000</double>
+ <property name="toolTip">
+ <string>Show the image patch that the pose estimation model sees.</string>
</property>
- <property name="value">
- <double>1.000000000000000</double>
+ <property name="text">
+ <string>Show Network Input</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="10">
+ <widget class="Line" name="line_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="threadCountLabel">
+ <property name="text">
+ <string>Thread Count</string>
</property>
</widget>
</item>
@@ -393,218 +184,373 @@
</layout>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QGroupBox" name="groupBox_10">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="10" column="0">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
+ </widget>
+ </item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="resolution_display">
<property name="autoFillBackground">
<bool>true</bool>
</property>
- <property name="title">
- <string>Head Center Offset</string>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
</property>
- <layout class="QGridLayout" name="gridLayout_5">
- <item row="0" column="0">
- <widget class="QFrame" name="frame_4">
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text">
+ <string notr="true"/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QWidget" name="widget" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item alignment="Qt::AlignTop">
+ <widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
+ <property name="autoFillBackground">
+ <bool>true</bool>
</property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <property name="title">
+ <string>Camera Configuration</string>
</property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
+ <property name="flat">
+ <bool>false</bool>
</property>
- <layout class="QGridLayout" name="gridLayout_11">
- <property name="sizeConstraint">
- <enum>QLayout::SetDefaultConstraint</enum>
+ <property name="checkable">
+ <bool>false</bool>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>10</number>
</property>
- <property name="verticalSpacing">
- <number>0</number>
+ <property name="bottomMargin">
+ <number>8</number>
</property>
- <item row="1" column="1">
- <widget class="QSpinBox" name="ty_spin">
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="suffix">
- <string> mm</string>
- </property>
- <property name="minimum">
- <number>-65535</number>
- </property>
- <property name="maximum">
- <number>65536</number>
- </property>
- </widget>
- </item>
- <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>Right</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="tz_spin">
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="suffix">
- <string> mm</string>
- </property>
- <property name="minimum">
- <number>-65535</number>
- </property>
- <property name="maximum">
- <number>65536</number>
- </property>
- </widget>
- </item>
- <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>
- <property name="text">
- <string>Forward</string>
+ <item>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
</property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QSpinBox" name="tx_spin">
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
+ <property name="leftMargin">
+ <number>0</number>
</property>
- <property name="suffix">
- <string> mm</string>
+ <property name="topMargin">
+ <number>0</number>
</property>
- <property name="minimum">
- <number>-65535</number>
+ <property name="rightMargin">
+ <number>0</number>
</property>
- <property name="maximum">
- <number>65536</number>
+ <property name="bottomMargin">
+ <number>0</number>
</property>
- </widget>
- </item>
- <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 name="horizontalSpacing">
+ <number>16</number>
</property>
- <property name="text">
- <string>Up</string>
+ <property name="verticalSpacing">
+ <number>2</number>
</property>
- </widget>
+ <item row="0" column="1">
+ <widget class="QComboBox" name="cameraName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>Camera override</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="exposure_preset">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Exposure preset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QPushButton" name="camera_settings">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Camera settings</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QFrame" name="frame_5">
+ <item alignment="Qt::AlignTop">
+ <widget class="QGroupBox" name="groupBox_10">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
- <size>
- <width>260</width>
- <height>0</height>
- </size>
+ <property name="autoFillBackground">
+ <bool>true</bool>
</property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <property name="title">
+ <string>Head Center Offset</string>
</property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="label_59">
- <property name="text">
- <string>Use only yaw and pitch while calibrating.
-Don't roll or change position.</string>
+ <layout class="QGridLayout" name="gridLayout_5">
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QFrame" name="frame_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
</property>
- <property name="wordWrap">
- <bool>true</bool>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
</property>
- <property name="openExternalLinks">
- <bool>false</bool>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
</property>
+ <layout class="QGridLayout" name="gridLayout_11">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>0</number>
+ </property>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="ty_spin">
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="suffix">
+ <string> mm</string>
+ </property>
+ <property name="minimum">
+ <number>-65535</number>
+ </property>
+ <property name="maximum">
+ <number>65536</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="tx_spin">
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="suffix">
+ <string> mm</string>
+ </property>
+ <property name="minimum">
+ <number>-65535</number>
+ </property>
+ <property name="maximum">
+ <number>65536</number>
+ </property>
+ </widget>
+ </item>
+ <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>
+ <property name="text">
+ <string>Up</string>
+ </property>
+ </widget>
+ </item>
+ <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>
+ <property name="text">
+ <string>Forward</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="tz_spin">
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="suffix">
+ <string> mm</string>
+ </property>
+ <property name="minimum">
+ <number>-65535</number>
+ </property>
+ <property name="maximum">
+ <number>65536</number>
+ </property>
+ </widget>
+ </item>
+ <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>Right</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
- <item>
- <widget class="QLabel" name="sample_count_display">
+ <item row="0" column="1">
+ <widget class="QFrame" name="frame_5">
<property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>0</height>
+ </size>
+ </property>
<property name="frameShape">
- <enum>QFrame::Panel</enum>
+ <enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="tcalib_button">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Start calibration</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
+ <enum>QFrame::Raised</enum>
</property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_59">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Use only yaw and pitch while calibrating.
+Don't roll or change position.</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="openExternalLinks">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="sample_count_display">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="tcalib_button">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Start calibration</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
</layout>
@@ -613,24 +559,32 @@ Don't roll or change position.</string>
</layout>
</widget>
</item>
- <item row="8" column="0">
- <widget class="QLabel" name="resolution_display">
- <property name="autoFillBackground">
- <bool>true</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
+ <item row="9" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="text">
- <string notr="true"/>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>0</height>
+ </size>
</property>
- </widget>
+ </spacer>
</item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>cameraName</tabstop>
+ <tabstop>tx_spin</tabstop>
+ <tabstop>ty_spin</tabstop>
+ <tabstop>tz_spin</tabstop>
+ <tabstop>tcalib_button</tabstop>
+ <tabstop>threadCount</tabstop>
+ <tabstop>showNetworkInput</tabstop>
+ <tabstop>roiFilterAlpha</tabstop>
+ <tabstop>roiZoom</tabstop>
+ </tabstops>
<resources/>
<connections/>
<designerdata>
diff --git a/variant/default/_variant.cmake b/variant/default/_variant.cmake
index ffa795d0..f972806e 100644
--- a/variant/default/_variant.cmake
+++ b/variant/default/_variant.cmake
@@ -1,11 +1,11 @@
function(otr_init_variant)
set_property(GLOBAL PROPERTY opentrack-variant "default")
- set_property(GLOBAL PROPERTY opentrack-ident "opentrack-2.3")
+ set_property(GLOBAL PROPERTY opentrack-ident "trackhat-v3")
set(subprojects
- "tracker-*"
+ "tracker-neuralnet"
"proto-*"
- "filter-*"
+ "filter-accela"
"options"
"api"
"compat"
@@ -23,7 +23,7 @@ function(otr_init_variant)
"migration"
"main-window"
"video"
- "video-*"
+ "video-opencv"
"opentrack"
)
diff --git a/video-opencv/impl-camera.cpp b/video-opencv/impl-camera.cpp
index 662eceb2..afd76310 100644
--- a/video-opencv/impl-camera.cpp
+++ b/video-opencv/impl-camera.cpp
@@ -1,6 +1,7 @@
#include "impl.hpp"
#include "compat/sleep.hpp"
#include "video-property-page.hpp"
+#include <QDebug>
namespace opencv_camera_impl {
@@ -30,6 +31,34 @@ bool cam::is_open()
return !!cap;
}
+void cam::set_exposure(bool write)
+{
+ auto e = *s.exposure;
+ if (e != exposure)
+ switch (e)
+ {
+ case exposure_preset::near: cap->set(cv::CAP_PROP_EXPOSURE, -5); qDebug() << "near"; break;
+ case exposure_preset::far: cap->set(cv::CAP_PROP_EXPOSURE, -4); qDebug() << "far"; break;
+ default: break;
+ }
+
+ if (s.exposure != exposure_preset::ignored)
+ {
+ constexpr struct {
+ int prop, value;
+ } props[] = {
+ { cv::CAP_PROP_AUTO_EXPOSURE, 0 },
+ { cv::CAP_PROP_BRIGHTNESS, 0 },
+ { cv::CAP_PROP_SHARPNESS, 3 },
+ };
+ for (const auto [prop, value] : props)
+ cap->set(prop, value);
+ }
+
+ if (write)
+ exposure = e;
+}
+
bool cam::start(info& args)
{
stop();
@@ -46,6 +75,8 @@ bool cam::start(info& args)
if (args.use_mjpeg)
cap->set(cv::CAP_PROP_FOURCC, cv::VideoWriter::fourcc('M', 'J', 'P', 'G'));
+ set_exposure(false);
+
if (!cap->isOpened())
goto fail;
@@ -82,6 +113,8 @@ bool cam::get_frame_()
portable::sleep(50);
}
+ set_exposure(true);
+
return false;
}
diff --git a/video-opencv/impl.hpp b/video-opencv/impl.hpp
index ed5499b0..8e61989e 100644
--- a/video-opencv/impl.hpp
+++ b/video-opencv/impl.hpp
@@ -8,6 +8,7 @@
#pragma once
#include "video/camera.hpp"
+#include "settings.hpp"
#include <optional>
#include <opencv2/videoio.hpp>
@@ -43,13 +44,17 @@ static constexpr int video_capture_backend =
bool is_open() override;
std::tuple<const frame&, bool> get_frame() override;
bool show_dialog() override;
+ void set_exposure(bool write);
bool get_frame_();
+ dshow_camera_settings s;
+
std::optional<cv::VideoCapture> cap;
cv::Mat mat;
frame frame_;
int idx = -1;
+ exposure_preset exposure = exposure_preset::ignored;
};
} // ns opencv_camera_impl
diff --git a/video-opencv/settings.hpp b/video-opencv/settings.hpp
new file mode 100644
index 00000000..a4f70c25
--- /dev/null
+++ b/video-opencv/settings.hpp
@@ -0,0 +1,13 @@
+#pragma once
+#include "options/value.hpp"
+using namespace options;
+
+enum class exposure_preset : int {
+ near, far, ignored,
+ DEFAULT = near,
+};
+
+struct dshow_camera_settings final {
+ bundle b = make_bundle("video-camera");
+ value<exposure_preset> exposure{b, "exposure-preset", exposure_preset::near};
+};