Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
621 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...