summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--clientfiles/freepie-udp/com.freepie.android.imu.apkbin167822 -> 167874 bytes
-rw-r--r--facetracknoir/main.cpp4
-rw-r--r--facetracknoir/ui.cpp2
-rw-r--r--ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp6
-rw-r--r--opentrack/options.hpp10
-rw-r--r--opentrack/plugin-support.cpp5
6 files changed, 15 insertions, 12 deletions
diff --git a/clientfiles/freepie-udp/com.freepie.android.imu.apk b/clientfiles/freepie-udp/com.freepie.android.imu.apk
index 0277b82a..11934d67 100644
--- a/clientfiles/freepie-udp/com.freepie.android.imu.apk
+++ b/clientfiles/freepie-udp/com.freepie.android.imu.apk
Binary files differ
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp
index 9c2ced45..ae237b61 100644
--- a/facetracknoir/main.cpp
+++ b/facetracknoir/main.cpp
@@ -28,9 +28,9 @@ int main(int argc, char** argv)
QApplication::setAttribute(Qt::AA_X11InitThreads, true);
QApplication app(argc, argv);
- auto w = std::make_shared<MainWindow>();
+ MainWindow w;
- w->show();
+ w.show();
app.exec();
return 0;
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index 54e4646e..c9a0b7b3 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -88,7 +88,6 @@ MainWindow::~MainWindow()
tray->hide();
stopTracker();
save();
- _exit(0);
}
void MainWindow::set_working_directory()
@@ -132,6 +131,7 @@ void MainWindow::save() {
settings->sync();
#if defined(__unix) || defined(__linux)
+ QString currentFile = group::ini_pathname();
QByteArray bytes = QFile::encodeName(currentFile);
const char* filename_as_asciiz = bytes.constData();
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
index 27d835f0..4e257e3a 100644
--- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
+++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp
@@ -204,7 +204,7 @@ void Tracker::run()
cv::cvtColor(color, grayscale, cv::COLOR_RGB2GRAY);
const int scale = grayscale.cols > 480 ? 2 : 1;
- detector.setThresholdParams(scale > 1 ? 13 : 7, 5);
+ detector.setThresholdParams(scale > 1 ? 7 : 5, 4);
const float focal_length_w = 0.5 * grayscale.cols / tan(0.5 * s.fov * HT_PI / 180);
const float focal_length_h = 0.5 * grayscale.rows / tan(0.5 * s.fov * grayscale.rows / grayscale.cols * HT_PI / 180.0);
@@ -298,7 +298,7 @@ void Tracker::run()
cv::Vec3d rvec, tvec;
- cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, cv::ITERATIVE);
+ cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec, tvec, false, CV_ITERATIVE);
std::vector<cv::Point2f> roi_projection(4);
@@ -323,7 +323,7 @@ void Tracker::run()
{
cv::Mat rvec_, tvec_;
- cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec_, tvec_, false, cv::ITERATIVE);
+ cv::solvePnP(obj_points, m, intrinsics, dist_coeffs, rvec_, tvec_, false, CV_ITERATIVE);
tvec = tvec_;
}
diff --git a/opentrack/options.hpp b/opentrack/options.hpp
index 5eae754f..23ce6f7b 100644
--- a/opentrack/options.hpp
+++ b/opentrack/options.hpp
@@ -224,7 +224,7 @@ namespace options {
{
public:
using pbundle = std::shared_ptr<v>;
- using tt = std::tuple<cnt, pbundle>;
+ using tt = std::tuple<cnt, std::weak_ptr<v>>;
private:
QMutex implsgl_mtx;
map<k, tt> implsgl_data;
@@ -242,7 +242,11 @@ namespace options {
QMutexLocker l(&implsgl_mtx);
if (implsgl_data.count(key) != 0)
- return std::get<1>(implsgl_data[key]);
+ {
+ auto shared = std::get<1>(implsgl_data[key]).lock();
+ if (shared != nullptr)
+ return shared;
+ }
qDebug() << "bundle +" << QString::fromStdString(key);
@@ -258,8 +262,6 @@ namespace options {
if (--std::get<0>(implsgl_data[key]) == 0)
implsgl_data.erase(key);
}
-
- ~opt_singleton() { implsgl_data.clear(); }
};
using pbundle = std::shared_ptr<opt_bundle>;
diff --git a/opentrack/plugin-support.cpp b/opentrack/plugin-support.cpp
index 2c129906..403798de 100644
--- a/opentrack/plugin-support.cpp
+++ b/opentrack/plugin-support.cpp
@@ -120,15 +120,16 @@ QList<mem<dylib>> dylib::enum_libraries()
dylib::dylib(const QString& filename, Type t) :
type(t),
+ filename(filename),
Dialog(nullptr),
Constructor(nullptr),
- Meta(nullptr)
+ Meta(nullptr),
+ handle(nullptr)
{
// otherwise dlopen opens the calling executable
if (filename.size() == 0)
return;
- this->filename = filename;
#if defined(_WIN32)
QString fullPath = QCoreApplication::applicationDirPath() + "/" + this->filename;
handle = new QLibrary(fullPath);