c++ visual-studio opencv cmake cross-compiling

c++ - Cómo resolver eso no se puede encontrar el archivo de inclusión al compilar opencv3.0 con modelos adicionales con CMAKE 3.4.1 y VS2015



visual-studio cross-compiling (2)

Pruebe su compilación con la fuente OpenCV 3.1.

Como está compilando Xfeatures2d, parece que ha agregado el módulo opencv_contrib a su árbol fuente. Hice lo mismo la semana pasada y la versión de opencv_contrib que descargué solo se compilará con OpenCV 3.1, que ahora está disponible. Con OpenCV 3.0 tuve exactamente el mismo primer mensaje de error que está viendo (No se puede abrir el archivo scr "opencv2 / core / hal / intrin.hpp"). Parece que hal se ha movido al núcleo en OpenCV 3.1.

Pruébalo. Todos los módulos se están construyendo con éxito para Windows 7 con Visual Studio 2012. Nota: ''opencv_extra_modules_path'' debe estar configurado en CMake y supongo que también quiere que ''with_cuda'' esté configurado (y probablemente ya lo haya comprobado). Estoy usando CMake 2.8.12.2.

Al compilar OPENCV 3.0 con CMAKE 3.4.1 y VS2015. VS2015 presenta los siguientes errores:

error C2264 “std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth>::tuple”: error;opencv_perf_core E:/OpenCV3/sources/modules/core/perf/opencl/perf_channels.cpp 187 error Cannot open scr file "opencv2/core/hal/intrin.hpp" opencv_xphoto e:/OpenCV3/sources/modules/xphoto/src/grayworld_white_balance.cpp 43 error C1083 Cannot open include file: “opencv2/core/hal/intrin.hpp”: No such file or directory opencv_xphoto E:/OpenCV3/sources/modules/xphoto/src/grayworld_white_balance.cpp 43 error C2610 “std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth>::tuple(const std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth> &)”: E:/OpenCV3/sources/modules/core/perf/opencl/perf_channels.cpp) opencv_perf_core D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/tuple 328 error C2610 “std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth>::tuple(std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth> &&)”: E:/OpenCV3/sources/modules/core/perf/opencl/perf_channels.cpp) opencv_perf_core D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/tuple 329 error C2535 “std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth> &std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth>::operator =(const std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth> &)”: E:/OpenCV3/sources/modules/core/perf/opencl/perf_channels.cpp) opencv_perf_core D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/tuple 463 error C2382 “std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth>::operator =”: E:/OpenCV3/sources/modules/core/perf/opencl/perf_channels.cpp) opencv_perf_core D:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/tuple 463 error C2264 “std::tuple<cv::Size,perf::`anonymous-namespace''::MatDepth>::tuple”: 函数定义或声明中有error;未调用函数 opencv_perf_core E:/OpenCV3/sources/modules/core/perf/opencl/perf_channels.cpp 165 error C1083 Cannot open include file: “opencv2/core/hal/intrin.hpp”: No such file or directory opencv_ximgproc E:/OpenCV3/sources/modules/ximgproc/src/fgs_filter.cpp 38 error C1083 Cannot open include file: “opencv2/core/hal/hal.hpp”: No such file or directory opencv_aruco E:/OpenCV3/sources/modules/aruco/src/dictionary.cpp 44 error C1083 Cannot open include file: “opencv2/core/hal/hal.hpp”: No such file or directory opencv_ximgproc E:/OpenCV3/sources/modules/ximgproc/src/sparse_match_interpolators.cpp 41 error C1083 Cannot open include file: “opencv2/core/hal/hal.hpp”: No such file or directory opencv_xfeatures2d E:/OpenCV3/sources/modules/xfeatures2d/src/sift.cpp 108 error C1083 Cannot open include file: “opencv2/core/hal/hal.hpp”: No such file or directory opencv_optflow E:/OpenCV3/sources/modules/optflow/src/motempl.cpp 44 error LNK1104 Cannot open file“../../lib/Debug/opencv_aruco300d.lib” opencv_test_aruco E:/OpenCV3/sources/build/modules/aruco/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_optflow300d.lib” opencv_test_optflow E:/OpenCV3/sources/build/modules/optflow/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_xfeatures2d300d.lib” opencv_stitching E:/OpenCV3/sources/build/modules/stitching/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_stitching300d.lib” opencv_perf_stitching E:/OpenCV3/sources/build/modules/stitching/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_xphoto300d.lib” opencv_perf_xphoto E:/OpenCV3/sources/build/modules/xphoto/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_ximgproc300d.lib” opencv_perf_ximgproc E:/OpenCV3/sources/build/modules/ximgproc/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_xfeatures2d300d.lib” opencv_perf_xfeatures2d E:/OpenCV3/sources/build/modules/xfeatures2d/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_stitching300d.lib” opencv_test_stitching E:/OpenCV3/sources/build/modules/stitching/LINK 1 error C2065 “vector_Rect2d”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22172 error C2146 syntax error: missing“;”(在标识符“boundingBox”的前面) opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22172 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22172 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22179 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22181 error C2065 “vector_Rect2d”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22191 error C2146 syntax error: missing“;” opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22191 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22191 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22197 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22199 error C2065 “vector_Rect2d”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22216 error C2146 syntax error: missing“;”opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22216 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22216 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22223 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_types.h 22224 error C2065 “vector_Rect2d”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_funcs.h 7839 error C2146 syntax error: missing“;” opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_funcs.h 7839 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_funcs.h 7839 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_funcs.h 7846 error C2065 “boundingBox”: Undeclared identifier opencv_python2 E:/OpenCV3/sources/build/modules/python2/pyopencv_generated_funcs.h 7848 error LNK1104 Cannot open file“../../lib/Debug/opencv_xfeatures2d300d.lib” opencv_test_xfeatures2d E:/OpenCV3/sources/build/modules/xfeatures2d/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_ximgproc300d.lib” opencv_test_ximgproc E:/OpenCV3/sources/build/modules/ximgproc/LINK 1 error LNK1104 Cannot open file“../../lib/Debug/opencv_xphoto300d.lib” opencv_test_xphoto E:/OpenCV3/sources/build/modules/xphoto/LINK 1

Pensé que el problema podría provenir de "opencv2 / core / hal / intrin.hpp" y "opencv2 / core / hal / hal.hpp". Sin embargo, después de que especifique el archivo de inclusión. más problemas dentro del código surgen como que no existe tal cosa como cv :: hal, etc. Así que pierdo por completo los errores.

Utilizo el siguiente tutorial para configurar y compilar mi Cmake y VS: https://putuyuwono.wordpress.com/2015/04/23/building-and-installing-opencv-3-0-on-windows-7-64- poco/

Necesito usar Xfeatures2d, entonces, ¿qué puedo hacer para hacerlo? Muchas gracias y feliz Navidad ~


cd opencv git checkout 3.1.0 git push origin master

y

cd opencv_contrib git checkout 3.1.0 git push origin master

editar: Git Pull Origin Master