Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to use xfeatures2d surf in opencv?


Asked by Kristopher Roberson on Dec 08, 2021 FAQ



More... Inheritance diagram for cv::xfeatures2d::SURF: Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). More... Detects keypoints in an image (first variant) or image set (second variant).
Indeed,
SURF in OpenCV . OpenCV provides SURF functionalities just like SIFT. You initiate a SURF object with some optional conditions like 64/128-dim descriptors, Upright/Normal SURF etc. All the details are well explained in docs. Then as we did in SIFT, we can use SURF.detect(), SURF.compute() etc for finding keypoints and descriptors.
Additionally, SIFT and SURF are no longer included in OpenCV Version >= 3. If you want to use them you have to manually compile OpenCV with contrib-modules and OPENCV_ENABLE_NONFREE CMake flag turned on. – daB0bby Aug 15 '19 at 9:02
Moreover,
For example, if you match images from a stereo pair, or do image stitching, the matched features likely have very similar angles, and you can speed up feature extraction by setting upright=1. member double hessianThreshold Threshold for the keypoint detector.
In fact,
With OpenCV 3 came a big push to move many of these “non-free” modules out of the default OpenCV install and into the opencv_contrib package. The packages contains implementations of algorithms that are either patented or in experimental development.