diff --git a/Core/Shaders/FeedbackBuffer.h b/Core/Shaders/FeedbackBuffer.h index ea94a840..c5aea0b2 100644 --- a/Core/Shaders/FeedbackBuffer.h +++ b/Core/Shaders/FeedbackBuffer.h @@ -25,7 +25,7 @@ #include "../Utils/Resolution.h" #include "../Utils/Intrinsics.h" #include -#include +#include /// A feedback buffer holds one vertex per pixel (see uvo) class FeedbackBuffer { diff --git a/GUI/MainController.cpp b/GUI/MainController.cpp index b01eedea..70ec1cc9 100644 --- a/GUI/MainController.cpp +++ b/GUI/MainController.cpp @@ -216,32 +216,32 @@ MainController::MainController(int argc, char* argv[]) showcaseMode = Parse::get().arg(argc, argv, "-sc", empty) > -1; gui = new GUI(logFile.length() == 0, showcaseMode); - if (Parse::get().arg(argc, argv, "-d", tmpFloat) > -1) gui->depthCutoff->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-i", tmpFloat) > -1) gui->icpWeight->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-or", tmpFloat) > -1) gui->outlierCoefficient->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-segMinNew", tmpFloat) > -1) gui->minRelSizeNew->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-segMaxNew", tmpFloat) > -1) gui->maxRelSizeNew->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-crfRGB", tmpFloat) > -1) gui->pairwiseRGBSTD->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-crfDepth", tmpFloat) > -1) gui->pairwiseDepthSTD->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-crfPos", tmpFloat) > -1) gui->pairwisePosSTD->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-crfAppearance", tmpFloat) > -1) gui->pairwiseAppearanceWeight->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-crfSmooth", tmpFloat) > -1) gui->pairwiseSmoothnessWeight->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-offset", tmpFloat) > -1) gui->modelSpawnOffset->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-thNew", tmpFloat) > -1) gui->thresholdNew->Ref().Set(tmpFloat); - if (Parse::get().arg(argc, argv, "-k", tmpFloat) > -1) gui->unaryErrorK->Ref().Set(tmpFloat); - - gui->flipColors->Ref().Set(logReader->flipColors); - gui->rgbOnly->Ref().Set(false); - gui->enableMultiModel->Ref().Set(Parse::get().arg(argc, argv, "-static", empty) <= -1); - gui->enableSmartDelete->Ref().Set(Parse::get().arg(argc, argv, "-keep", empty) <= -1); - gui->pyramid->Ref().Set(true); - gui->fastOdom->Ref().Set(fastOdom); - // gui->confidenceThreshold->Ref().Set(confidence); - gui->so3->Ref().Set(so3); - gui->frameToFrameRGB->Ref().Set(frameToFrameRGB); - gui->pause->Ref().Set((Parse::get().arg(argc, argv, "-run", empty) <= -1)); - // gui->pause->Ref().Set(logFile.length()); - // gui->pause->Ref().Set(!showcaseMode); + if (Parse::get().arg(argc, argv, "-d", tmpFloat) > -1) gui->depthCutoff->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-i", tmpFloat) > -1) gui->icpWeight->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-or", tmpFloat) > -1) gui->outlierCoefficient->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-segMinNew", tmpFloat) > -1) gui->minRelSizeNew->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-segMaxNew", tmpFloat) > -1) gui->maxRelSizeNew->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-crfRGB", tmpFloat) > -1) gui->pairwiseRGBSTD->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-crfDepth", tmpFloat) > -1) gui->pairwiseDepthSTD->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-crfPos", tmpFloat) > -1) gui->pairwisePosSTD->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-crfAppearance", tmpFloat) > -1) gui->pairwiseAppearanceWeight->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-crfSmooth", tmpFloat) > -1) gui->pairwiseSmoothnessWeight->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-offset", tmpFloat) > -1) gui->modelSpawnOffset->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-thNew", tmpFloat) > -1) gui->thresholdNew->Ref()->Set(tmpFloat); + if (Parse::get().arg(argc, argv, "-k", tmpFloat) > -1) gui->unaryErrorK->Ref()->Set(tmpFloat); + + gui->flipColors->Ref()->Set(logReader->flipColors); + gui->rgbOnly->Ref()->Set(false); + gui->enableMultiModel->Ref()->Set(Parse::get().arg(argc, argv, "-static", empty) <= -1); + gui->enableSmartDelete->Ref()->Set(Parse::get().arg(argc, argv, "-keep", empty) <= -1); + gui->pyramid->Ref()->Set(true); + gui->fastOdom->Ref()->Set(fastOdom); + // gui->confidenceThreshold->Ref()->Set(confidence); + gui->so3->Ref()->Set(so3); + gui->frameToFrameRGB->Ref()->Set(frameToFrameRGB); + gui->pause->Ref()->Set((Parse::get().arg(argc, argv, "-run", empty) <= -1)); + // gui->pause->Ref()->Set(logFile.length()); + // gui->pause->Ref()->Set(!showcaseMode); resizeStream = new GPUResize(Resolution::getInstance().width(), Resolution::getInstance().height(), Resolution::getInstance().width() / 2, Resolution::getInstance().height() / 2); @@ -388,7 +388,7 @@ void MainController::run() { } if (coFusion->processFrame(logReader->getFrameData(), currentPose, weightMultiplier) && !showcaseMode) { - gui->pause->Ref().Set(true); + gui->pause->Ref()->Set(true); } if (exportLabels) { @@ -430,11 +430,11 @@ void MainController::run() { std::stringstream stri; stri << coFusion->getModelToModel().lastICPCount; - gui->trackInliers->Ref().Set(stri.str()); + gui->trackInliers->Ref()->Set(stri.str()); std::stringstream stre; stre << (std::isnan(coFusion->getModelToModel().lastICPError) ? 0 : coFusion->getModelToModel().lastICPError); - gui->trackRes->Ref().Set(stre.str()); + gui->trackRes->Ref()->Set(stre.str()); if (!gui->pause->Get()) { gui->resLog.Log((std::isnan(coFusion->getModelToModel().lastICPError) ? std::numeric_limits::max() diff --git a/GUI/Tools/GUI.h b/GUI/Tools/GUI.h index e7913af5..33867683 100644 --- a/GUI/Tools/GUI.h +++ b/GUI/Tools/GUI.h @@ -260,15 +260,15 @@ class GUI { pangolin::RegisterKeyPressCallback(' ', pangolin::SetVarFunctor("ui.Reset", true)); } - pangolin::RegisterKeyPressCallback('p', [&]() { pause->Ref().Set(!pause->Get()); }); - pangolin::RegisterKeyPressCallback('c', [&]() { drawColors->Ref().Set(!drawColors->Get()); }); - pangolin::RegisterKeyPressCallback('l', [&]() { drawLabelColors->Ref().Set(!drawLabelColors->Get()); }); - pangolin::RegisterKeyPressCallback('x', [&]() { drawFxaa->Ref().Set(!drawFxaa->Get()); }); - pangolin::RegisterKeyPressCallback('f', [&]() { followPose->Ref().Set(!followPose->Get()); }); - pangolin::RegisterKeyPressCallback('q', [&]() { savePoses->Ref().Set(true); }); - pangolin::RegisterKeyPressCallback('w', [&]() { saveCloud->Ref().Set(true); }); - pangolin::RegisterKeyPressCallback('e', [&]() { saveView->Ref().Set(true); }); - pangolin::RegisterKeyPressCallback('s', [&]() { step->Ref().Set(true); }); + pangolin::RegisterKeyPressCallback('p', [&]() { pause->Ref()->Set(!pause->Get()); }); + pangolin::RegisterKeyPressCallback('c', [&]() { drawColors->Ref()->Set(!drawColors->Get()); }); + pangolin::RegisterKeyPressCallback('l', [&]() { drawLabelColors->Ref()->Set(!drawLabelColors->Get()); }); + pangolin::RegisterKeyPressCallback('x', [&]() { drawFxaa->Ref()->Set(!drawFxaa->Get()); }); + pangolin::RegisterKeyPressCallback('f', [&]() { followPose->Ref()->Set(!followPose->Get()); }); + pangolin::RegisterKeyPressCallback('q', [&]() { savePoses->Ref()->Set(true); }); + pangolin::RegisterKeyPressCallback('w', [&]() { saveCloud->Ref()->Set(true); }); + pangolin::RegisterKeyPressCallback('e', [&]() { saveView->Ref()->Set(true); }); + pangolin::RegisterKeyPressCallback('s', [&]() { step->Ref()->Set(true); }); } virtual ~GUI() {