Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
605 views
in Technique[技术] by (71.8m points)

c++ - OpenCV window in fullscreen and without any borders

In OpenCV when displaying an image with:

cvSetWindowProperty("displayCVWindow", CV_WND_PROP_FULLSCREEN, 
CV_WINDOW_FULLSCREEN);

There is a small border around the full screened window if anyone ever noticed. Is there a way to get a rid of this?

Screenshot showing border of window when in full screen mode. Note: the screenshot was cropped to show only top-left corner

Screenshot showing border of window when in full screen mode. **Note**: the screenshot was cropped to show only top-left corner

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

OpenCV does not provide this capability.

If you want to have the image in fullscreen mode or floating around without window/borders you will have 2 choices:

If you decide to hack the window, you may try this code and replace the SetWindowLong() call for:

SetWindowLong(win_handle, GWL_STYLE, 0;

If that doesn't work, you'll have to dig a little deeper into window creation on Windows.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...