Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Qt with openCV
Forum Updated to NodeBB v4.3 + New Features

Qt with openCV

Scheduled Pinned Locked Moved 3rd Party Software
2 Posts 1 Posters 16.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bence.takacs
    wrote on last edited by
    #1

    I am a begginer with both Qt and OpenCV.

    I would like to configure Qt with openCV. But I cannot make it work. I found some tutorials like this: http://www.barbato.us/2010/09/20/using-opencv-within-qtcreator-in-windows/

    I have a simple UI and everything works fine (even with OpenCV imports) until I want to use OpenCV:
    @Mat image = imread("d:/work/Project/resources/test.jpg", CV_LOAD_IMAGE_COLOR);@

    In that case the application exists with: "exited with code -1073741819" (access violation error) without reaching that line in the debugger... This is the case using Qt 5.1.1 with bundled MinGW and Qt Creator 2.8.1.

    I found some forum records that suggests to switch back to Qt 4. So I would like to switch to Qt 4.8, but it isn't bundled with MinGW (qt-win-opensource-4.8.4-mingw.exe installer always asking for existing MinGW installation). There are builds for Qt ( http://download.qt-project.org/development_releases/prebuilt/mingw_32/ ) but I don't know which one to choose.

    Does anybody know a working version combination of QtCreator - Qt - Mingw - openCV for Windows 7 ?

    Thanks for any information.

    UPDATE:
    I've just tried to install Qt 4.8 using this version of MinGW ( http://download.qt-project.org/development_releases/prebuilt/mingw_32/x32-4.8.0-release-posix-dwarf-rev2.7z ), but it has the following problems:

    • if I choose directory 'd:\app\mingw32' then it's missing w32api.h
    • if I choose directory 'd:\app\mingw32\i686-w64-mingw32' then it says "There is a problem with MinGW installation: g++ not found in d:\app\mingw32\i686-w64-mingw32\bin\

    UPDATE2: I tried to go on with the above warning, but get this message (as expected):
    @12:06:01: Starting: "mingw32-make.exe"
    qtcreator_ctrlc_stub: Command line failed: mingw32-make.exe
    12:06:01: The process "mingw32-make.exe" crashed.
    Error while building/deploying project Project (kit: Qt 4.8.5 with MinGW-4.8 )
    When executing step 'Make'@

    Regards:
    Bence

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bence.takacs
      wrote on last edited by
      #2

      SOLVED!

      This tutorial works well: http://stackoverflow.com/questions/15881913/how-to-link-opencv-in-qtcreator-and-use-qt-library

      Building OpenCV with MinGW is a must!
      ...and then everything is working fine

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved