I am writing a course assignment in computer vision and navigation techniques on the extraction and matching of sift and surf features. Because there are direct functions in opencv that can be called.
Regarding the characteristics of SIFT and SURF, in the nonfree module of opencv, you can know "not free" from the literal meaning, and the US emperor's patent awareness is still quite strong. The reason is that the two feature algorithms sift and surf have already applied for patents in the United States.
The default installation of opencv does not install the nonfree module, which requires additional installation. But in fact the header file of opencv2/nonfree/nonfree.hpp is there, I guess the library file is not installed.
When you call the nonfree module, the following error will be reported
fatal error: opencv2/nonfree/nonfree.hpp: No such file or directory
For the opencv2.x version, it is still easy to install under the ubuntu system. Just install by following command
sudo apt-get update sudo add-apt-repository --yes ppa:xqms/opencv-nonfree sudo apt-get update sudo apt-get install libopencv-nonfree-dev
For opencv3.x version
In opecv3.0, SURF/SIFT and a few other things were moved to a separate library (opencv_contrib repo)
For details, please refer to the blog post
https://blog.csdn.net/zhounanzhaode/article/details/50302385