Skip to content
Snippets Groups Projects
Commit 15ecb7ea authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

move namedWindow to loop

parent 08bcf721
No related branches found
No related tags found
1 merge request!91Groupview stereo images and multiple frames
Pipeline #12725 passed
This commit is part of merge request !91. Comments created here will be created in the context of that merge request.
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment