Re: Opencv SURF

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Opencv-SURF-tp1554p1563.html

Hi Daniel,

I usually install OpenCV from source using these commands:
Extract opencv somewhere (~/opencv)
$ cd ~/opencv
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make
After 100% successfully built:
$ sudo make install
By default OpenCV is installed in ~/usr/local

Then go back to rtabmap source, erase everything in build then re-cmake/make/install again. Erasing everything in build make sure that previous build cache (where the previously OpenCV info is kept) is removed. When you do "cmake .." in rtabmap library, you would see at the status if OpenCV is built with nonfree or not. At this point, if opencv in /usr/local is correctly detected, you should see that it will build with nonfree support.

If OpenCV in /usr/local is still not detected. Remove the CMakeCache.txt of the build directory, then use this command (point out the folder in where OpenCVConfig.cmake is installed):
$ cd rtabmap/build
$ cmake -DOpenCV_DIR=/usr/local/share/OpenCV ..
$ make
$ sudo make install

For catkin packages (rtabmap_ros and find_object), do the same thing: erase ~/catkin_ws/build directory, then catkin_make again.

cheers