I need to calculate SURF features of a single specific point in the image using OpenCV. I am using SurfDescriptorExtractor to extract surf features, but it takes an array of keypoint as the arguemenet, which in turn was calculated by SurfFeatureDetector . Is there any way to use SurfDescriptorExtractor to calculate SURF feature of a single point?
Use push_back()
function to fill the std::vector
of cv::Keypoint
. In your case, this array contains only one element. You can run compute
function from class SurfDescriptorExtractor
on this array with :
void compute( const cv::Mat& image, std::vector<cv::KeyPoint>& keypoints, cv::Mat& descriptors ) const;
Note that: Row i is the descriptor for keypoint i.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.