From 4c0a25afd17900a21f9d9b62508cba7f821422f3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 10 Apr 2013 03:12:08 +0200 Subject: Externalize classification delay in milliseconds --- bin/tracker-ht/headtracker-ftnoir.exe | Bin 4487168 -> 4482560 bytes ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 29 +-- ftnoir_tracker_ht/ht-api.h | 1 + ftnoir_tracker_ht/ht-trackercontrols.ui | 308 +------------------------------- 4 files changed, 25 insertions(+), 313 deletions(-) diff --git a/bin/tracker-ht/headtracker-ftnoir.exe b/bin/tracker-ht/headtracker-ftnoir.exe index f69b48b5..c1d9d3a7 100644 Binary files a/bin/tracker-ht/headtracker-ftnoir.exe and b/bin/tracker-ht/headtracker-ftnoir.exe differ diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp index a6623619..4ea8180c 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp @@ -109,28 +109,30 @@ static void load_settings(ht_config_t* config, Tracker* tracker) config->field_of_view = iniFile.value("fov", 52).toFloat(); config->pyrlk_pyramids = 3; config->pyrlk_win_size_w = config->pyrlk_win_size_h = 21; - config->max_keypoints = 100; - config->keypoint_quality = 5; - config->keypoint_distance = 1.5; - config->keypoint_3distance = 7; + config->max_keypoints = 200; + config->keypoint_quality = 11; + config->keypoint_distance = 1; + config->keypoint_3distance = 4; //config->force_width = 640; //config->force_height = 480; config->force_fps = iniFile.value("fps", 0).toInt(); config->camera_index = iniFile.value("camera-index", -1).toInt(); config->ransac_num_iters = 100; - config->ransac_max_reprojection_error = 3.9; - config->ransac_max_inlier_error = 3.8; - config->ransac_max_mean_error = 3.7; + config->ransac_max_reprojection_error = 3.1; + config->ransac_max_inlier_error = 3.6; + config->ransac_max_mean_error = 3.8; config->ransac_abs_max_mean_error = 9; - config->debug = 0; - config->ransac_min_features = 0.85; + config->debug = 1; + config->ransac_min_features = 0.82; int res = iniFile.value("resolution", 0).toInt(); if (res < 0 || res >= (int)(sizeof(*resolution_choices) / sizeof(resolution_tuple))) res = 0; resolution_tuple r = resolution_choices[res]; config->force_width = r.width; config->force_height = r.height; - config->user_landmarks = iniFile.value("use-bashed-coords").toBool(); + config->user_landmarks = false; //iniFile.value("use-bashed-coords").toBool(); + config->flandmark_delay = 200; +#if 0 if (config->user_landmarks) { config->user_landmark_locations[0][0] = iniFile.value("b1").toDouble(); @@ -146,6 +148,7 @@ static void load_settings(ht_config_t* config, Tracker* tracker) config->user_landmark_locations[1][3] = iniFile.value("b11").toDouble(); config->user_landmark_locations[2][3] = iniFile.value("b12").toDouble(); } +#endif qDebug() << "width" << r.width << "height" << r.height; if (tracker) { @@ -330,7 +333,7 @@ TrackerControls::TrackerControls() connect(ui.tz, SIGNAL(stateChanged(int)), this, SLOT(settingChanged(int))); connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(doCancel())); connect(ui.buttonOK, SIGNAL(clicked()), this, SLOT(doOK())); - connect(ui.buttonSettings, SIGNAL(clicked()), this, SLOT(cameraSettings())); + //connect(ui.buttonSettings, SIGNAL(clicked()), this, SLOT(cameraSettings())); loadSettings(); settingsDirty = false; } @@ -386,6 +389,7 @@ void TrackerControls::loadSettings() ui.ty->setCheckState(iniFile.value("enable-ty", true).toBool() ? Qt::Checked : Qt::Unchecked); ui.tz->setCheckState(iniFile.value("enable-tz", true).toBool() ? Qt::Checked : Qt::Unchecked); ui.resolution->setCurrentIndex(iniFile.value("resolution", 0).toInt()); +#if 0 ui.groupBox_2->setChecked(iniFile.value("use-bashed-coords").toBool()); ui.doubleSpinBox_1->setValue(iniFile.value("b1", 0).toDouble()); ui.doubleSpinBox_2->setValue(iniFile.value("b2", 0).toDouble()); @@ -399,6 +403,7 @@ void TrackerControls::loadSettings() ui.doubleSpinBox_10->setValue(iniFile.value("b10", 0).toDouble()); ui.doubleSpinBox_11->setValue(iniFile.value("b11", 0).toDouble()); ui.doubleSpinBox_12->setValue(iniFile.value("b12", 0).toDouble()); +#endif iniFile.endGroup(); settingsDirty = false; } @@ -437,6 +442,7 @@ void TrackerControls::save() iniFile.setValue("enable-ty", ui.ty->checkState() != Qt::Unchecked ? true : false); iniFile.setValue("enable-tz", ui.tz->checkState() != Qt::Unchecked ? true : false); iniFile.setValue("resolution", ui.resolution->currentIndex()); +#if 0 iniFile.setValue("b1", ui.doubleSpinBox_1->value()); iniFile.setValue("b2", ui.doubleSpinBox_2->value()); iniFile.setValue("b3", ui.doubleSpinBox_3->value()); @@ -450,6 +456,7 @@ void TrackerControls::save() iniFile.setValue("b11", ui.doubleSpinBox_11->value()); iniFile.setValue("b12", ui.doubleSpinBox_12->value()); iniFile.setValue("use-bashed-coords", ui.groupBox_2->isChecked()); +#endif iniFile.endGroup(); settingsDirty = false; } diff --git a/ftnoir_tracker_ht/ht-api.h b/ftnoir_tracker_ht/ht-api.h index 81caf16f..c09dbf55 100644 --- a/ftnoir_tracker_ht/ht-api.h +++ b/ftnoir_tracker_ht/ht-api.h @@ -41,6 +41,7 @@ typedef struct ht_config { float ransac_abs_max_mean_error; bool user_landmarks; float user_landmark_locations[3][4]; + float flandmark_delay; } ht_config_t; typedef struct { diff --git a/ftnoir_tracker_ht/ht-trackercontrols.ui b/ftnoir_tracker_ht/ht-trackercontrols.ui index 968b7dc7..5f414fc2 100644 --- a/ftnoir_tracker_ht/ht-trackercontrols.ui +++ b/ftnoir_tracker_ht/ht-trackercontrols.ui @@ -9,8 +9,8 @@ 0 0 - 724 - 160 + 549 + 131 @@ -122,8 +122,8 @@ - 220 - 130 + 390 + 100 75 23 @@ -135,8 +135,8 @@ - 300 - 130 + 470 + 100 75 23 @@ -289,302 +289,6 @@ - - - - 500 - 10 - 221 - 141 - - - - Bashed coordinates - - - true - - - false - - - - - 10 - 20 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 80 - 20 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 150 - 20 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 150 - 50 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 10 - 50 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 80 - 50 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 150 - 80 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 10 - 80 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 80 - 80 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 150 - 110 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 80 - 110 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - 10 - 110 - 61 - 22 - - - - true - - - QAbstractSpinBox::NoButtons - - - 5 - - - -99.000000000000000 - - - - - - - 10 - 130 - 101 - 23 - - - - Camera settings - - -- cgit v1.2.3