Ok this is a weired one. I have a picture that I show. The picture is very big but normaly it should be able to scale the window. However as soon as I click on the picture it always goes to its huge scale on my machine. What could be the reason?
I insalled OpencCV 4.2.0 with CUDA on KDE NEON 5.18
The toy code for the display to check the issue:
#include <iostream>
#include <thread>
#include <vector>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
int main()
{
std::string _windowName = "Test";
cv::namedWindow(_windowName, cv::WINDOW_NORMAL);
cv::Mat background = cv::imread("../data/nyc.jpg");
while (true)
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
cv::imshow(_windowName, background);
if (cv::waitKey(33) == 27)
{
cv::destroyAllWindows();
break;
}
}
}
If I run this on my machine it looks like this:
Trying to resize ends up making the picture directly like this:
However on annother machines it poops up scaled and can get resized as expected:
If you want to investigate it. I uploaded the test project on github: You can find it complete in my github here: https://github.com/sandro4912/opencvDebug