diff --git a/app/SandboxSetup/main.cpp b/app/SandboxSetup/main.cpp index 42fece4605f638c045ec40de73360a466e56aec1..7f6520d97a7f75701d1d060a0170bcfa685259b8 100644 --- a/app/SandboxSetup/main.cpp +++ b/app/SandboxSetup/main.cpp @@ -1,5 +1,3 @@ - - #include <QApplication> #include "mainwindow.h" @@ -10,91 +8,3 @@ int main(int argc, char *argv[]) main.show(); return app.exec(); } - -/* - -#include <QApplication> -#include "monitorgui.h" -#include "camerafocus.h" -#include "croppingmask.h" -#include "projectiongui.h" -#include "qtfullscreen.h" -#include "beamerlocationgui.h" -#include <sandboxSetup.h> - - -void exit_msg(SandboxSetup *setup, std::string msg){ - setup->getCamera()->stop(); - std::cout << msg << std::endl; - exit(1); -} - -int main(int argc, char *argv[]) -{ - QApplication app(argc, argv); - - SandboxSetup setup; - MonitorGui mg; - ProjectionGui pg(&setup, &mg); - CameraFocus cf(&setup); - CroppingMask cm(&setup, &mg); - BeamerLocationGui bl(&setup, &mg); - - setup.getCamera()->start(); - - - // Select output screen and projection's resolutions - mg.show(); - app.exec(); - if(!mg.isOk()){ - exit_msg(&setup, "Cancel resolution"); - } - setup.getBeamer()->setResolution(cv::Size(mg.getWidth(), mg.getHeight())); - - - // Setup camera and beamer physically - pg.show(); - app.exec(); - - - // Edit frame process profil for the setupBeamerLocation routine - cf.show(); - app.exec(); - if(!cf.isOk()){ - exit_msg(&setup, "Cancel camera parameters"); - } - - - // Setup the adjust matrix and cropping mask - cm.show(); - app.exec(); - if(!cm.isOk()){ - exit_msg(&setup, "Cancel drop"); - } - if(cm.updated()){ - cv::Size s = setup.getCamera()->getDepthFrame().size(); - cv::Point center(s.width / 2, s.height / 2); - std::vector<cv::Point> rectPoints = cm.getRectPoints(); - - setup.setupAdjustMatrix(rectPoints, center); - setup.setupCroppingMask(rectPoints); - } - - // Setup the beamer location - bl.show(); - app.exec(); - if(!bl.endedSuccessfully()){ - exit_msg(&setup, "Cancel beamer position"); - } - - // Save config in file - if(setup.saveConfig()){ - exit_msg(&setup, "Failed to save configuration"); - } - - setup.getCamera()->stop(); - return 0; - - -} -*/