2015年4月27日 星期一

Integrate OpenCV with QT

Windows8 + OpenCV v2.4.9 + QT v5.3.1 (Win+Android) + CMake v3.0.1 (win32/x86)
    Install QT, CMake, and OpenCV
    PATH=%PATH%;%QT%\Tools\mingw482_32\bin to make GCC accessible
    Launch CMake_GUI
    Set [Source code] to %CV%\sources
    Set [Build] to %CV%\mingw
    Click "Configure"
        Specify the generator for this project = MinGW Makefiles
        Specify native compilers = %QT%\Tools\mingw482_32\bin\gcc.exe and g++.exe
    You can see lots of items are colored in red.
    Alter configuration (optional),
        Check BUILD_EXAMPLES
        Check INSTALL_*
        Uncheck WITH_1394
        Check WITH_OPENGL
        Check WITH_QT
    Click "Configure" and some items are colored in red:
 %QT%/5.3/mingw482_32/lib/cmake/Qt5Concurrent
 %QT%/5.3/mingw482_32/lib/cmake/Qt5Core
   %QT%/5.3/mingw482_32/lib/cmake/Qt5Gui
   %QT%/5.3/mingw482_32/lib/cmake/Qt5Test
   %QT%/5.3/mingw482_32/lib/cmake/Qt5Widgets
   %QT%/5.3/mingw482_32/lib/cmake/Qt5OpenGL
    Click "Configure" and you see
    All items are colored in white rather than in red.
    Configuring done
    Click "Generate" to generate makefiles.
    Open a command prompt in \mingw.
    mingw32-make
    mingw32-make install

沒有留言: