Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to build opencv3 branch of this repo but getting error: opencv2/xfeatures2d.hpp: No such file or directory #16

Open
raghavk92 opened this issue Aug 3, 2018 · 1 comment

Comments

@raghavk92
Copy link

raghavk92 commented Aug 3, 2018

Hi,
I wanted to use the but_velodyne repo . For that i need to install this first. When i try to install this on ros melodic on debian stretch i get the error below. I tried to search why this error is coming where it says that it may be because the opencv contrib modules may not be installed and need to be recompiled with source. But i got the opencv 3.2.0 version with the ros melodic installation so how do i install the contrib modules to an existing installation of opencv which i didnt build from source.

i found these two links: http://wiki.ros.org/opencv3 and https://github.com/ros-gbp/opencv3-release which maybe helpful in resolving this error but there is no mention of melodic in them and i dont know how to use them .I am new to ros so i may be wrong. Please help . Thanks

The error trace is below:

[ 43%] Built target but_velodyne
[ 50%] Built target show_correspondences
[ 56%] Built target collar-lines-odom
[ 62%] Built target register-loops
[ 68%] Built target verify-loops
[ 75%] Built target show-kitti-poses
[ 81%] Built target find-loops-vfh
[ 87%] Built target extract-vfh
[ 93%] Built target slampp-solution-to-poses
[ 96%] Building CXX object CMakeFiles/sac-visual-registration.dir/src/apps/sac-visual-registration.o
/mnt/c/Users/KellyServices/Documents/awswork/rosfiles/testing/but_velodyne_lib/src/apps/sac-visual-registration.cpp:35:39: fatal error: opencv2/xfeatures2d.hpp: No such file or directory
     #include "opencv2/xfeatures2d.hpp"
                                       ^
compilation terminated.
CMakeFiles/sac-visual-registration.dir/build.make:62: recipe for target 'CMakeFiles/sac-visual-registration.dir/src/apps/sac-visual-registration.o' failed
make[2]: *** [CMakeFiles/sac-visual-registration.dir/src/apps/sac-visual-registration.o] Error 1
CMakeFiles/Makefile2:400: recipe for target 'CMakeFiles/sac-visual-registration.dir/all' failed
make[1]: *** [CMakeFiles/sac-visual-registration.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
@martin-velas
Copy link
Contributor

Hmm - I have no experiences with building opencv_contrib with pre-installed OpenCV. But - I can suggest you a workaround - comment the lines 92 and 93 in CMakeLists.txt:
add_executable(sac-visual-registration src/apps/sac-visual-registration.cpp) target_link_libraries(sac-visual-registration but_velodyne)
In case you do not need this specific app, you should be OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants