diff --git a/applications/groupview/src/main.cpp b/applications/groupview/src/main.cpp index 66ff5d0d1a56a6ce55a5a81742a3c4f51108df82..eadda40ce19c586401a8a6c7464d461d9bc2b110 100644 --- a/applications/groupview/src/main.cpp +++ b/applications/groupview/src/main.cpp @@ -110,7 +110,6 @@ void modeLeftRight(ftl::Configurable *root) { int key; Mat show; - cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); while (ftl::running) { while (!new_frames) { @@ -124,7 +123,7 @@ void modeLeftRight(ftl::Configurable *root) { mutex.unlock(); stack(rgb, show); - + cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); cv::imshow("Cameras", show); key = cv::waitKey(100); @@ -197,8 +196,6 @@ void modeFrame(ftl::Configurable *root, int frames=1) { vector<cv::Mat> rgb(sources.size()); vector<cv::Mat> depth(sources.size()); - cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); - while (ftl::running) { for (auto s : sources) s->grab(30); for (size_t i = 0; i < sources.size(); i++) { @@ -207,6 +204,7 @@ void modeFrame(ftl::Configurable *root, int frames=1) { } stack(rgb, show); + cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); cv::imshow("Cameras", show); auto key = cv::waitKey(20); @@ -231,8 +229,6 @@ void modeVideo(ftl::Configurable *root) { vector<cv::Mat> rgb(sources.size()); vector<cv::Mat> depth(sources.size()); - cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); - int count = 0; int remaining = 0; @@ -257,6 +253,7 @@ void modeVideo(ftl::Configurable *root) { } stack(rgb, show); + cv::namedWindow("Cameras", cv::WINDOW_KEEPRATIO | cv::WINDOW_NORMAL); cv::imshow("Cameras", show); auto key = cv::waitKey(20);