I've tried a few times but most guides out there only tell you how to install it AFTER you've built OpenCV. I've had 2 unsuccessful attempts doing it this way and it's been a lot of work to do it this way, so
There is an answer by Berak on the opencv forums to this question, quoted below. Essentially you can pull it down from Git, add it during the cmake process and you are good to go.
Beraks answer:
in 3.0, SIFT and SURF were moved to the opencv_contrib repo
you will need to clone/fork/download that, and add that to your (main opencv) cmake;
cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules
then, after building,
#include "opencv2/xfeatures2d/nonfree.hpp" Ptr<xfeatures2d::SURF> surf = xfeatures2d::SURF::create(); // note extra namespace surf->detect(...); surf->compute(...);
don't forget to link to opencv_xfeatures2d(.lib)
Also, in answer to Question #4. OpenCV 3.0 is fine, I wouldn't say it was unreliable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With