Ask Your Question
0

To remove opencv title bar

asked May 20 '14

keren gravatar image

updated Sep 13 '14

Hi,

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);
cvSetWindowProperty("Name", CV_WND_PROP_FULLSCREEN, CV_WINDOW_FULLSCREEN); 
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.

Preview: (hide)

Comments

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

StevenPuttemans gravatar imageStevenPuttemans (Sep 9 '14)edit

1 answer

Sort by » oldest newest most voted
0

answered Sep 8 '14

Flot2011 gravatar image

updated Sep 13 '14

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_OVERLAPPEDWINDOW;
    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_OVERLAPPEDWINDOW;
    style |= WS_POPUP;
    ::SetWindowLong(hParent, GWL_STYLE, style);
Preview: (hide)

Comments

1

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 (Sep 9 '14)edit

Question Tools

Stats

Asked: May 20 '14

Seen: 8,046 times

Last updated: Sep 13 '14