我正试图在Ubuntu18.0上安装openCv
我遵循了这些步骤
blog
但当我运行这个命令时
制作
它抛出以下错误
[ 57%] Built target opencv_perf_ocl
[ 57%] Built target opencv_nonfree
[ 57%] Built target opencv_perf_nonfree
[ 58%] Built target opencv_test_nonfree
[ 58%] Building CXX object modules/contrib/CMakeFiles/opencv_contrib.dir/src/chamfermatching.cpp.o
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp: In member function âvoid cv::ChamferMatcher::Matching::computeDistanceTransform(cv::Mat&, cv::Mat&, cv::Mat&, float, float, float)â:
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp:969:30: error: the compiler can assume that the address of âannotate_imgâ will never be NULL [-Werror=address]
if (&annotate_img!=NULL) {
^
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp:1016:34: error: the compiler can assume that the address of âannotate_imgâ will never be NULL [-Werror=address]
if (&annotate_img!=NULL) {
^
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp: In member function âcv::ChamferMatcher::Match* cv::ChamferMatcher::Matching::localChamferDistance(cv::Point, cv::Mat&, cv::Mat&, cv::ChamferMatcher::Template*, float)â:
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp:1111:25: error: the compiler can assume that the address of âorientation_imgâ will never be NULL [-Werror=address]
if (&orientation_img!=NULL) {
^
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp:1111:5: warning: nonnull argument âorientation_imgâ compared to NULL [-Wnonnull-compare]
if (&orientation_img!=NULL) {
^~
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp: In member function âvoid cv::ChamferMatcher::Matching::computeDistanceTransform(cv::Mat&, cv::Mat&, cv::Mat&, float, float, float)â:
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp:1016:17: warning: nonnull argument âannotate_imgâ compared to NULL [-Wnonnull-compare]
if (&annotate_img!=NULL) {
^~
/home/knoldus/opencv-2.4.9/modules/contrib/src/chamfermatching.cpp:969:13: warning: nonnull argument âannotate_imgâ compared to NULL [-Wnonnull-compare]
if (&annotate_img!=NULL) {
^~
cc1plus: some warnings being treated as errors
modules/contrib/CMakeFiles/opencv_contrib.dir/build.make:158: recipe for target 'modules/contrib/CMakeFiles/opencv_contrib.dir/src/chamfermatching.cpp.o' failed
make[2]: *** [modules/contrib/CMakeFiles/opencv_contrib.dir/src/chamfermatching.cpp.o] Error 1
CMakeFiles/Makefile2:2974: recipe for target 'modules/contrib/CMakeFiles/opencv_contrib.dir/all' failed
make[1]: *** [modules/contrib/CMakeFiles/opencv_contrib.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2