summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bin/camera/ManyCam Video Source-56.yml (renamed from bin/camera/PS3Eye Camera.yml)0
-rw-r--r--bin/camera/ManyCam Video Source-75.yml22
-rw-r--r--bin/camera/PS3Eye Camera-56.yml22
-rw-r--r--bin/camera/PS3Eye Camera-75.yml22
-rw-r--r--bin/settings/facetracknoir supported games.csv11
-rw-r--r--facetracknoir/curve-config.cpp10
-rw-r--r--facetracknoir/options-dialog.cpp8
-rw-r--r--facetracknoir/process_detector.cpp8
-rw-r--r--facetracknoir/process_detector.h8
-rw-r--r--facetracknoir/ui.cpp9
-rw-r--r--facetracknoir/ui.h8
-rw-r--r--ftnoir_filter_accela/ftnoir_filter_accela.h6
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.cpp8
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.h8
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp1
-rw-r--r--ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp34
-rw-r--r--ftnoir_protocol_mouse/ftnoir_protocol_mouse.h50
-rw-r--r--ftnoir_protocol_sc/ftnoir_protocol_sc.cpp8
-rw-r--r--ftnoir_tracker_aruco/ar_video_widget.cpp4
-rw-r--r--ftnoir_tracker_aruco/ar_video_widget.h10
-rw-r--r--ftnoir_tracker_aruco/aruco-trackercontrols.ui41
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp6
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.h5
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp1
-rw-r--r--ftnoir_tracker_ht/ht_video_widget.cpp4
-rw-r--r--ftnoir_tracker_ht/ht_video_widget.h15
-rw-r--r--ftnoir_tracker_ht/stdafx.h0
-rw-r--r--ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp6
-rw-r--r--ftnoir_tracker_pt/camera.cpp10
-rw-r--r--ftnoir_tracker_pt/camera.h4
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp50
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.h1
-rw-r--r--ftnoir_tracker_pt/point_extractor.cpp3
-rw-r--r--ftnoir_tracker_pt/pt_video_widget.cpp3
-rw-r--r--ftnoir_tracker_pt/pt_video_widget.h11
-rw-r--r--ftnoir_tracker_udp/ftnoir_tracker_udp.cpp8
-rw-r--r--opentrack/camera-names.hpp8
-rw-r--r--opentrack/main-settings.hpp8
-rw-r--r--opentrack/opencv-calibration.hpp50
-rw-r--r--opentrack/opencv-camera-dialog.hpp8
-rw-r--r--opentrack/plugin-api.hpp8
-rw-r--r--opentrack/shortcuts.cpp9
-rw-r--r--opentrack/tracker.cpp2
-rw-r--r--pose-widget/glwidget.cpp2
-rw-r--r--pose-widget/glwidget.h2
45 files changed, 352 insertions, 170 deletions
diff --git a/bin/camera/PS3Eye Camera.yml b/bin/camera/ManyCam Video Source-56.yml
index 6859d0fb..6859d0fb 100644
--- a/bin/camera/PS3Eye Camera.yml
+++ b/bin/camera/ManyCam Video Source-56.yml
diff --git a/bin/camera/ManyCam Video Source-75.yml b/bin/camera/ManyCam Video Source-75.yml
new file mode 100644
index 00000000..bf8fe0d3
--- /dev/null
+++ b/bin/camera/ManyCam Video Source-75.yml
@@ -0,0 +1,22 @@
+%YAML:1.0
+calibration_time: "07/20/15 04:51:53"
+image_width: 640
+image_height: 480
+board_width: 5
+board_height: 5
+square_size: 1.
+flags: 0
+camera_matrix: !!opencv-matrix
+ rows: 3
+ cols: 3
+ dt: d
+ data: [ 7.1311062261797588e+002, 0., 2.8104464540018199e+002, 0.,
+ 7.0668490426304095e+002, 2.7903331411454337e+002, 0., 0., 1. ]
+distortion_coefficients: !!opencv-matrix
+ rows: 5
+ cols: 1
+ dt: d
+ data: [ -2.2697038330479780e-001, 9.3383028790481815e-001,
+ 1.0716120533882623e-002, -9.0372250512977884e-003,
+ -1.7702927181212214e+000 ]
+avg_reprojection_error: 1.7556161579210681e+000
diff --git a/bin/camera/PS3Eye Camera-56.yml b/bin/camera/PS3Eye Camera-56.yml
new file mode 100644
index 00000000..6859d0fb
--- /dev/null
+++ b/bin/camera/PS3Eye Camera-56.yml
@@ -0,0 +1,22 @@
+%YAML:1.0
+calibration_time: "07/13/15 17:45:33"
+image_width: 640
+image_height: 480
+board_width: 24
+board_height: 15
+square_size: 1.
+flags: 0
+camera_matrix: !!opencv-matrix
+ rows: 3
+ cols: 3
+ dt: d
+ data: [ 7.5119574967224673e+002, 0., 3.2806930334341007e+002, 0.,
+ 7.5112907969240291e+002, 2.2681331450818737e+002, 0., 0., 1. ]
+distortion_coefficients: !!opencv-matrix
+ rows: 5
+ cols: 1
+ dt: d
+ data: [ -2.2741190107950382e-001, 9.4372681451250684e-001,
+ -4.0955586655475494e-003, -2.6778551080439902e-003,
+ -1.7969804313130640e+000 ]
+avg_reprojection_error: 1.9233386799903629e+000
diff --git a/bin/camera/PS3Eye Camera-75.yml b/bin/camera/PS3Eye Camera-75.yml
new file mode 100644
index 00000000..bf8fe0d3
--- /dev/null
+++ b/bin/camera/PS3Eye Camera-75.yml
@@ -0,0 +1,22 @@
+%YAML:1.0
+calibration_time: "07/20/15 04:51:53"
+image_width: 640
+image_height: 480
+board_width: 5
+board_height: 5
+square_size: 1.
+flags: 0
+camera_matrix: !!opencv-matrix
+ rows: 3
+ cols: 3
+ dt: d
+ data: [ 7.1311062261797588e+002, 0., 2.8104464540018199e+002, 0.,
+ 7.0668490426304095e+002, 2.7903331411454337e+002, 0., 0., 1. ]
+distortion_coefficients: !!opencv-matrix
+ rows: 5
+ cols: 1
+ dt: d
+ data: [ -2.2697038330479780e-001, 9.3383028790481815e-001,
+ 1.0716120533882623e-002, -9.0372250512977884e-003,
+ -1.7702927181212214e+000 ]
+avg_reprojection_error: 1.7556161579210681e+000
diff --git a/bin/settings/facetracknoir supported games.csv b/bin/settings/facetracknoir supported games.csv
index 2fa70b56..98dba166 100644
--- a/bin/settings/facetracknoir supported games.csv
+++ b/bin/settings/facetracknoir supported games.csv
@@ -31,6 +31,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
26;ArmA 2 Operation Arrowhead;FreeTrack20;V160;V;vn88holden;0;001ABC224B7783DAF0D500
27;ArmA 3;FreeTrack20;V170;;;7503;001BB69411ABD4E2B39900
28;Armored Assault - Gold Edition;FreeTrack20;V170;;;1303;001CA7F7CAA00814ECA700
+559;Artificial Head;FreeTrack20;V160;;;20380;022F3A9DCD1F7E0D62C000
29;Arvoch Alliance;FreeTrack20;V160;;;14908;001D318F8773BAE29A9300
30;Arvoch Conflict;FreeTrack20;V160;;;14901;001E5C1FDE722DAE2BA900
31;Auditory Displays for the blind;FreeTrack20;V160;;;20035;001F0FC9FF862F9D34BA00
@@ -69,6 +70,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
60;Chopper;FreeTrack20;V160;;;3150;003CC166C8632A32EA2300
61;Clearbox;FreeTrack20;V160;;;20565;003D5C1FDE74279D1DB800
62;CNKFsoft;FreeTrack20;V160;;;20495;003ED7690F6073187B0000
+558;Code 10;FreeTrack20;V160;;;2975;022E45423D22193FF81900
487;Cognitics;FreeTrack20;V160;;;20760;01E715A96D19515BFC1500
63;Colin McRae DiRT 2;FreeTrack20;V170;V;V4Friend;8107;003F7815C5379491C73300
64;Colin McRae Rally 04;FreeTrack20;V160;;;8103;0040D13C2A843DA526A610
@@ -84,6 +86,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
72;Corys;FreeTrack20;V160;;;20550;0048157D78738A342A8D00
73;Counter Strike;FreeTrack20;V160;;;12501;004953FE1E862AB73DA600
74;Crane Simulator;FreeTrack20;V160;;;20048;004A6B62C6A7931972DA00
+567;Cranfield University;FreeTrack20;V160;;;20905;0237A8C5B26E7A38A66500
75;Crashday;FreeTrack20;V160;;;5601;004BD6E585F893D933BA00
76;Creanex Training Simulator;FreeTrack20;V160;;;20205;004CF478D277A40A929A00
77;Creative Labs headset;FreeTrack20;V160;;;20018;004D348B1743E961FA6300
@@ -91,6 +94,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
79;Crysis Mod;FreeTrack20;V160;;;1625;004F90B57839B231A24200
80;Crystal Growth Simulation;FreeTrack20;V160;;;20029;005026F79742FB241A6200
81;Crytek;FreeTrack20;V170;;;2775;0051D5F1EBBAD81C714600
+562;Cypher City;FreeTrack20;V160;;;4250;023259070AE238A9E78100
83;D2x-XL;FreeTrack20;V160;;;16001;00532E20237BEDABEB8A00
84;Dark Horizons Lore;FreeTrack20;V160;;;7901;005487801A852AA7385200
85;Dawn of Aces - Gold Edition;FreeTrack20;V170;;;1304;0055A9ED7700814190DE00
@@ -102,6 +106,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
90;Dead Reckoning;FreeTrack20;V160;;;10401;005A4C2F6752F912D66200
91;Delivery;FreeTrack20;V160;;;15901;005BF3E85B1A8534AE3400
471;Demon Core;FreeTrack20;V160;;;3225;01D7D1DC6052A165A7AC00
+563;Descent: Underground;FreeTrack20;V160;;;4275;023355381D3CCBD801D700
92;DiRT;FreeTrack20;V160;;;8104;005C72456F7523881F1800
93;DiRT 3;FreeTrack20;V170;;;8108;005DABA016ED2DFBDF6F00
94;Door3;FreeTrack20;V160;;;20665;005ED13C2A853DA82F6B00
@@ -136,6 +141,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
116;Eventology;FreeTrack20;V160;;;12201;0074849F8B469C2BAC3600
117;EVOC-101 Training;FreeTrack20;V160;;;20038;00756925967D2088FC6200
118;Evochron Alliance 2.0;FreeTrack20;V160;;;14904;00767A32A1A8735A022900
+557;Evochron Legacy;FreeTrack20;V160;;;14909;022D84A6946770E4EFD800
119;Evochron Legends;FreeTrack20;V160;;;14906;0077D6E585F8B41A12BA00
120;Evochron Mercenary;FreeTrack20;V160;V;Scavenger4711 ;14907;00783752FBC7B42B221A00
121;Evochron Renegades;FreeTrack20;V160;;;14905;0079621E7763FB421A1300
@@ -166,6 +172,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
140;Flying Tigers;FreeTrack20;V160;;;7002;008C91D997F29A930B0200
141;FlyingGuns;FreeTrack20;V160;;;14801;008D7A32A1A882BAA28A00
142;Ford Racing 3;FreeTrack20;V160;;;6901;008E27D5047C2BA62F5800
+561;Forklift Simulator;FreeTrack20;V160;;;20885;02314A30F16DAF63EABB00
542;Fractured Space;FreeTrack20;V170;;;3976;0F88A4D88906429E684E00
143;Free Falcon 4.0;FreeTrack20;V160;;;1901;008F157D78A3B962E55000
144;Free Falcon 4.0: Allied Force;FreeTrack20;V160;;;8901;0090656DD6793CA9325900
@@ -228,6 +235,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
189;Innovatec Simulator;FreeTrack20;V160;;;20036;00BD22FD7935B23DB82C00
190;Insurgency;FreeTrack20;V160;;;9401;00BEB6C61427B3EA744B00
191;Intific;FreeTrack20;V160;;;20655;00BF2BCA747F2AA8309D00
+566;Into the Dungeon;FreeTrack20;V160;;;4375;0236B346990ACCFC047A00
192;iRacing;FreeTrack20;V160;V;vn88holden ;14101;00C0103AF1AA730A236900
193;IREQ Robotic Camera Control;FreeTrack20;V160;;;20027;00C10448E0E8618521EB00
536;ISAMM;FreeTrack20;V160;;;20860;0218303730165E681DB000
@@ -247,6 +255,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
206;Jumpgate Evolution;FreeTrack20;V170;;;15002;00CE5936D4F93DCE0CE700
207;KAF Keymapper;FreeTrack20;V160;;;3101;00CF934348830E87EB8300
476;KAI FLight Simulator;FreeTrack20;V160;;;20725;01DCC522132A5C01EDE500
+560;Keita Head Tracking;FreeTrack20;V160;;;20385;02307E33478667072B0800
208;Key Macro View;FreeTrack20;V160;;;12001;00D016BC08431B1EF90100
209;kiwi.vg;FreeTrack20;V160;;;20395;00D1409A430AB33633E900
521;Kongsberg GlobalSim;FreeTrack20;V160;;;20825;0209B2C573D990BF764700
@@ -433,6 +442,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
361;Steel Beasts 2;FreeTrack20;V160;;;11703;0169DCC441A9443A831A00
362;Steel Beasts Pro;FreeTrack20;V160;;;11701;016A8F54A20833CAA23900
363;Steel Beasts Pro Personal;FreeTrack20;V160;;;11702;016BF3E85B1A9443A73000
+565;Steel Beasts Professional;FreeTrack20;V160;;;4350;02356C64A9AFBB37E56E00
364;Stoked Rider;FreeTrack20;V160;;;14701;016CC166C963EA32997300
365;Storm of War: the Battle of Britain;FreeTrack20;V170;;;11001;016D8F54A68B71F25D0200
495;STRAFT;FreeTrack20;V160;;;3375;01EF1329E014ADF98D6B00
@@ -523,6 +533,7 @@ No;Game Name;Game protocol;Supported since;Verified;By;INTERNATIONAL_ID;FTN_ID
480;Vizard;FreeTrack20;V160;;;20745;01E0C1F20A79D7C0561300
437;VizRD;FreeTrack20;V160;;;20031;01B55485D9825BF1D8AB00
438;Void War;FreeTrack20;V160;;;10001;01B65C1FDE872AA1206600
+564;VR Truck Simulator;FreeTrack20;V160;;;4325;02344CAEE1BC9E243D9F00
477;VRPlayer;FreeTrack20;V160;;;20730;01DD6787E57245201D5000
439;VT08;FreeTrack20;V160;;;1275;01B7B78B06EC9912750200
440;VVVV Plugin;FreeTrack20;V160;;;20075;01B8B1C6648A138C205500
diff --git a/facetracknoir/curve-config.cpp b/facetracknoir/curve-config.cpp
index f6c78f79..e199d005 100644
--- a/facetracknoir/curve-config.cpp
+++ b/facetracknoir/curve-config.cpp
@@ -1,4 +1,12 @@
-#include "./curve-config.h"
+/* Copyright (c) 2014-2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
+#include "curve-config.h"
#include "opentrack/main-settings.hpp"
MapWidget::MapWidget(Mappings& m, main_settings& s) :
m(m)
diff --git a/facetracknoir/options-dialog.cpp b/facetracknoir/options-dialog.cpp
index 1b64de9e..10fbbed6 100644
--- a/facetracknoir/options-dialog.cpp
+++ b/facetracknoir/options-dialog.cpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#include "options-dialog.hpp"
#include "ftnoir_tracker_pt/camera.h"
diff --git a/facetracknoir/process_detector.cpp b/facetracknoir/process_detector.cpp
index 8efc0c10..df38eb29 100644
--- a/facetracknoir/process_detector.cpp
+++ b/facetracknoir/process_detector.cpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#include "process_detector.h"
#include "facetracknoir/ui.h"
#include <QList>
diff --git a/facetracknoir/process_detector.h b/facetracknoir/process_detector.h
index 3cebd422..792a941f 100644
--- a/facetracknoir/process_detector.h
+++ b/facetracknoir/process_detector.h
@@ -1,3 +1,11 @@
+/* Copyright (c) 2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#pragma once
#include <QObject>
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 1d9f3702..8501e2ae 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -21,6 +21,15 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
+
+/* Copyright (c) 2013-2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#include "ui.h"
#include "opentrack/tracker.h"
#include "opentrack/options.hpp"
diff --git a/facetracknoir/ui.h b/facetracknoir/ui.h
index ccd82e5b..2253ec80 100644
--- a/facetracknoir/ui.h
+++ b/facetracknoir/ui.h
@@ -22,6 +22,14 @@
* with this program; if not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
+/* Copyright (c) 2014-2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#pragma once
#include <QMainWindow>
diff --git a/ftnoir_filter_accela/ftnoir_filter_accela.h b/ftnoir_filter_accela/ftnoir_filter_accela.h
index d962d82f..1529169b 100644
--- a/ftnoir_filter_accela/ftnoir_filter_accela.h
+++ b/ftnoir_filter_accela/ftnoir_filter_accela.h
@@ -1,3 +1,9 @@
+/* Copyright (c) 2012-2015 Stanislaw Halik
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
#pragma once
#include "opentrack/plugin-api.hpp"
#include "qfunctionconfigurator/functionconfig.h"
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
index 73bf834a..b38b0730 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
@@ -24,6 +24,14 @@
* FTServer FTServer is the Class, that communicates headpose-data
* to games, using the FreeTrackClient.dll.
********************************************************************************/
+
+/* Copyright (c) 2013-2015 Stanislaw Halik <sthalik@misaki.pl>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
+
#include "ftnoir_protocol_ft.h"
#include "csv/csv.h"
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h
index b7506c75..f80a511b 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h
@@ -24,6 +24,14 @@
* FTServer FTServer is the Class, that communicates headpose-data *
* to games, using the FreeTrackClient.dll. *
********************************************************************************/
+
+/* Copyright (c) 2013-2015 Stanislaw Halik <sthalik@misaki.pl>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
+
#pragma once
#include "ui_ftnoir_ftcontrols.h"
#include "opentrack/plugin-api.hpp"
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp
index db0165b5..04d5635e 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft_dialog.cpp
@@ -22,6 +22,7 @@
* with this program; if not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
+
#include "ftnoir_protocol_ft.h"
#include <QDebug>
#include <QFileDialog>
diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp
index 6b7c52b2..5d9f9689 100644
--- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp
+++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp
@@ -1,31 +1,9 @@
-/********************************************************************************
-* FaceTrackNoIR This program is a private project of the some enthusiastic *
-* gamers from Holland, who don't like to pay much for *
-* head-tracking. *
-* *
-* Copyright (C) 2010-2011 Wim Vriend (Developing) *
-* Ron Hendriks (Researching and Testing) *
-* *
-* Homepage *
-* *
-* This program is free software; you can redistribute it and/or modify it *
-* under the terms of the GNU General Public License as published by the *
-* Free Software Foundation; either version 3 of the License, or (at your *
-* option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, but *
-* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-* more details. *
-* *
-* You should have received a copy of the GNU General Public License along *
-* with this program; if not, see <http://www.gnu.org/licenses/>. *
-* *
-* FTNoIR_Protocol_Mouse The Class, that communicates headpose-data by *
-* generating Mouse commands. *
-* Many games (like FPS's) support Mouse-look features, *
-* but no face-tracking. *
-********************************************************************************/
+/* Copyright (c) 2015 Stanislaw Halik <sthalik@misaki.pl>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
#include "ftnoir_protocol_mouse.h"
#include "opentrack/plugin-api.hpp"
diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h
index 06405e69..95b5f72c 100644
--- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h
+++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h
@@ -1,44 +1,15 @@
-/********************************************************************************
-* FaceTrackNoIR This program is a private project of some enthusiastic *
-* gamers from Holland, who don't like to pay much for *
-* head-tracking. *
-* *
-* Copyright (C) 2010-2011 Wim Vriend (Developing) *
-* Ron Hendriks (Researching and Testing) *
-* *
-* http://facetracknoir.sourceforge.net/home/default.htm *
-* *
-* This program is free software; you can redistribute it and/or modify it *
-* under the terms of the GNU General Public License as published by the *
-* Free Software Foundation; either version 3 of the License, or (at your *
-* option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, but *
-* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-* more details. *
-* *
-* You should have received a copy of the GNU General Public License along *
-* with this program; if not, see <http://www.gnu.org/licenses/>. *
-* *
-* FTNoIR_Protocol_Mouse The Class, that communicates headpose-data by *
-* generating Mouse commands. *
-* Many games (like FPS's) support Mouse-look features, *
-* but no face-tracking. *
-********************************************************************************/
+/* Copyright (c) 2015 Stanislaw Halik <sthalik@misaki.pl>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
+
#pragma once
-#ifndef INCLUDED_MOUSESERVER_H
-#define INCLUDED_MOUSESERVER_H
#include "ui_ftnoir_mousecontrols.h"
-#include <QMessageBox>
-#include <QSettings>
-#include <QLibrary>
-#include <QProcess>
#include <QDebug>
-#include <QFile>
#include <windows.h>
-#include <winuser.h>
#include "opentrack/plugin-api.hpp"
#include "opentrack/options.hpp"
using namespace options;
@@ -52,9 +23,6 @@ struct settings : opts {
{}
};
-#define MOUSE_AXIS_MIN 0
-#define MOUSE_AXIS_MAX 65535
-
class FTNoIR_Protocol : public IProtocol
{
public:
@@ -90,7 +58,3 @@ public:
QString name() { return QString("mouse emulation"); }
QIcon icon() { return QIcon(":/images/mouse.png"); }
};
-
-
-#endif//INCLUDED_MOUSESERVER_H
-//END
diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
index ef695623..14233f36 100644
--- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
+++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp
@@ -26,6 +26,14 @@
* SimConnect.dll is a so called 'side-by-side' assembly, so it *
* must be treated as such... *
********************************************************************************/
+
+/* Copyright (c) 2015 Stanislaw Halik <sthalik@misaki.pl>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
+
#include "ftnoir_protocol_sc.h"
#include "opentrack/plugin-api.hpp"
diff --git a/ftnoir_tracker_aruco/ar_video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp
index 2d9e3052..70c26e55 100644
--- a/ftnoir_tracker_aruco/ar_video_widget.cpp
+++ b/ftnoir_tracker_aruco/ar_video_widget.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 Patrick Ruoff
+/* Copyright (c) 2014 Stanislaw Halik
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -7,8 +7,6 @@
#include "ar_video_widget.h"
-#include <QDebug>
-
using namespace std;
void ArucoVideoWidget::update_image(const cv::Mat& frame)
diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h
index 638b0ab4..6df2d626 100644
--- a/ftnoir_tracker_aruco/ar_video_widget.h
+++ b/ftnoir_tracker_aruco/ar_video_widget.h
@@ -1,24 +1,20 @@
-/* Copyright (c) 2012 Patrick Ruoff
+/* Copyright (c) 2014 Stanislaw Halik
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*/
-#ifndef VIDEOWIDGET_H
-#define VIDEOWIDGET_H
+#pragma once
#include <QTimer>
#include <QWidget>
#include <QMutex>
#include <QMutexLocker>
-#include <QLabel>
#include <QPainter>
#include <QPaintEvent>
-#include <QTimer>
#include <opencv/cv.hpp>
-// ----------------------------------------------------------------------------
class ArucoVideoWidget : public QWidget
{
Q_OBJECT
@@ -35,5 +31,3 @@ public:
void update_image(const cv::Mat& frame);
void paintEvent( QPaintEvent*) override;
};
-
-#endif // VIDEOWIDGET_H
diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui
index bc384f39..7e32936c 100644
--- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui
+++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui
@@ -33,28 +33,6 @@
<item row="0" column="0">
<widget class="QFrame" name="frame">
<layout class="QGridLayout" name="gridLayout_3">
- <item row="0" column="1">
- <widget class="QDoubleSpinBox" name="cameraFOV">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="locale">
- <locale language="English" country="UnitedStates"/>
- </property>
- <property name="minimum">
- <double>35.000000000000000</double>
- </property>
- <property name="maximum">
- <double>180.000000000000000</double>
- </property>
- <property name="value">
- <double>52.000000000000000</double>
- </property>
- </widget>
- </item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
@@ -172,6 +150,25 @@
</property>
</widget>
</item>
+ <item row="0" 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="locale">
+ <locale language="English" country="UnitedStates"/>
+ </property>
+ <property name="minimum">
+ <number>10</number>
+ </property>
+ <property name="maximum">
+ <number>180</number>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index c0ce1f22..786be62d 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013 Stanislaw Halik <sthalik@misaki.pl>
+/* Copyright (c) 2013-2015 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -132,7 +132,7 @@ void Tracker::run()
double failed = 0;
const double max_failed = 1.25;
cv::Vec3d rvec, tvec;
- double last_fov = -1;
+ int last_fov = -1;
cv::Mat intrinsics = cv::Mat::eye(3, 3, CV_32FC1);
cv::Mat dist_coeffs = cv::Mat::zeros(5, 1, CV_32FC1);
@@ -161,7 +161,7 @@ void Tracker::run()
if (last_fov != s.fov)
{
last_fov = s.fov;
- if (!get_camera_calibration(static_cast<QString>(s.camera_name), intrinsics, dist_coeffs, grayscale.cols, grayscale.rows))
+ if (!get_camera_calibration(s.camera_name, intrinsics, dist_coeffs, grayscale.cols, grayscale.rows, s.fov))
{
intrinsics.at<float> (0, 0) = focal_length_w;
intrinsics.at<float> (1, 1) = focal_length_h;
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
index ae574338..9691a75c 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013 Stanislaw Halik <sthalik@misaki.pl>
+/* Copyright (c) 2013-2015 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -26,7 +26,8 @@
using namespace options;
struct settings : opts {
- value<double> fov, headpos_x, headpos_y, headpos_z;
+ value<int> fov;
+ value<double> headpos_x, headpos_y, headpos_z;
value<QString> camera_name;
value<int> force_fps, resolution;
settings() :
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index 86992911..2ac614a2 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -1,4 +1,3 @@
-#include "stdafx.h"
#include "headtracker-ftnoir.h"
#include "ftnoir_tracker_ht.h"
#include "ui_ht-trackercontrols.h"
diff --git a/ftnoir_tracker_ht/ht_video_widget.cpp b/ftnoir_tracker_ht/ht_video_widget.cpp
index 1c5f565c..ef58c98f 100644
--- a/ftnoir_tracker_ht/ht_video_widget.cpp
+++ b/ftnoir_tracker_ht/ht_video_widget.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 Patrick Ruoff
+/* Copyright (c) 2014 Stanislaw Halik
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -7,8 +7,6 @@
#include "ht_video_widget.h"
-#include <QDebug>
-
using namespace std;
void HTVideoWidget::update_image(unsigned char *frame, int width, int height)
diff --git a/ftnoir_tracker_ht/ht_video_widget.h b/ftnoir_tracker_ht/ht_video_widget.h
index be4aee44..054b2cf4 100644
--- a/ftnoir_tracker_ht/ht_video_widget.h
+++ b/ftnoir_tracker_ht/ht_video_widget.h
@@ -1,27 +1,21 @@
-/* Copyright (c) 2012 Patrick Ruoff
+/* Copyright (c) 2014 Stanislaw Halik
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*/
+#pragma once
-#ifndef VIDEOWIDGET_H
-#define VIDEOWIDGET_H
-
-#include <QTime>
+#include <QTimer>
#include <QWidget>
#include <QMutex>
#include <QMutexLocker>
-#include <QLabel>
#include <QPainter>
#include <QPaintEvent>
-#include <QTimer>
-// ----------------------------------------------------------------------------
class HTVideoWidget : public QWidget
{
Q_OBJECT
-
public:
HTVideoWidget(QWidget *parent) : QWidget(parent), fb(), width(0), height(0), fresh(false) {
connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint()));
@@ -35,7 +29,6 @@ protected slots:
painter.drawImage(e->rect(), texture);
}
void update_and_repaint();
-
private:
QMutex mtx;
QImage texture;
@@ -44,5 +37,3 @@ private:
int width,height;
bool fresh;
};
-
-#endif // VIDEOWIDGET_H
diff --git a/ftnoir_tracker_ht/stdafx.h b/ftnoir_tracker_ht/stdafx.h
deleted file mode 100644
index e69de29b..00000000
--- a/ftnoir_tracker_ht/stdafx.h
+++ /dev/null
diff --git a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
index 9fe382c3..45cf2f10 100644
--- a/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
+++ b/ftnoir_tracker_joystick/ftnoir_tracker_joystick.cpp
@@ -1,3 +1,9 @@
+/* Copyright (c) 2013 Stanislaw Halik <sthalik@misaki.pl>
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ */
#include "ftnoir_tracker_joystick.h"
#include "opentrack/plugin-api.hpp"
#include <QMutexLocker>
diff --git a/ftnoir_tracker_pt/camera.cpp b/ftnoir_tracker_pt/camera.cpp
index 9168a3e4..2e745f2a 100644
--- a/ftnoir_tracker_pt/camera.cpp
+++ b/ftnoir_tracker_pt/camera.cpp
@@ -61,6 +61,16 @@ void Camera::set_res(int x_res, int y_res)
}
}
+CamInfo Camera::get_info()
+{
+ if (cam_info.res_x == 0 || cam_info.res_y == 0)
+ {
+ cv::Mat tmp;
+ _get_frame(&tmp);
+ }
+ return cam_info;
+}
+
bool Camera::get_frame(float dt, cv::Mat* frame)
{
bool new_frame = _get_frame(frame);
diff --git a/ftnoir_tracker_pt/camera.h b/ftnoir_tracker_pt/camera.h
index 63614ded..2c42652a 100644
--- a/ftnoir_tracker_pt/camera.h
+++ b/ftnoir_tracker_pt/camera.h
@@ -54,8 +54,8 @@ public:
bool get_frame(float dt, cv::Mat* frame);
// WARNING: returned references are valid as long as object
- const CamInfo& get_info() const { return cam_info; }
- const CamInfo& get_desired() const { return cam_desired; }
+ CamInfo get_info();
+ CamInfo get_desired() const { return cam_desired; }
protected:
// get a frame from the camera
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index 474123d0..716fddfd 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -12,6 +12,7 @@
#include <QFile>
#include <QCoreApplication>
#include "opentrack/camera-names.hpp"
+#include "opentrack/opencv-calibration.hpp"
using namespace std;
using namespace cv;
@@ -67,11 +68,14 @@ float Tracker_PT::get_focal_length()
}
const float diag_fov = static_cast<int>(fov_) * pi / 180.f;
+ QMutexLocker l(&camera_mtx);
+ if (!intrinsics.empty())
+ return intrinsics.at<float>(0, 0);
CamInfo info = camera.get_info();
const int w = info.res_x, h = info.res_y;
const double diag = sqrt(w * w + h * h)/w;
const double fov = 2.*atan(tan(diag_fov/2.0)/sqrt(1. + diag*diag));
- return .5 / tan(.5 * fov);
+ return w*.5 / tan(.5 * fov);
}
void Tracker_PT::run()
@@ -105,7 +109,18 @@ void Tracker_PT::run()
ever_success |= success;
if (success)
- point_tracker.track(points, PointModel(s), get_focal_length(), s.dynamic_pose, s.init_phase_timeout);
+ {
+ if (!intrinsics.empty())
+ {
+ std::vector<cv::Vec2f> points_;
+ cv::undistortPoints(points, points_, intrinsics, dist_coeffs);
+ point_tracker.track(points_, PointModel(s), get_focal_length(), s.dynamic_pose, s.init_phase_timeout);
+ }
+ else
+ {
+ point_tracker.track(points, PointModel(s), get_focal_length(), s.dynamic_pose, s.init_phase_timeout);
+ }
+ }
{
Affine X_CM = pose();
@@ -114,25 +129,23 @@ void Tracker_PT::run()
cv::Vec3f p = X_GH.t; // head (center?) position in global space
float fx = get_focal_length();
cv::Vec2f p_(p[0] / p[2] * fx, p[1] / p[2] * fx); // projected to screen
-
points.push_back(p_);
}
for (unsigned i = 0; i < points.size(); i++)
{
auto& p = points[i];
- auto p2 = cv::Point(p[0] * frame.cols + frame.cols/2, -p[1] * frame.cols + frame.rows/2);
cv::Scalar color(0, 255, 0);
if (i == points.size()-1)
color = cv::Scalar(0, 0, 255);
cv::line(frame,
- cv::Point(p2.x - 20, p2.y),
- cv::Point(p2.x + 20, p2.y),
+ cv::Point(p[0] - 20, p[1]),
+ cv::Point(p[0] + 20, p[1]),
color,
4);
cv::line(frame,
- cv::Point(p2.x, p2.y - 20),
- cv::Point(p2.x, p2.y + 20),
+ cv::Point(p[0], p[1] - 20),
+ cv::Point(p[0], p[1] + 20),
color,
4);
}
@@ -152,7 +165,6 @@ void Tracker_PT::apply_settings()
{
qDebug()<<"Tracker:: Applying settings";
QMutexLocker l(&camera_mtx);
- QMutexLocker lock(&mutex);
camera.set_device_index(camera_name_to_index("PS3Eye Camera"));
int res_x, res_y, cam_fps;
switch (s.camera_mode)
@@ -182,6 +194,26 @@ void Tracker_PT::apply_settings()
camera.set_res(res_x, res_y);
camera.set_fps(cam_fps);
+ cv::Mat intrinsics_ = cv::Mat::eye(3, 3, CV_32FC1);
+ cv::Mat dist_coeffs_ = cv::Mat::zeros(5, 1, CV_32FC1);
+ intrinsics = cv::Mat();
+ dist_coeffs = cv::Mat();
+ int fov;
+ switch (s.fov)
+ {
+ default:
+ case 0: fov = 56; break;
+ case 1: fov = 75; break;
+ }
+ if (get_camera_calibration("PS3Eye Camera", intrinsics_, dist_coeffs_, res_x, res_y, fov))
+ {
+ intrinsics = intrinsics_.clone();
+ dist_coeffs = dist_coeffs_.clone();
+ qDebug() << "calibrated";
+ }
+ else
+ qDebug() << "not calibrated!";
+
qDebug()<<"Tracker::apply ends";
}
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
index 21da9a2c..aeda7dd7 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
@@ -78,6 +78,7 @@ private:
Timer time;
volatile bool ever_success;
+ cv::Mat intrinsics, dist_coeffs;
static constexpr double rad2deg = 180.0/3.14159265;
static constexpr double deg2rad = 3.14159265/180.0;
diff --git a/ftnoir_tracker_pt/point_extractor.cpp b/ftnoir_tracker_pt/point_extractor.cpp
index e81e3aa0..cc9dbce1 100644
--- a/ftnoir_tracker_pt/point_extractor.cpp
+++ b/ftnoir_tracker_pt/point_extractor.cpp
@@ -211,8 +211,7 @@ std::vector<Vec2f> PointExtractor::extract_points(Mat& frame)
for (auto& b : simple_blob::merge(blobs))
{
auto pos = b.effective_pos();
- Vec2f p((pos[0] - W/2)/W, -(pos[1] - H/2)/W);
- points.push_back(p);
+ points.push_back(pos);
}
vector<Mat> channels_;
diff --git a/ftnoir_tracker_pt/pt_video_widget.cpp b/ftnoir_tracker_pt/pt_video_widget.cpp
index 12f01413..15fc5a86 100644
--- a/ftnoir_tracker_pt/pt_video_widget.cpp
+++ b/ftnoir_tracker_pt/pt_video_widget.cpp
@@ -9,9 +9,6 @@
#include "pt_video_widget.h"
-#include <QDebug>
-#include <QHBoxLayout>
-
using namespace cv;
using namespace std;
diff --git a/ftnoir_tracker_pt/pt_video_widget.h b/ftnoir_tracker_pt/pt_video_widget.h
index 09818254..af1d60fd 100644
--- a/ftnoir_tracker_pt/pt_video_widget.h
+++ b/ftnoir_tracker_pt/pt_video_widget.h
@@ -1,4 +1,5 @@
/* Copyright (c) 2012 Patrick Ruoff
+ * Copyright (c) 2014 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -8,15 +9,9 @@
#pragma once
#include <QObject>
-#include <QTime>
-#include <QDialog>
+#include <QWidget>
#include <opencv2/core/core.hpp>
-#ifndef OPENTRACK_API
-# include <QGLWidget>
-# include <boost/shared_ptr.hpp>
-#else
-# include <memory>
-#endif
+#include <memory>
#include <QPainter>
#include <QPaintEvent>
#include <QTimer>
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
index b60e7ccc..bc42f402 100644
--- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
+++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2014, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#include "ftnoir_tracker_udp.h"
#include "opentrack/plugin-api.hpp"
diff --git a/opentrack/camera-names.hpp b/opentrack/camera-names.hpp
index fd869e6b..4ae07a9f 100644
--- a/opentrack/camera-names.hpp
+++ b/opentrack/camera-names.hpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2014-2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#pragma once
#include <QList>
diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp
index d3a49a83..300c0561 100644
--- a/opentrack/main-settings.hpp
+++ b/opentrack/main-settings.hpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#pragma once
#include <QString>
diff --git a/opentrack/opencv-calibration.hpp b/opentrack/opencv-calibration.hpp
index 6dee9908..99e6d4c7 100644
--- a/opentrack/opencv-calibration.hpp
+++ b/opentrack/opencv-calibration.hpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#pragma once
#include <QCoreApplication>
#include <QString>
@@ -6,21 +14,31 @@
#include <opencv2/core.hpp>
template<typename = void>
-bool get_camera_calibration(const QString& camera_name, cv::Mat& intrinsics, cv::Mat& distortion, int w, int h)
+bool get_camera_calibration(const QString& camera_name, cv::Mat& intrinsics, cv::Mat& distortion, int w, int h, int fov)
{
- QString pathname_ = QCoreApplication::applicationDirPath() + "/camera/" + camera_name + ".yml";
- std::string pathname = pathname_.toStdString();
- cv::FileStorage fs(pathname, cv::FileStorage::READ);
- if (!fs.isOpened())
- return false;
- cv::Mat intrinsics_, distortion_;
- fs["camera_matrix"] >> intrinsics_;
- fs["distortion_coefficients"] >> distortion_;
- intrinsics_.at<double>(0, 0) *= w / 640.;
- intrinsics_.at<double>(2, 0) *= w / 640.;
- intrinsics_.at<double>(1, 1) *= h / 480.;
- intrinsics_.at<double>(2, 1) *= h / 480.;
- intrinsics = intrinsics_;
- distortion = distortion_;
- return true;
+ const QString pathnames[] = {
+ QCoreApplication::applicationDirPath() + "/camera/" + camera_name + "-" + QString::number(fov) + ".yml",
+ QCoreApplication::applicationDirPath() + "/camera/" + camera_name + ".yml",
+ };
+ for (auto& pathname : pathnames)
+ {
+ cv::FileStorage fs(pathname.toStdString(), cv::FileStorage::READ);
+ if (!fs.isOpened())
+ continue;
+ cv::Mat intrinsics_, distortion_;
+ fs["camera_matrix"] >> intrinsics_;
+ fs["distortion_coefficients"] >> distortion_;
+ int w_, h_;
+ fs["image_width"] >> w_;
+ fs["image_height"] >> h_;
+ double w__ = w_, h__ = h_;
+ intrinsics_.at<float>(0, 0) *= w / w__;
+ intrinsics_.at<float>(2, 0) *= w / w__;
+ intrinsics_.at<float>(1, 1) *= h / h__;
+ intrinsics_.at<float>(2, 1) *= h / h__;
+ intrinsics = intrinsics_;
+ distortion = distortion_;
+ return true;
+ }
+ return false;
}
diff --git a/opentrack/opencv-camera-dialog.hpp b/opentrack/opencv-camera-dialog.hpp
index cd3d38e7..0d4a51af 100644
--- a/opentrack/opencv-camera-dialog.hpp
+++ b/opentrack/opencv-camera-dialog.hpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#pragma once
#include <QTimer>
diff --git a/opentrack/plugin-api.hpp b/opentrack/plugin-api.hpp
index 021f5017..b0da4950 100644
--- a/opentrack/plugin-api.hpp
+++ b/opentrack/plugin-api.hpp
@@ -1,3 +1,11 @@
+/* Copyright (c) 2013-2015, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#pragma once
#include "export.hpp"
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp
index e81b6bb0..ed1701c7 100644
--- a/opentrack/shortcuts.cpp
+++ b/opentrack/shortcuts.cpp
@@ -1,7 +1,14 @@
+/* Copyright (c) 2014, Stanislaw Halik <sthalik@misaki.pl>
+
+ * Permission to use, copy, modify, and/or distribute this
+ * software for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice and this permission
+ * notice appear in all copies.
+ */
+
#include "shortcuts.h"
#include <QMutexLocker>
-
#if defined(_WIN32)
#include <windows.h>
diff --git a/opentrack/tracker.cpp b/opentrack/tracker.cpp
index ce23afad..e9d85f5d 100644
--- a/opentrack/tracker.cpp
+++ b/opentrack/tracker.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2013 Stanislaw Halik <sthalik@misaki.pl>
+/* Copyright (c) 2012-2015 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/pose-widget/glwidget.cpp b/pose-widget/glwidget.cpp
index ed4560af..8fbe046e 100644
--- a/pose-widget/glwidget.cpp
+++ b/pose-widget/glwidget.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013 Stanislaw Halik <sthalik@misaki.pl>
+/* Copyright (c) 2013, 2015 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
diff --git a/pose-widget/glwidget.h b/pose-widget/glwidget.h
index f54ae48d..88961fbd 100644
--- a/pose-widget/glwidget.h
+++ b/pose-widget/glwidget.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013 Stanislaw Halik <sthalik@misaki.pl>
+/* Copyright (c) 2013, 2015 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above