Ask Your Question
0

Make error about opencv_contrib 3.4.8

asked 2019-11-08 02:22:50 -0600

YancenBOB gravatar image

updated 2019-11-08 03:01:56 -0600

Hi. I want to install opencv_contrib in my Ubuntu 18.04. Before it, I have installed opencv 3.4.8. I have downloaded opencv_contrib with the same version and want to make install. I meet the problem you can see it below

/home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:595:9: error: ‘TLSData’ has not been declared TLSData<std::vector<keypoint> > &_tls_kpts_struct) ^~~~~~~ /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:595:16: error: expected ‘,’ or ‘...’ before ‘<’ token TLSData<std::vector<keypoint> > &_tls_kpts_struct) ^ /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:699:5: error: ‘TLSData’ does not name a type; did you mean ‘UMatData’? TLSData<std::vector<keypoint> > &tls_kpts_struct; ^~~~~~~ UMatData /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp: In constructor ‘cv::xfeatures2d::findScaleSpaceExtremaComputer::findScaleSpaceExtremaComputer(int, int, int, int, int, int, int, double, double, double, const std::vector<cv::mat>&, const std::vector<cv::mat>&, int)’: /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:609:11: error: class ‘cv::xfeatures2d::findScaleSpaceExtremaComputer’ does not have any field named ‘tls_kpts_struct’ tls_kpts_struct(_tls_kpts_struct) { } ^~~~~~~~~~~~~~~ /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:609:27: error: ‘_tls_kpts_struct’ was not declared in this scope tls_kpts_struct(_tls_kpts_struct) { } ^~~~~~~~~~~~~~~~ /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:609:27: note: suggested alternative: ‘__locale_struct’ tls_kpts_struct(_tls_kpts_struct) { } ^~~~~~~~~~~~~~~~ __locale_struct /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp: In member function ‘virtual void cv::xfeatures2d::findScaleSpaceExtremaComputer::operator()(const cv::Range&) const’: /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:622:43: error: ‘tls_kpts_struct’ was not declared in this scope std::vector<keypoint> tls_kpts = tls_kpts_struct.get(); ^~~~~~~~~~~~~~~ /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:622:43: note: suggested alternative: ‘tls_kpts’ std::vector<keypoint> *tls_kpts = tls_kpts_struct.get(); ^~~~~~~~~~~~~~~ tls_kpts /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp: In member function ‘void cv::xfeatures2d::SIFT_Impl::findScaleSpaceExtrema(const std::vector<cv::mat>&, const std::vector<cv::mat>&, std::vector<cv::keypoint>&) const’: /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:712:5: error: ‘TLSData’ was not declared in this scope TLSData<std::vector<keypoint> > tls_kpts_struct; ^~~~~~~ /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:712:5: note: suggested alternative: ‘UMatData’ TLSData<std::vector<keypoint> > tls_kpts_struct; ^~~~~~~ UMatData /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:712:35: error: expected primary-expression before ‘>’ token TLSData<std::vector<keypoint> > tls_kpts_struct; ^ /home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp:712:37: error: ‘tls_kpts_struct’ was not declared in this scope TLSData<std::vector<keypoint> > tls_kpts_struct; ^~~~~~~~~~~~~~~ modules/world/CMakeFiles/opencv_world.dir/build.make:12840: recipe for target 'modules/world/CMakeFiles/opencv_world.dir/home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d/src/sift.cpp.o' failed make[2]: [modules/world/CMakeFiles/opencv_world.dir/home/unicore/others/opencv-3.4/opencv_contrib-3.4.8/modules/xfeatures2d ...

(more)
edit retag flag offensive close merge delete

Comments

1

please be so nice to us, and replace the useless screenshot(s) with a TEXT version, thank you.

berak gravatar imageberak ( 2019-11-08 02:51:32 -0600 )edit
2

I change the image to txt words.

YancenBOB gravatar imageYancenBOB ( 2019-11-08 03:02:09 -0600 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2019-11-08 03:13:29 -0600

berak gravatar image

you need EXACTLY the same opencv and opencv_contrib versions (3.4.8 vs. master) so either:

  • download or checkout 3.4.8 for opencv_contrib (so both are at 3.4.8) or
  • upgrade your main opencv repo to latest master branch

then, clean your build folder, and rerun cmake && make install

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-11-08 02:22:50 -0600

Seen: 2,059 times

Last updated: Nov 08 '19