Ask Your Question

To remove opencv title bar

asked 2014-05-20 02:24:04 -0500

keren gravatar image

updated 2014-09-13 07:46:50 -0500


I tried executing the program to display the video. opencv window without title bar. i used the following lines to remove the title bar

cvNamedWindow("Name", CV_WINDOW_NORMAL);
cvShowImage("Name", your_image);

the window name was removed successfully. but i am unable to remove the title bar completely. their is a black line.. is their any way to remove the opencv window title bar completely.

edit retag flag offensive close merge delete


And please, check the makeup of your question ... this is about the most terrible one I have seen in ages...

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-09 08:09:49 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-09-08 14:38:56 -0500

Flot2011 gravatar image

updated 2014-09-13 02:52:39 -0500

It is not a complete answer, but if you are using Windows, you can do it using Windows API:

cv::namedWindow(m_szWinName, CV_WINDOW_AUTOSIZE);
    // Get window handle. It will return the handle of the video container
    // There is also enclosing parent window, which will be treated later
    m_hMediaWindow = (HWND)cvGetWindowHandle(m_szWinName);

    // change style of the child HighGui window
    DWORD style = ::GetWindowLong(m_hMediaWindow, GWL_STYLE);
    style |= WS_POPUP;
    ::SetWindowLong(m_hMediaWindow, GWL_STYLE, style);

    // change style of the parent HighGui window
    HWND hParent = ::FindWindow(0, m_szWinName);
    style = ::GetWindowLong(hParent, GWL_STYLE);
    style |= WS_POPUP;
    ::SetWindowLong(hParent, GWL_STYLE, style);
edit flag offensive delete link more



This could indeed be a solution for Windows environments... However topic starter is not clear about his operating system. Thanks for the suggestion however.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-09 08:10:38 -0500 )edit

Question Tools


Asked: 2014-05-20 02:24:04 -0500

Seen: 5,131 times

Last updated: Sep 13 '14