Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCV fullscreen window

I'm trying to create a fullscreen window using opencv 2.3 but it doesn't work (But I remember, that it should). The code is very simple.

cvNamedWindow("Name", CV_WINDOW_FULLSCREEN );

I also tried to set window property

cvSetWindowProperty("General Optica" , CV_WND_PROP_AUTOSIZE , CV_WINDOW_FULLSCREEN);

but there is no effect, I get a window but not fullscren.

OS - Windows 7 , 64 bit OpenCV 2.3 C++

Thanks in advance!

like image 866
Nick Avatar asked Sep 11 '11 17:09

Nick


1 Answers

First of all, there is a bug in OpenCV 2.x which breaks fullscreen mode on Windows.

Unfortunately there are no prebuilt version of OpenCV having this bug fixed. To get a binaries with bug fixed you can get the latest OpenCV trunk and build the library yourself. If you don't want to upgrade to the trunk then you can apply changes from revision 6706 to your version of codes (but building from sources is the only option).

Please also note that OpenCV supports fullscreen mode only for Win2k or newer.

And finally you should modify your code as shown below:

cvNamedWindow("Name", CV_WINDOW_NORMAL);
cvSetWindowProperty("Name", CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN);
cvShowImage("Name", your_image);
like image 139
Andrey Kamaev Avatar answered Oct 01 '22 13:10

Andrey Kamaev