问题描述
我一直在尝试设置opencv_contrib(基于我最初安装opencv独立时的成功)。
在过去,我已经能够没有opencv_contrib安装opencv。
感谢任何想法我需要使用opencv_contrib库。
p>
头文件组织在3.0中改变,2.4中的opencv2 / core / core.hpp现在是opencv2 / core.hpp(这是你丢失的文件)
I've been trying to set up opencv_contrib (https://github.com/Itseez/opencv_contrib) on my Mac, but can't get past this problem. Below I've copied the steps I've taken and the current error output.
Steps:
1 - Download opencv 2.4.10 and opencv_contrib. Unzip both into a new empty directory. File structure is newfolder/opencv-2.4.10, newfolder/opencv_contrib
2 - make a build director in opencv-2.4.10. File structure is newfolder/opencv-2.4.10/build
3 - cd build
4 - Run the following commands
cmake -G "Unix Makefiles" -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules ..
make -j8
At that point I get the following output partway through the make:
Scanning dependencies of target opencv_surface_matching
[ 25%] Building CXX object modules/surface_matching/CMakeFiles/opencv_surface_matching.dir/src/icp.cpp.o
In file included from <path to folder>/newfolder/opencv_contrib/modules/surface_matching/src/icp.cpp:41:
In file included from <path to folder>/newfolder/opencv_contrib/modules/surface_matching/src/precomp.hpp:45:
<path to newfolder>/newfolder/opencv_contrib/modules/surface_matching/include/opencv2/surface_matching/ppf_match_3d.hpp:62:10: fatal error:
'opencv2/core.hpp' file not found
I'm not sure what to do to fix this, I've been following the directions on installation almost verbatim. The one change is the addition of -G "Unix Makefiles" (which I got from here http://tilomitra.com/opencv-on-mac-osx/ based on my success when originally installing opencv standalone).
In the past I've been able to install opencv without opencv_contrib without issue.
Thanks for any ideas on what I can do to figure this out!
you need opencv3.0 to make use of the opencv_contrib repo.
the header organization was changed in 3.0, what would be opencv2/core/core.hpp in 2.4 is now opencv2/core.hpp (that's your missing file)
这篇关于Mac OSX:build opencv_contrib致命错误:找不到文件opencv2 / core.hpp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!