Ask Your Question
1

Unwanted interface via imshow()

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

Leir gravatar image

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

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:

#include<opencv2/opencv.hpp>

using namespace cv;

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

window with picture looks like this:

image description

edit retag flag offensive close merge delete

Comments

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 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
5

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

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

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

http://docs.opencv.org/modules/highgui/doc/user_interface.html

Just pass CV_GUI_NORMAL and you will get the old version.

edit flag offensive delete link more

Comments

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 -0600 )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 -0600 )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 -0600 )edit

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

begueradj gravatar imagebegueradj ( 2015-03-13 04:33:27 -0600 )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 -0600 )edit

Question Tools

Stats

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

Seen: 531 times

Last updated: Nov 17 '14