Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

opencv_contrib compilation error: class has no member

Tags:

c++

opencv

ubuntu

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

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.

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

Thanks in advance

like image 601
Akshat Goyal Avatar asked Nov 25 '25 13:11

Akshat Goyal


1 Answers

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

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.

Your options here are:

  • 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
like image 152
ivan_pozdeev Avatar answered Nov 28 '25 02:11

ivan_pozdeev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!