OpenCV - Gtkmm conflict?
Hello,
I would use the OpenCV libraries into a program using the Gtkmm interface but when I try to open an image with cv::imread, there is an error message during the execution : gtk-error ** Using gtk+ 2.x and gtk+ 3 in the same process is not supported.
I know that this is a gtk error, but it is caused by the imread instruction.
Does anyone have heard about this kind of conflict?
I am using gtkmm 3.0 and have upgraded opencv to 2.4.5 but this did not solve the problem. The operating system is Ubuntu 12.04.
Thnak you in advance.
As far as I know OpenCV doesn't use any gtk. Probably your program debugger is not showing you the correct place of the error. As you mentioned yourself, I do not think this is the correct forum for your question...
I have image manipulation programs, using opencvs, which could be useful for colleagues. But they are used to use programs with graphical interface. If I give them a console and three lines of code, file names and parameter, they might be sceptical. Thus the idea to try to develop those program into a graphical environment. gtkmm is “just” for the interface. The problem is that the mere fact of opening an image with opencv create the mentioned error message from the gtkmm end. I supposed that I am not the only one to have used those libraries together. But I have only seen one post on this conflict and the solution was to upgrade opencv, which I did, with no success.
For graphical purposes, openCV works perfectly with Qt for linux/windows or you can even use winforms on windows platforms. Done both without problems for graphical interfacing.
I will continue it dig a bit with gtkmm but if I have no luck, I will follow your advice. Thank you.
Well, you have to downgrade your gtkmm3.0 to gtkmm2.x I prefer gtkmm2.4 this is done by removing libgtkmm-3-dev and installing libgtkmm-2.4-dev