opencv
opencv copied to clipboard
Error: Null pointer (NULL window: 'Test Program') in cvGetPropWindowAutoSize_W32
System information (version)
- OpenCV => 4.5
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
Detailed description
When I take WindowPropertyFlags that no work after opencv 4.5, but is normal work in opencv4.4.
Tips:Error: Null pointer (NULL window: 'Test Program') in cvGetPropWindowAutoSize_W32
Example Code:
#include <opencv2/opencv.hpp>
#include <iostream>
#include <opencv2/highgui/highgui_c.h>
using namespace cv;
using namespace std;
int main()
{
VideoCapture capture(0);
while(1)
{
Mat frame;
capture >> frame;
if(frame.empty())
break;
namedWindow("Test Program",WINDOW_AUTOSIZE);
imshow("Test Program",frame);
waitKey(30);
if( getWindowProperty("Test Program",WND_PROP_AUTOSIZE) != 1)
break;
}
capture.release();
destroyAllWindows();
return 0;
}