From 984f1c719a6636ec5e155a218bd69fec7da8b71c Mon Sep 17 00:00:00 2001 From: Stéphane Lenclud Date: Sat, 13 Apr 2019 20:27:41 +0200 Subject: Easy Tracker: Sorting out UI and logo issues. --- tracker-easy/FTNoIR_PT_Controls.ui | 1430 -------------------------- tracker-easy/Resources/Logo_IR.png | Bin 18357 -> 0 bytes tracker-easy/Resources/easy-tracker-logo.png | Bin 0 -> 18357 bytes tracker-easy/cv-point-extractor.cpp | 4 +- tracker-easy/module.cpp | 2 +- tracker-easy/tracker-easy-dialog.h | 2 +- tracker-easy/tracker-easy-settings.ui | 1421 +++++++++++++++++++++++++ tracker-easy/tracker-easy.cpp | 4 + tracker-easy/tracker_easy.qrc | 2 +- 9 files changed, 1430 insertions(+), 1435 deletions(-) delete mode 100644 tracker-easy/FTNoIR_PT_Controls.ui delete mode 100644 tracker-easy/Resources/Logo_IR.png create mode 100644 tracker-easy/Resources/easy-tracker-logo.png create mode 100644 tracker-easy/tracker-easy-settings.ui diff --git a/tracker-easy/FTNoIR_PT_Controls.ui b/tracker-easy/FTNoIR_PT_Controls.ui deleted file mode 100644 index 061f5351..00000000 --- a/tracker-easy/FTNoIR_PT_Controls.ui +++ /dev/null @@ -1,1430 +0,0 @@ - - - UICPTClientControls - - - Qt::NonModal - - - - 0 - 0 - 418 - 724 - - - - - 0 - 0 - - - - PointTracker Settings - - - - :/Resources/Logo_IR.png:/Resources/Logo_IR.png - - - Qt::LeftToRight - - - false - - - - QLayout::SetFixedSize - - - - - - 0 - 0 - - - - Status - - - - - - - 0 - 0 - - - - Extracted Points: - - - - - - - - 0 - 0 - - - - Camera Info: - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - 0 - 0 - - - - - - - 0 - - - - Camera - - - - - - - 0 - 0 - - - - Camera settings - - - - - - - 0 - 0 - - - - 10 - - - - - - - - 0 - 0 - - - - ° - - - - - - 10 - - - 90 - - - - - - - - 0 - 0 - - - - Diagonal field of view - - - - - - - - 0 - 0 - - - - Width - - - - - - - - 0 - 0 - - - - FPS - - - fps_spin - - - - - - - - 0 - 0 - - - - Desired capture height - - - px - - - 2000 - - - 10 - - - - - - - - 0 - 0 - - - - Dynamic pose timeout - - - - - - - - 0 - 0 - - - - Desired capture framerate - - - Hz - - - 2000 - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - Desired capture width - - - px - - - 2000 - - - 10 - - - - - - - - 0 - 0 - - - - Height - - - - - - - - 0 - 0 - - - - ms - - - 50 - - - 5000 - - - - - - - - 0 - 0 - - - - Device - - - camdevice_combo - - - - - - - - 0 - 0 - - - - Open - - - - - - - - 0 - 0 - - - - Camera settings (when available) - - - - - - - - 0 - 0 - - - - Color channels used - - - - - - - - 0 - 0 - - - - - Average - - - - - Natural - - - - - Red only - - - - - Green only - - - - - Blue only - - - - - - - - - 0 - 0 - - - - Dynamic pose (for caps only, never clips) - - - - - - - - - - - 0 - 0 - - - - Point extraction - - - - - - - 0 - 0 - - - - Threshold - - - threshold_slider - - - - - - - - 0 - 0 - - - - Min size - - - mindiam_spin - - - - - - - - 0 - 0 - - - - Max size - - - maxdiam_spin - - - - - - - - 0 - 0 - - - - Intensity threshold for point extraction - - - 255 - - - 1 - - - 127 - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - 25 - - - - - - - - 0 - 0 - - - - Enable, slider sets point size - - - - - - - - 0 - 0 - - - - Automatic threshold - - - - - - - - 0 - 0 - - - - Maximum point diameter - - - px - - - 1 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - Minimum point diameter - - - px - - - 1 - - - 0.100000000000000 - - - - - - - - 0 - 0 - - - - - - - - - - - Value - - - - - - - - - - - Model - - - - - - - 0 - 0 - - - - QTabWidget::Rounded - - - 0 - - - false - - - false - - - false - - - - Clip - - - - - - - 0 - 0 - - - - - 331 - 208 - - - - Model Dimensions - - - - - 70 - 35 - 100 - 22 - - - - mm - - - -65535 - - - 65535 - - - - - - 150 - 130 - 100 - 22 - - - - mm - - - -65535 - - - 65535 - - - - - - 65 - 55 - 71 - 111 - - - - - - - :/Resources/clip_side.png - - - - - - 20 - 40 - 46 - 13 - - - - Side - - - - - - 50 - 160 - 100 - 22 - - - - mm - - - -65535 - - - 65535 - - - - - - 150 - 70 - 100 - 22 - - - - mm - - - -65535 - - - 65535 - - - - - - 290 - 40 - 46 - 13 - - - - Front - - - - - - 300 - 70 - 21 - 111 - - - - - - - :/Resources/clip_front.png - - - - - - - - - Cap - - - - - - - 331 - 208 - - - - Model Dimensions - - - - - 100 - 60 - 111 - 81 - - - - - - - :/Resources/cap_side.png - - - - - - 20 - 40 - 46 - 13 - - - - Side - - - - - - 90 - 40 - 101 - 22 - - - - mm - - - -65535 - - - 65535 - - - - - - 220 - 100 - 81 - 81 - - - - - - - :/Resources/cap_front.png - - - - - - 240 - 70 - 81 - 22 - - - - mm - - - -65535 - - - 65535 - - - - - - 240 - 40 - 46 - 13 - - - - Front - - - - - - 20 - 90 - 81 - 22 - - - - mm - - - -65535 - - - 65535 - - - - - - - - - Custom - - - - - - Model Dimensions - - - - - - - 0 - 0 - - - - z: - - - - - - - mm - - - -65535 - - - 65535 - - - - - - - - 0 - 0 - - - - x: - - - - - - - mm - - - -65535 - - - 65535 - - - - - - - mm - - - -65535 - - - 65535 - - - - - - - mm - - - -65535 - - - 65535 - - - - - - - mm - - - -65535 - - - 65535 - - - - - - - - 0 - 0 - - - - <html><head/><body><p>Location of the two remaining model points<br/>with respect to the reference point in default pose</p><p>Use any units you want, not necessarily centimeters.</p></body></html> - - - - - - - mm - - - -65535 - - - 65535 - - - - - - - - 0 - 0 - - - - y: - - - - - - - - 0 - 0 - - - - x: - - - - - - - - 0 - 0 - - - - <html><head/><body><p><span style=" font-size:16pt;">P</span><span style=" font-size:16pt; vertical-align:sub;">3</span></p></body></html> - - - - - - - - 0 - 0 - - - - <html><head/><body><p><span style=" font-size:16pt;">P</span><span style=" font-size:16pt; vertical-align:sub;">2</span></p></body></html> - - - - - - - - 0 - 0 - - - - z: - - - - - - - - 0 - 0 - - - - y: - - - - - - - - - - - - - - - 0 - 0 - - - - Model position - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - - - mm - - - -65535 - - - 65536 - - - - - - - - 0 - 0 - - - - z: - - - - - - - mm - - - -65535 - - - 65536 - - - - - - - - 0 - 0 - - - - x: - - - - - - - mm - - - -65535 - - - 65536 - - - - - - - - 0 - 0 - - - - y: - - - - - - - - - - QFrame::NoFrame - - - QFrame::Raised - - - - - - Use only yaw and pitch while calibrating. -Don't roll or change position. - - - Qt::AlignCenter - - - true - - - false - - - - - - - - 0 - 0 - - - - - - - true - - - - - - - false - - - Start calibration - - - true - - - - - - - - - - - - - - About - - - - - - <html><head/><body><p><span style=" font-weight:600;">FTNoIR PointTracker Plugin<br/>Version 1.1</span></p><p><span style=" font-weight:600;">by Patrick Ruoff</span></p><p><a href="http://ftnoirpt.sourceforge.net/"><span style=" font-weight:600; text-decoration: underline; color:#0000ff;">Manual (external)</span></a></p></body></html> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - - - - :/Resources/Logo_IR.png - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - - - - - - 0 - 0 - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - tabWidget - camdevice_combo - res_x_spin - res_y_spin - fps_spin - fov - dynamic_pose - init_phase_timeout - camera_settings - blob_color - auto_threshold - threshold_slider - mindiam_spin - maxdiam_spin - model_tabs - clip_tlength_spin - clip_theight_spin - clip_bheight_spin - clip_blength_spin - cap_length_spin - cap_height_spin - cap_width_spin - m1x_spin - m1y_spin - m1z_spin - m2x_spin - m2y_spin - m2z_spin - tx_spin - ty_spin - tz_spin - tcalib_button - - - - - - - - - - - - - - - - startEngineClicked() - stopEngineClicked() - cameraSettingsClicked() - - diff --git a/tracker-easy/Resources/Logo_IR.png b/tracker-easy/Resources/Logo_IR.png deleted file mode 100644 index 5a7da41c..00000000 Binary files a/tracker-easy/Resources/Logo_IR.png and /dev/null differ diff --git a/tracker-easy/Resources/easy-tracker-logo.png b/tracker-easy/Resources/easy-tracker-logo.png new file mode 100644 index 00000000..5a7da41c Binary files /dev/null and b/tracker-easy/Resources/easy-tracker-logo.png differ diff --git a/tracker-easy/cv-point-extractor.cpp b/tracker-easy/cv-point-extractor.cpp index 9720eb63..368f5587 100644 --- a/tracker-easy/cv-point-extractor.cpp +++ b/tracker-easy/cv-point-extractor.cpp @@ -79,10 +79,10 @@ namespace EasyTracker } } - // Keep the three points which are highest, i.e. with lowest Y coordinates + // Keep only the three points which are highest, i.e. with lowest Y coordinates // That's most usefull to discard noise from features below your cap/head. // Typically noise comming from zippers and metal parts on your clothing. - // With a cap tracker it also successfully discards noise glasses. + // With a cap tracker it also successfully discards noise from glasses. // However it may not work as good with a clip user wearing glasses. while (aPoints.size() > 3) // Until we have no more than three points { diff --git a/tracker-easy/module.cpp b/tracker-easy/module.cpp index c5751e6e..b6d21c80 100644 --- a/tracker-easy/module.cpp +++ b/tracker-easy/module.cpp @@ -12,7 +12,7 @@ namespace EasyTracker { QString Metadata::name() { return tr("Easy Tracker 0.1"); } - QIcon Metadata::icon() { return QIcon(":/Resources/Logo_IR.png"); } + QIcon Metadata::icon() { return QIcon(":/Resources/easy-tracker-logo.png"); } } diff --git a/tracker-easy/tracker-easy-dialog.h b/tracker-easy/tracker-easy-dialog.h index 8d4cffbd..86b9771b 100644 --- a/tracker-easy/tracker-easy-dialog.h +++ b/tracker-easy/tracker-easy-dialog.h @@ -10,7 +10,7 @@ #include "tracker-easy-api.h" #include "tracker-easy.h" -#include "ui_FTNoIR_PT_Controls.h" +#include "ui_tracker-easy-settings.h" #include "cv/translation-calibrator.hpp" #include "video/video-widget.hpp" diff --git a/tracker-easy/tracker-easy-settings.ui b/tracker-easy/tracker-easy-settings.ui new file mode 100644 index 00000000..41f08707 --- /dev/null +++ b/tracker-easy/tracker-easy-settings.ui @@ -0,0 +1,1421 @@ + + + UICPTClientControls + + + Qt::NonModal + + + + 0 + 0 + 418 + 724 + + + + + 0 + 0 + + + + PointTracker Settings + + + + :/Resources/tracker-easy-logo.png:/Resources/tracker-easy-logo.png + + + Qt::LeftToRight + + + false + + + + QLayout::SetFixedSize + + + + + + 0 + 0 + + + + Status + + + + + + + 0 + 0 + + + + Extracted Points: + + + + + + + + 0 + 0 + + + + Camera Info: + + + + + + + + 0 + 0 + + + + + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + 0 + 0 + + + + + + + 0 + + + + Camera + + + + + + + 0 + 0 + + + + Camera settings + + + + + + + 0 + 0 + + + + 10 + + + + + + + + 0 + 0 + + + + ° + + + + + + 10 + + + 90 + + + + + + + + 0 + 0 + + + + Diagonal field of view + + + + + + + + 0 + 0 + + + + Width + + + + + + + + 0 + 0 + + + + FPS + + + fps_spin + + + + + + + + 0 + 0 + + + + Desired capture height + + + px + + + 2000 + + + 10 + + + + + + + + 0 + 0 + + + + Dynamic pose timeout + + + + + + + + 0 + 0 + + + + Desired capture framerate + + + Hz + + + 2000 + + + + + + + + 0 + 0 + + + + + + + + + + + + 0 + 0 + + + + Desired capture width + + + px + + + 2000 + + + 10 + + + + + + + + 0 + 0 + + + + Height + + + + + + + + 0 + 0 + + + + ms + + + 50 + + + 5000 + + + + + + + + 0 + 0 + + + + Device + + + camdevice_combo + + + + + + + + 0 + 0 + + + + Open + + + + + + + + 0 + 0 + + + + Camera settings (when available) + + + + + + + + 0 + 0 + + + + Color channels used + + + + + + + + 0 + 0 + + + + + Average + + + + + Natural + + + + + Red only + + + + + Green only + + + + + Blue only + + + + + + + + + 0 + 0 + + + + Dynamic pose (for caps only, never clips) + + + + + + + + + + + 0 + 0 + + + + Point extraction + + + + + + + 0 + 0 + + + + Threshold + + + threshold_slider + + + + + + + + 0 + 0 + + + + Min size + + + mindiam_spin + + + + + + + + 0 + 0 + + + + Max size + + + maxdiam_spin + + + + + + + + 0 + 0 + + + + Intensity threshold for point extraction + + + 255 + + + 1 + + + 127 + + + Qt::Horizontal + + + QSlider::TicksBothSides + + + 25 + + + + + + + + 0 + 0 + + + + Enable, slider sets point size + + + + + + + + 0 + 0 + + + + Automatic threshold + + + + + + + + 0 + 0 + + + + Maximum point diameter + + + px + + + 1 + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + Minimum point diameter + + + px + + + 1 + + + 0.100000000000000 + + + + + + + + 0 + 0 + + + + + + + + + + + Value + + + + + + + + + + + Model + + + + + + + 0 + 0 + + + + QTabWidget::Rounded + + + 0 + + + false + + + false + + + false + + + + Clip + + + + + + + 0 + 0 + + + + + 331 + 208 + + + + Model Dimensions + + + + + 70 + 35 + 100 + 22 + + + + mm + + + -65535 + + + 65535 + + + + + + 150 + 130 + 100 + 22 + + + + mm + + + -65535 + + + 65535 + + + + + + 65 + 55 + 71 + 111 + + + + + + + :/Resources/clip_side.png + + + + + + 20 + 40 + 46 + 13 + + + + Side + + + + + + 50 + 160 + 100 + 22 + + + + mm + + + -65535 + + + 65535 + + + + + + 150 + 70 + 100 + 22 + + + + mm + + + -65535 + + + 65535 + + + + + + 290 + 40 + 46 + 13 + + + + Front + + + + + + 300 + 70 + 21 + 111 + + + + + + + :/Resources/clip_front.png + + + + + + + + + Cap + + + + + + + 331 + 208 + + + + Model Dimensions + + + + + 100 + 60 + 111 + 81 + + + + + + + :/Resources/cap_side.png + + + + + + 20 + 40 + 46 + 13 + + + + Side + + + + + + 90 + 40 + 101 + 22 + + + + mm + + + -65535 + + + 65535 + + + + + + 220 + 100 + 81 + 81 + + + + + + + :/Resources/cap_front.png + + + + + + 240 + 70 + 81 + 22 + + + + mm + + + -65535 + + + 65535 + + + + + + 240 + 40 + 46 + 13 + + + + Front + + + + + + 20 + 90 + 81 + 22 + + + + mm + + + -65535 + + + 65535 + + + + + + + + + Custom + + + + + + Model Dimensions + + + + + + + 0 + 0 + + + + z: + + + + + + + mm + + + -65535 + + + 65535 + + + + + + + + 0 + 0 + + + + x: + + + + + + + mm + + + -65535 + + + 65535 + + + + + + + mm + + + -65535 + + + 65535 + + + + + + + mm + + + -65535 + + + 65535 + + + + + + + mm + + + -65535 + + + 65535 + + + + + + + + 0 + 0 + + + + <html><head/><body><p>Location of the two remaining model points<br/>with respect to the reference point in default pose</p><p>Use any units you want, not necessarily centimeters.</p></body></html> + + + + + + + mm + + + -65535 + + + 65535 + + + + + + + + 0 + 0 + + + + y: + + + + + + + + 0 + 0 + + + + x: + + + + + + + + 0 + 0 + + + + <html><head/><body><p><span style=" font-size:16pt;">P</span><span style=" font-size:16pt; vertical-align:sub;">3</span></p></body></html> + + + + + + + + 0 + 0 + + + + <html><head/><body><p><span style=" font-size:16pt;">P</span><span style=" font-size:16pt; vertical-align:sub;">2</span></p></body></html> + + + + + + + + 0 + 0 + + + + z: + + + + + + + + 0 + 0 + + + + y: + + + + + + + + + + + + + + + 0 + 0 + + + + Model position + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + + + mm + + + -65535 + + + 65536 + + + + + + + + 0 + 0 + + + + z: + + + + + + + mm + + + -65535 + + + 65536 + + + + + + + + 0 + 0 + + + + x: + + + + + + + mm + + + -65535 + + + 65536 + + + + + + + + 0 + 0 + + + + y: + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + + + Use only yaw and pitch while calibrating. +Don't roll or change position. + + + Qt::AlignCenter + + + true + + + false + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + false + + + Start calibration + + + true + + + + + + + + + + + + + + About + + + + + + <html><head/><body><p><span style=" font-weight:600;">FTNoIR PointTracker Plugin<br/>Version 1.1</span></p><p><span style=" font-weight:600;">by Patrick Ruoff</span></p><p><a href="http://ftnoirpt.sourceforge.net/"><span style=" font-weight:600; text-decoration: underline; color:#0000ff;">Manual (external)</span></a></p></body></html> + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + + + + :/Resources/tracker-easy-logo.png + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + + + 0 + 0 + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + tabWidget + camdevice_combo + res_x_spin + res_y_spin + fps_spin + fov + dynamic_pose + init_phase_timeout + camera_settings + blob_color + auto_threshold + threshold_slider + mindiam_spin + maxdiam_spin + model_tabs + clip_tlength_spin + clip_theight_spin + clip_bheight_spin + clip_blength_spin + cap_length_spin + cap_height_spin + cap_width_spin + m1x_spin + m1y_spin + m1z_spin + m2x_spin + m2y_spin + m2z_spin + tx_spin + ty_spin + tz_spin + tcalib_button + + + + + + + startEngineClicked() + stopEngineClicked() + cameraSettingsClicked() + + diff --git a/tracker-easy/tracker-easy.cpp b/tracker-easy/tracker-easy.cpp index f0ff4bb7..42666677 100644 --- a/tracker-easy/tracker-easy.cpp +++ b/tracker-easy/tracker-easy.cpp @@ -332,6 +332,10 @@ namespace EasyTracker { QMutexLocker l(&camera_mtx); + iCameraInfo.fps = s.cam_fps; + iCameraInfo.width = s.cam_res_x; + iCameraInfo.height = s.cam_res_y; + return camera->start(iCameraInfo); } diff --git a/tracker-easy/tracker_easy.qrc b/tracker-easy/tracker_easy.qrc index 8be79de9..b7d1a896 100644 --- a/tracker-easy/tracker_easy.qrc +++ b/tracker-easy/tracker_easy.qrc @@ -1,6 +1,6 @@ - Resources/Logo_IR.png + Resources/easy-tracker-logo.png Resources/cap_front.png Resources/cap_side.png Resources/clip_front.png -- cgit v1.2.3