Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I recommend to use the QT library which is much more efficient.

The GTK window is very basic, it displays only a window containing the image. You get the different window modes; trackbars and the mouse callback, and that's all.

With QT you have many useful extra functions, like window toolbar and menu; status bar with mouse coordinates and pixel value; display overlay; and a control panel - a small window where you can add your own custom controls (buttons, check boxes, etc).

So the GTK interface is OK if you only need to display an image, and you don't need any interactions. The QT bindings provide a real user interface. So unless you have some serious limitations or a strong reason for GTK, I suggest to use QT.

Note that the OpenCV - QT bindings are still quite basic; so for a serious product I suggest to develop your own interface. You will find in the forum several posts about transforming OpenCV Mat variables to QImage and integrate them into a custom QT interface.