1

I just installed via cmake (OPENCV_EXTRA_MODULS_PATH) and mingw530 (Qt)

  • opencv-3.4.2
  • opencv_contrib-3.4.2
  • mingw32-make
  • mingw32-make install

Filestructur is

  • opencv/source
  • opencv/build
  • opencv/release (compile folder)
  • opencv/contrib

But if I try to insert

#include "opencv2/xfeatures2d.hpp"

it does not find it.

The same problem is already descript here: http://answers.opencv.org/question/57397/cant-find-xfeatures2dhpp/

But I don't understand the solution "@Bhatt, on win, you will have to build the INSTALL project. this will copy headers/libs/dlls to your install folder".

My fallback is to insert

#include "E:/PROGRAMS/opencv/opencv_contrib-3.4.2/modules/xfeatures2d/include/opencv2/xfeatures2d/nonfree.hpp"

then it works. Can someone explain me what's going wrong?

PowerNow
  • 363
  • 1
  • 2
  • 15

1 Answers1

0

For who is interested: The equivalent to VS+INSTALL project is mingw32-make install. The clue is the CMAKE_INSTALL_PREFIX in cmake where this files (headers/libs/dlls) are saved. Add to your Qt .pro file INCLUDEPATH += \install\include.

PowerNow
  • 363
  • 1
  • 2
  • 15