이 오류를 해결하기 위해 추가 모듈 opencv-contrib-master를 https://github.com/opencv/opencv_contrib.git에서 추가하려고했습니다. 'make'를 실행하는 동안 MD 파일 그러나 나는 다음과 같은 출력이 점점 오전 :이 버전의 gcc에 문제가있을 수 있다는 말을 들었다AttributeError : 'module'객체에 'xfeatures2d'속성이 없습니다 [python/opencv 3.1.0 dev]
[ 4%] Built target libwebp
[ 4%] Built target opencv_core_pch_dephelp
[ 4%] Built target pch_Generate_opencv_core
Scanning dependencies of target opencv_core
[ 4%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
Linking CXX shared library ../../lib/libopencv_core.so
[ 7%] Built target opencv_core
[ 7%] Built target opencv_ts_pch_dephelp
[ 7%] Built target pch_Generate_opencv_ts
[ 7%] Built target opencv_imgproc_pch_dephelp
[ 8%] Built target pch_Generate_opencv_imgproc
Linking CXX shared library ../../lib/libopencv_imgproc.so
[ 11%] Built target opencv_imgproc
[ 11%] Built target opencv_imgcodecs_pch_dephelp
[ 11%] Built target pch_Generate_opencv_imgcodecs
Linking CXX shared library ../../lib/libopencv_imgcodecs.so
[ 12%] Built target opencv_imgcodecs
[ 12%] Built target opencv_videoio_pch_dephelp
[ 12%] Built target pch_Generate_opencv_videoio
Linking CXX shared library ../../lib/libopencv_videoio.so
[ 13%] Built target opencv_videoio
[ 13%] Built target opencv_highgui_pch_dephelp
[ 13%] Built target pch_Generate_opencv_highgui
Linking CXX shared library ../../lib/libopencv_highgui.so
[ 14%] Built target opencv_highgui
[ 14%] Built target opencv_ts
[ 14%] Built target opencv_perf_core_pch_dephelp
[ 14%] Built target pch_Generate_opencv_perf_core
Linking CXX executable ../../bin/opencv_perf_core
[ 16%] Built target opencv_perf_core
[ 16%] Built target opencv_test_core_pch_dephelp
[ 16%] Generating test_precomp.hpp.gch/opencv_test_core_RELEASE.gch
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:1:0: fatal error: can’t create precompiled header /home/chandu/Opencv/opencv/release/modules/core/test_precomp.hpp.gch/opencv_test_core_RELEASE.gch: Permission denied
/* Copyright (C) 1991-2014 Free Software Foundation, Inc.
^
compilation terminated.
Preprocessed source stored into /tmp/cchn5Yvk.out file, please attach this to your bugreport.
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/_usr_lib_gcc_x86_64-linux-gnu_4.9_cc1plus.1000.crash'
make[2]: *** [modules/core/test_precomp.hpp.gch/opencv_test_core_RELEASE.gch] Error 1
make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_test_core.dir/all] Error 2
make: *** [all] Error 2
어딘가에하지만 GCC 버전하지만 성공을 업데이트했습니다. 나는 버전 4.9.4의 gcc와 버전 14.04.1의 우분투를 사용하고있다. 'make'단계 전에 다음을 실행했습니다.
cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules /usr/local .. -DWITH_IPP=OFF -DWITH_OPENGL=ON -DWITH_QT=ON -DBUILD_EXAMPLES=ON
많은 리소스에 접근했지만 결과가 없습니다. 모든 종류의 도움이 상당합니다.
해결책을 얻었습니다. 문제는 내가 여분의 모듈 즉 xfeatures2d가 저장된 위치에 경로를 지정하지 못했다는 것입니다. 고맙습니다 답장 :) – Glachas
cmake -DOPENCV_EXTRA_MODULES_PATH = ../../opencv_contrib/modules'에 추가로 moudules이있는 곳 (xfeatures2d)이 있다고 가정합니다. 어쩌면 잘못된 경로를 정의했을 수 있습니까? –
나는 왜 그것이 효과가 있었는지도 모른다. 나는 또한 cmake를 실행하는 동안 경로를 제공 한 후에도 opencv 빌드/모듈 디렉토리에 모듈을 추가하지 않았다는 것에 놀랐다. 내가 extra_modules가 위의 명령을 시도 그래서 연결되지 않는 오류를보고하여 관찰. – Glachas