opencv_contrib编译错误:类没有成员 [英] opencv_contrib compilation error: class has no member

查看:215
本文介绍了opencv_contrib编译错误:类没有成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须实现SURF算法进行图像拼接.我在使用库时遇到问题,如

I have to implement the SURF algorithm for image stitching. I was having trouble with the libraries, as listed here

尝试了我能找到的解决方案后,我删除了opencv并开始从头开始构建.我试图在安装过程中包括"opencv_contrib"库,但没有用.

After trying the solutions I could find, I removed the opencv and started to build from scratch. I tried to include the 'opencv_contrib' library during installation, but it didn't work.

所以我安装了opencv,然后尝试集成软件包,如int他 github存储库所述.包裹.在
使-j2 行,我不断收到以下错误.

So I installed opencv, and then tried to integrate the package as told int he github repository of the package. During the
make -j2 line, I keep getting the following error.

[ 77%] Building CXX object modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/sparse_match_interpolators.cpp.o
In file included from /home/akshat/OpenCV/opencv-3.0.0/modules/core/include/opencv2/core.hpp:54:0,
                 from /home/akshat/OpenCV/opencv-3.0.0/build/modules/ximgproc/precomp.hpp:40:
/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp: In member function ‘virtual void cv::ximgproc::EdgeAwareInterpolatorImpl::interpolate(cv::InputArray, cv::InputArray, cv::InputArray, cv::InputArray, cv::OutputArray)’:
/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp:171:52: error: ‘const class cv::_InputArray’ has no member named ‘isVector’
     CV_Assert( !from_points.empty() && from_points.isVector() &&
                                                    ^
/home/akshat/OpenCV/opencv-3.0.0/modules/core/include/opencv2/core/base.hpp:389:33: note: in definition of macro ‘CV_Assert’
 #define CV_Assert( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ )
                                 ^
/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp:172:52: error: ‘const class cv::_InputArray’ has no member named ‘isVector’
                !to_points  .empty() && to_points  .isVector() &&
                                                    ^
/home/akshat/OpenCV/opencv-3.0.0/modules/core/include/opencv2/core/base.hpp:389:33: note: in definition of macro ‘CV_Assert’
 #define CV_Assert( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ )
                                 ^
make[2]: *** [modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/src/sparse_match_interpolators.cpp.o] Error 1
make[1]: *** [modules/ximgproc/CMakeFiles/opencv_ximgproc.dir/all] Error 2
make: *** [all] Error 2

预先感谢

推荐答案

/home/akshat/opencv_contrib/modules/ximgproc/src/sparse_match_interpolators.cpp:171:52: error: ‘const class cv::_InputArray’ has no member named ‘isVector’

证明这是版本不兼容. ximgproc中的代码期望与cv(特别是cv::_InputArray)不同的接口,而不是库存中提供的接口.

testifies this is a version incompatibility. The code in ximgproc expects a different interface from cv (specifically, cv::_InputArray) than the one your stock one is providing.

您的选择如下:

  • 尝试与已安装的cv版本相对应的opencv-contrib代码库版本.
  • 再次尝试构建与您当前的opencv-contrib相对应的更新的cv
  • try the version of the opencv-contrib codebase that corresponds to your installed version of cv
  • make yet another attempt to build the newer cv that corresponds to your current opencv-contrib

这篇关于opencv_contrib编译错误:类没有成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆