Why compile OpenCV with QT?

I am using Qt and OpenCV in a new project, I am going to compile OpenCV to work with MinGW.

The thought came up that I could compile OpenCV libraries with Qt support, but I really don't understand why I would like to do this. If I do not compile Qs-enabled libs, I can still route cv::matin QImageusing a method like this .

So what am I missing? What value is provided when compiling Qt with OpenCV?

I searched online and pages such as this , this and this (from the search “why compile OpenCV with Qt”) will show only how to compile with Qt, and not why.

+4
source share
1 answer

LE: misunderstood the question

The WITH_QT parameter is used by the highgui module to create windows using qt, so converting QImage to cv :: Mat and vice versa will work regardless of how the WITH_QT option is set.

First, some clarifications: you are not compiling OpenCV with Qt, Qt is not a compiler, so you cannot compile anything with it. Qt is a C ++ library (it is called frameworkbecause it imposes some some rules on the source code of your application, but basically it is a C ++ library, like OpenCV).

, ++ world *, , ( ), , ++ , Qt OpenCV, , , .

MinGW, OpenCV MinGW, OpenCV ( , 2410) Visual ++ 10, 11, 12 - Visual Studio 2010, 2012 2013.

, Visual Studio, , Qt OpenCV , MinGW, OpenCV MinGW.

* , C, Qt, OpenCV. // , : c++ binary compatibility c++ abi

+3

Source: https://habr.com/ru/post/1619988/


All Articles