问题描述
在OpenCV中显示图片时:
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
推荐答案
OpenCV不提供此功能。
如果您希望将图片设置为全屏模式或在没有窗口/边框的情况下浮动,您将有两个选择:
If you want to have the image in fullscreen mode or floating around without window/borders you will have 2 choices:
-
;
。
如果您决定入侵该窗口,您可以并替换 SetWindowLong()
调用:
If you decide to hack the window, you may try this code and replace the SetWindowLong()
call for:
SetWindowLong(win_handle, GWL_STYLE, 0;
我们必须深入了解Windows上的窗口创建。
If that doesn't work, you'll have to dig a little deeper into window creation on Windows.
这篇关于OpenCV窗口在全屏,没有任何边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!