Ask Your Question

Unwanted interface via imshow()

asked 2014-11-13 13:34:22 -0500

Leir gravatar image

updated 2014-11-13 15:44:35 -0500

Hi. I just installed opencv on ubuntu and when i created window with imshow() there are buttons and statistik. I was first surprised becuse in tutorials i have not seen these. Is there way to get rid of them? Other function which show just the image i want to? Or should i get used to them?

Edit: adding code and picture

code is simple:


using namespace cv;

int main(){
    Mat img = imread("/home/test.jpeg",CV_LOAD_IMAGE_GRAYSCALE);
    return 0;

window with picture looks like this:

image description

edit retag flag offensive close merge delete


Could you please post the _complete_ code you used and if possible a screenshot please? A priori, it seems like your code defines other behaviour before showing the image... Hard to tell without the code though

Doombot gravatar imageDoombot ( 2014-11-13 14:14:23 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-14 17:30:21 -0500

updated 2014-11-17 04:38:06 -0500

Your OpenCV was compiled with QT support so that you can use the enhanced interface. I really like it, but if you want to get rid of it, have a look at the flags when creating the window using cv::namedwindow

Just pass CV_GUI_NORMAL and you will get the old version.

edit flag offensive delete link more


Thank you. That is what i wanted. I must missed the Qt tags when looking in namedWindow function.

Leir gravatar imageLeir ( 2014-11-17 02:17:45 -0500 )edit

@Leir That is good it worked for you. On my side I hade to use the flag cv2.WINDOW_OPENGL instead to achieve your goal because this flag does not exist in my version. Can you tell me what version of OpenCV you use, please ?

begueradj gravatar imagebegueradj ( 2015-03-12 06:08:29 -0500 )edit

"Can you tell me what version of OpenCV you use, please ?" I use the C++ Version of OpenCV...

FooBar gravatar imageFooBar ( 2015-03-12 12:52:05 -0500 )edit

by version I mean 2.4.10. or 3.0 or ...

begueradj gravatar imagebegueradj ( 2015-03-13 04:33:27 -0500 )edit

but cv2.WINDOW_OPENGL is a python flag, so I assume you somehow mix the C++ and Python flags.

FooBar gravatar imageFooBar ( 2015-03-13 07:27:01 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2014-11-13 13:34:22 -0500

Seen: 260 times

Last updated: Nov 17 '14