diff --git a/app/SandboxSetup/SandboxSetup.pro b/app/SandboxSetup/SandboxSetup.pro index a699d0a5139338ac38f90bd0b949d1f6af196dbf..7af29b715ca468f7dec4d23ce20f06ff9ae9f55f 100644 --- a/app/SandboxSetup/SandboxSetup.pro +++ b/app/SandboxSetup/SandboxSetup.pro @@ -63,7 +63,6 @@ FORMS += \ saveconfiggui.ui - INCLUDEPATH += ../../inc LIBS += -L"../../build" -lsandbox -lrealsense2 -lyaml-cpp diff --git a/app/SandboxSetup/monitorgui.cpp b/app/SandboxSetup/monitorgui.cpp index 124b7dd71239e87a5b728ff2c73847c4159e7a42..d2dbd2a6aae63cfec673a886e1a93a49aecab71c 100644 --- a/app/SandboxSetup/monitorgui.cpp +++ b/app/SandboxSetup/monitorgui.cpp @@ -84,7 +84,7 @@ void MonitorGui::on_cbxOutputs_currentIndexChanged(int index) void MonitorGui::initMonitorMapWithFile(std::string path){ // Save in file the monitors and their resolutions - int err = system( ("xrandr -d :0 | sed -n '1!p' > " + path).c_str() ); + int err = system( ("xrandr | sed -n '1!p' > " + path).c_str() ); if(err){ std::cout << "Couldn't get screens and their resolutions" << std::endl; exit(err); diff --git a/app/SandboxSetup/projectiongui.cpp b/app/SandboxSetup/projectiongui.cpp index bcc542257bfc83f277d98e4dd225e4cc514a480b..92422001da0db6a0f36a83f76c96704dde26b954 100644 --- a/app/SandboxSetup/projectiongui.cpp +++ b/app/SandboxSetup/projectiongui.cpp @@ -53,7 +53,11 @@ void ProjectionGui::refreshFrame(){ void ProjectionGui::startCapture(){ if(!cameraUsed){ // open blue screen on the selected output - cv::Mat blue = cv::Mat(1, 1, CV_8UC3, cv::Scalar(0, 0, 255)); + setup->getCamera()->capture(); + cv::Mat rgb = setup->getCamera()->getColorFrame(); + cv::Size sz = rgb.size(); + cv::Mat blue = cv::Mat(sz.height, sz.width, CV_8UC3, cv::Scalar(0, 0, 255)); + cv::circle(blue, cv::Point(sz.width/2, sz.height/2), sz.height*2/100, cv::Scalar(255,0,0), CV_FILLED, 8,0); blueScreen->editGeometry(mg->getResolution()); blueScreen->imShow(blue); cameraUsed = true; diff --git a/app/SandboxSetup/projectiongui.ui b/app/SandboxSetup/projectiongui.ui index 0af5fca649ad45285bfe89b7571796eb906ee788..41e07ba0c2426bbeb4f53fd795bff06390165476 100644 --- a/app/SandboxSetup/projectiongui.ui +++ b/app/SandboxSetup/projectiongui.ui @@ -51,7 +51,7 @@ <x>30</x> <y>370</y> <width>581</width> - <height>101</height> + <height>131</height> </rect> </property> <property name="readOnly"> @@ -62,7 +62,9 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Project a blue screen on the previously selected output to help you setup your beamer and camera manually. Adjust the position and orientation of your beamer to project the blue frame in your sandbox. Then adjust the position and oritentation of your camera to capture the blue screen projected. Try to set your camera, so the camera's point of view above is mostly filled with the blue screen.</p></body></html></string> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Project a blue screen on the previously selected output to help you setup your beamer and camera manually.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Firstly, adjust the position and orientation of your beamer to project the blue frame in your sandbox. The red dot indicates the center of the blue screen.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Then adjust the position and oritentation of your camera to capture the sandbox. Your camera must capture all of the blue screen and must be perpendicular to the sandbox's top.</p></body></html></string> </property> </widget> <widget class="QLabel" name="label">