并行 SURF 和 SIFT 计算

Parallel SURF and SIFT computing

本文关键字:计算 SIFT SURF 并行      更新时间:2023-10-16

如何加快 SURF 和 SIFT 操作?我知道我应该使用TBB,但我应该使用TBB的什么功能?也许parallel_for?我得到了代码:int minHessian = 400;

SurfFeatureDetector detector( minHessian );
std::vector<KeyPoint> keypoints_object, keypoints_scene;
detector.detect( img_object, keypoints_object );
detector.detect( img_scene, keypoints_scene );
//-- Step 2: Calculate descriptors (feature vectors)
SurfDescriptorExtractor extractor;
Mat descriptors_object, descriptors_scene;
extractor.compute( img_object, keypoints_object, descriptors_object );
extractor.compute( img_scene, keypoints_scene, descriptors_scene );
//-- Step 3: Matching descriptor vectors using FLANN matcher
FlannBasedMatcher matcher;
std::vector< DMatch > matches;
matcher.match( descriptors_object, descriptors_scene, matches );

文档说SURF内部使用TBB,所以你应该在支持TBB的情况下构建OpenCV。