error: ‘phase_unwrapping’ in namespace ‘cv’ does not name a type typedef cv::phase_unwrapping解决办法

项目场景:

参考Ubuntu16.04安装配置opencv3.4.3+opencv_contrib3.4.3进行opencv-contrib编译。
本人环境:ubuntu16.04+opencv3.4.17+opencv-contrib3.4.17。

问题描述:

按照博客一步步走,在make99%出现如下error:

error: ‘phase_unwrapping’ in namespace ‘cv’ does not name a type
 typedef cv::phase_unwrapping::HistogramPhaseUnwrapping::Params HistogramPhaseUnwrapping_
             ^
error: ‘phase_unwrapping’ in namespace ‘cv’ does not name a type
 typedef cv::phase_unwrapping::HistogramPhaseUnwrapping::Params HistogramPhaseUnwrapping_
             ^
In file included from /home/yzh/opencv_src/opencv-3.4/build/modules/python_bindings_generator/pyopencv_custom_headers.h:7:0,
                 from /home/yzh/opencv_src/opencv-3.4/modules/python/src2/cv2.cpp:2066:
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/surface_matching/misc/python/pyopencv_ppf_match_3d.hpp:3:40: error: ‘ppf_match_3d’ was not declared in this scope
 template<> struct pyopencvVecConverter<ppf_match_3d::Pose3DPtr >
                                        ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/surface_matching/misc/python/pyopencv_ppf_match_3d.hpp:3:64: error: template argument 1 is invalid
 template<> struct pyopencvVecConverter<ppf_match_3d::Pose3DPtr >
                                                                ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/surface_matching/misc/python/pyopencv_ppf_match_3d.hpp:16:21: error: ‘ppf_match_3d’ was not declared in this scope
 typedef std::vector<ppf_match_3d::Pose3DPtr> vector_Pose3DPtr;
                     ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/surface_matching/misc/python/pyopencv_ppf_match_3d.hpp:16:44: error: template argument 1 is invalid
 typedef std::vector<ppf_match_3d::Pose3DPtr> vector_Pose3DPtr;
                                            ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/surface_matching/misc/python/pyopencv_ppf_match_3d.hpp:16:44: error: template argument 2 is invalid
In file included from /home/yzh/opencv_src/opencv-3.4/build/modules/python_bindings_generator/pyopencv_custom_headers.h:13:0,
                 from /home/yzh/opencv_src/opencv-3.4/modules/python/src2/cv2.cpp:2066:
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:4:40: error: ‘linemod’ was not declared in this scope
 template<> struct pyopencvVecConverter<linemod::Match>
                                        ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:4:54: error: template argument 1 is invalid
 template<> struct pyopencvVecConverter<linemod::Match>
                                                      ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:17:40: error: ‘linemod’ was not declared in this scope
 template<> struct pyopencvVecConverter<linemod::Template>
                                        ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:17:57: error: template argument 1 is invalid
 template<> struct pyopencvVecConverter<linemod::Template>
                                                         ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:30:40: error: ‘linemod’ was not declared in this scope
 template<> struct pyopencvVecConverter<linemod::Feature>
                                        ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:30:56: error: template argument 1 is invalid
 template<> struct pyopencvVecConverter<linemod::Feature>
                                                        ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:43:44: error: ‘linemod’ was not declared in this scope
 template<> struct pyopencvVecConverter<Ptr<linemod::Modality> >
                                            ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:43:61: error: template argument 1 is invalid
 template<> struct pyopencvVecConverter<Ptr<linemod::Modality> >
                                                             ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:43:63: error: template argument 1 is invalid
 template<> struct pyopencvVecConverter<Ptr<linemod::Modality> >
                                                               ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:56:21: error: ‘linemod’ was not declared in this scope
 typedef std::vector<linemod::Match> vector_Match;
                     ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:56:35: error: template argument 1 is invalid
 typedef std::vector<linemod::Match> vector_Match;
                                   ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:56:35: error: template argument 2 is invalid
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:57:21: error: ‘linemod’ was not declared in this scope
 typedef std::vector<linemod::Template> vector_Template;
                     ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:57:38: error: template argument 1 is invalid
 typedef std::vector<linemod::Template> vector_Template;
                                      ^
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:57:38: error: template argument 2 is invalid
/home/yzh/opencv_src/opencv-3.4/opencv_contrib-3.4.17/modules/rgbd/misc/python/pyopencv_linemod.hpp:58:21: error: ‘linemod’ was not declared in this scope
 typedef std::vector<linemod::Feature> vector_Feature;


error: ‘phase_unwrapping’ in namespace ‘cv’ does not name a type typedef cv::phase_unwrapping解决办法_第1张图片

解决方案:

在最开始的CMAKE-GUI里勾选ENABLE_CXX11
error: ‘phase_unwrapping’ in namespace ‘cv’ does not name a type typedef cv::phase_unwrapping解决办法_第2张图片

你可能感兴趣的:(计算机视觉,linux,opencv)